From 82b2a20225c9c0fe6405f845f7da5ab3ca1dec3f Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 23 Dec 2017 19:31:42 -0700 Subject: [PATCH] patch from Ben Wong to fix zgrep handling of filenames starting in 'binary' --- debian/changelog | 8 ++++++++ debian/patches/series | 1 + debian/patches/zgrep-syntax-error.diff | 13 +++++++++++++ zgrep.in | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 debian/patches/zgrep-syntax-error.diff diff --git a/debian/changelog b/debian/changelog index 7a24627..5749aee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 23 Dec 2017 19:29:22 -0700 + gzip (1.8-1) unstable; urgency=low * new upstream version, closes: #855839 diff --git a/debian/patches/series b/debian/patches/series index 429ab93..34fccc8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 index 0000000..104da7e --- /dev/null +++ b/debian/patches/zgrep-syntax-error.diff @@ -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");; 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");; -- 2.30.2