From f1be6b4c7278c180aa04c6943e0cdfc9033d5a54 Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Jan 12 2016 09:46:57 +0000 Subject: Fixed pcre-count test on secondary architectures (byt test-pcre-count-fix patch) Resolves: rhbz#1296842 --- diff --git a/grep-2.22-test-pcre-count-fix.patch b/grep-2.22-test-pcre-count-fix.patch new file mode 100644 index 0000000..47dc901 --- /dev/null +++ b/grep-2.22-test-pcre-count-fix.patch @@ -0,0 +1,26 @@ +diff --git a/tests/pcre-count b/tests/pcre-count +--- a/tests/pcre-count ++++ b/tests/pcre-count +@@ -13,11 +13,17 @@ require_pcre_ + + fail=0 + +-printf 'a\n%032768d\nb\x0\n%032768d\na\n' 0 0 > in ++printf 'a\n%032768d\nb\0\n%032768d\na\n' 0 0 > in || framework_failure_ + +-LC_ALL=C grep -P 'a' in | wc -l > exp ++# grep will discover that the input is a binary file sooner if the ++# page size is larger, so allow for either possible output. ++printf 'a\nBinary file in matches\n' >exp1a || framework_failure_ ++printf 'Binary file in matches\n' >exp1b || framework_failure_ ++LC_ALL=C grep -P 'a' in >out || fail=1 ++compare exp1a out || compare exp1b out || fail=1 + +-LC_ALL=C grep -Pc 'a' in > out || fail=1 +-compare exp out || fail=1 ++printf '2\n' >exp2 || framework_failure_ ++LC_ALL=C grep -Pc 'a' in >out || fail=1 ++compare exp2 out || fail=1 + + Exit $fail + diff --git a/grep.spec b/grep.spec index 9691254..2ca58bd 100644 --- a/grep.spec +++ b/grep.spec @@ -3,7 +3,7 @@ Summary: Pattern matching utilities Name: grep Version: 2.22 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ URL: http://www.gnu.org/software/grep/ Group: Applications/Text @@ -26,6 +26,8 @@ Patch2: grep-2.22-disable-performance-related-tests.patch Patch3: grep-2.22-better-encoding-errors-handling.patch # backported from upstream, upstream bug#22028 Patch4: grep-2.22-Pc-consistent-results.patch +# backported from upstream, upstream bug#22350 +Patch5: grep-2.22-test-pcre-count-fix.patch Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -48,6 +50,7 @@ GNU grep is needed by many scripts, so it shall be installed on every system. %patch2 -p1 -b .disable-performance-related-tests %patch3 -p1 -b .better-encoding-errors-handling %patch4 -p1 -b .Pc-consistent-results +%patch5 -p1 -b .test-pcre-count-fix chmod 755 tests/encoding-error chmod 755 tests/pcre-count @@ -101,6 +104,11 @@ fi %{_libexecdir}/grepconf.sh %changelog +* Tue Jan 12 2016 Jaroslav Škarvada - 2.22-6 +- Fixed pcre-count test on secondary architectures + (byt test-pcre-count-fix patch) + Resolves: rhbz#1296842 + * Wed Jan 6 2016 Jaroslav Škarvada - 2.22-5 - Used latest upstream patch for bug 1269014 to fix regression, fixed order of patches