From ac975b9dd109ba15ee68357c0b0096f96b51df3e Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 26 Jul 2023 10:39:29 +0200 Subject: [PATCH] 2221506 - qpdf-11.5.0 is available --- .gitignore | 2 ++ qpdf-relax.patch | 44 ++++++++++++++--------------- qpdf-s390x-disable-streamtest.patch | 26 ++++++++--------- qpdf.spec | 13 +++++---- sources | 4 +-- 5 files changed, 47 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index e865571..3a4705f 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,5 @@ /qpdf-11.3.0.tar.gz /qpdf-11.4.0.tar.gz /qpdf-11.4.0-doc.zip +/qpdf-11.5.0.tar.gz +/qpdf-11.5.0-doc.zip diff --git a/qpdf-relax.patch b/qpdf-relax.patch index a5a18bf..88695ca 100644 --- a/qpdf-relax.patch +++ b/qpdf-relax.patch @@ -1,6 +1,6 @@ -diff -up qpdf-11.4.0/libqpdf/QPDF.cc.relax qpdf-11.4.0/libqpdf/QPDF.cc ---- qpdf-11.4.0/libqpdf/QPDF.cc.relax 2023-05-22 17:31:18.991888284 +0200 -+++ qpdf-11.4.0/libqpdf/QPDF.cc 2023-05-22 17:33:28.134747199 +0200 +diff -up qpdf-11.5.0/libqpdf/QPDF.cc.relax qpdf-11.5.0/libqpdf/QPDF.cc +--- qpdf-11.5.0/libqpdf/QPDF.cc.relax 2023-07-09 16:00:51.000000000 +0200 ++++ qpdf-11.5.0/libqpdf/QPDF.cc 2023-07-26 09:07:46.944582444 +0200 @@ -13,6 +13,10 @@ #include #include @@ -12,7 +12,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDF.cc.relax qpdf-11.4.0/libqpdf/QPDF.cc #include #include #include -@@ -258,14 +262,26 @@ void +@@ -250,14 +254,26 @@ void QPDF::processFile(char const* filename, char const* password) { auto* fi = new FileInputSource(filename); @@ -39,9 +39,9 @@ diff -up qpdf-11.4.0/libqpdf/QPDF.cc.relax qpdf-11.4.0/libqpdf/QPDF.cc } void -diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_encryption.cc ---- qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax 2023-05-21 20:42:37.000000000 +0200 -+++ qpdf-11.4.0/libqpdf/QPDF_encryption.cc 2023-05-22 17:36:24.816923148 +0200 +diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_encryption.cc +--- qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax 2023-07-09 16:00:51.000000000 +0200 ++++ qpdf-11.5.0/libqpdf/QPDF_encryption.cc 2023-07-26 09:09:55.859495262 +0200 @@ -3,6 +3,8 @@ #include @@ -62,7 +62,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e static unsigned char const padding_string[] = { 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a}; -@@ -359,10 +365,21 @@ QPDF::compute_data_key( +@@ -351,10 +357,21 @@ QPDF::compute_data_key( result += "sAlT"; } @@ -81,10 +81,10 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e + gnutls_fips140_set_mode(static_cast(oldmode), GNUTLS_FIPS140_SET_MODE_THREAD); +#endif + - return std::string(reinterpret_cast(digest), std::min(result.length(), toS(16))); + return {reinterpret_cast(digest), std::min(result.length(), toS(16))}; } -@@ -1003,6 +1020,12 @@ QPDF::getKeyForObject( +@@ -978,6 +995,12 @@ QPDF::getKeyForObject( void QPDF::decryptString(std::string& str, QPDFObjGen const& og) { @@ -97,7 +97,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e if (!og.isIndirect()) { return; } -@@ -1065,6 +1088,10 @@ QPDF::decryptString(std::string& str, QP +@@ -1039,6 +1062,10 @@ QPDF::decryptString(std::string& str, QP } catch (std::runtime_error& e) { throw damagedPDF("error decrypting string for object " + og.unparse() + ": " + e.what()); } @@ -108,7 +108,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e } void -@@ -1077,6 +1104,12 @@ QPDF::decryptStream( +@@ -1051,6 +1078,12 @@ QPDF::decryptStream( QPDFObjectHandle& stream_dict, std::vector>& heap) { @@ -121,7 +121,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e std::string type; if (stream_dict.getKey("/Type").isName()) { type = stream_dict.getKey("/Type").getName(); -@@ -1181,6 +1214,10 @@ QPDF::decryptStream( +@@ -1154,6 +1187,10 @@ QPDF::decryptStream( } pipeline = new_pipeline.get(); heap.push_back(new_pipeline); @@ -132,9 +132,9 @@ diff -up qpdf-11.4.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.4.0/libqpdf/QPDF_e } void -diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax qpdf-11.4.0/libqpdf/QPDFWriter.cc ---- qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax 2023-05-22 17:31:18.992888290 +0200 -+++ qpdf-11.4.0/libqpdf/QPDFWriter.cc 2023-05-22 17:38:49.596889049 +0200 +diff -up qpdf-11.5.0/libqpdf/QPDFWriter.cc.relax qpdf-11.5.0/libqpdf/QPDFWriter.cc +--- qpdf-11.5.0/libqpdf/QPDFWriter.cc.relax 2023-07-09 16:00:51.000000000 +0200 ++++ qpdf-11.5.0/libqpdf/QPDFWriter.cc 2023-07-26 09:11:31.758155204 +0200 @@ -26,6 +26,10 @@ #include #include @@ -143,10 +143,10 @@ diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax qpdf-11.4.0/libqpdf/QPDFWriter. +#include +#endif + - QPDFWriter::ProgressReporter::~ProgressReporter() + QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default) { - // Must be explicit and not inline -- see QPDF_DLL_CLASS in -@@ -288,6 +292,13 @@ void + // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer +@@ -287,6 +291,13 @@ void QPDFWriter::setDeterministicID(bool val) { m->deterministic_id = val; @@ -160,7 +160,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax qpdf-11.4.0/libqpdf/QPDFWriter. } void -@@ -308,6 +319,13 @@ void +@@ -307,6 +318,13 @@ void QPDFWriter::setPreserveEncryption(bool val) { m->preserve_encryption = val; @@ -174,7 +174,7 @@ diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax qpdf-11.4.0/libqpdf/QPDFWriter. } void -@@ -1940,11 +1958,21 @@ QPDFWriter::generateID() +@@ -1894,11 +1912,21 @@ QPDFWriter::generateID() } } @@ -195,4 +195,4 @@ diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.relax qpdf-11.4.0/libqpdf/QPDFWriter. +#endif } - // If /ID already exists, follow the spec: use the original first + // If /ID already exists, follow the spec: use the original first word and generate a new second diff --git a/qpdf-s390x-disable-streamtest.patch b/qpdf-s390x-disable-streamtest.patch index de7d473..1f55983 100644 --- a/qpdf-s390x-disable-streamtest.patch +++ b/qpdf-s390x-disable-streamtest.patch @@ -1,17 +1,17 @@ -diff -up qpdf-11.4.0/libqpdf/QPDFWriter.cc.s390x-disable-streamtest qpdf-11.4.0/libqpdf/QPDFWriter.cc ---- qpdf-11.4.0/libqpdf/QPDFWriter.cc.s390x-disable-streamtest 2023-05-22 17:39:20.908097940 +0200 -+++ qpdf-11.4.0/libqpdf/QPDFWriter.cc 2023-05-22 17:40:22.782510735 +0200 -@@ -1763,7 +1763,6 @@ QPDFWriter::writeObjectStream(QPDFObject - // 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. +diff -up qpdf-11.5.0/libqpdf/QPDFWriter.cc.s390x-disable-streamtest qpdf-11.5.0/libqpdf/QPDFWriter.cc +--- qpdf-11.5.0/libqpdf/QPDFWriter.cc.s390x-disable-streamtest 2023-07-26 09:11:48.611267435 +0200 ++++ qpdf-11.5.0/libqpdf/QPDFWriter.cc 2023-07-26 09:12:55.743716337 +0200 +@@ -1722,7 +1722,6 @@ QPDFWriter::writeObjectStream(QPDFObject + if (obj_to_write.isStream()) { + // This condition occurred in a fuzz input. Ideally we should block it 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 -up qpdf-11.4.0/qpdf/qpdf.testcov.s390x-disable-streamtest qpdf-11.4.0/qpdf/qpdf.testcov ---- qpdf-11.4.0/qpdf/qpdf.testcov.s390x-disable-streamtest 2023-05-21 20:42:37.000000000 +0200 -+++ qpdf-11.4.0/qpdf/qpdf.testcov 2023-05-22 17:39:20.908097940 +0200 +diff -up qpdf-11.5.0/qpdf/qpdf.testcov.s390x-disable-streamtest qpdf-11.5.0/qpdf/qpdf.testcov +--- qpdf-11.5.0/qpdf/qpdf.testcov.s390x-disable-streamtest 2023-07-09 16:00:51.000000000 +0200 ++++ qpdf-11.5.0/qpdf/qpdf.testcov 2023-07-26 09:11:48.611267435 +0200 @@ -428,7 +428,6 @@ QPDF xref skipped space 0 QPDF eof skipping spaces before xref 1 QPDF_encryption user matches owner V < 5 0 @@ -20,9 +20,9 @@ diff -up qpdf-11.4.0/qpdf/qpdf.testcov.s390x-disable-streamtest qpdf-11.4.0/qpdf QPDFParser duplicate dict key 0 QPDFWriter no encryption sig contents 0 QPDFPageObjectHelper colorspace lookup 0 -diff -up qpdf-11.4.0/qpdf/qtest/specific-bugs.test.s390x-disable-streamtest qpdf-11.4.0/qpdf/qtest/specific-bugs.test ---- qpdf-11.4.0/qpdf/qtest/specific-bugs.test.s390x-disable-streamtest 2023-05-21 20:42:37.000000000 +0200 -+++ qpdf-11.4.0/qpdf/qtest/specific-bugs.test 2023-05-22 17:39:20.908097940 +0200 +diff -up qpdf-11.5.0/qpdf/qtest/specific-bugs.test.s390x-disable-streamtest qpdf-11.5.0/qpdf/qtest/specific-bugs.test +--- qpdf-11.5.0/qpdf/qtest/specific-bugs.test.s390x-disable-streamtest 2023-07-09 16:00:51.000000000 +0200 ++++ qpdf-11.5.0/qpdf/qtest/specific-bugs.test 2023-07-26 09:11:48.611267435 +0200 @@ -38,7 +38,6 @@ my @bug_tests = ( ["263", "empty xref stream", 2], ["335a", "ozz-fuzz-12152", 2], diff --git a/qpdf.spec b/qpdf.spec index 09c4752..01192ec 100644 --- a/qpdf.spec +++ b/qpdf.spec @@ -1,7 +1,7 @@ Summary: Command-line tools and library for transforming PDF files Name: qpdf -Version: 11.4.0 -Release: 2%{?dist} +Version: 11.5.0 +Release: 1%{?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) @@ -135,10 +135,10 @@ install -m 0644 completions/zsh/_qpdf %{buildroot}%{zsh_completions_dir}/_qpdf %{zsh_completions_dir}/_qpdf %files libs -%doc README.md TODO ChangeLog -%license Artistic-2.0 +%doc README.md TODO.md ChangeLog +%license Artistic-2.0 LICENSE.txt NOTICE.md %{_libdir}/libqpdf.so.29 -%{_libdir}/libqpdf.so.29.4.0 +%{_libdir}/libqpdf.so.29.5.0 %files devel %doc examples/*.cc examples/*.c @@ -151,6 +151,9 @@ install -m 0644 completions/zsh/_qpdf %{buildroot}%{zsh_completions_dir}/_qpdf %changelog +* Wed Jul 26 2023 Zdenek Dohnal - 11.5.0-1 +- 2221506 - qpdf-11.5.0 is available + * Fri Jul 21 2023 Fedora Release Engineering - 11.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 4dce71a..8d86588 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qpdf-11.4.0.tar.gz) = 6f31a37a9a52752c89d319e0d29d8e6c1e4885ca494de47a65f9374cdb5672497ab93f754481300c8e6c68fc2874860997b778dc05386b6f3e6a5a70a3f9f754 -SHA512 (qpdf-11.4.0-doc.zip) = 25aab31b8481034bba876411eab2034375a9ffed97666c221b211400b1a7e60cfc11b5237406733058fbbbd2412baad7aa6029ad4303d0ddd879f6d7aff3b2b0 +SHA512 (qpdf-11.5.0.tar.gz) = 3c8504de11c34e7d623b829c0c987ba5555c2bdcfdd5d4408d29f321fd79154ec2d6fa76f45556046dfc931b51bd75e3062973c36c8020383acacbe56c90e04c +SHA512 (qpdf-11.5.0-doc.zip) = 263fa79a9a1d14086787adf8ce2cfb1e951f504cb214a9c4b44e261a72e715a33e03dc3084a8aaa76e0b068ac0fe5905c6a1ec99e52e962c1589f1f4d0e6f678