patch from Ben Wong to fix zgrep handling of filenames starting in 'binary'
authorBdale Garbee <bdale@gag.com>
Sun, 24 Dec 2017 02:31:42 +0000 (19:31 -0700)
committerBdale Garbee <bdale@gag.com>
Sun, 24 Dec 2017 02:31:42 +0000 (19:31 -0700)
debian/changelog
debian/patches/series
debian/patches/zgrep-syntax-error.diff [new file with mode: 0644]
zgrep.in

index 7a246270544b986cfb559a9125fa24282c0c9117..5749aeebe54651d368b8a383f6d70601c706ca29 100644 (file)
@@ -1,3 +1,11 @@
+gzip (1.8-2) UNRELEASED; urgency=medium
+
+  * patch from Ben Wong that fixes zgrep failure on filenames starting with
+    'binary' due to missing dashes in an option detection pattern match,
+    closes: #854878
+
+ -- Bdale Garbee <bdale@gag.com>  Sat, 23 Dec 2017 19:29:22 -0700
+
 gzip (1.8-1) unstable; urgency=low
 
   * new upstream version, closes: #855839
index 429ab9387a3b9f79d2aed975571d142bb1597ef6..34fccc826047792b050efd187ceadf79cb1c8f20 100644 (file)
@@ -1,2 +1,3 @@
 sigpipe.diff
 gzip_reproducible_build.diff
+zgrep-syntax-error.diff
diff --git a/debian/patches/zgrep-syntax-error.diff b/debian/patches/zgrep-syntax-error.diff
new file mode 100644 (file)
index 0000000..104da7e
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/zgrep.in b/zgrep.in
+index 7ce45ae..30ee129 100644
+--- a/zgrep.in
++++ b/zgrep.in
+@@ -69,7 +69,7 @@ while test $# -ne 0; do
+     option=$(expr "X$option" : 'X\(-.[0-9]*\)');;
+   (--binary-*=* | --[lm]a*=* | --reg*=*)
+     ;;
+-  (-[ABCDXdefm] | binary-* | --file | --[lm]a* | --reg*)
++  (-[ABCDXdefm] | --binary-* | --file | --[lm]a* | --reg*)
+     case ${1?"$option option requires an argument"} in
+     (*\'*)
+       optarg=" '"$(printf '%s\n' "$1" | sed "$escape");;
index 7ce45ae8b3900afb12e6147c7039e04e297c3a18..30ee129180906c02a793d86d1e66f3ef44992960 100644 (file)
--- a/zgrep.in
+++ b/zgrep.in
@@ -69,7 +69,7 @@ while test $# -ne 0; do
     option=$(expr "X$option" : 'X\(-.[0-9]*\)');;
   (--binary-*=* | --[lm]a*=* | --reg*=*)
     ;;
-  (-[ABCDXdefm] | binary-* | --file | --[lm]a* | --reg*)
+  (-[ABCDXdefm] | --binary-* | --file | --[lm]a* | --reg*)
     case ${1?"$option option requires an argument"} in
     (*\'*)
       optarg=" '"$(printf '%s\n' "$1" | sed "$escape");;