From: Bdale Garbee Date: Sun, 24 Dec 2017 02:31:42 +0000 (-0700) Subject: patch from Ben Wong to fix zgrep handling of filenames starting in 'binary' X-Git-Tag: debian/1.9-1~9 X-Git-Url: https://git.gag.com/?p=debian%2Fgzip;a=commitdiff_plain;h=82b2a20225c9c0fe6405f845f7da5ab3ca1dec3f patch from Ben Wong to fix zgrep handling of filenames starting in 'binary' --- 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");;