diff --git a/0001-Backport-fix-for-test-that-started-to-fail-with-libx.patch b/0001-Backport-fix-for-test-that-started-to-fail-with-libx.patch new file mode 100644 index 0000000..ac9e565 --- /dev/null +++ b/0001-Backport-fix-for-test-that-started-to-fail-with-libx.patch @@ -0,0 +1,76 @@ +From 428e59f229fac1470b7c1cb240f42149843f5409 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Wed, 26 Apr 2023 11:34:42 +0200 +Subject: [PATCH] Backport fix for test that started to fail with libxml2 + 2.10.4 + +This is a backport of the relevant part of +91fcb290ab0cc26a8ec584da9610f553fd27ac97 "libxml2: upgrade to release 2.10.4" +from libreoffice-7-5-3. + +I had seen builds of LibreOffice 7.5.2 on Flathub start to fail now after + +"Update elements/components/libxml2.bst to v2.10.4-0", with the same symptoms as +described for the backported fix, e.g. +(), + +> xmltesttools.cxx:188:Assertion +> Test name: testReqIfTable::Import_Export +> equality assertion failed +> - Expected: 1 +> - Actual : 0 +> - In , XPath '/html/body/div/table/tr/th' number of nodes is incorrect +> Failures !!! +> Run: 81 Failure total: 1 Failures: 1 Errors: 0 +> Error: a unit test failed, please do one of: +> make CppunitTest_sw_htmlexport CPPUNITTRACE="gdb --args" +> # for interactive debugging on Linux +> make CppunitTest_sw_htmlexport VALGRIND=memcheck +> # for memory checking +> make CppunitTest_sw_htmlexport DEBUGCPPUNIT=TRUE +> # for exception catching +> You can limit the execution to just one particular test by: +> make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params... +> make[1]: *** [/run/build/libreoffice/solenv/gbuild/CppunitTest.mk:121: /run/build/libreoffice/workdir/CppunitTest/sw_htmlexport.test] Error 1 + +Change-Id: I9ffc01f8b8af1f43cf0d65be404787e300655c02 +--- + sw/qa/extras/htmlexport/htmlexport.cxx | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx +index a8cc4d2cef04..d78e35c1413a 100644 +--- a/sw/qa/extras/htmlexport/htmlexport.cxx ++++ b/sw/qa/extras/htmlexport/htmlexport.cxx +@@ -777,16 +777,24 @@ DECLARE_HTMLEXPORT_TEST(testReqIfJpgImg, "reqif-jpg-img.xhtml") + + DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml") + { +- htmlDocUniquePtr pDoc = parseHtml(maTempFile); ++ SvMemoryStream aStream; ++ WrapReqifFromTempFile(aStream); ++ xmlDocUniquePtr pDoc = parseXmlStream(&aStream); + CPPUNIT_ASSERT(pDoc); + + //
was missing, so the XHTML fragment wasn't a valid + // xhtml.BlkStruct.class type anymore. +- assertXPath(pDoc, "/html/body/div/table/tr/th", 1); ++ assertXPath(pDoc, ++ "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", ++ 1); + // Make sure that the cell background is not written using CSS. +- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "style"); ++ assertXPathNoAttribute( ++ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", ++ "style"); + // The attribute was present, which is not valid in reqif-xhtml. +- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor"); ++ assertXPathNoAttribute( ++ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th", ++ "bgcolor"); + } + + DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt") +-- +2.40.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 0a99915..14e426e 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -268,9 +268,10 @@ Patch3: 0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch Patch4: 0001-Use-sifr-and-sifr_dark-for-gnome.patch Patch5: 0001-rhbz-2171265-Report-fatal-InitApplicationServiceMana.patch Patch6: 0001-rhbz-2171265-Filter-out-all-non-.rdb-files.patch +Patch7: 0001-Backport-fix-for-test-that-started-to-fail-with-libx.patch # TODO investigate these -Patch7: 0001-aarch64-failing-here.patch -Patch8: 0001-include-filename-if-the-test-fails.patch +Patch8: 0001-aarch64-failing-here.patch +Patch9: 0001-include-filename-if-the-test-fails.patch # not upstreamed Patch500: 0001-disable-libe-book-support.patch