diff --git a/0001-Fix-tests-with-GNU-grep-3.8.patch b/0001-Fix-tests-with-GNU-grep-3.8.patch new file mode 100644 index 0000000..561dcef --- /dev/null +++ b/0001-Fix-tests-with-GNU-grep-3.8.patch @@ -0,0 +1,37 @@ +diff --git a/build-scripts/build-doc b/build-scripts/build-doc +index 077f836..18f85ee 100755 +--- a/build-scripts/build-doc ++++ b/build-scripts/build-doc +@@ -10,7 +10,7 @@ pip3 install sphinx sphinx_rtd_theme + ./configure --enable-doc-maintenance + make -j$(nproc) doc-dist DOC_DEST=doc + zip -r doc.zip doc +-version=$(egrep '^release' manual/conf.py | cut -d"'" -f 2) ++version=$(grep -E '^release' manual/conf.py | cut -d"'" -f 2) + mv doc qpdf-${version}-doc + mkdir distribution + zip -r distribution/qpdf-${version}-doc.zip qpdf-${version}-doc +diff --git a/qpdf/qtest/qpdf/diff-encrypted b/qpdf/qtest/qpdf/diff-encrypted +index ac5428c..f6741c2 100755 +--- a/qpdf/qtest/qpdf/diff-encrypted ++++ b/qpdf/qtest/qpdf/diff-encrypted +@@ -1,5 +1,5 @@ + #!/bin/sh +-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | egrep -v '(Date|InstanceID)' | wc -l)) ++lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | grep -E -v '(Date|InstanceID)' | wc -l)) + if [ "$lines" = "0" ]; then + echo okay + else +diff --git a/qpdf/qtest/qpdf/diff-ignore-ID-version b/qpdf/qtest/qpdf/diff-ignore-ID-version +index 72def44..de4c7c9 100755 +--- a/qpdf/qtest/qpdf/diff-ignore-ID-version ++++ b/qpdf/qtest/qpdf/diff-ignore-ID-version +@@ -1,6 +1,6 @@ + #!/bin/sh +-lines=$(expr 0 + $(diff "$1" "$2" | egrep '^[<>]' | \ +- egrep -v '/ID' | egrep -v '%PDF-' | wc -l)) ++lines=$(expr 0 + $(diff "$1" "$2" | grep -E '^[<>]' | \ ++ grep -E -v '/ID' | grep -E -v '%PDF-' | wc -l)) + if [ "$lines" = "0" ]; then + echo okay + else diff --git a/qpdf.spec b/qpdf.spec index b319173..c2d7093 100644 --- a/qpdf.spec +++ b/qpdf.spec @@ -1,7 +1,7 @@ Summary: Command-line tools and library for transforming PDF files Name: qpdf Version: 10.6.3 -Release: 4%{?dist} +Release: 5%{?dist} # MIT: e.g. libqpdf/sha2.c # upstream uses ASL 2.0 now, but he allowed other to distribute qpdf under # old license (see README) @@ -15,6 +15,9 @@ Patch1: qpdf-relax.patch # now we have s390x specific patch in zlib which changes output # so we need to disable one test because of it Patch2: qpdf-s390x-disable-streamtest.patch +# egrep now shows warning, which causes test failure. Move to `grep -E` +# https://github.com/qpdf/qpdf/commit/7049588bff21e3ea3e7bf3c4a4325c8ab4ed46f8 +Patch3: 0001-Fix-tests-with-GNU-grep-3.8.patch # gcc and gcc-c++ are no longer in buildroot by default # gcc is needed for qpdf-ctest.c @@ -98,6 +101,7 @@ QPDF Manual %ifarch s390x %patch2 -p1 -b .s390x-disable-streamtest %endif +%patch3 -p1 -b .use-grepe # unpack zip file with manual unzip %{SOURCE1} @@ -153,6 +157,9 @@ make check %changelog +* Thu Sep 22 2022 Zdenek Dohnal - 10.6.3-5 +- use `grep -E` in test suite (bz2127957) + * Mon Jul 25 2022 Zdenek Dohnal - 10.6.3-4 - qpdf doesn't depend on pcre since 7.0b1