From 0fd99c118573ca0caefb3b21e5842ec096700df9f04fbe6d19fd44fe68282703 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Tue, 26 Apr 2022 15:42:43 +0000 Subject: [PATCH 1/4] Accepting request 972942 from home:dspinella:branches:LibreOffice:Factory - Add poppler-22-04-0.patch OBS-URL: https://build.opensuse.org/request/show/972942 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1013 --- libreoffice.changes | 5 ++++ libreoffice.spec | 3 +++ poppler-22-04-0.patch | 62 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 poppler-22-04-0.patch diff --git a/libreoffice.changes b/libreoffice.changes index 917f173..6527b2d 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 26 15:34:26 UTC 2022 - Danilo Spinella + +- Add poppler-22-04-0.patch + ------------------------------------------------------------------- Tue Apr 19 10:40:59 UTC 2022 - Danilo Spinella diff --git a/libreoffice.spec b/libreoffice.spec index 8f9683d..9601130 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -115,6 +115,8 @@ Patch990: install-with-hardlinks.diff Patch991: libreoffice-no-destdircheck.patch # PATCH-FIX-UPSTRAM poppler-22-03-0.patch Patch992: poppler-22-03-0.patch +# PATCH-FIX-SUSE poppler-22-04-0.patch +Patch993: poppler-22-04-0.patch BuildRequires: %{name}-share-linker BuildRequires: ant BuildRequires: autoconf @@ -1025,6 +1027,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch990 -p1 %patch991 -p1 %patch992 -p1 +%patch993 -p1 # Disable some of the failing tests (some are random) %if 0%{?suse_version} < 1330 diff --git a/poppler-22-04-0.patch b/poppler-22-04-0.patch new file mode 100644 index 0000000..aeee505 --- /dev/null +++ b/poppler-22-04-0.patch @@ -0,0 +1,62 @@ +Index: libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +=================================================================== +--- libreoffice-7.3.3.1.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -474,12 +474,21 @@ int PDFOutDev::parseFont( long long nNew + { + // TODO(P3): Unfortunately, need to read stream twice, since + // we must write byte count to stdout before ++#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed ++ auto pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef()); ++ if ( pBuf ) ++ { ++ aNewFont.isEmbedded = true; ++ nSize = pBuf->size(); ++ } ++#else + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); + if( pBuf ) + { + aNewFont.isEmbedded = true; + gfree(pBuf); + } ++#endif + } + + m_aFontMap[ nNewId ] = aNewFont; +@@ -492,21 +501,35 @@ void PDFOutDev::writeFontFile( GfxFont* + return; + + int nSize = 0; ++#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed ++ auto pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef()); ++ if ( !pBuf ) ++ return; ++ nSize = pBuf->size(); ++#else + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); + if( !pBuf ) + return; ++#endif + + // ---sync point--- see SYNC STREAMS above + fflush(stdout); + ++#if POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed ++ if( fwrite(pBuf->data(), sizeof(unsigned char), nSize, g_binary_out) != static_cast(nSize) ) ++ { ++#else + if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast(nSize) ) + { + gfree(pBuf); ++#endif + exit(1); // error + } + // ---sync point--- see SYNC STREAMS above + fflush(g_binary_out); ++#if !POPPLER_CHECK_VERSION(22, 04, 0) // readEmbFontFile signature changed + gfree(pBuf); ++#endif + } + + #if POPPLER_CHECK_VERSION(0, 83, 0) From 81d3f955d0f20c3c2c20d7c59630e440bb67f7b1613d859ceaf25d24d2ae7d59 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Wed, 27 Apr 2022 08:29:11 +0000 Subject: [PATCH 2/4] Accepting request 973051 from home:dspinella:branches:LibreOffice:Factory OBS-URL: https://build.opensuse.org/request/show/973051 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1014 --- poppler-22-04-0.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/poppler-22-04-0.patch b/poppler-22-04-0.patch index aeee505..6ee941a 100644 --- a/poppler-22-04-0.patch +++ b/poppler-22-04-0.patch @@ -60,3 +60,27 @@ Index: libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx } #if POPPLER_CHECK_VERSION(0, 83, 0) +@@ -759,7 +782,11 @@ void PDFOutDev::updateFont(GfxState *sta + { + assert(state); + ++#if POPPLER_CHECK_VERSION(22, 04, 0) ++ std::shared_ptr gfxFont = state->getFont(); ++#else + GfxFont *gfxFont = state->getFont(); ++#endif + if( !gfxFont ) + return; + +@@ -776,7 +803,11 @@ void PDFOutDev::updateFont(GfxState *sta + m_aFontMap.find( fontID ); + if( it == m_aFontMap.end() ) + { ++#if POPPLER_CHECK_VERSION(22, 04, 0) ++ nEmbedSize = parseFont( fontID, gfxFont->get(), state ); ++#else + nEmbedSize = parseFont( fontID, gfxFont, state ); ++#endif + it = m_aFontMap.find( fontID ); + } + From 49fe9c47a116fc739c99016f528c1db6742c207a5a152c30d21c2c2c33193a1b Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Wed, 27 Apr 2022 12:00:43 +0000 Subject: [PATCH 3/4] Accepting request 973068 from home:marxin:branches:LibreOffice:Factory - Filter out binary-or-shlib-defines-rpath with $ORIGIN argument. It is pretty fine and it is newly reported by rpmlint. OBS-URL: https://build.opensuse.org/request/show/973068 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1015 --- libreoffice-rpmlintrc | 1 + libreoffice.changes | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/libreoffice-rpmlintrc b/libreoffice-rpmlintrc index 6da1683..ed45d94 100644 --- a/libreoffice-rpmlintrc +++ b/libreoffice-rpmlintrc @@ -1,2 +1,3 @@ # libreoffice devel package is de facto called libreoffice-sdk #addFilter("devel-file-in-non-devel-package") +addFilter("binary-or-shlib-defines-rpath .*ORIGIN") diff --git a/libreoffice.changes b/libreoffice.changes index 6527b2d..9122817 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 27 09:22:38 UTC 2022 - Martin Liška + +- Filter out binary-or-shlib-defines-rpath with $ORIGIN argument. + It is pretty fine and it is newly reported by rpmlint. + ------------------------------------------------------------------- Tue Apr 26 15:34:26 UTC 2022 - Danilo Spinella From 499a0048b60659d55220da0ad949a0c26d225e40a93a4055f5c05c651260e51c Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Wed, 27 Apr 2022 13:06:48 +0000 Subject: [PATCH 4/4] Accepting request 973193 from home:dspinella:branches:LibreOffice:Factory OBS-URL: https://build.opensuse.org/request/show/973193 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1016 --- poppler-22-04-0.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/poppler-22-04-0.patch b/poppler-22-04-0.patch index 6ee941a..d884c6f 100644 --- a/poppler-22-04-0.patch +++ b/poppler-22-04-0.patch @@ -77,10 +77,22 @@ Index: libreoffice-7.3.3.1/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx if( it == m_aFontMap.end() ) { +#if POPPLER_CHECK_VERSION(22, 04, 0) -+ nEmbedSize = parseFont( fontID, gfxFont->get(), state ); ++ nEmbedSize = parseFont( fontID, gfxFont.get(), state ); +#else nEmbedSize = parseFont( fontID, gfxFont, state ); +#endif it = m_aFontMap.find( fontID ); } +@@ -806,7 +837,11 @@ void PDFOutDev::updateFont(GfxState *sta + + if (nEmbedSize) + { ++#if POPPLER_CHECK_VERSION(22, 04, 0) ++ writeFontFile(gfxFont.get()); ++#else + writeFontFile(gfxFont); ++#endif + } + } +