From b75c7e0036b5f00fd0e1e40a7f1cf1a841e8b110 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 20 Apr 2021 11:31:36 +0200 Subject: [PATCH] 1950033 - Possible changes in zlib output causes FTBFS for qpdf Resolves: rhbz#1950033 --- qpdf-s390x-disable-streamtest.patch | 36 +++++++++++++++++++++++++++++ qpdf.spec | 18 +++++++++++---- 2 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 qpdf-s390x-disable-streamtest.patch diff --git a/qpdf-s390x-disable-streamtest.patch b/qpdf-s390x-disable-streamtest.patch new file mode 100644 index 0000000..8a157c3 --- /dev/null +++ b/qpdf-s390x-disable-streamtest.patch @@ -0,0 +1,36 @@ +diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc +index fccefe0..2793191 100644 +--- a/libqpdf/QPDFWriter.cc ++++ b/libqpdf/QPDFWriter.cc +@@ -2096,7 +2096,6 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object) + // This condition occurred in a fuzz input. Ideally we + // should block it at at parse time, but it's not + // clear to me how to construct a case for this. +- QTC::TC("qpdf", "QPDFWriter stream in ostream"); + obj_to_write.warnIfPossible( + "stream found inside object stream; treating as null"); + obj_to_write = QPDFObjectHandle::newNull(); +diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov +index b4e7c46..3e935d0 100644 +--- a/qpdf/qpdf.testcov ++++ b/qpdf/qpdf.testcov +@@ -443,7 +443,6 @@ QPDF xref skipped space 0 + QPDF eof skipping spaces before xref 1 + QPDF_encryption user matches owner V < 5 0 + QPDF_encryption same password 1 +-QPDFWriter stream in ostream 0 + QPDFObjectHandle duplicate dict key 0 + QPDFWriter no encryption sig contents 0 + QPDFPageObjectHelper colorspace lookup 0 +diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test +index afb6668..b8f55a2 100644 +--- a/qpdf/qtest/qpdf.test ++++ b/qpdf/qtest/qpdf.test +@@ -996,7 +996,6 @@ my @bug_tests = ( + ["263", "empty xref stream", 2], + ["335a", "ozz-fuzz-12152", 2], + ["335b", "ozz-fuzz-14845", 2], +- ["fuzz-16214", "stream in object stream", 3], + # When adding to this list, consider adding to SEED_CORPUS_FILES + # in fuzz/build.mk and updating the count in fuzz/qtest/fuzz.test. + ); diff --git a/qpdf.spec b/qpdf.spec index 7c06928..0f69c4e 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.3.1 -Release: 2%{?dist} +Release: 3%{?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) @@ -12,9 +12,11 @@ Source0: http://downloads.sourceforge.net/sourceforge/qpdf/qpdf-%{version}.tar.g Patch0: qpdf-doc.patch # zlib has optimalization for aarch64 now, which gives different output after # compression - patch erases 3 tests with generated object stream which were failing -Patch2: qpdf-erase-tests-with-generated-object-stream.patch +Patch1: qpdf-erase-tests-with-generated-object-stream.patch # make qpdf working under FIPS, downstream patch -Patch3: qpdf-relax.patch +Patch2: qpdf-relax.patch +# 1950033 - Possible changes in zlib output causes FTBFS for qpdf +Patch3: qpdf-s390x-disable-streamtest.patch # gcc and gcc-c++ are no longer in buildroot by default # gcc is needed for qpdf-ctest.c @@ -97,9 +99,12 @@ QPDF Manual # fix 'complete manual location' note in man pages %patch0 -p1 -b .doc %ifarch aarch64 -%patch2 -p1 -b .erase-tests-with-generated-object-stream +%patch1 -p1 -b .erase-tests-with-generated-object-stream +%endif +%patch2 -p1 -b .relax +%ifarch s390x +%patch3 -p1 -b .s390x-disable-streamtest %endif -%patch3 -p1 -b .relax %build # work-around check-rpaths errors @@ -148,6 +153,9 @@ make check %changelog +* Tue Apr 20 2021 Zdenek Dohnal - 10.3.1-3 +- 1950033 - Possible changes in zlib output causes FTBFS for qpdf + * Fri Apr 16 2021 Mohan Boddu - 10.3.1-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937