diff -Nur pax-3.3-modifyWarn/src/cpio.1 pax-3.3-bzip2/src/cpio.1 --- pax-3.3-modifyWarn/src/cpio.1 2003-04-22 15:15:50.000000000 +1000 +++ pax-3.3-bzip2/src/cpio.1 2003-04-22 15:15:50.000000000 +1000 @@ -39,7 +39,7 @@ .Sh SYNOPSIS .Nm cpio .Fl o -.Op Fl aABcLMvzZ +.Op Fl aABcjLMvzZ .Op Fl C Ar bytes .Op Fl F Ar archive .Op Fl H Ar format @@ -48,7 +48,7 @@ .Op Ar "> archive" .Nm cpio .Fl i -.Op Fl bBcdfmrsStuvzZ6 +.Op Fl bBcdfjmrsStuvzZ6 .Op Fl C Ar bytes .Op Fl E Ar file .Op Fl F Ar archive @@ -115,6 +115,10 @@ .It Ar ustar POSIX ustar format. .El +.It Fl j +Compress or decompress archive using +.Xr bzip2 1 +format. .It Fl L Follow symbolic links. .It Fl M @@ -123,7 +127,7 @@ Be verbose about operations. List filenames as they are written to the archive. .It Fl z -Compress archive using +Compress or decompress archive using .Xr gzip 1 format. .It Fl Z diff -Nur pax-3.3-modifyWarn/src/options.c pax-3.3-bzip2/src/options.c --- pax-3.3-modifyWarn/src/options.c 2003-04-22 15:15:50.000000000 +1000 +++ pax-3.3-bzip2/src/options.c 2003-04-22 15:15:50.000000000 +1000 @@ -92,6 +92,7 @@ #define GZIP_CMD "gzip" /* command to run as gzip */ #define COMPRESS_CMD "compress" /* command to run as compress */ +#define BZIP2_CMD "bzip2" /* command to run as bzip2 */ /* * Format specific routine table - MUST BE IN SORTED ORDER BY NAME @@ -199,7 +200,7 @@ * process option flags */ while ((c=getopt(argc,argv, - "ab:cdf:iklno:p:rs:tuvwx:zB:DE:G:HLMPT:U:XYZ")) != -1) { + "ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HLMPT:U:XYZ")) != -1) { switch (c) { case 'a': /* @@ -245,6 +246,12 @@ iflag = 1; flg |= IF; break; + case 'j': + /* + * use bzip2. Non standard option. + */ + gzip_program = BZIP2_CMD; + break; case 'k': /* * do not clobber files that exist @@ -621,7 +628,7 @@ * process option flags */ while ((c = getoldopt(argc, argv, - "b:cef:hmopqruts:vwxzBC:HI:LMOPXZ014578")) != -1) { + "b:cef:hjmopqruts:vwxzBC:HI:LMOPXZ014578")) != -1) { switch(c) { case 'b': /* @@ -666,6 +673,12 @@ */ Lflag = 1; break; + case 'j': + /* + * use bzip2. Non standard option. + */ + gzip_program = BZIP2_CMD; + break; case 'm': /* * do not preserve modification time @@ -1048,7 +1061,7 @@ nodirs = 1; listf = stderr; while ((c=getopt(argc,argv, - "abcdfiklmoprstuvzABC:E:F:H:I:LMO:SZ6")) != -1) + "abcdfijklmoprstuvzABC:E:F:H:I:LMO:SZ6")) != -1) switch (c) { case 'a': /* @@ -1085,6 +1098,12 @@ */ act = EXTRACT; break; + case 'j': + /* + * use bzip2. Non standard option. + */ + gzip_program = BZIP2_CMD; + break; case 'k': break; case 'l': @@ -1574,18 +1593,18 @@ void pax_usage(void) { - (void)fputs("usage: pax [-cdnvzO] [-E limit] [-f archive] ", stderr); + (void)fputs("usage: pax [-cdjnvzO] [-E limit] [-f archive] ", stderr); (void)fputs("[-s replstr] ... [-U user] ...", stderr); (void)fputs("\n [-G group] ... ", stderr); (void)fputs("[-T [from_date][,to_date]] ... ", stderr); (void)fputs("[pattern ...]\n", stderr); - (void)fputs(" pax -r [-cdiknuvzDOYZ] [-E limit] ", stderr); + (void)fputs(" pax -r [-cdijknuvzDOYZ] [-E limit] ", stderr); (void)fputs("[-f archive] [-o options] ... \n", stderr); (void)fputs(" [-p string] ... [-s replstr] ... ", stderr); (void)fputs("[-U user] ... [-G group] ...\n ", stderr); (void)fputs("[-T [from_date][,to_date]] ... ", stderr); (void)fputs(" [pattern ...]\n", stderr); - (void)fputs(" pax -w [-dituvzHLMOPX] [-b blocksize] ", stderr); + (void)fputs(" pax -w [-dijtuvzHLMOPX] [-b blocksize] ", stderr); (void)fputs("[ [-a] [-f archive] ] [-x format] \n", stderr); (void)fputs(" [-B bytes] [-s replstr] ... ", stderr); (void)fputs("[-o options] ... [-U user] ...", stderr); @@ -1608,7 +1627,7 @@ void tar_usage(void) { - (void)fputs("usage: tar [-]{crtux}[-befhmopqsvwzHLMOPXZ014578] [blocksize] ", + (void)fputs("usage: tar [-]{crtux}[-befhjmopqsvwzHLMOPXZ014578] [blocksize] ", stderr); (void)fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n", stderr); @@ -1623,9 +1642,9 @@ void cpio_usage(void) { - (void)fputs("usage: cpio -o [-aABcLMvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr); + (void)fputs("usage: cpio -o [-aABcjLMvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr); (void)fputs(" [-F archive] < name-list [> archive]\n", stderr); - (void)fputs(" cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr); + (void)fputs(" cpio -i [-bBcdfjmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr); (void)fputs(" [-I archive] [-F archive] [pattern...] [< archive]\n", stderr); (void)fputs(" cpio -p [-adlLmMuvV] destination-directory < name-list\n", stderr); exit(1); diff -Nur pax-3.3-modifyWarn/src/pax.1 pax-3.3-bzip2/src/pax.1 --- pax-3.3-modifyWarn/src/pax.1 2003-04-22 15:15:50.000000000 +1000 +++ pax-3.3-bzip2/src/pax.1 2003-04-22 15:15:50.000000000 +1000 @@ -46,7 +46,7 @@ .Nd read and write file archives and copy directory hierarchies .Sh SYNOPSIS .Nm pax -.Op Fl cdnvz +.Op Fl cdjnvz .Bk -words .Op Fl f Ar archive .Ek @@ -73,7 +73,7 @@ .Op Ar pattern ... .Nm pax .Fl r -.Op Fl cdiknuvzDYZ +.Op Fl cdijknuvzDYZ .Bk -words .Op Fl f Ar archive .Ek @@ -109,7 +109,7 @@ .Op Ar pattern ... .Nm pax .Fl w -.Op Fl dituvzHLMPX +.Op Fl dijtuvzHLMPX .Bk -words .Op Fl b Ar blocksize .Ek @@ -467,6 +467,12 @@ is encountered when reading a response or if .Pa /dev/tty cannot be opened for reading and writing. +.It Fl j +Use +.Xr bzip2 1 +to compress (decompress) the archive while writing (reading). +Incompatible with +.Fl a . .It Fl k Do not overwrite existing files. .It Fl l @@ -1174,6 +1180,7 @@ .St -p1003.2 standard. The options +.Fl j , .Fl B , .Fl D , .Fl E , diff -Nur pax-3.3-modifyWarn/src/tar.1 pax-3.3-bzip2/src/tar.1 --- pax-3.3-modifyWarn/src/tar.1 2003-04-22 15:15:50.000000000 +1000 +++ pax-3.3-bzip2/src/tar.1 2003-04-22 15:15:50.000000000 +1000 @@ -39,7 +39,7 @@ .Sh SYNOPSIS .Nm tar .Sm off -.Oo \&- Oc {crtux} Op befhmopqsvwzHLMOPXZ014578 +.Oo \&- Oc {crtux} Op befhjmopqsvwzHLMOPXZ014578 .Sm on .Op Ar blocksize .Op Ar archive @@ -111,6 +111,10 @@ In extract mode this means that a directory entry in the archive will not overwrite an existing symbolic link, but rather what the link ultimately points to. +.It Fl j +Compress or decompress archive using +.Xr bzip2 1 +format. .It Fl m Do not preserve modification time. .It Fl O @@ -194,7 +198,9 @@ to prompt the user for the filename to use when storing or extracting files in an archive. .It Fl z -Compress archive using gzip. +Compress or decompress archive using +.Xr gzip 1 +format. .It Fl C Ar directory This is a positional argument which sets the working directory for the following files. @@ -333,6 +339,7 @@ .At v7 . .Sh CAVEATS The +.Fl j , .Fl L and .Fl M