source: npl/overig/archivetools/pax/pax-3.3-bzip2.patch @ 892871d

Last change on this file since 892871d was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 6.9 KB
RevLine 
[c5c522c]1diff -Nur pax-3.3-modifyWarn/src/cpio.1 pax-3.3-bzip2/src/cpio.1
2--- pax-3.3-modifyWarn/src/cpio.1       2003-04-22 15:15:50.000000000 +1000
3+++ pax-3.3-bzip2/src/cpio.1    2003-04-22 15:15:50.000000000 +1000
4@@ -39,7 +39,7 @@
5 .Sh SYNOPSIS
6 .Nm cpio
7 .Fl o
8-.Op Fl aABcLMvzZ
9+.Op Fl aABcjLMvzZ
10 .Op Fl C Ar bytes
11 .Op Fl F Ar archive
12 .Op Fl H Ar format
13@@ -48,7 +48,7 @@
14 .Op Ar "> archive"
15 .Nm cpio
16 .Fl i
17-.Op Fl bBcdfmrsStuvzZ6
18+.Op Fl bBcdfjmrsStuvzZ6
19 .Op Fl C Ar bytes
20 .Op Fl E Ar file
21 .Op Fl F Ar archive
22@@ -115,6 +115,10 @@
23 .It Ar ustar
24 POSIX ustar format.
25 .El
26+.It Fl j
27+Compress or decompress archive using
28+.Xr bzip2 1
29+format.
30 .It Fl L
31 Follow symbolic links.
32 .It Fl M
33@@ -123,7 +127,7 @@
34 Be verbose about operations.
35 List filenames as they are written to the archive.
36 .It Fl z
37-Compress archive using
38+Compress or decompress archive using
39 .Xr gzip 1
40 format.
41 .It Fl Z
42diff -Nur pax-3.3-modifyWarn/src/options.c pax-3.3-bzip2/src/options.c
43--- pax-3.3-modifyWarn/src/options.c    2003-04-22 15:15:50.000000000 +1000
44+++ pax-3.3-bzip2/src/options.c 2003-04-22 15:15:50.000000000 +1000
45@@ -92,6 +92,7 @@
46 
47 #define GZIP_CMD       "gzip"          /* command to run as gzip */
48 #define COMPRESS_CMD   "compress"      /* command to run as compress */
49+#define BZIP2_CMD      "bzip2"         /* command to run as bzip2 */
50 
51 /*
52  *     Format specific routine table - MUST BE IN SORTED ORDER BY NAME
53@@ -199,7 +200,7 @@
54         * process option flags
55         */
56        while ((c=getopt(argc,argv,
57-         "ab:cdf:iklno:p:rs:tuvwx:zB:DE:G:HLMPT:U:XYZ")) != -1) {
58+         "ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HLMPT:U:XYZ")) != -1) {
59                switch (c) {
60                case 'a':
61                        /*
62@@ -245,6 +246,12 @@
63                        iflag = 1;
64                        flg |= IF;
65                        break;
66+               case 'j':
67+                       /*
68+                        * use bzip2.  Non standard option.
69+                        */
70+                       gzip_program = BZIP2_CMD;
71+                       break;
72                case 'k':
73                        /*
74                         * do not clobber files that exist
75@@ -621,7 +628,7 @@
76         * process option flags
77         */
78        while ((c = getoldopt(argc, argv,
79-           "b:cef:hmopqruts:vwxzBC:HI:LMOPXZ014578")) != -1) {
80+           "b:cef:hjmopqruts:vwxzBC:HI:LMOPXZ014578")) != -1) {
81                switch(c) {
82                case 'b':
83                        /*
84@@ -666,6 +673,12 @@
85                         */
86                        Lflag = 1;
87                        break;
88+               case 'j':
89+                       /*
90+                        * use bzip2.  Non standard option.
91+                        */
92+                       gzip_program = BZIP2_CMD;
93+                       break;
94                case 'm':
95                        /*
96                         * do not preserve modification time
97@@ -1048,7 +1061,7 @@
98        nodirs = 1;
99        listf = stderr;
100        while ((c=getopt(argc,argv,
101-         "abcdfiklmoprstuvzABC:E:F:H:I:LMO:SZ6")) != -1)
102+         "abcdfijklmoprstuvzABC:E:F:H:I:LMO:SZ6")) != -1)
103                switch (c) {
104                        case 'a':
105                                /*
106@@ -1085,6 +1098,12 @@
107                                 */
108                                act = EXTRACT;
109                                break;
110+                       case 'j':
111+                               /*
112+                                * use bzip2.  Non standard option.
113+                                */
114+                               gzip_program = BZIP2_CMD;
115+                               break;
116                        case 'k':
117                                break;
118                        case 'l':
119@@ -1574,18 +1593,18 @@
120 void
121 pax_usage(void)
122 {
123-       (void)fputs("usage: pax [-cdnvzO] [-E limit] [-f archive] ", stderr);
124+       (void)fputs("usage: pax [-cdjnvzO] [-E limit] [-f archive] ", stderr);
125        (void)fputs("[-s replstr] ... [-U user] ...", stderr);
126        (void)fputs("\n           [-G group] ... ", stderr);
127        (void)fputs("[-T [from_date][,to_date]] ... ", stderr);
128        (void)fputs("[pattern ...]\n", stderr);
129-       (void)fputs("       pax -r [-cdiknuvzDOYZ] [-E limit] ", stderr);
130+       (void)fputs("       pax -r [-cdijknuvzDOYZ] [-E limit] ", stderr);
131        (void)fputs("[-f archive] [-o options] ... \n", stderr);
132        (void)fputs("           [-p string] ... [-s replstr] ... ", stderr);
133        (void)fputs("[-U user] ... [-G group] ...\n           ", stderr);
134        (void)fputs("[-T [from_date][,to_date]] ... ", stderr);
135        (void)fputs(" [pattern ...]\n", stderr);
136-       (void)fputs("       pax -w [-dituvzHLMOPX] [-b blocksize] ", stderr);
137+       (void)fputs("       pax -w [-dijtuvzHLMOPX] [-b blocksize] ", stderr);
138        (void)fputs("[ [-a] [-f archive] ] [-x format] \n", stderr);
139        (void)fputs("           [-B bytes] [-s replstr] ... ", stderr);
140        (void)fputs("[-o options] ... [-U user] ...", stderr);
141@@ -1608,7 +1627,7 @@
142 void
143 tar_usage(void)
144 {
145-       (void)fputs("usage: tar [-]{crtux}[-befhmopqsvwzHLMOPXZ014578] [blocksize] ",
146+       (void)fputs("usage: tar [-]{crtux}[-befhjmopqsvwzHLMOPXZ014578] [blocksize] ",
147                 stderr);
148        (void)fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n",
149            stderr);
150@@ -1623,9 +1642,9 @@
151 void
152 cpio_usage(void)
153 {
154-       (void)fputs("usage: cpio -o [-aABcLMvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
155+       (void)fputs("usage: cpio -o [-aABcjLMvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
156        (void)fputs("               [-F archive] < name-list [> archive]\n", stderr);
157-       (void)fputs("       cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
158+       (void)fputs("       cpio -i [-bBcdfjmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
159        (void)fputs("               [-I archive] [-F archive] [pattern...] [< archive]\n", stderr);
160        (void)fputs("       cpio -p [-adlLmMuvV] destination-directory < name-list\n", stderr);
161        exit(1);
162diff -Nur pax-3.3-modifyWarn/src/pax.1 pax-3.3-bzip2/src/pax.1
163--- pax-3.3-modifyWarn/src/pax.1        2003-04-22 15:15:50.000000000 +1000
164+++ pax-3.3-bzip2/src/pax.1     2003-04-22 15:15:50.000000000 +1000
165@@ -46,7 +46,7 @@
166 .Nd read and write file archives and copy directory hierarchies
167 .Sh SYNOPSIS
168 .Nm pax
169-.Op Fl cdnvz
170+.Op Fl cdjnvz
171 .Bk -words
172 .Op Fl f Ar archive
173 .Ek
174@@ -73,7 +73,7 @@
175 .Op Ar pattern ...
176 .Nm pax
177 .Fl r
178-.Op Fl cdiknuvzDYZ
179+.Op Fl cdijknuvzDYZ
180 .Bk -words
181 .Op Fl f Ar archive
182 .Ek
183@@ -109,7 +109,7 @@
184 .Op Ar pattern ...
185 .Nm pax
186 .Fl w
187-.Op Fl dituvzHLMPX
188+.Op Fl dijtuvzHLMPX
189 .Bk -words
190 .Op Fl b Ar blocksize
191 .Ek
192@@ -467,6 +467,12 @@
193 is encountered when reading a response or if
194 .Pa /dev/tty
195 cannot be opened for reading and writing.
196+.It Fl j
197+Use
198+.Xr bzip2 1
199+to compress (decompress) the archive while writing (reading).
200+Incompatible with
201+.Fl a .
202 .It Fl k
203 Do not overwrite existing files.
204 .It Fl l
205@@ -1174,6 +1180,7 @@
206 .St -p1003.2
207 standard.
208 The options
209+.Fl j ,
210 .Fl B ,
211 .Fl D ,
212 .Fl E ,
213diff -Nur pax-3.3-modifyWarn/src/tar.1 pax-3.3-bzip2/src/tar.1
214--- pax-3.3-modifyWarn/src/tar.1        2003-04-22 15:15:50.000000000 +1000
215+++ pax-3.3-bzip2/src/tar.1     2003-04-22 15:15:50.000000000 +1000
216@@ -39,7 +39,7 @@
217 .Sh SYNOPSIS
218 .Nm tar
219 .Sm off
220-.Oo \&- Oc {crtux} Op befhmopqsvwzHLMOPXZ014578
221+.Oo \&- Oc {crtux} Op befhjmopqsvwzHLMOPXZ014578
222 .Sm on
223 .Op Ar blocksize
224 .Op Ar archive
225@@ -111,6 +111,10 @@
226 In extract mode this means that a directory entry in the archive
227 will not overwrite an existing symbolic link, but rather what the
228 link ultimately points to.
229+.It Fl j
230+Compress or decompress archive using
231+.Xr bzip2 1
232+format.
233 .It Fl m
234 Do not preserve modification time.
235 .It Fl O
236@@ -194,7 +198,9 @@
237 to prompt the user for the filename to use when storing or
238 extracting files in an archive.
239 .It Fl z
240-Compress archive using gzip.
241+Compress or decompress archive using
242+.Xr gzip 1
243+format.
244 .It Fl C Ar directory
245 This is a positional argument which sets the working directory for the
246 following files.
247@@ -333,6 +339,7 @@
248 .At v7 .
249 .Sh CAVEATS
250 The
251+.Fl j ,
252 .Fl L
253 and
254 .Fl M
Note: See TracBrowser for help on using the repository browser.