summaryrefslogtreecommitdiff
path: root/core/openbsd/patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-12-03 23:54:09 -0800
committerMichael Forney <mforney@mforney.org>2016-12-08 00:11:31 -0800
commitbd8c76f34f47b6531dc177939358d6e4297edbca (patch)
treef1b71542e82780ddaa5cff0555959085deac78b0 /core/openbsd/patch
parent6307c7c1c739c39acfb73e22f2a302847a517fcb (diff)
openbsd: Support -J flag for xz compression in pax/tar
Diffstat (limited to 'core/openbsd/patch')
-rw-r--r--core/openbsd/patch/0012-pax-Support-xz-compression-with-J-flag.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/core/openbsd/patch/0012-pax-Support-xz-compression-with-J-flag.patch b/core/openbsd/patch/0012-pax-Support-xz-compression-with-J-flag.patch
new file mode 100644
index 00000000..61a4332e
--- /dev/null
+++ b/core/openbsd/patch/0012-pax-Support-xz-compression-with-J-flag.patch
@@ -0,0 +1,90 @@
+From 5b372180bd0994a256be1a334c565d882f0db458 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 51101c7ad5a..a79a03b5bed 100644
+--- a/bin/pax/options.c
++++ b/bin/pax/options.c
+@@ -78,6 +78,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
+@@ -221,7 +222,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':
+@@ -481,6 +482,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
+@@ -657,7 +664,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':
+ /*
+@@ -815,6 +822,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
+@@ -1098,7 +1111,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':
+ /*
+@@ -1282,6 +1295,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.11.0
+