From b35a8d39dc8c77d8ce3e9a302b6d0b112f7a9469 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Dec 04 2020 13:07:39 +0000 Subject: fix without-pdfium xmlsecurity tests --- diff --git a/0001-disable-tests-that-don-t-work-without-pdfium.patch b/0001-disable-tests-that-don-t-work-without-pdfium.patch new file mode 100644 index 0000000..6783881 --- /dev/null +++ b/0001-disable-tests-that-don-t-work-without-pdfium.patch @@ -0,0 +1,61 @@ +From 5597567fbecbb62cdc9e64e68b9fe9bf23e032a6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 4 Dec 2020 12:58:20 +0000 +Subject: [PATCH] disable tests that don't work without pdfium + +we're probably past the end of the road on --disable-pdfium + +Change-Id: Id91ea6c77bbdb3ecf609a7ffd16a278eb3b17e91 +--- + xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +index 7659fe9485c5..68738134cc36 100644 +--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx ++++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +@@ -7,6 +7,8 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + ++#include ++ + #include + #include + +@@ -414,6 +416,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1) + = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p1.pdf", 1, + /*rExpectedSubFilter=*/OString()); + CPPUNIT_ASSERT(!aInfos.empty()); ++#if HAVE_FEATURE_PDFIUM + SignatureInformation& rInformation = aInfos[0]; + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 0 (SecurityOperationStatus_UNKNOWN) +@@ -421,6 +424,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP1) + // i.e. annotation after a P1 signature was not considered as a bad modification. + CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN, + rInformation.nStatus); ++#endif + } + + CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp) +@@ -429,14 +433,15 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testBadCertP3Stamp) + = verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad-cert-p3-stamp.pdf", 1, + /*rExpectedSubFilter=*/OString()); + CPPUNIT_ASSERT(!aInfos.empty()); ++#if HAVE_FEATURE_PDFIUM + SignatureInformation& rInformation = aInfos[0]; +- + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 0 (SecurityOperationStatus_UNKNOWN) + // - Actual : 1 (SecurityOperationStatus_OPERATION_SUCCEEDED) + // i.e. adding a stamp annotation was not considered as a bad modification. + CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN, + rInformation.nStatus); ++#endif + } + + /// Test writing a PAdES signature. +-- +2.28.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 115695e..9cc6ddd 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -252,6 +252,7 @@ Patch4: 0001-rhbz-1870501-crash-on-reexport-of-odg.patch Patch6: 0001-rhbz-1882616-move-cursor-one-step-at-a-time-in-the-d.patch Patch7: 0001-export-HYPERLINK-target-in-html-clipboard-export.patch Patch10: 0001-gcc11.patch +Patch11: 0001-disable-tests-that-don-t-work-without-pdfium.patch # Patches with numbers above 100 are applied conditionally Patch101: 0001-Upgrade-liborcus-to-0.16.0.patch