summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch')
-rw-r--r--pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch b/pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch
new file mode 100644
index 00000000..8c3755a3
--- /dev/null
+++ b/pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch
@@ -0,0 +1,90 @@
+From c0b84520a7c92b67b195c6ec9ed9185438810380 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 9dd2ea0ce25..63f17f2c1c7 100644
+--- a/bin/pax/options.c
++++ b/bin/pax/options.c
+@@ -156,6 +156,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
+@@ -312,7 +313,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':
+@@ -568,6 +569,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
+@@ -744,7 +751,7 @@ tar_options(int argc, char **argv)
+ * process option flags
+ */
+ while ((c = getoldopt(argc, argv,
+- "b:cef:hjmopqruts:vwxzBC:F:HI:LNOPXZ014578")) != -1) {
++ "b:cef:hjmopqruts:vwxzBC:F:HI:JLNOPXZ014578")) != -1) {
+ switch (c) {
+ case 'b':
+ /*
+@@ -911,6 +918,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
+@@ -1194,7 +1207,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':
+ /*
+@@ -1378,6 +1391,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.49.0
+