Import mbuffer-20140310 into pkgsrc, packaged by Brian Bennett.

mbuffer is a tool for buffering data streams with a large set of
unique features:

 * direct support for TCP based network targets (IPv4 and IPv6)
 * ability to send to multiple targets in parallel (distribution mode)
 * support for multiple volumes
 * I/O rate limitation
 * high/low watermark based restart criteria
 * configurable buffer size
 * on the fly MD5 hash calculation
 * highly efficient, multi-threaded implementation

It is especially useful, if you are writing backups to fast tape drives
or libraries.
This commit is contained in:
jperkin 2014-05-08 11:21:24 +00:00
parent 34152738e1
commit 7145e61354
7 changed files with 84 additions and 0 deletions

5
misc/mbuffer/DESCR Normal file
View file

@ -0,0 +1,5 @@
The mbuffer tool is used to buffer data streams and show the I/O rate
and summary to the user. It is especially useful for writing backups to
fast tape drives or streaming them over the network. If used correctly,
it can prevent buffer underruns and speed up the whole backup or
transfer process.

17
misc/mbuffer/Makefile Normal file
View file

@ -0,0 +1,17 @@
# $NetBSD: Makefile,v 1.1 2014/05/08 11:21:24 jperkin Exp $
DISTNAME= mbuffer-20140310
CATEGORIES= misc
MASTER_SITES= http://www.maier-komor.de/software/mbuffer/
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.maier-komor.de/mbuffer.html
COMMENT= Tool for buffering data streams
LICENSE= gnu-gpl-v3
NOT_FOR_PLATFORM= NetBSD-*-* # Needs sysctl bits
GNU_CONFIGURE= yes
.include "../../mk/bsd.pkg.mk"

3
misc/mbuffer/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 2014/05/08 11:21:24 jperkin Exp $
bin/mbuffer
man/man1/mbuffer.1

8
misc/mbuffer/distinfo Normal file
View file

@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.1 2014/05/08 11:21:24 jperkin Exp $
SHA1 (mbuffer-20140310.tgz) = 6646a7391470ee120bd8fdb754e16984d737f4e0
RMD160 (mbuffer-20140310.tgz) = 2c67c3c0c6d87ea1c0bcfa6abe94d3d14e9db146
Size (mbuffer-20140310.tgz) = 122422 bytes
SHA1 (patch-Makefile.in) = 81118c470367b0136f868f8ccb0f35e3c389150c
SHA1 (patch-configure) = e92b735b8ca0e03ee011522ce247bf3f242614f4
SHA1 (patch-network.c) = 6d5b5a937ce71482b1b2f13cf0a3d8b2d8b45e4f

View file

@ -0,0 +1,21 @@
$NetBSD: patch-Makefile.in,v 1.1 2014/05/08 11:21:24 jperkin Exp $
Fix install permissions.
--- Makefile.in.orig 2014-03-10 22:41:15.000000000 +0000
+++ Makefile.in
@@ -39,10 +39,10 @@ distclean: clean
config.status Makefile mbuffer.1 core
install: $(TARGET)
- -$(INSTALL) -d $(DESTDIR)$(bindir)
- $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
- -$(INSTALL) -d $(DESTDIR)$(mandir)
- $(INSTALL) mbuffer.1 $(DESTDIR)$(mandir)
+ -$(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
+ $(BSD_INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ -$(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(mandir)
+ $(BSD_INSTALL_MAN) mbuffer.1 $(DESTDIR)$(mandir)
lint:
lint $(DEFS) $(SOURCES)

View file

@ -0,0 +1,15 @@
$NetBSD: patch-configure,v 1.1 2014/05/08 11:21:24 jperkin Exp $
Portability fix.
--- configure.orig 2014-05-08 10:26:55.008091173 +0000
+++ configure
@@ -3841,7 +3841,7 @@ fi
else
SUNCCVERSION=`${CC} -V 2>&1 | grep Sun`
SUNCC=$?
- if test "${SUNCC}" == "0" ; then
+ if test "${SUNCC}" = "0" ; then
CFLAGS="${CFLAGS} -O"
cflags_tmp="$CFLAGS"
HAS_M64=`${CC} -flags | grep m64`

View file

@ -0,0 +1,15 @@
$NetBSD: patch-network.c,v 1.1 2014/05/08 11:21:24 jperkin Exp $
Portability fix.
--- network.c.orig 2014-03-10 22:41:15.000000000 +0000
+++ network.c
@@ -114,7 +114,7 @@ void initNetworkInput(const char *addr)
hint.ai_family = AddrFam;
hint.ai_protocol = IPPROTO_TCP;
hint.ai_socktype = SOCK_STREAM;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
hint.ai_flags = AI_ADDRCONFIG;
#else
hint.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;