Changeset 551 in ProjectBuilder for projects/buffer/pbconf


Ignore:
Timestamp:
Sep 20, 2008, 2:21:10 AM (16 years ago)
Author:
Bruno Cornec
Message:

Fedora fixes for buffer in order to submit it for inclusion

Location:
projects/buffer/pbconf/1.19
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • projects/buffer/pbconf/1.19/buffer.pb

    r501 r551  
    1717#pburl buffer = dir:///src/buffer-devel
    1818#
    19 #pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz
    20 pburl buffer = file:///home/bruno/Work/bruno/mandriva/buffer/SOURCES/buffer-1.19.tar.bz2
     19pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz
     20#pburl buffer = file:///home/bruno/Work/bruno/mandriva/buffer/SOURCES/buffer-1.19.tar.bz2
    2121
    2222# Repository
  • projects/buffer/pbconf/1.19/buffer/pbpatch/01-debian-patches.all

    r501 r551  
    1 --- buffer-1.19.orig/buffer.man
    2 +++ buffer-1.19/buffer.man
    3 @@ -37,7 +37,8 @@
    4  Use the given file as the output file.  The default is stdout.
    5  .TP
    6  .B \-S size
    7 -After every chunk this size has been writen print out how much been writen so far.
    8 +After every chunk of this size has been written, print out how much has
    9 +been written so far. Also prints the total througput.
    10  By default this is not set.
    11  .TP
    12  .B \-s size
    13 @@ -71,9 +72,9 @@
    14  throughput on some drives.)
    15  .TP
    16  .B \-B
    17 -Force each block writen to be padded out to the blocksize.  This is needed by some tape
    18 +Force each block written to be padded out to the blocksize.  This is needed by some tape
    19  and cartridge drives.  Defaults to unpadded.  This only affects the
    20 -last block writen.
    21 +last block written.
    22  .TP
    23  .B \-t
    24  On exiting print to stderr a brief message showing the total number of
    25 @@ -82,7 +83,7 @@
    26  .B \-Z
    27  If reading/writing directly to a character device (like a tape drive)
    28  then after each gigabyte perform an lseek to the start of the file.
    29 -Use this flag with extreme care.  If can only be used on devices where
    30 +Use this flag with extreme care.  It can only be used on devices where
    31  an lseek does not rewind the tape but does reset the kernels position
    32  flags.  It is used to allow more than 2 gigabytes to be written.
    33  .PP
    34 --- buffer-1.19.orig/buffer.c
    35 +++ buffer-1.19/buffer.c
    36 @@ -78,7 +78,7 @@
     1diff -urNp buffer-1.19.orig/buffer.c buffer-1.19/buffer.c
     2--- buffer-1.19.orig/buffer.c   2000-01-04 03:46:11.000000000 +0100
     3+++ buffer-1.19/buffer.c    2008-09-20 01:19:18.000000000 +0200
     4@@ -81,7 +81,7 @@
    375  * Christoph Wicki <wicki@iis.ethz.ch>
    386  *
     
    4311  * Revision 1.6  1992/04/07  19:57:30  lmjm
    4412  * Added Kevins -B and -p options.
    45 @@ -93,7 +93,7 @@
     13@@ -96,7 +96,7 @@
    4614  * Make sofar printing size an option.
    4715  *
     
    5220  * Now tries to fill this with blocks.
    5321  * reader waits for writer to terminate and then frees the shared mem and sems.
    54 @@ -109,6 +109,9 @@
     22@@ -112,6 +112,9 @@
    5523  * Initial revision
    5624  *
     
    6230 #include <stdio.h>
    6331 #include <signal.h>
    64 @@ -120,15 +123,16 @@
     32@@ -123,15 +126,16 @@
    6533 #include <sys/shm.h>
    6634 #include <sys/sem.h>
     
    7038 
    7139 #ifndef lint
    72  static char *rcsid = "$Header: /a/swan/home/swan/staff/csg/lmjm/src/buffer/RCS/buffer.c,v 1.19 1995/08/24 17:46:28 lmjm Exp lmjm $";
     40 static char *rcsid = "$Header: /usr/src/build/buffer/buffer.c,v 1.1 2000/01/04 02:45:48 root Exp $";
    7341 #endif
    7442 
     
    8149 /* General macros */
    8250 #define TRUE 1
    83 @@ -136,6 +140,14 @@
     51@@ -139,6 +143,14 @@ extern char *shmat();
    8452 #define K *1024
    8553 #define M *1024*1024
     
    9664 void byee();
    9765 void start_reader_and_writer();
    98 @@ -159,7 +171,7 @@
     66@@ -162,7 +174,7 @@ void write_block_to_stdout();
    9967 void pr_out();
    10068 void end_writer();
     
    10573 #define PRINT_EVERY 10 K
    10674 
    107 @@ -250,7 +262,9 @@
     75@@ -253,7 +265,9 @@ char *progname = "buffer";
    10876 
    10977 char print_total = 0;
     
    11684 int
    11785 main( argc, argv )
    118 @@ -262,6 +276,8 @@
     86@@ -265,6 +279,8 @@ main( argc, argv )
    11987    set_handlers();
    12088 
     
    12593    start_reader_and_writer();
    12694 
    127 @@ -287,7 +303,7 @@
     95@@ -290,7 +306,7 @@ parse_args( argc, argv )
    12896 
    12997    while( (c = getopt( argc, argv, "BS:Zdm:s:b:p:u:ti:o:z:" )) != -1 ){
     
    134102            break;
    135103        case 'u': /* pause after write for given microseconds */
    136 @@ -384,8 +400,8 @@
     104@@ -387,8 +403,8 @@ parse_args( argc, argv )
    137105            fprintf( stderr, "Usage: %s [-B] [-t] [-S size] [-m memsize] [-b blocks] [-p percent] [-s blocksize] [-u pause] [-i infile] [-o outfile] [-z size]\n",
    138106                progname );
     
    145113            fprintf( stderr, "-b num = number of blocks in queue\n" );
    146114            fprintf( stderr, "-p percent = don't start writing until percent blocks filled\n" );
    147 @@ -397,6 +413,11 @@
     115@@ -400,6 +416,11 @@ parse_args( argc, argv )
    148116            byee( -1 );
    149117        }
     
    157125    if (zflag) showevery = blocksize;
    158126 
    159 @@ -507,9 +528,9 @@
     127@@ -510,9 +531,9 @@ buffer_allocate()
    160128    get_buffer();
    161129 
     
    169137 #ifdef SYS5
    170138    memset( (char *)pbuffer, '\0', buffer_size );
    171 @@ -528,7 +549,17 @@
     139@@ -531,7 +552,17 @@ buffer_allocate()
    172140    pbuffer->blocks_free_lock = 1;
    173141    /* start this off so lock() can be called on it for each block
     
    187155    /* Detattach the shared memory so the fork doesnt do anything odd */
    188156    shmdt( (char *)pbuffer );
    189 @@ -648,7 +679,7 @@
     157@@ -651,7 +682,7 @@ get_next_free_block()
    190158 int
    191159 fill_block()
     
    196164    int toread;
    197165    static char eof_reached = 0;
    198 @@ -707,7 +738,7 @@
     166@@ -710,7 +741,7 @@ writer()
    199167 {
    200168    int filled = 0;
     
    205173    if( debug )
    206174        fprintf( stderr, "\tW: Entering writer\n blocks = %d\n maxfilled = %d\n",
    207 @@ -742,7 +773,7 @@
     175@@ -745,7 +776,7 @@ writer()
    208176    }
    209177 
     
    214182 
    215183    if( debug )
    216 @@ -783,14 +814,14 @@
     184@@ -786,14 +817,14 @@ write_blocks_to_stdout( filled, first_bl
    217185 void
    218186 write_block_to_stdout()
     
    232200        next_k = showevery;
    233201    }
    234 @@ -798,7 +829,7 @@
     202@@ -801,7 +832,7 @@ write_block_to_stdout()
    235203    if( (written = write( fdout, curr_block->data, curr_block->bytes )) != curr_block->bytes ){
    236204        report_proc();
     
    241209    }
    242210 
    243 @@ -825,7 +856,7 @@
     211@@ -828,7 +859,7 @@ write_block_to_stdout()
    244212    }
    245213    if( showevery ){
     
    250218        if( outk >= next_k ){
    251219            pr_out();
    252 @@ -914,13 +945,12 @@
     220@@ -917,13 +948,12 @@ int
    253221 do_size( arg )
    254222    char *arg;
     
    268236    case 'M':
    269237        ret = ret K K;
    270 @@ -941,7 +971,36 @@
     238@@ -944,7 +974,36 @@ do_size( arg )
    271239 void
    272240 pr_out()
     
    306274 
    307275 #ifdef SYS5
    308 --- buffer-1.19.orig/sem.c
    309 +++ buffer-1.19/sem.c
    310 @@ -27,6 +27,7 @@
    311   * semaphores */
    312  
    313  #include <stdio.h>
    314 +#include <unistd.h>
    315  #include <sys/types.h>
    316  #include <sys/stat.h>
    317  #include <sys/ipc.h>
    318 @@ -34,6 +35,20 @@
    319  #include <errno.h>
    320  #include "sem.h"
    321  
    322 +/* If we've got a version of glibc that doesn't define union semun, we do
    323 + * it ourseleves like in semctl(2). Otherwise, fall back to the original
    324 + * buffer behaviour of defining it (differetly!) only on some systems.
    325 + *
    326 + * mbuck@debian.org, 1999/08/29
    327 + */
    328 +#if defined(__GNU_LIBRARY__) && defined(_SEM_SEMUN_UNDEFINED)
    329 +union semun {
    330 +   int val;            /* value for SETVAL              */
    331 +   struct semid_ds *buf;       /* buffer for IPC_STAT & IPC_SET */
    332 +   unsigned short int *array;  /* array for GETALL & SETALL     */
    333 +   struct seminfo *__buf;      /* buffer for IPC_INFO           */
    334 +};
    335 +#else
    336  #if defined(SYS5) || defined(ultrix) || defined(_AIX)
    337  union semun {
    338     int val;
    339 @@ -41,6 +56,7 @@
    340     ushort *array;
    341  };
    342  #endif
    343 +#endif   
    344  
    345  /* IMPORTS */
    346  
    347 @@ -95,7 +111,7 @@
    348     return sem;
    349  }
    350  
    351 -static
    352 +static void
    353  do_sem( sem_id, pbuf, err )
    354     int sem_id;
    355     struct sembuf *pbuf;
    356 @@ -149,10 +165,13 @@
    357  remove_sems( sem_id )
    358     int sem_id;
    359  {
    360 +   union semun arg;
    361 +
    362     if( sem_id == -1 )
    363         return;
    364  
    365 -   if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){
    366 +   arg.val = 0;
    367 +   if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){
    368         report_proc();
    369         perror( "internal error, failed to remove semaphore" );
    370     }
    371 --- buffer-1.19.orig/debian/changelog
    372 +++ buffer-1.19/debian/changelog
     276diff -urNp buffer-1.19.orig/buffer.man buffer-1.19/buffer.man
     277--- buffer-1.19.orig/buffer.man 2000-01-04 03:44:32.000000000 +0100
     278+++ buffer-1.19/buffer.man  2008-09-20 01:18:48.000000000 +0200
     279@@ -37,7 +37,8 @@ Use the given file as the input file.  T
     280 Use the given file as the output file.  The default is stdout.
     281 .TP
     282 .B \-S size
     283-After every chunk this size has been writen print out how much been writen so far.
     284+After every chunk of this size has been written, print out how much has
     285+been written so far. Also prints the total througput.
     286 By default this is not set.
     287 .TP
     288 .B \-s size
     289@@ -71,9 +72,9 @@ After every write pause for this many mi
     290 throughput on some drives.)
     291 .TP
     292 .B \-B
     293-Force each block writen to be padded out to the blocksize.  This is needed by some tape
     294+Force each block written to be padded out to the blocksize.  This is needed by some tape
     295 and cartridge drives.  Defaults to unpadded.  This only affects the
     296-last block writen.
     297+last block written.
     298 .TP
     299 .B \-t
     300 On exiting print to stderr a brief message showing the total number of
     301@@ -82,7 +83,7 @@ bytes written.
     302 .B \-Z
     303 If reading/writing directly to a character device (like a tape drive)
     304 then after each gigabyte perform an lseek to the start of the file.
     305-Use this flag with extreme care.  If can only be used on devices where
     306+Use this flag with extreme care.  It can only be used on devices where
     307 an lseek does not rewind the tape but does reset the kernels position
     308 flags.  It is used to allow more than 2 gigabytes to be written.
     309 .PP
     310diff -urNp buffer-1.19.orig/debian/changelog buffer-1.19/debian/changelog
     311--- buffer-1.19.orig/debian/changelog   1970-01-01 01:00:00.000000000 +0100
     312+++ buffer-1.19/debian/changelog    2008-09-20 01:18:48.000000000 +0200
    373313@@ -0,0 +1,98 @@
    374314+buffer (1.19-7) unstable; urgency=low
     
    470410+mode: debian-changelog
    471411+End:
    472 --- buffer-1.19.orig/debian/control
    473 +++ buffer-1.19/debian/control
     412diff -urNp buffer-1.19.orig/debian/control buffer-1.19/debian/control
     413--- buffer-1.19.orig/debian/control 1970-01-01 01:00:00.000000000 +0100
     414+++ buffer-1.19/debian/control  2008-09-20 01:18:48.000000000 +0200
    474415@@ -0,0 +1,19 @@
    475416+Source: buffer
     
    492433+ program and the tape device, but there are also other applications like
    493434+ buffering printer data in lpd's input filter.
    494 --- buffer-1.19.orig/debian/rules
    495 +++ buffer-1.19/debian/rules
     435diff -urNp buffer-1.19.orig/debian/copyright buffer-1.19/debian/copyright
     436--- buffer-1.19.orig/debian/copyright   1970-01-01 01:00:00.000000000 +0100
     437+++ buffer-1.19/debian/copyright    2008-09-20 01:18:48.000000000 +0200
     438@@ -0,0 +1,11 @@
     439+This package was debianized by Martin Buck mbuck@debian.org on
     440+Wed, 27 Aug 1997 01:11:29 +0200.
     441+
     442+It was downloaded from
     443+http://sunsite.org.uk/public/public/packages/buffer/
     444+
     445+Copyright:
     446+GPL (see /usr/share/common-licenses/GPL)
     447+In addtion under NO circumstances can I (Lee McLoughlin), or Imperial
     448+College, be held liable for any event caused by the running or storing of
     449+this program or its documentation.
     450diff -urNp buffer-1.19.orig/debian/rules buffer-1.19/debian/rules
     451--- buffer-1.19.orig/debian/rules   1970-01-01 01:00:00.000000000 +0100
     452+++ buffer-1.19/debian/rules    2008-09-20 01:18:48.000000000 +0200
    496453@@ -0,0 +1,64 @@
    497454+#!/usr/bin/make -f
     
    559516+binary: binary-indep binary-arch
    560517+.PHONY: build clean binary-indep binary-arch binary install
    561 --- buffer-1.19.orig/debian/copyright
    562 +++ buffer-1.19/debian/copyright
    563 @@ -0,0 +1,11 @@
    564 +This package was debianized by Martin Buck mbuck@debian.org on
    565 +Wed, 27 Aug 1997 01:11:29 +0200.
    566 +
    567 +It was downloaded from
    568 +http://sunsite.org.uk/public/public/packages/buffer/
    569 +
    570 +Copyright:
    571 +GPL (see /usr/share/common-licenses/GPL)
    572 +In addtion under NO circumstances can I (Lee McLoughlin), or Imperial
    573 +College, be held liable for any event caused by the running or storing of
    574 +this program or its documentation.
     518diff -urNp buffer-1.19.orig/sem.c buffer-1.19/sem.c
     519--- buffer-1.19.orig/sem.c  2000-01-04 03:49:12.000000000 +0100
     520+++ buffer-1.19/sem.c   2008-09-20 01:18:48.000000000 +0200
     521@@ -27,6 +27,7 @@
     522  * semaphores */
     523 
     524 #include <stdio.h>
     525+#include <unistd.h>
     526 #include <sys/types.h>
     527 #include <sys/stat.h>
     528 #include <sys/ipc.h>
     529@@ -103,7 +119,7 @@ new_sems( nsems )
     530    return sem;
     531 }
     532 
     533-static
     534+static void
     535 do_sem( sem_id, pbuf, err )
     536    int sem_id;
     537    struct sembuf *pbuf;
     538@@ -157,10 +173,13 @@ void
     539 remove_sems( sem_id )
     540    int sem_id;
     541 {
     542+   union semun arg;
     543+
     544    if( sem_id == -1 )
     545        return;
     546 
     547-   if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){
     548+   arg.val = 0;
     549+   if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){
     550        report_proc();
     551        perror( "internal error, failed to remove semaphore" );
     552    }
  • projects/buffer/pbconf/1.19/buffer/rpm/buffer.spec

    r501 r551  
    33#
    44
    5 Summary:        buffer speeds up writing tapes on remote tape drives
    6 Summary(fr):    buffer accélère l'écriture des bande sur des périphériques distants
     5Summary:        This program speeds up writing tapes on remote tape drives
     6Summary(fr):    Ce programme accélère l'écriture des bande sur des périphériques distants
    77
    88Name:           PBPKG
     
    3131%install
    3232%{__rm} -rf $RPM_BUILD_ROOT
    33 install -m 755 -D buffer $RPM_BUILD_ROOT%{_bindir}/buffer
    34 install -m 644 -D buffer.man $RPM_BUILD_ROOT%{_mandir}/man1/buffer.1
     33install -p -m 755 -D buffer $RPM_BUILD_ROOT%{_bindir}/buffer
     34install -p -m 644 -D buffer.man $RPM_BUILD_ROOT%{_mandir}/man1/buffer.1
    3535
    3636%clean
     
    3838
    3939%files
    40 %defattr(-,root,root)
    41 %doc ChangeLog
     40%defattr(-,root,root,-)
    4241%doc COPYING README
    4342#AUTHORS NEWS
  • projects/buffer/pbconf/1.19/pbfilter/all.pbf

    r501 r551  
    1818
    1919# PBLOG is replaced by the changelog if value is yes
    20 filter PBLOG = yes
     20filter PBLOG = no
    2121
    2222# License
     
    4242
    4343# PBDESC contains the description of the package
    44 filter PBDESC = This is a program designed to speed up writing tapes on remote tape drives.  When this program is put "in the pipe", two processes are started.  One process reads from standard-in and the other writes to standard-out.  Both processes communicate via shared memory.
     44filter PBDESC = This is a program designed to speed up writing tapes on remote tape drives.$/When this program is put "in the pipe", two processes are started.$/One process reads from standard-in and the other writes to standard-out.$/Both processes communicate via shared memory.
    4545
    4646# PBURL contains the URL of the Web site of the project
Note: See TracChangeset for help on using the changeset viewer.