diff options
| author | Wang Mingyu <wangmy@fujitsu.com> | 2025-04-01 10:10:59 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-04-08 15:49:17 +0100 |
| commit | f42a153439b1de2c2a26184de9a3ea6f5f502fb8 (patch) | |
| tree | 2067c1bfb0b5bb45804b9257be4527ba21bf1c4f | |
| parent | 057049c1b6936ed684a1ad1ae43a041615ab4f06 (diff) | |
| download | poky-f42a153439b1de2c2a26184de9a3ea6f5f502fb8.tar.gz | |
libdnf: upgrade 0.73.4 -> 0.74.0
(From OE-Core rev: 2606586c10b9a3297fcab15cd45f519975649655)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0001-Fix-a-segfault-in-iterator-of-a-ConfigParser-section.patch | 84 | ||||
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch | 13 | ||||
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf_0.74.0.bb (renamed from meta/recipes-devtools/libdnf/libdnf_0.73.4.bb) | 3 |
3 files changed, 9 insertions, 91 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Fix-a-segfault-in-iterator-of-a-ConfigParser-section.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-a-segfault-in-iterator-of-a-ConfigParser-section.patch deleted file mode 100644 index 1c62d02455..0000000000 --- a/meta/recipes-devtools/libdnf/libdnf/0001-Fix-a-segfault-in-iterator-of-a-ConfigParser-section.patch +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | From f3302a865b230e021e9defbcea978ed1290a9b2f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> | ||
| 3 | Date: Fri, 6 Dec 2024 18:01:16 +0100 | ||
| 4 | Subject: [PATCH] Fix a segfault in iterator of a ConfigParser section | ||
| 5 | |||
| 6 | An iterator should return self on __iter__. | ||
| 7 | |||
| 8 | So that this works: | ||
| 9 | |||
| 10 | >>> it1 = iter(sectObj) | ||
| 11 | >>> it2 = iter(it1) | ||
| 12 | >>> it1 is it2 | ||
| 13 | True | ||
| 14 | |||
| 15 | Previously, this iterator did not return self on __iter__, it was like this: | ||
| 16 | |||
| 17 | class PreserveOrderMapStringStringIterator(object): | ||
| 18 | ... | ||
| 19 | def __iter__(self): | ||
| 20 | return _common_types.PreserveOrderMapStringStringIterator___iter__(self) | ||
| 21 | |||
| 22 | And that returned a new Python object. | ||
| 23 | |||
| 24 | This fixes https://bugzilla.redhat.com/2330562 by avoiding a second iterator object. | ||
| 25 | |||
| 26 | My SWIG skills are close to zero, | ||
| 27 | perhaps this is not the best way to return self, but it seems to work. | ||
| 28 | |||
| 29 | Upstream-Status: Backport | ||
| 30 | (https://github.com/rpm-software-management/libdnf/commit/f3302a865b) | ||
| 31 | |||
| 32 | Backport so that it works properly with Python 3.13.1. | ||
| 33 | |||
| 34 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
| 35 | |||
| 36 | --- | ||
| 37 | bindings/swig/common_types.i | 11 +++++++---- | ||
| 38 | bindings/swig/conf.i | 4 ---- | ||
| 39 | 2 files changed, 7 insertions(+), 8 deletions(-) | ||
| 40 | |||
| 41 | diff --git a/bindings/swig/common_types.i b/bindings/swig/common_types.i | ||
| 42 | index c9ae798a..a1f90d9e 100644 | ||
| 43 | --- a/bindings/swig/common_types.i | ||
| 44 | +++ b/bindings/swig/common_types.i | ||
| 45 | @@ -63,10 +63,6 @@ template<class T> | ||
| 46 | class Iterator { | ||
| 47 | public: | ||
| 48 | Iterator(typename T::iterator _cur, typename T::iterator _end) : cur(_cur), end(_end) {} | ||
| 49 | - Iterator* __iter__() | ||
| 50 | - { | ||
| 51 | - return this; | ||
| 52 | - } | ||
| 53 | |||
| 54 | typename T::iterator cur; | ||
| 55 | typename T::iterator end; | ||
| 56 | @@ -165,3 +161,10 @@ EXTEND_TEMPLATE_PreserveOrderMapIterator(std::string, std::string) | ||
| 57 | EXTEND_TEMPLATE_PreserveOrderMapIterator(std::string, libdnf::PreserveOrderMap<std::string, std::string>) | ||
| 58 | |||
| 59 | %exception; // beware this resets all exception handlers if you import this file after defining any | ||
| 60 | + | ||
| 61 | +%pythoncode %{ | ||
| 62 | +def PreserveOrderMapStringStringIterator___iter__(self): | ||
| 63 | + return self | ||
| 64 | +PreserveOrderMapStringStringIterator.__iter__ = PreserveOrderMapStringStringIterator___iter__ | ||
| 65 | +del PreserveOrderMapStringStringIterator___iter__ | ||
| 66 | +%} | ||
| 67 | diff --git a/bindings/swig/conf.i b/bindings/swig/conf.i | ||
| 68 | index b6a0ce88..2f77003f 100644 | ||
| 69 | --- a/bindings/swig/conf.i | ||
| 70 | +++ b/bindings/swig/conf.i | ||
| 71 | @@ -71,10 +71,6 @@ template<class T> | ||
| 72 | class Iterator { | ||
| 73 | public: | ||
| 74 | Iterator(typename T::iterator _cur, typename T::iterator _end) : cur(_cur), end(_end) {} | ||
| 75 | - Iterator* __iter__() | ||
| 76 | - { | ||
| 77 | - return this; | ||
| 78 | - } | ||
| 79 | |||
| 80 | typename T::iterator cur; | ||
| 81 | typename T::iterator end; | ||
| 82 | -- | ||
| 83 | 2.39.5 | ||
| 84 | |||
diff --git a/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch index 5620b51d4c..6fc05d9ff8 100644 --- a/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch +++ b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 05fff53c13fc5969e17f1e887b0b59bf0a088a6e Mon Sep 17 00:00:00 2001 | 1 | From 870f50ba4761317f2db018ac130a42087230dded Mon Sep 17 00:00:00 2001 |
| 2 | From: Joe Slater <joe.slater@windriver.com> | 2 | From: Joe Slater <joe.slater@windriver.com> |
| 3 | Date: Wed, 22 Jul 2020 13:31:11 -0700 | 3 | Date: Wed, 22 Jul 2020 13:31:11 -0700 |
| 4 | Subject: [PATCH] libdnf: allow reproducible binary builds | 4 | Subject: [PATCH] libdnf: allow reproducible binary builds |
| @@ -14,14 +14,14 @@ Signed-off-by: Joe Slater <joe.slater@windriver.com> | |||
| 14 | 1 file changed, 6 insertions(+), 1 deletion(-) | 14 | 1 file changed, 6 insertions(+), 1 deletion(-) |
| 15 | 15 | ||
| 16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 16 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 17 | index 60c66e94..1459dfbf 100644 | 17 | index b1daacb..f461e54 100644 |
| 18 | --- a/CMakeLists.txt | 18 | --- a/CMakeLists.txt |
| 19 | +++ b/CMakeLists.txt | 19 | +++ b/CMakeLists.txt |
| 20 | @@ -132,7 +132,12 @@ add_definitions(-DGETTEXT_DOMAIN=\\"libdnf\\") | 20 | @@ -131,7 +131,12 @@ add_definitions(-DGETTEXT_DOMAIN="libdnf") |
| 21 | add_definitions(-DG_LOG_DOMAIN=\\"libdnf\\") | 21 | add_definitions(-DG_LOG_DOMAIN="libdnf") |
| 22 | 22 | ||
| 23 | # tests | 23 | # tests |
| 24 | -add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\") | 24 | -add_definitions(-DTESTDATADIR="${CMAKE_SOURCE_DIR}/data/tests") |
| 25 | +if(NOT WITH_TESTS) | 25 | +if(NOT WITH_TESTS) |
| 26 | + set(TEST_DATA_DIR "/notests") | 26 | + set(TEST_DATA_DIR "/notests") |
| 27 | +elseif(NOT DEFINED TEST_DATA_DIR) | 27 | +elseif(NOT DEFINED TEST_DATA_DIR) |
| @@ -31,3 +31,6 @@ index 60c66e94..1459dfbf 100644 | |||
| 31 | 31 | ||
| 32 | # librhsm | 32 | # librhsm |
| 33 | if(ENABLE_RHSM_SUPPORT) | 33 | if(ENABLE_RHSM_SUPPORT) |
| 34 | -- | ||
| 35 | 2.43.0 | ||
| 36 | |||
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.73.4.bb b/meta/recipes-devtools/libdnf/libdnf_0.74.0.bb index 5b9e734e82..5a2d4d9364 100644 --- a/meta/recipes-devtools/libdnf/libdnf_0.73.4.bb +++ b/meta/recipes-devtools/libdnf/libdnf_0.74.0.bb | |||
| @@ -11,10 +11,9 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;p | |||
| 11 | file://enable_test_data_dir_set.patch \ | 11 | file://enable_test_data_dir_set.patch \ |
| 12 | file://0001-drop-FindPythonInstDir.cmake.patch \ | 12 | file://0001-drop-FindPythonInstDir.cmake.patch \ |
| 13 | file://armarch.patch \ | 13 | file://armarch.patch \ |
| 14 | file://0001-Fix-a-segfault-in-iterator-of-a-ConfigParser-section.patch \ | ||
| 15 | " | 14 | " |
| 16 | 15 | ||
| 17 | SRCREV = "79ed383cd5a822e6d8d9d549835383f5c5106204" | 16 | SRCREV = "91a0bf9aada36a722855051526f012e0b5ab1af9" |
| 18 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!4\.90)\d+(\.\d+)+)" | 17 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!4\.90)\d+(\.\d+)+)" |
| 19 | 18 | ||
| 20 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
