[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updated misc/buffer port



Here's an update for the port of misc/buffer, which seems to have
been abandoned across *BSD and which suffered from bit rot and general
uncleanliness. It's long gone from the original MASTER_SITE given in the
old port and seems to survive only as a distfile among various *BSD and
Linux distributions.

Builds and apparently works on OpenBSD/sparc and FreeBSD/i386.

----------------
diff -uNr --exclude=CVS /usr/ports/misc/buffer/Makefile buffer/Makefile
--- /usr/ports/misc/buffer/Makefile	Thu Dec 18 00:11:45 1997
+++ buffer/Makefile	Thu Mar 11 18:24:01 1999
@@ -8,11 +8,12 @@
 
 DISTNAME=       buffer-1.17
 CATEGORIES=	misc
-MASTER_SITES=   ftp://ftp.sun.ac.za/pub/unix/misc/
+MASTER_SITES=	ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/ \
+		ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/
 
-MAINTAINER=	joey_(_at_)_OpenBSD_(_dot_)_ORG
+MAINTAINER=	naddy_(_at_)_unix-ag_(_dot_)_uni-kl_(_dot_)_de
 
 NO_WRKSUBDIR=	yes
-MANL=		buffer.l
+MAN1=		buffer.1
 
 .include <bsd.port.mk>
diff -uNr --exclude=CVS /usr/ports/misc/buffer/files/md5 buffer/files/md5
--- /usr/ports/misc/buffer/files/md5	Fri Mar  5 18:19:06 1999
+++ buffer/files/md5	Fri Nov 17 20:03:48 1995
@@ -1,3 +1 @@
 MD5 (buffer-1.17.tar.gz) = 6c5236ed99f4df0832623f4c0498c681
-RMD160 (buffer-1.17.tar.gz) = 5316d3641153e76531fd60cf5bf0c07b7d1aaf8a
-SHA1 (buffer-1.17.tar.gz) = 3806a74da185763098627914d1152f1df1e44702
diff -uNr --exclude=CVS /usr/ports/misc/buffer/patches/patch-aa buffer/patches/patch-aa
--- /usr/ports/misc/buffer/patches/patch-aa	Thu Dec 18 00:11:45 1997
+++ buffer/patches/patch-aa	Thu Mar 11 18:55:25 1999
@@ -1,31 +1,42 @@
-diff -udr buffer.ORG/Makefile buffer/Makefile
---- buffer.ORG/Makefile	Wed Jul 14 17:59:17 1993
-+++ Makefile	Thu Nov 16 20:09:23 1995
-@@ -8,7 +8,7 @@
+--- Makefile.orig	Wed Jul 14 17:59:17 1993
++++ Makefile	Thu Mar 11 18:51:57 1999
+@@ -4,13 +4,13 @@
+ #   You should also add -DSYS5 for Ultrix, AIX, and Solarix.
+ # Add -DDEF_SHMEM=n if you can only have n bytes of shared memory
+ #   (eg: -DDEF_SHMEM=524288 if you can only have half a meg.)
+-CFLAGS=
++CFLAGS+=
  
  # Where to install buffer and its manual pages
- INSTBIN=/usr/local/bin
+-INSTBIN=/usr/local/bin
 -INSTMAN=/usr/man/manl
-+INSTMAN=/usr/local/man/manl
++INSTBIN=${PREFIX}/bin
++INSTMAN=${PREFIX}/man/man1
  # The manual page section (normally l or 1)
- S=l
+-S=l
++S=1
  
-diff -udr buffer.ORG/buffer.c buffer/buffer.c
---- buffer.ORG/buffer.c	Wed Jul 14 17:59:17 1993
-+++ buffer.c	Fri Nov 17 20:23:58 1995
-@@ -384,6 +384,7 @@
- }
- 
- /* The interrupt handler */
-+void
- shutdown()
- {
- 	static int shutting;
-@@ -400,6 +401,7 @@
- }
- 
- /* Shutdown because the child has ended */
-+void
- child_shutdown()
- {
- 	/* Find out which child has died.  (They may not be my
+ RM=/bin/rm
+ ALL=README buffer.man Makefile buffer.c sem.c COPYING
+@@ -18,18 +18,14 @@
+ all: buffer
+ 
+ buffer: buffer.o sem.o
+-	$(CC) -o buffer $(CFLAGS) buffer.o sem.o
++	$(CC) -o buffer buffer.o sem.o
+ 
+ clean:
+ 	$(RM) -f *.o core buffer .merrs
+ 
+ install: buffer
+-	rm -f $(INSTBIN)/buffer
+-	cp buffer $(INSTBIN)/buffer
+-	chmod 111 $(INSTBIN)/buffer
+-	rm -f $(INSTMAN)/buffer.$S
+-	cp buffer.man $(INSTMAN)/buffer.$S
+-	chmod 444 $(INSTMAN)/buffer.$S
++	${BSD_INSTALL_PROGRAM} buffer $(INSTBIN)/buffer
++	${BSD_INSTALL_MAN} buffer.man $(INSTMAN)/buffer.$S
+ 
+ buffer.tar: $(ALL)
+ 	$(RM) -f buffer.tar
diff -uNr --exclude=CVS /usr/ports/misc/buffer/patches/patch-ab buffer/patches/patch-ab
--- /usr/ports/misc/buffer/patches/patch-ab	Thu Jan  1 01:00:00 1970
+++ buffer/patches/patch-ab	Thu Mar 11 03:25:38 1999
@@ -0,0 +1,18 @@
+--- buffer.c.orig	Wed Jul 14 17:59:17 1993
++++ buffer.c	Thu Mar 11 02:55:42 1999
+@@ -384,6 +384,7 @@
+ }
+ 
+ /* The interrupt handler */
++void
+ shutdown()
+ {
+ 	static int shutting;
+@@ -400,6 +401,7 @@
+ }
+ 
+ /* Shutdown because the child has ended */
++void
+ child_shutdown()
+ {
+ 	/* Find out which child has died.  (They may not be my
diff -uNr --exclude=CVS /usr/ports/misc/buffer/patches/patch-ac buffer/patches/patch-ac
--- /usr/ports/misc/buffer/patches/patch-ac	Thu Jan  1 01:00:00 1970
+++ buffer/patches/patch-ac	Thu Mar 11 03:37:08 1999
@@ -0,0 +1,32 @@
+--- buffer.man.orig	Wed Jul 14 17:59:16 1993
++++ buffer.man	Thu Mar 11 03:36:46 1999
+@@ -37,7 +37,7 @@
+ Use the given file as the output file.  The default is stdout.
+ .TP
+ .B \-S size
+-After every chunk this size has been writen print out how much been writen so far.
++After every chunk this size has been written, print out how much been written so far.
+ By default this is not set.
+ .TP
+ .B \-s size
+@@ -71,9 +71,9 @@
+ throughput on some drives.)
+ .TP
+ .B \-B
+-Force each block writen to be padded out to the blocksize.  This is needed by some tape
++Force each block written to be padded out to the blocksize.  This is needed by some tape
+ and cartridge drives.  Defaults to unpadded.  This only affects the
+-last block writen.
++last block written.
+ .TP
+ .B \-t
+ On exiting print to stderr a brief message showing the total number of
+@@ -82,7 +82,7 @@
+ .B \-Z
+ If reading/writing directly to a character device (like a tape drive)
+ then after each gigabyte perform an lseek to the start of the file.
+-Use this flag with extreme care.  If can only be used on devices where
++Use this flag with extreme care.  It can only be used on devices where
+ an lseek does not rewind the tape but does reset the kernels position
+ flags.  It is used to allow more than 2 gigabytes to be written.
+ .PP
diff -uNr --exclude=CVS /usr/ports/misc/buffer/pkg/COMMENT buffer/pkg/COMMENT
--- /usr/ports/misc/buffer/pkg/COMMENT	Thu Dec 18 00:11:45 1997
+++ buffer/pkg/COMMENT	Thu Mar 11 03:00:54 1999
@@ -1 +1 @@
-buffer sporadic binary I/O for faster tape use
+Buffer sporadic binary I/O for faster tape use.
diff -uNr --exclude=CVS /usr/ports/misc/buffer/pkg/DESCR buffer/pkg/DESCR
--- /usr/ports/misc/buffer/pkg/DESCR	Thu Dec 18 00:11:45 1997
+++ buffer/pkg/DESCR	Thu Mar 11 19:10:19 1999
@@ -1,27 +1,18 @@
-This is a program designed to speed up writing tapes on remote tape
-drives.  Requirements are shared memory and locks which normally
-means that these are supported in your kernel.
+Buffer reads from standard input reblocking to the given blocksize
+and writes each block to standard output.
 
-[for FreeBSD, this means you MUST have a kernel with 
- options SYSVSHM
- compiled in - markm]
+Internally, buffer is a pair of processes communicating via a large
+circular queue held in shared memory. This means you *must* have a
+kernel with
+
+  options SYSVSHM
+
+compiled in. The reader process only has to block when the queue
+is full and the writer process when the queue is empty. Buffer is
+designed to try and keep the writer side continuously busy so that
+it can stream when writing to tape drives. When used to write tapes
+with an intervening network, buffer can result in a considerable
+increase in throughput.
 
-Buffer has been tested under OpenBSD SunOS 4.0.*, SunOS 4.1.*, Solarix,
-HP-UX 7.0, and Gould UTX 2.1A (sv universe).
-
-The program splits itself into two processes.  The first process reads
-(and reblocks) from stdin into a shared memory buffer.  The second
-writes from the shared memory buffer to stdout.  Doing it this way
-means that the writing side effectly sits in a tight write loop and
-doesn't have to wait for input.  Similarly for the input side.  It is
-this waiting that slows down other reblocking processes, like dd.
-
-I run an archive and need to write large chunks out to tape regularly
-with an ethernet in the way.  Using 'buffer' in a command like:
-
-	tar cvf - stuff | rsh somebox "buffer > /dev/rst8"
-
-is a factor of 5 faster than the best alternative, gnu tar with its
-remote tape option:
-
-	tar cvf somebox:/dev/rst8 stuff
+- Christian "naddy" Weisgerber
+  <naddy_(_at_)_unix-ag_(_dot_)_uni-kl_(_dot_)_de>
diff -uNr --exclude=CVS /usr/ports/misc/buffer/pkg/PLIST buffer/pkg/PLIST
--- /usr/ports/misc/buffer/pkg/PLIST	Thu Dec 18 00:11:45 1997
+++ buffer/pkg/PLIST	Thu Mar 11 18:54:21 1999
@@ -1,2 +1,2 @@
 bin/buffer
-man/manl/buffer.l
+man/man1/buffer.1

-- 
Christian "naddy" Weisgerber                     naddy_(_at_)_unix-ag_(_dot_)_uni-kl_(_dot_)_de



Visit your host, monkey.org