poppler: upgrade 24.12.0 -> 25.01.0

Includes fix for CVE-2024-56378

Changelog:
===========
core:
* TextOutputDev: Better detect fakebold words
* TextOutputDev: Faster sorting algorithm
* Internal code improvements
* Fix crashes in malformed documents

cpp:
* Remove rect parameter from image::copy, it was never implemented

qt6:
* Fix crash in Submit Forms if document links to non existing field

qt5:
* Fix crash in Submit Forms if document links to non existing field

glib:
* mark transfer of poppler_page_get_selected_region

utils:
* pdfdetach: Make -savefile work with Unicode strings. Issue #1540

build system:
* Don't update pdfsig.pot when POT-Creation-date is the only change

Droped 0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch
as this is available in 25.01.0

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Yogita Urade 2025-01-20 12:13:36 +00:00 committed by Khem Raj
parent bba186bdcb
commit 901a6b2b61
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 1 additions and 129 deletions

View File

@ -1,127 +0,0 @@
From 053acd5d2b310c696993dc97072d1f2b3b1dd7ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@gmail.com>
Date: Fri, 5 Apr 2024 15:08:09 +0100
Subject: [PATCH] Don't update pdfsig.pot when POT-Creation-date is the only
change
Everytime we perform a Poppler build the pdfsig.pot file is
updated with just a new timestamp in POT-Creation-date field.
That is a nuance as we have to always discard that change in Git
prior to submitting a MR or just switching branches locally.
- Fix it by only updating pdfsig.pot when there are changes
other than the POT-Creation-date. Currently only done for
platforms other than Windows as it requires 'diff' command.
- Change the OUTPUT/DEPENDS to be pdfsig.pot.new instead of
pdfsig.pot, which is more correct as the former is auto
generated while the later is a repo checked-in file, this
way we avoid pdfsig.pot from being marked as deleted by
git when doing a 'make clean'.
Other changes:
- Drop flag '-s' from msgmerge as it's deprecated, use
instead sort flag '-F' for both msgmerge and xgettext
so their output is more synced and so prevent useless
diffs that only carry reordering changes.
- Drop redundant flag '--language=C++' as xgettext will
use that anyway by recognizing source extension '.cc'
- Update 'pdfsig.pot' and 'ca/pdfsig.po' with the outputs
generated with the new flags.
Some related info:
https://savannah.gnu.org/bugs/?49654#comment1
Fixes #1479
Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/053acd5d2b310c696993dc97072d1f2b3b1dd7ac]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
utils/po/CMakeLists.txt | 24 +++++++++++++++++-------
utils/po/ca/pdfsig.po | 10 ++++++----
utils/po/pdfsig.pot | 6 ++++--
3 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/utils/po/CMakeLists.txt b/utils/po/CMakeLists.txt
index 2eb7f0f0..38e1fd44 100644
--- a/utils/po/CMakeLists.txt
+++ b/utils/po/CMakeLists.txt
@@ -13,16 +13,26 @@ macro(UPDATE_POT_FILE input)
foreach(_lang ${_langs})
set(_poFile "${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${input}.po")
list(APPEND _commands
- COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} "${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}")
+ COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -F ${_poFile} "${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}")
endforeach()
- add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}
- COMMAND xgettext --keyword=_ --language=c++ --package-name=pdfsig --output-dir=po --output=${_potFile} ${input}.cc
- ${_commands}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../${input}.cc
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+ set(COPY_NEW_POTFILE ${CMAKE_COMMAND} -E copy po/${_potFile}.new po/${_potFile})
+ if (NOT (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows"))
+ # IF the new potfile carries changes other than an updated POT-creation-date (autogenerated) THEN proceed to use that new potfile
+ set(CM diff --brief --ignore-matching-lines="POT-Creation-Date.*" po/${_potFile} po/${_potFile}.new || ${COPY_NEW_POTFILE})
+ else ()
+ set(CM ${COPY_NEW_POTFILE})
+ endif ()
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}.new
+ COMMAND xgettext ${input}.cc --package-name=${input} --keyword=_ -F --output=po/${_potFile}.new
+ COMMAND ${CM}
+ ${_commands}
+ DEPENDS ../${input}.cc
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
add_custom_target(update_pot_${input}
ALL
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile})
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}.new)
endmacro()
UPDATE_POT_FILE(pdfsig)
diff --git a/utils/po/ca/pdfsig.po b/utils/po/ca/pdfsig.po
index fe6a14e7..0d83e42c 100644
--- a/utils/po/ca/pdfsig.po
+++ b/utils/po/ca/pdfsig.po
@@ -18,9 +18,11 @@ msgstr ""
"X-Generator: Lokalize 22.12.3\n"
#: pdfsig.cc:544
-msgid "Digitally signed by {0:s}"
-msgstr "Signat digitalment per {0:s}"
-
-#: pdfsig.cc:544
+#, c++-format
msgid "Date: {0:s}"
msgstr "Data: {0:s}"
+
+#: pdfsig.cc:544
+#, c++-format
+msgid "Digitally signed by {0:s}"
+msgstr "Signat digitalment per {0:s}"
diff --git a/utils/po/pdfsig.pot b/utils/po/pdfsig.pot
index 83095113..ffe3bc2f 100644
--- a/utils/po/pdfsig.pot
+++ b/utils/po/pdfsig.pot
@@ -18,9 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: pdfsig.cc:544
-msgid "Digitally signed by {0:s}"
+#, c++-format
+msgid "Date: {0:s}"
msgstr ""
#: pdfsig.cc:544
-msgid "Date: {0:s}"
+#, c++-format
+msgid "Digitally signed by {0:s}"
msgstr ""
--
2.34.1

View File

@ -7,9 +7,8 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
file://0001-Do-not-overwrite-all-our-build-flags.patch \
file://basename-include.patch \
file://0001-cmake-Do-not-use-isystem.patch \
file://0001-Don-t-update-pdfsig.pot-when-POT-Creation-date-is-th.patch \
"
SRC_URI[sha256sum] = "1cf374c3146f3f685d9257701bf0c2866c61d6c202c14d1f5c01a1f3a089028a"
SRC_URI[sha256sum] = "7eefc122207bbbd72a303c5e0743f4941e8ae861e24dcf0501e18ce1d1414112"
DEPENDS = "fontconfig zlib cairo lcms glib-2.0 glib-2.0-native"