diff --git a/0001-fix-testSignDocument_PEM_PDF.patch b/0001-fix-testSignDocument_PEM_PDF.patch deleted file mode 100644 index 32c7395..0000000 --- a/0001-fix-testSignDocument_PEM_PDF.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 599722cf77310429a9b9bd2a348486a08b60de0d Mon Sep 17 00:00:00 2001 -From: Miklos Vajna -Date: Mon, 13 Mar 2023 20:04:17 +0100 -Subject: svl: fix CppunitTest_desktop_lib's - DesktopLOKTest::testSignDocument_PEM_PDF - -The problem was that this test passed when the entire suite was running, -but not as an individual test. - -Digging deeper, this didn't pass in isolation because the test loads a -private key into memory (which is not in the NSS DB) and since commit -5592ee094ca9f09bfcc16537d931518d4e6b2231 (svl: fix -testSignDocument_PEM_PDF with "dbm:" NSS DB, 2022-04-28) we delete that -in-memory key as a workaround for the NSS dbm -> sqlite transition. - -Fix the problem by not deleting the in-memory private key in the LOK -case: this makes the test (operating in a stateless mode, with in-memory -keys) pass again and keeps the desktop signing (working with the NSS DB) -working. - -I noticed this test failure as a local test update of libxmlsec to 1.3 -RC started to fail here even when the whole suite was running, but looks -like this was working by accident before anyway, and the fix doesn't -hurt for libxmlsec 1.2, either. - -Change-Id: Id365ddc5c5d04d538609f444c0e3c4ab4b32a6fd -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148817 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna ---- - svl/source/crypto/cryptosign.cxx | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx -index 1d6337845569..e68ccb8aafda 100644 ---- a/svl/source/crypto/cryptosign.cxx -+++ b/svl/source/crypto/cryptosign.cxx -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -640,7 +641,11 @@ NSSCMSMessage *CreateCMSMessage(const PRTime* time, - // if it works, and fallback if it doesn't. - if (SECKEYPrivateKey * pPrivateKey = PK11_FindKeyByAnyCert(cert, nullptr)) - { -- SECKEY_DestroyPrivateKey(pPrivateKey); -+ if (!comphelper::LibreOfficeKit::isActive()) -+ { -+ // pPrivateKey only exists in the memory in the LOK case, don't delete it. -+ SECKEY_DestroyPrivateKey(pPrivateKey); -+ } - *cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA256); - } - else --- -cgit v1.2.1 - diff --git a/0001-include-filename-if-the-test-fails.patch b/0001-include-filename-if-the-test-fails.patch deleted file mode 100644 index 2f58fe0..0000000 --- a/0001-include-filename-if-the-test-fails.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d362de6dee0949704c917d65d06d2bf1bc0892c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 26 Jan 2023 09:59:47 +0000 -Subject: [PATCH] include filename if the test fails - -which it does for me with fedora 38 s390x - -Change-Id: I32ad30061717287e785a395afc893db1a5764bcd ---- - sw/qa/core/macros-test.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx -index 72ed9b5a9612..a8c76bef1883 100644 ---- a/sw/qa/core/macros-test.cxx -+++ b/sw/qa/core/macros-test.cxx -@@ -142,7 +142,7 @@ void SwMacrosTest::testVba() - - uno::Any aRet = executeMacro(testInfo[i].sMacroUrl); - OUString aStringRes; -- CPPUNIT_ASSERT(aRet >>= aStringRes); -+ CPPUNIT_ASSERT_MESSAGE(sFileName.toUtf8().getStr(), aRet >>= aStringRes); - CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes); - } - } --- -2.39.1 - diff --git a/0002-Fix-heap-use-after-free.patch b/0002-Fix-heap-use-after-free.patch new file mode 100644 index 0000000..d79a629 --- /dev/null +++ b/0002-Fix-heap-use-after-free.patch @@ -0,0 +1,50 @@ +From 694bacca057c9f1d93ab27d61199aec9d060b868 Mon Sep 17 00:00:00 2001 +From: Tibor Nagy +Date: Fri, 4 Aug 2023 00:39:24 +0200 +Subject: [PATCH] Fix heap-use-after-free + +The issue is caused by commit Ic87983fa6e3279a64841babc565fbe97710ff730 +(tdf#99808 sc: fix background of conditional formatting in merged cell) + +Change-Id: Ic72ba16c2649537dc3b486e07c12e2486cdf1957 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155328 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + sc/qa/unit/ucalc_condformat.cxx | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx +index 6b79a4318501..7a0abc7cf026 100644 +--- a/sc/qa/unit/ucalc_condformat.cxx ++++ b/sc/qa/unit/ucalc_condformat.cxx +@@ -1394,21 +1394,19 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testConditionStyleInMergedCell) + // Add a conditional format. + auto pFormat = std::make_unique(1, m_pDoc); + pFormat->SetRange(ScRange(0, 0, 0, 0, 0, 0)); +- auto pFormatTmp = pFormat.get(); +- sal_uLong nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0); + + // Add condition in which if the value equals 1, set the "Good" style. + ScCondFormatEntry* pEntry = new ScCondFormatEntry( + ScConditionMode::Equal, "=1", "", *m_pDoc, ScAddress(0, 0, 0), ScResId(STR_STYLENAME_GOOD)); +- pFormatTmp->AddEntry(pEntry); ++ pFormat->AddEntry(pEntry); + + // Apply the format to the range. +- m_pDoc->AddCondFormatData(pFormatTmp->GetRange(), 0, nKey); ++ m_pDoc->AddCondFormatData(pFormat->GetRange(), 0, 1); + + ScDocFunc& rFunc = m_xDocShell->GetDocFunc(); +- sal_uInt32 nOldFormat = pFormatTmp->GetKey(); +- const ScRangeList& rRangeList = pFormatTmp->GetRange(); +- rFunc.ReplaceConditionalFormat(nOldFormat, pFormatTmp->Clone(), 0, rRangeList); ++ sal_uInt32 nOldFormat = pFormat->GetKey(); ++ const ScRangeList& rRangeList = pFormat->GetRange(); ++ rFunc.ReplaceConditionalFormat(nOldFormat, std::move(pFormat), 0, rRangeList); + + CPPUNIT_ASSERT_EQUAL(true, aListener.mbPaintAllMergedCell); + +-- +2.41.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 83a5822..0428099 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1,5 +1,5 @@ # download path contains version without the last (fourth) digit -%global libo_version 7.5.5 +%global libo_version 7.6.0 # Should contain .alphaX / .betaX, if this is pre-release (actually # pre-RC) version. The pre-release string is part of tarball file names, # so we need a way to define it easily at one place. @@ -57,8 +57,8 @@ ExcludeArch: %{ix86} Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 -Version: %{libo_version}.2 -Release: 3%{?libo_prerelease}%{?dist} +Version: %{libo_version}.3 +Release: 2%{?libo_prerelease}%{?dist} # default new files are: MPLv2 # older files are typically: MPLv2 incorporating work under ASLv2 # nlpsolver is: LGPLv3 @@ -126,6 +126,7 @@ BuildRequires: patch BuildRequires: perl(Digest::MD5) BuildRequires: perl(FindBin) BuildRequires: perl(base) +BuildRequires: perl(lib) %if 0%{?fedora} BuildRequires: glibc-all-langpacks BuildRequires: libappstream-glib @@ -223,10 +224,11 @@ BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libeot) BuildRequires: pkgconfig(libepubgen-0.1) BuildRequires: pkgconfig(libqxp-0.0) -BuildRequires: pkgconfig(liborcus-0.17) -BuildRequires: pkgconfig(mdds-2.0) +BuildRequires: pkgconfig(liborcus-0.18) +BuildRequires: pkgconfig(mdds-2.1) BuildRequires: pkgconfig(zxing) BuildRequires: libnumbertext-devel +BuildRequires: frozen-static %ifarch %{java_arches} # java stuff @@ -243,6 +245,7 @@ BuildRequires: google-carlito-fonts BuildRequires: google-rubik-fonts # Amiri used in vcl/qa/cppunit tests BuildRequires: amiri-fonts +BuildRequires: amiri-quran-fonts BuildRequires: liberation-mono-fonts BuildRequires: liberation-narrow-fonts BuildRequires: liberation-sans-fonts @@ -269,11 +272,10 @@ Patch3: 0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch Patch4: 0001-default-to-sifr-for-gnome-light-mode.patch # TODO investigate these Patch5: 0001-aarch64-failing-here.patch -Patch6: 0001-include-filename-if-the-test-fails.patch # backported -Patch7: 0001-fix-testSignDocument_PEM_PDF.patch Patch8: 0001-Only-pass-I.-arguments-to-g-ir-scanner-by-using-pkg-.patch Patch9: 0001-Adapt-test-code-to-cURL-8.2.0.patch +Patch10: 0002-Fix-heap-use-after-free.patch # not upstreamed Patch500: 0001-disable-libe-book-support.patch @@ -997,6 +999,11 @@ gpgv2 --keyring ./keyring.gpg %{SOURCE5} %{SOURCE4} %setup -q -n %{name}-%{version}%{?libo_prerelease} -b 2 -b 4 rm -rf git-hooks */git-hooks +# This is normally done by %%autosetup -S git_am, +# but that does not work with multiple -b options, so we use plain %%setup above +%global __scm git_am +%__scm_setup_git_am -q + #Customize Palette to add Red Hat colours (head -n -1 extras/source/palettes/standard.soc && \ echo -e ' @@ -1006,6 +1013,7 @@ rm -rf git-hooks */git-hooks ' && \ tail -n 1 extras/source/palettes/standard.soc) > redhat.soc mv -f redhat.soc extras/source/palettes/standard.soc +git commit -q -m 'add Red Hat colors to palette' extras/source/palettes/standard.soc # apply patches %autopatch -p1 -M 99 @@ -1013,14 +1021,25 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch500 -p1 %endif -# Temporarily disable failig tests -sed -i -e /CppunitTest_sc_array_functions_test/d sc/Module_sc.mk # ppc64le -sed -i -e /CppunitTest_sc_addin_functions_test/d sc/Module_sc.mk # aarch64/ppc64*/s390x -sed -i -e /CppunitTest_sc_financial_functions_test/d sc/Module_sc.mk # ppc64* -sed -i -e /CppunitTest_sc_statistical_functions_test/d sc/Module_sc.mk # aarch64/ppc64* -sed -i -e /CppunitTest_dbaccess_hsqldb_test/d dbaccess/Module_dbaccess.mk # ppc64le -sed -i -e s/CppunitTest_dbaccess_RowSetClones// dbaccess/Module_dbaccess.mk # ppc64le -sed -i -e s/CppunitTest_sw_macros_test// sw/Module_sw.mk # s390x +# Temporarily disable failing tests +%ifarch ppc64le +sed -i -e /CppunitTest_sc_array_functions_test/d sc/Module_sc.mk +sed -i -e /CppunitTest_sc_addin_functions_test/d sc/Module_sc.mk +sed -i -e /CppunitTest_sc_financial_functions_test/d sc/Module_sc.mk +sed -i -e /CppunitTest_sc_statistical_functions_test/d sc/Module_sc.mk +sed -i -e /CppunitTest_dbaccess_hsqldb_test/d dbaccess/Module_dbaccess.mk +sed -i -e s/CppunitTest_dbaccess_RowSetClones// dbaccess/Module_dbaccess.mk +%endif +%ifarch aarch64 +sed -i -e /CppunitTest_sc_addin_functions_test/d sc/Module_sc.mk +sed -i -e /CppunitTest_sc_statistical_functions_test/d sc/Module_sc.mk +%endif +%ifarch s390x +sed -i -e /CppunitTest_sc_addin_functions_test/d sc/Module_sc.mk +sed -i -e s/CppunitTest_sw_macros_test// sw/Module_sw.mk +# https://bugs.documentfoundation.org/show_bug.cgi?id=125978 +sed -i -e s/CustomTarget_uno_test// testtools/Module_testtools.mk +%endif #see rhbz#2072615 rm -f vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9936-1.tiff @@ -1113,12 +1132,9 @@ touch autogen.lastrun %{?archoptions} \ %{?flatpakoptions} -if ! make verbose=true build; then - echo "build attempt 1 failed" - if ! make verbose=true build; then - echo "build attempt 2 failed" - make verbose=true GMAKE_OPTIONS=-rj1 build - fi +if ! %make_build; then + echo "build attempt 1 failed" + make verbose=true build fi #generate the icons and mime type stuff @@ -1465,6 +1481,9 @@ export DESTDIR=%{buildroot} # org.libreoffice.LibreOffice.appdata.xml: solenv/bin/assemble-flatpak-appdata.sh \ %{buildroot}%{_datadir}/metainfo/ 0 +# ...then append the original files to the single file: +solenv/bin/assemble-flatpak-appdata-step2.sh \ + %{buildroot}%{_datadir}/metainfo/ %{buildroot}%{_datadir}/metainfo/ rm %{buildroot}%{_datadir}/metainfo/libreoffice-*.appdata.xml %endif @@ -1529,7 +1548,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libdeployment.so %{baseinstdir}/program/libdeploymentgui.so %{baseinstdir}/program/libdlgprovlo.so -%{baseinstdir}/program/libexpwraplo.so +#%%{baseinstdir}/program/libexpwraplo.so %{baseinstdir}/program/libfps_officelo.so %{baseinstdir}/program/gdbtrace %{baseinstdir}/program/gengal @@ -1561,6 +1580,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libdesktop_detectorlo.so %{baseinstdir}/program/libdict_ja.so %{baseinstdir}/program/libdict_zh.so +%{baseinstdir}/program/libdocmodello.so %{baseinstdir}/program/libdrawinglayerlo.so %{baseinstdir}/program/libdrawinglayercorelo.so %{baseinstdir}/program/libeditenglo.so @@ -2002,7 +2022,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/impress.abignore %endif %{baseinstdir}/program/libPresentationMinimizerlo.so -%{baseinstdir}/program/libPresenterScreenlo.so +#%%{baseinstdir}/program/libPresenterScreenlo.so %{baseinstdir}/program/libwpftimpresslo.so %dir %{baseinstdir}/share/config/soffice.cfg/simpress %{baseinstdir}/share/config/soffice.cfg/simpress/effects.xml @@ -2242,8 +2262,9 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/LibreOfficeKit %changelog -* Sun Aug 06 2023 Mattia Verga - 1:7.5.5.2-3 -- Do not setup sources as git repo during build. +* Tue Aug 15 2023 Mattia Verga - 1:7.6.0.3-2 +- Disable unreliable test under s390x +- Try verbose make if first build attempt fails * Wed Aug 02 2023 Gwyn Ciesla - 1:7.5.5.2-2 - Poppler rebuild.