2255755 - qpdf-11.7.0 is available
This commit is contained in:
parent
8ecc4f2c15
commit
0b33cd9e3a
2
.gitignore
vendored
2
.gitignore
vendored
@ -64,3 +64,5 @@
|
||||
/qpdf-11.6.3.tar.gz
|
||||
/qpdf-11.6.4.tar.gz
|
||||
/qpdf-11.6.4-doc.zip
|
||||
/qpdf-11.7.0.tar.gz
|
||||
/qpdf-11.7.0-doc.zip
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
diff --git a/qpdf/qtest/encryption.test b/qpdf/qtest/encryption.test
|
||||
index 672eb995..2e6d89ac 100644
|
||||
--- a/qpdf/qtest/encryption.test
|
||||
+++ b/qpdf/qtest/encryption.test
|
||||
@@ -373,19 +373,8 @@ $td->runtest("show-encryption works invalid password",
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
my @cenc = (
|
||||
- [11, 'hybrid-xref.pdf', "''", 'r2', "", ""],
|
||||
- [12, 'hybrid-xref.pdf', "''", 'r3', "", ""],
|
||||
- [15, 'hybrid-xref.pdf', "''", 'r4', "", ""],
|
||||
[17, 'hybrid-xref.pdf', "''", 'r5', "", "owner3"],
|
||||
[18, 'hybrid-xref.pdf', "''", 'r6', "", "user4"],
|
||||
- [13, 'c-r2.pdf', 'user1', 'decrypt with user',
|
||||
- "user password: user1\n", ""],
|
||||
- [13, 'c-r3.pdf', 'owner2', 'decrypt with owner',
|
||||
- "user password: user2\n", ""],
|
||||
- [13, 'c-r5-in.pdf', 'user3', 'decrypt R5 with user',
|
||||
- "user password: user3\n", ""],
|
||||
- [13, 'c-r6-in.pdf', 'owner4', 'decrypt R6 with owner',
|
||||
- "user password: \n", ""],
|
||||
);
|
||||
$n_tests += 2 * @cenc;
|
||||
|
||||
@@ -551,10 +540,8 @@ $td->runtest("check encryption",
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
# Look at some actual V4 files
|
||||
-$n_tests += 17;
|
||||
-foreach my $d (['--force-V4', 'V4'],
|
||||
- ['--cleartext-metadata', 'V4-clearmeta'],
|
||||
- ['--use-aes=y', 'V4-aes'],
|
||||
+$n_tests += 11;
|
||||
+foreach my $d (['--cleartext-metadata', 'V4-clearmeta'],
|
||||
['--cleartext-metadata --use-aes=y', 'V4-aes-clearmeta'])
|
||||
{
|
||||
my ($args, $out) = @$d;
|
||||
diff --git a/zlib-flate/qtest/zf.test b/zlib-flate/qtest/zf.test
|
||||
index d864a130..469a5fb2 100644
|
||||
--- a/zlib-flate/qtest/zf.test
|
||||
+++ b/zlib-flate/qtest/zf.test
|
||||
@@ -11,11 +11,11 @@ foreach my $level ('', '=1', '=9')
|
||||
{
|
||||
my $f = $level;
|
||||
$f =~ s/=/-/;
|
||||
- $td->runtest("compress",
|
||||
- {$td->COMMAND =>
|
||||
- "zlib-flate -compress$level < 1.uncompressed"},
|
||||
- {$td->FILE => "1.compressed$f",
|
||||
- $td->EXIT_STATUS => 0});
|
||||
+ # $td->runtest("compress",
|
||||
+ # {$td->COMMAND =>
|
||||
+ # "zlib-flate -compress$level < 1.uncompressed"},
|
||||
+ # {$td->FILE => "1.compressed$f",
|
||||
+ # $td->EXIT_STATUS => 0});
|
||||
|
||||
$td->runtest("uncompress",
|
||||
{$td->COMMAND => "zlib-flate -uncompress < 1.compressed"},
|
||||
@@ -36,4 +36,4 @@ $td->runtest("corrupted input",
|
||||
$td->EXIT_STATUS => 3},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
-$td->report(8);
|
||||
+$td->report(5);
|
||||
@ -1,6 +1,6 @@
|
||||
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
|
||||
diff -up qpdf-11.7.0/libqpdf/QPDF.cc.relax qpdf-11.7.0/libqpdf/QPDF.cc
|
||||
--- qpdf-11.7.0/libqpdf/QPDF.cc.relax 2023-12-24 13:36:07.000000000 +0100
|
||||
+++ qpdf-11.7.0/libqpdf/QPDF.cc 2024-01-08 15:17:27.020951639 +0100
|
||||
@@ -13,6 +13,10 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
@ -39,9 +39,9 @@ diff -up qpdf-11.5.0/libqpdf/QPDF.cc.relax qpdf-11.5.0/libqpdf/QPDF.cc
|
||||
}
|
||||
|
||||
void
|
||||
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
|
||||
diff -up qpdf-11.7.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.7.0/libqpdf/QPDF_encryption.cc
|
||||
--- qpdf-11.7.0/libqpdf/QPDF_encryption.cc.relax 2023-12-24 13:36:07.000000000 +0100
|
||||
+++ qpdf-11.7.0/libqpdf/QPDF_encryption.cc 2024-01-08 15:19:52.303117277 +0100
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <qpdf/assert_debug.h>
|
||||
@ -62,7 +62,7 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.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};
|
||||
@@ -351,10 +357,21 @@ QPDF::compute_data_key(
|
||||
@@ -349,10 +355,21 @@ QPDF::compute_data_key(
|
||||
result += "sAlT";
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_e
|
||||
return {reinterpret_cast<char*>(digest), std::min(result.length(), toS(16))};
|
||||
}
|
||||
|
||||
@@ -978,6 +995,12 @@ QPDF::getKeyForObject(
|
||||
@@ -976,6 +993,12 @@ QPDF::getKeyForObject(
|
||||
void
|
||||
QPDF::decryptString(std::string& str, QPDFObjGen const& og)
|
||||
{
|
||||
@ -97,7 +97,7 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_e
|
||||
if (!og.isIndirect()) {
|
||||
return;
|
||||
}
|
||||
@@ -1039,6 +1062,10 @@ QPDF::decryptString(std::string& str, QP
|
||||
@@ -1036,6 +1059,10 @@ QPDF::decryptString(std::string& str, QP
|
||||
} catch (std::runtime_error& e) {
|
||||
throw damagedPDF("error decrypting string for object " + og.unparse() + ": " + e.what());
|
||||
}
|
||||
@ -107,10 +107,10 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_e
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
||||
// Prepend a decryption pipeline to 'pipeline'. The decryption pipeline (returned as
|
||||
@@ -1051,6 +1078,12 @@ QPDF::decryptStream(
|
||||
QPDFObjectHandle& stream_dict,
|
||||
std::vector<std::shared_ptr<Pipeline>>& heap)
|
||||
std::unique_ptr<Pipeline>& decrypt_pipeline)
|
||||
{
|
||||
+#ifdef USE_CRYPTO_GNUTLS
|
||||
+ unsigned oldmode = gnutls_fips140_mode_enabled();
|
||||
@ -121,10 +121,10 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_e
|
||||
std::string type;
|
||||
if (stream_dict.getKey("/Type").isName()) {
|
||||
type = stream_dict.getKey("/Type").getName();
|
||||
@@ -1154,6 +1187,10 @@ QPDF::decryptStream(
|
||||
@@ -1151,6 +1184,10 @@ QPDF::decryptStream(
|
||||
toI(key.length()));
|
||||
}
|
||||
pipeline = new_pipeline.get();
|
||||
heap.push_back(new_pipeline);
|
||||
pipeline = decrypt_pipeline.get();
|
||||
+
|
||||
+#ifdef USE_CRYPTO_GNUTLS
|
||||
+ gnutls_fips140_set_mode(static_cast<gnutls_fips_mode_t>(oldmode), GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
@ -132,9 +132,9 @@ diff -up qpdf-11.5.0/libqpdf/QPDF_encryption.cc.relax qpdf-11.5.0/libqpdf/QPDF_e
|
||||
}
|
||||
|
||||
void
|
||||
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
|
||||
diff -up qpdf-11.7.0/libqpdf/QPDFWriter.cc.relax qpdf-11.7.0/libqpdf/QPDFWriter.cc
|
||||
--- qpdf-11.7.0/libqpdf/QPDFWriter.cc.relax 2023-12-24 13:36:07.000000000 +0100
|
||||
+++ qpdf-11.7.0/libqpdf/QPDFWriter.cc 2024-01-08 15:17:27.022951614 +0100
|
||||
@@ -26,6 +26,10 @@
|
||||
#include <cstdlib>
|
||||
#include <stdexcept>
|
||||
@ -174,7 +174,7 @@ diff -up qpdf-11.5.0/libqpdf/QPDFWriter.cc.relax qpdf-11.5.0/libqpdf/QPDFWriter.
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1894,11 +1912,21 @@ QPDFWriter::generateID()
|
||||
@@ -1890,11 +1908,21 @@ QPDFWriter::generateID()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
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.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
|
||||
QPDF_encryption same password 1
|
||||
-QPDFWriter stream in ostream 0
|
||||
QPDFParser duplicate dict key 0
|
||||
QPDFWriter no encryption sig contents 0
|
||||
QPDFPageObjectHelper colorspace lookup 0
|
||||
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],
|
||||
["335b", "ozz-fuzz-14845", 2],
|
||||
- ["fuzz-16214", "stream in object stream", 3, "--preserve-unreferenced"],
|
||||
# When adding to this list, consider adding to CORPUS_FROM_TEST in
|
||||
# fuzz/CMakeLists.txt and updating the count in
|
||||
# fuzz/qtest/fuzz.test.
|
||||
87
qpdf.spec
87
qpdf.spec
@ -1,7 +1,7 @@
|
||||
Summary: Command-line tools and library for transforming PDF files
|
||||
Name: qpdf
|
||||
Version: 11.6.4
|
||||
Release: 2%{?dist}
|
||||
Version: 11.7.0
|
||||
Release: 1%{?dist}
|
||||
# MIT: e.g. libqpdf/sha2.c, but those are not compiled in (GNUTLS is used)
|
||||
# upstream uses ASL 2.0 now, but he allowed other to distribute qpdf under
|
||||
# old license (see README)
|
||||
@ -12,14 +12,7 @@ Source1: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name
|
||||
|
||||
# make qpdf working under FIPS, downstream patch
|
||||
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
|
||||
# Disable zlib-flate compression tests and some encryption tests because they
|
||||
# are known to fail when using zlib-ng-compat.
|
||||
# TODO: Remove this patch after upstream has a better solution for this.
|
||||
# Upstream discussion: https://github.com/qpdf/qpdf/issues/774
|
||||
Patch3: bz2254778.patch
|
||||
|
||||
|
||||
# gcc and gcc-c++ are no longer in buildroot by default
|
||||
# gcc is needed for qpdf-ctest.c
|
||||
@ -96,75 +89,6 @@ QPDF Manual
|
||||
%setup -q
|
||||
|
||||
%patch -P 1 -p1 -b .relax
|
||||
%ifarch s390x
|
||||
%patch -P 2 -p1 -b .s390x-disable-streamtest
|
||||
%endif
|
||||
%patch -P 3 -p1 -b .bz2254778
|
||||
|
||||
# Remove tests that are known to fail with zlib-ng-compat.
|
||||
# All these tests compare compressed data. With the transition to
|
||||
# zlib-ng-compat, the compressed data changed causing these tests to fail
|
||||
# despite the generated files being correct.
|
||||
# TODO: Remove this code after upstream has a better solution for this.
|
||||
# Upstream discussion: https://github.com/qpdf/qpdf/issues/774
|
||||
rm -f \
|
||||
examples/qtest/c-objects.test \
|
||||
examples/qtest/custom-filter.test \
|
||||
examples/qtest/invert-images.test \
|
||||
examples/qtest/overlay-page.test \
|
||||
examples/qtest/qpdf-job.test \
|
||||
examples/qtest/qpdfjob-c.test \
|
||||
examples/qtest/qpdfjob-remove-annotations.test \
|
||||
examples/qtest/set-form-values.test \
|
||||
libtests/qtest/logger.test \
|
||||
libtests/qtest/lzw.test \
|
||||
libtests/qtest/matrix.test \
|
||||
libtests/qtest/md5.test \
|
||||
libtests/qtest/nntree.test \
|
||||
libtests/qtest/numrange.test \
|
||||
libtests/qtest/ph.test \
|
||||
libtests/qtest/pl_function.test \
|
||||
libtests/qtest/predictors.test \
|
||||
libtests/qtest/qintc.test \
|
||||
libtests/qtest/qutil.test \
|
||||
libtests/qtest/random.test \
|
||||
libtests/qtest/rc4.test \
|
||||
libtests/qtest/runlength.test \
|
||||
libtests/qtest/sha2.test \
|
||||
libtests/qtest/sparse_array.test \
|
||||
qpdf/qtest/attachments.test \
|
||||
qpdf/qtest/basic-parsing.test \
|
||||
qpdf/qtest/c-api.test \
|
||||
qpdf/qtest/coalesce-contents.test \
|
||||
qpdf/qtest/compression-level.test \
|
||||
qpdf/qtest/copy-annotations.test \
|
||||
qpdf/qtest/custom-pipeline.test \
|
||||
qpdf/qtest/dangling-refs.test \
|
||||
qpdf/qtest/decode-parameters.test \
|
||||
qpdf/qtest/deterministic-id.test \
|
||||
qpdf/qtest/encryption-parameters.test \
|
||||
qpdf/qtest/error-condition.test \
|
||||
qpdf/qtest/extensions-dictionary.test \
|
||||
qpdf/qtest/filter-abbreviations.test \
|
||||
qpdf/qtest/form-xobject.test \
|
||||
qpdf/qtest/inline-images.test \
|
||||
qpdf/qtest/linearization.test \
|
||||
qpdf/qtest/linearize-pass1.test \
|
||||
qpdf/qtest/many-nulls.test \
|
||||
qpdf/qtest/merge-and-split.test \
|
||||
qpdf/qtest/newline-before-endstream.test \
|
||||
qpdf/qtest/page-errors.test \
|
||||
qpdf/qtest/pages-tree.test \
|
||||
qpdf/qtest/parsing.test \
|
||||
qpdf/qtest/preserve-unref.test \
|
||||
qpdf/qtest/qpdf-json.test \
|
||||
qpdf/qtest/qpdfjob.test \
|
||||
qpdf/qtest/replace-input.test \
|
||||
qpdf/qtest/rotate-pages.test \
|
||||
qpdf/qtest/specific-file.test \
|
||||
qpdf/qtest/split-pages.test \
|
||||
qpdf/qtest/stream-replacements.test \
|
||||
qpdf/qtest/xref-streams.test
|
||||
|
||||
# unpack zip file with manual
|
||||
unzip %{SOURCE1}
|
||||
@ -209,7 +133,7 @@ install -m 0644 completions/zsh/_qpdf %{buildroot}%{zsh_completions_dir}/_qpdf
|
||||
%doc README.md TODO.md ChangeLog
|
||||
%license Artistic-2.0 LICENSE.txt NOTICE.md
|
||||
%{_libdir}/libqpdf.so.29
|
||||
%{_libdir}/libqpdf.so.29.6.4
|
||||
%{_libdir}/libqpdf.so.29.7.0
|
||||
|
||||
%files devel
|
||||
%doc examples/*.cc examples/*.c
|
||||
@ -222,6 +146,9 @@ install -m 0644 completions/zsh/_qpdf %{buildroot}%{zsh_completions_dir}/_qpdf
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 08 2024 Zdenek Dohnal <zdohnal@redhat.com> - 11.7.0-1
|
||||
- 2255755 - qpdf-11.7.0 is available
|
||||
|
||||
* Tue Dec 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 11.6.4-2
|
||||
- 2254778 - remove the tests which fail with zlib-ng-compat for now
|
||||
|
||||
|
||||
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (qpdf-11.6.4.tar.gz) = 4e2497ae0f2524173b9288466e94a5bcab8326c153a605b4de7a7c55f640934818ecb40c2f9bbb7508c5bd7afd529fa1f88dd08647bfaa4d2b3b6118ca928c9a
|
||||
SHA512 (qpdf-11.6.4-doc.zip) = 2ebbf7b257adc56b27f645cdda9b311c21db4823f3fb6227a408e874a4aff4a0de2ccb578e71790287141cacac71e08d3f13b87e34041e0c6a980ea89918826e
|
||||
SHA512 (qpdf-11.7.0.tar.gz) = 6ee302671fd4513c5b22f101feb773b4101de6cc5ff6b0e25d1daa03df82420f87ce7db49a6c47758d7e8bbc3beeb997d4671d52e4cf0ac0d4f817f10677d1f9
|
||||
SHA512 (qpdf-11.7.0-doc.zip) = 7ceeff62788defe3649a8d242220c7c8208ebe92dbd9d67b4b53d5036afb1cdbcfe46b4140b064b0542cba2d8eaaad6eedec1ed7b7bd0ccafe2dd7aa20efaa69
|
||||
|
||||
Loading…
Reference in New Issue
Block a user