From 93ff517f90c9044d61d35aee486e3861d698bc55 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 9 Apr 2013 13:01:06 +0200 Subject: [PATCH] xzgrep: fix non-working -h option Version: xz-5.1.2-5alpha Resolves: #850898 --- xz-5.1.2alpha-xzgrep-and-h-option.patch | 23 +++++++++++++++++++++++ xz.spec | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 xz-5.1.2alpha-xzgrep-and-h-option.patch diff --git a/xz-5.1.2alpha-xzgrep-and-h-option.patch b/xz-5.1.2alpha-xzgrep-and-h-option.patch new file mode 100644 index 0000000..dfbdf35 --- /dev/null +++ b/xz-5.1.2alpha-xzgrep-and-h-option.patch @@ -0,0 +1,23 @@ +commit 5019413a055ce29e660dbbf15e02443cb5a26c59 +Author: Jeff Bastian +AuthorDate: Wed Apr 3 13:59:17 2013 +0200 +Commit: Lasse Collin +CommitDate: Fri Apr 5 19:14:50 2013 +0300 + + xzgrep: make the '-h' option to be --no-filename equivalent + + * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing. + +diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in +index d8e9bb5..951266b 100644 +--- a/src/scripts/xzgrep.in ++++ b/src/scripts/xzgrep.in +@@ -109,7 +109,7 @@ while test $# -ne 0; do + files_with_matches=1;; + (-L | --files-witho*) + files_without_matches=1;; +- (--no-f*) ++ (-h | --no-f*) + no_filename=1;; + (-V | --v | --ve | --ver | --vers | --versi | --versio | --version) + echo "$version" || exit 2 diff --git a/xz.spec b/xz.spec index ea6a8da..fd40240 100644 --- a/xz.spec +++ b/xz.spec @@ -19,6 +19,11 @@ Requires: %{name}-libs = %{version}-%{release} # ~> #948533 Patch0: xz-5.1.2alpha-man-page-day.patch +# fix 'xzgrep -h' to behave as expected +# ~> upstream (5019413a0) +# ~> #948533 +Patch1: xz-5.1.2alpha-xzgrep-and-h-option.patch + %description XZ Utils are an attempt to make LZMA compression easy to use on free (as in freedom) operating systems. This is achieved by providing tools and libraries @@ -72,6 +77,7 @@ commands that deal with the older LZMA format. %prep %setup -q -a1 -n %{name}-%{version}alpha %patch0 -p1 -b .man-page-day +%patch1 -p1 -b .xzgrep-and-h-option for i in `find . -name config.sub`; do perl -pi -e "s/ppc64-\*/ppc64-\* \| ppc64p7-\*/" $i @@ -147,6 +153,7 @@ rm -rf %{buildroot} %changelog * Tue Apr 09 2013 Pavel Raiskup - 5.1.2-5alpha - fix manual page inconsistencies with help output (private #948533) +- enable/fix the 'xzgrep -h' (#850898) * Thu Feb 21 2013 Karsten Hopp 5.1.2-4alpha - add support for ppc64p7 arch (Power7 optimized)