diff options
Diffstat (limited to 'patches/0012-pax-Support-xz-compression-with-J-flag.patch')
-rw-r--r-- | patches/0012-pax-Support-xz-compression-with-J-flag.patch | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/patches/0012-pax-Support-xz-compression-with-J-flag.patch b/patches/0012-pax-Support-xz-compression-with-J-flag.patch new file mode 100644 index 0000000..00f8a8b --- /dev/null +++ b/patches/0012-pax-Support-xz-compression-with-J-flag.patch @@ -0,0 +1,90 @@ +From ac4a17dd01df3889bac917b0dc34ba9fd15aa7fe Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 3 Dec 2016 23:50:27 -0800 +Subject: [PATCH] pax: Support xz compression with -J flag + +--- + bin/pax/options.c | 25 ++++++++++++++++++++++--- + 1 file changed, 22 insertions(+), 3 deletions(-) + +diff --git a/bin/pax/options.c b/bin/pax/options.c +index c7e64a5d22c..917414c999a 100644 +--- a/bin/pax/options.c ++++ b/bin/pax/options.c +@@ -154,6 +154,7 @@ static int xz_id(char *_blk, int _size); + #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 */ ++#define XZ_CMD "xz" /* command to run as xz */ + + /* + * Format specific routine table +@@ -300,7 +301,7 @@ pax_options(int argc, char **argv) + /* + * process option flags + */ +- while ((c=getopt(argc,argv,"ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HLOPT:U:XYZ0")) ++ while ((c=getopt(argc,argv,"ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HJLOPT:U:XYZ0")) + != -1) { + switch (c) { + case 'a': +@@ -556,6 +557,12 @@ pax_options(int argc, char **argv) + Hflag = 1; + flg |= CHF; + break; ++ case 'J': ++ /* ++ * use xz. Non standard option. ++ */ ++ gzip_program = XZ_CMD; ++ break; + case 'L': + /* + * follow symlinks +@@ -731,7 +738,7 @@ tar_options(int argc, char **argv) + * process option flags + */ + while ((c = getoldopt(argc, argv, +- "b:cef:hjmopqruts:vwxzBC:HI:LNOPXZ014578")) != -1) { ++ "b:cef:hjmopqruts:vwxzBC:HI:JLNOPXZ014578")) != -1) { + switch (c) { + case 'b': + /* +@@ -880,6 +887,12 @@ tar_options(int argc, char **argv) + incfiles[nincfiles - 1].file = optarg; + incfiles[nincfiles - 1].dir = chdname; + break; ++ case 'J': ++ /* ++ * use xz. Non standard option. ++ */ ++ gzip_program = XZ_CMD; ++ break; + case 'L': + /* + * follow symlinks +@@ -1164,7 +1177,7 @@ cpio_options(int argc, char **argv) + dflag = 1; + act = -1; + nodirs = 1; +- while ((c=getopt(argc,argv,"abcdfijklmoprstuvzABC:E:F:H:I:LO:SZ6")) != -1) ++ while ((c=getopt(argc,argv,"abcdfijklmoprstuvzABC:E:F:H:I:JLO:SZ6")) != -1) + switch (c) { + case 'a': + /* +@@ -1348,6 +1361,12 @@ cpio_options(int argc, char **argv) + (void)fputs("\n\n", stderr); + cpio_usage(); + break; ++ case 'J': ++ /* ++ * use xz. Non standard option. ++ */ ++ gzip_program = XZ_CMD; ++ break; + case 'L': + /* + * follow symbolic links +-- +2.26.2 + |