json-c: add patch to fix compiling with a C++ compiler
PATCH v9 1/5 json-c: add patch to fix compiling with a C++ compiler
Backported from upstream commit aab792578b4f081af6ed7b993475bcb2dbca8912
--- ...rs-when-building-with-a-cpp-compiler.patch | 50 +++++++++++++++++++ meta/recipes-devtools/json-c/json-c_0.19.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta/recipes-devtools/json-c/json-c/0001-fix-defined-but-not-used-errors-when-building-with-a-cpp-compiler.patch
meta/recipes-devtools/json-c/json-c/0001-fix-defined-but-not-used-errors-when-building-with-a-cpp-compiler.patch new file +50 -0
@@ -0,0 +1,50 @@ +From aab792578b4f081af6ed7b993475bcb2dbca8912 Mon Sep 17 00:00:00 2001 +From: Eric Hawicz <[email protected]> +Date: Sat, 11 Jul 2026 09:28:49 -0400 +Subject: [PATCH] Issue #941: fix "defined but not used" errors when building + with a c++ compiler. + + +Upstream-Status: Backport [https://github.com/json-c/json-c/commit/aab792578b4f081af6ed7b993475bcb2dbca8912] +Signed-off-by: Eric Hawicz <[email protected]> +Signed-off-by: Adam Duskett <[email protected]> +--- + json_object.h | 4 ++-- + linkhash.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/json_object.h b/json_object.h +index 7edb63d4f8..2cd94906e7 100644 +--- a/json_object.h ++++ b/json_object.h +@@ -488,7 +488,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key + * @param val the local name for the json_object* object variable defined in + * the body + */ +-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ++#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)) + + #define json_object_object_foreach(obj, key, val) \ + char *key = NULL; \ +@@ -520,7 +520,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key + : 0); \ + entry##key = entry_next##key) + +-#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */ ++#endif + + /** Iterate through all keys and values of an object (ANSI C Safe) + * @param obj the json_object instance +diff --git a/linkhash.h b/linkhash.h +index 5ad17cf2d2..48fb7c0b0a 100644 +--- a/linkhash.h ++++ b/linkhash.h +@@ -345,7 +345,7 @@ int lh_table_resize(struct lh_table *t, int new_size); + /** + * @deprecated Don't use this outside of linkhash.h: + */ +-#if !defined (__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ++#if !defined(__cplusplus) && (!defined (__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) + /* C89 compilers like VS2010 can't handle inline funcs, so skip it there, + note: this also applies to -std=c89 in GCC! */ + #define _LH_INLINE
meta/recipes-devtools/json-c/json-c_0.19.bb +1 -0
@@ -7,6 +7,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ + file://0001-fix-defined-but-not-used-errors-when-building-with-a-cpp-compiler.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "37ad0249902e301bd9052bf712e511fcc6acff4ecaad4b5900aad9ce564e26de"
Signature · 1 line
2.55.0
PATCH v9 2/5 libtoml11: new recipe
DNF5 requires libtoml. As such, copy libtoml verbatim from meta-openembedded to openembedded-core.
--- meta/conf/distro/include/maintainers.inc | 1 + .../distro/include/ptest-packagelists.inc | 1 + ...move-more-whitespaces-after-operator.patch | 34 ++++++++++++++ .../0001-Remove-whitespace-in-operator.patch | 46 +++++++++++++++++++ .../libtoml11/files/run-ptest | 13 ++++++ .../libtoml11/libtoml11_4.4.0.bb | 39 ++++++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch create mode 100755 meta/recipes-devtools/libtoml11/files/run-ptest create mode 100644 meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -403,6 +403,7 @@ RECIPE_MAINTAINER:pn-libssh2 = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-libstd-rs = "Randy MacLeod <[email protected]>" RECIPE_MAINTAINER:pn-libtasn1 = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-libtoml11 = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libtest-fatal-perl = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-libtest-needs-perl = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-libtest-warnings-perl = "Tim Orling <[email protected]>"
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -48,6 +48,7 @@ PTESTS_FAST = "\ libtest-needs-perl \ libtest-warnings-perl \ libtimedate-perl \ + libtoml11 \ libtry-tiny-perl \ libusb1 \ libxml-namespacesupport-perl \
meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 6af7de3d5eaae59c53c42aab8eca1e1e9a365da5 Mon Sep 17 00:00:00 2001 +From: Steffen Winter <[email protected]> +Date: Thu, 25 Dec 2025 20:48:02 +0100 +Subject: [PATCH] Remove more whitespaces after operator"" + +Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/306] +Signed-off-by: Khem Raj <[email protected]> +--- + include/toml11/fwd/literal_fwd.hpp | 4 ++-- + include/toml11/impl/literal_impl.hpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -24,7 +24,7 @@ inline namespace toml_literals + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and char8_t is + // NOT compatible to char +-::toml::value operator"" _toml(const char8_t* str, std::size_t len); ++::toml::value operator""_toml(const char8_t* str, std::size_t len); + #endif + + } // toml_literals +--- a/include/toml11/impl/literal_impl.hpp ++++ b/include/toml11/impl/literal_impl.hpp +@@ -146,7 +146,7 @@ operator""_toml(const char* str, std::si + // value of u8"" literal has been changed from char to char8_t and char8_t is + // NOT compatible to char + TOML11_INLINE ::toml::value +-operator"" _toml(const char8_t* str, std::size_t len) ++operator""_toml(const char8_t* str, std::size_t len) + { + if(len == 0) + {
meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch new file +46 -0
46 lines not on this page · raw message
meta/recipes-devtools/libtoml11/files/run-ptest new file +13 -0
@@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +cd tests || exit 1 + +rm -rf tests.log + +for atest in test_* ; do + if ./"${atest}" >> tests.log 2>&1; then + echo "PASS: ${atest}" + else + echo "FAIL: ${atest}" + fi +done
meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb new file +39 -0
@@ -0,0 +1,39 @@ +SUMMARY = "TOML for Modern C++" +DESCRIPTION = "toml11 is a feature-rich TOML language library for \ + C++11/14/17/20." + +HOMEPAGE = "https://github.com/ToruNiina/toml11" +BUGTRACKER = "https://github.com/ToruNiina/toml11/issues" +CVE_PRODUCT = "libtoml11" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" + +PE = "1" + +SRC_URI = "\ + gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV} \ + file://0001-Remove-whitespace-in-operator.patch \ + file://0001-Remove-more-whitespaces-after-operator.patch \ + file://run-ptest \ +" +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" + +inherit cmake ptest + +CXXFLAGS:append:toolchain-clang = " -Wno-error=c2y-extensions" + +EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ + -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "ON", "OFF", d)} \ +" + +ALLOW_EMPTY:${PN} = "1" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.55.0
Re: [OE-core] [PATCH v9 2/5] libtoml11: new recipe
Please do not forget to send a patch to delete it to oe-devel, once it is merged in core.
Quoted 246 lines · Adam Duskett via lists.openembedded.org
DNF5 requires libtoml. As such, copy libtoml verbatim from meta-openembedded to openembedded-core.
Signed-off-by Adam Duskett <[email protected]>--- meta/conf/distro/include/maintainers.inc | 1 + .../distro/include/ptest-packagelists.inc | 1 + ...move-more-whitespaces-after-operator.patch | 34 ++++++++++++++ .../0001-Remove-whitespace-in-operator.patch | 46 +++++++++++++++++++ .../libtoml11/files/run-ptest | 13 ++++++ .../libtoml11/libtoml11_4.4.0.bb | 39 ++++++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch create mode 100755 meta/recipes-devtools/libtoml11/files/run-ptest create mode 100644 meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bbmeta/conf/distro/include/maintainers.inc +0
-0@@ -403,6 +403,7 @@ RECIPE_MAINTAINER:pn-libssh2 = "Unassigned <[email protected]>"
RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-libstd-rs = "Randy MacLeod <
[email protected]>"
RECIPE_MAINTAINER:pn-libtasn1 = "Unassigned <[email protected]Quoted 1 line
"
+RECIPE_MAINTAINER:pn-libtoml11 = "Unassigned <[email protected]
Quoted 1 line
"
RECIPE_MAINTAINER:pn-libtest-fatal-perl = "Tim Orling <
[email protected]>"
RECIPE_MAINTAINER:pn-libtest-needs-perl = "Tim Orling <
[email protected]>"
RECIPE_MAINTAINER:pn-libtest-warnings-perl = "Tim Orling <
[email protected]>"meta/conf/distro/include/ptest-packagelists.inc +1
-0@@ -48,6 +48,7 @@ PTESTS_FAST = "\ libtest-needs-perl \ libtest-warnings-perl \ libtimedate-perl \ + libtoml11 \ libtry-tiny-perl \ libusb1 \ libxml-namespacesupport-perl \diff --git
a/meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patchb/meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patchnew file mode 100644
index 0000000000..5bff81eaf6
---/dev/null
+++b/meta/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patchmeta/conf/distro/include/ptest-packagelists.inc +17
-0@@ -0,0 +1,34 @@ +From 6af7de3d5eaae59c53c42aab8eca1e1e9a365da5 Mon Sep 17 00:00:00 2001 +From: Steffen Winter <[email protected]> +Date: Thu, 25 Dec 2025 20:48:02 +0100 +Subject: [PATCH] Remove more whitespaces after operator"" + +Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/306] +Signed-off-by: Khem Raj <[email protected]> +--- + include/toml11/fwd/literal_fwd.hpp | 4 ++-- + include/toml11/impl/literal_impl.hpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -24,7 +24,7 @@ inline namespace toml_literals + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and
char8_tis
+ // NOT compatible to char
+-::toml::value operator""_toml(const char8_t* str, std::size_t len); ++::toml::value operator""_toml(const char8_t* str,std::size_tlen);
+ #endif
+
+ } //toml_literals
+--- a/include/toml11/impl/literal_impl.hpp
++++ b/include/toml11/impl/literal_impl.hpp
+@@ -146,7 +146,7 @@ operator""_toml(const char* str,std::si
+ // value of u8"" literal has been changed from char tochar8_tandchar8_tis
+ // NOT compatible to char
+TOML11_INLINE::toml::value
+-operator""_toml(const char8_t* str, std::size_t len)++operator""_toml(const char8_t* str,std::size_tlen)
+ {meta/conf/distro/include/ptest-packagelists.inc +2
-0+ if(len == 0) + {diff --git
a/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patchb/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patchnew file mode 100644
index 0000000000..9516ee5cb1
---/dev/null
+++b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patchmeta/conf/distro/include/ptest-packagelists.inc +9
-0@@ -0,0 +1,46 @@ +From dee78f822d8a5b985e565e5c1ef42a59557aa8fc Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Mar 2025 11:35:46 -0800 +Subject: [PATCH] Remove whitespace in operator"" + +Clang 20+ errors about this whitespace. + +Fixes +include/toml11/impl/../fwd/literal_fwd.hpp:22:26: error: identifier'
_toml' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
+| 22 | ::toml::value operator"" _toml(const char* str,std::size_t
len);+| | ~~~~~~~~~~~^~~~~ +| | operator""_tomlmeta/conf/distro/include/ptest-packagelists.inc +2
-0+ +Upstream-Status: Backport [https://github.com/ToruNiina/toml11/commit/dee78f822d8a5b985e565e5c1ef42a59557aa8fc
]meta/conf/distro/include/ptest-packagelists.inc +7
-0+Signed-off-by: Khem Raj <[email protected]> +--- + include/toml11/fwd/literal_fwd.hpp | 2 +- + include/toml11/impl/literal_impl.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/toml11/fwd/literal_fwd.hppb/include/toml11/fwd/literal_fwd.hpp
meta/conf/distro/include/ptest-packagelists.inc +12
-0+index e46612c..82f62b7 100644 +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -19,7 +19,7 @@ inline namespace literals + inline namespace toml_literals + { + +-::toml::value operator"" _toml(const char* str, std::size_t len); ++::toml::value operator""_toml(const char* str, std::size_t len); + + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and
char8_tis
+diff --git a/include/toml11/impl/literal_impl.hpp b/include/toml11/impl/literal_impl.hppmeta/conf/distro/include/ptest-packagelists.inc +12
-0+index e8298c2..067d4ed 100644 +--- a/include/toml11/impl/literal_impl.hpp ++++ b/include/toml11/impl/literal_impl.hpp +@@ -115,7 +115,7 @@ inline namespace toml_literals + { + + TOML11_INLINE ::toml::value +-operator"" _toml(const char* str, std::size_t len) ++operator""_toml(const char* str, std::size_t len) + { + if(len == 0) + {meta/recipes-devtools/libtoml11/files/run-ptest new file +13
-0@@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +cd tests || exit 1 + +rm -rf tests.log + +for atest in test_* ; do + if ./"${atest}" >> tests.log 2>&1; then + echo "PASS: ${atest}" + else + echo "FAIL: ${atest}" + fi +donemeta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb new file +17
-0@@ -0,0 +1,39 @@ +SUMMARY = "TOML for Modern C++" +DESCRIPTION = "toml11 is a feature-rich TOML language library for \ + C++11/14/17/20." + +HOMEPAGE = "https://github.com/ToruNiina/toml11" +BUGTRACKER = "https://github.com/ToruNiina/toml11/issues" +CVE_PRODUCT = "libtoml11" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" + +PE = "1" + +SRC_URI = "\ + gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV}
<http://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v$%7BPV%7D>
\meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb new file +12
-1+ file://0001-Remove-whitespace-in-operator.patch \ + file://0001-Remove-more-whitespaces-after-operator.patch \ + file://run-ptest \ +" +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" + +inherit cmake ptest + +CXXFLAGS:append:toolchain-clang = " -Wno-error=c2y-extensions" + +EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ + -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "ON","OFF", d)} \
+"meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb new file +9
-1+ +ALLOW_EMPTY:${PN} = "1" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} + +BBCLASSEXTEND = "native nativesdk" --2.55.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#245295):
https://lists.openembedded.org/g/openembedded-core/message/245295
Mute This Topic: https://lists.openembedded.org/mt/121128671/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v9 3/5 libsolv: explicitly enable comps for rpm packageconfig
In reply to Adam Duskettdnf5 requires solv/repo_comps.h
--- meta/recipes-extended/libsolv/libsolv_0.7.39.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/libsolv/libsolv_0.7.39.bb +1 -1
@@ -19,7 +19,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" inherit cmake ptest PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGE_CLASSES','package_rpm','rpm','',d)}" -PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm" +PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPS=ON,,rpm" EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON -DENABLE_ZSTD_COMPRESSION=ON -DENABLE_STATIC=ON"
Signature · 1 line
2.55.0
PATCH v9 4/5 dnf: Upgrade to 5.4.4.0
In reply to Adam DuskettCompletely rewritten in C++, there are several changes needed to facilitate moving from DNF4 to DNF5. Below are some significant items to note:
- Added a negative lookahead filter for the following warning if RPM_SIGN_PACKAGES != '1': "Warning: skipped OpenPGP checks" This warning is hard-coded and piped to stderr if gpg checks are disabled. However, most users do not sign their RPM packages and use dnf to simply construct the rootfs.
- The "-v/--verbose" cli option is removed. As such, remove the argument everywhere it was called.[1]
- the rpmverbosity cli option is replaced with --setopt=rpmverbosity
- Change gpgcheck to pkg_gpgcheck as this is what the documentation recommends.[2]
- --nogpgcheck is now --no-gpgchecks
- --setopt=protect_running_kernel=False has to be set or else every dnf transaction complains that /boot/vmlinuz-${kernel_version} does not exist in /var/log/dnf5.log. There is an open issue on github[3] to enable the currently not-yet implemented autocheck_running_kernel option, but it has been open for quite some time and the protect_running_kernel option supresses the message.
- Move --skip-broken to after the install argument as the global --skip-broken argument is removed.
- /var/cache/dnf is replaced with /var/cache/libdnf5
- Add features += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n' features += 'PACKAGECONFIG:append:pn-librepo = " sequoia"\n' to test_testimage_dnf as librepo currently does not work with gpgme.
- Change if e_output.startswith("Error in POSTIN scriptlet in rpm package"): to `if "%post(" in e_output and "scriptlet failed" in e_output.
While DNF5 has many config options, unfortunately, the majority of them depends on sdbus-c++, which is not included in OE-core. However, the package is included in meta-openembedded, so it's best to include the PACKAGECONFIG options in the recipe and leave them off by default.
1: https://github.com/rpm-software-management/dnf5/issues/464
2: https://dnf5.readthedocs.io/en/latest/dnf5.conf.5.html
3: https://github.com/rpm-software-management/dnf5/issues/1255
--- .../lib/oeqa/runtime/cases/dnf_runtime.py | 6 +- meta/conf/distro/include/maintainers.inc | 2 +- meta/lib/oe/package_manager/rpm/__init__.py | 26 +- meta/lib/oe/package_manager/rpm/rootfs.py | 3 + meta/lib/oeqa/runtime/cases/dnf.py | 16 +- meta/lib/oeqa/selftest/cases/runtime_test.py | 5 + ...tly-install-tmpfiles.d-configuration.patch | 18 -- ...ode-etc-and-systemd-unit-directories.patch | 26 -- ...-hardcode-the-systemd-unit-directory.patch | 29 +++ .../0001-dnf-write-the-log-lock-to-root.patch | 29 --- .../0001-lock.py-fix-Exception-handling.patch | 62 ----- ...et-python-path-for-completion_helper.patch | 21 -- .../dnf/0002-cmake-set-CMP0190-to-OLD.patch | 51 ++++ ...0003-Do-not-hardcode-system_cachedir.patch | 36 +++ ...004-add-support-for-gcc-12-and-below.patch | 97 +++++++ ...Do-not-prepend-installroot-to-logdir.patch | 28 -- ...rm-arch-mapping-issues-for-qemuarmv5.patch | 59 +++++ ...ude-cstring-where-std-strcmp-is-used.patch | 242 ++++++++++++++++++ ...PYTHON_INSTALL_DIR-by-running-python.patch | 24 -- .../0030-Run-python-scripts-using-env.patch | 34 --- meta/recipes-devtools/dnf/dnf_4.24.0.bb | 96 ------- meta/recipes-devtools/dnf/dnf_5.4.4.0.bb | 181 +++++++++++++ 22 files changed, 731 insertions(+), 360 deletions(-) delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0005-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0006-include-cstring-where-std-strcmp-is-used.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch delete mode 100644 meta/recipes-devtools/dnf/dnf_4.24.0.bb create mode 100644 meta/recipes-devtools/dnf/dnf_5.4.4.0.bb
meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py +3 -3
@@ -41,11 +41,11 @@ class DnfSelftest(DnfTest): import re # Use '-y' for non-interactive mode: automatically import the feed signing key - output_makecache = self.dnf('-vy makecache') + output_makecache = self.dnf('-y makecache') self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache)) self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache)) - output_repoinfo = self.dnf('-v repoinfo') - matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL) + output_repoinfo = self.dnf('repoinfo') + matchobj = re.match(r".*Total packages\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL) self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo)) self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
meta/conf/distro/include/maintainers.inc +1 -1
@@ -157,7 +157,7 @@ RECIPE_MAINTAINER:pn-diffutils = "Chen Qi <[email protected]>" RECIPE_MAINTAINER:pn-distcc = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-distcc-config = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER:pn-dmidecode = "Unassigned <[email protected]>" -RECIPE_MAINTAINER:pn-dnf = "Unassigned <[email protected]>" +RECIPE_MAINTAINER:pn-dnf = "Adam Duskett <[email protected]>" RECIPE_MAINTAINER:pn-docbook-xml-dtd4 = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER:pn-docbook-xsl-stylesheets = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER:pn-dos2unix = "Khem Raj <[email protected]>"
meta/lib/oe/package_manager/rpm/__init__.py +16 -10
@@ -163,7 +163,7 @@ class RpmPM(PackageManager): gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME')) if self.d.getVar('RPM_SIGN_PACKAGES') != '1': - gpg_opts += 'gpgcheck=0\n' + gpg_opts += 'pkg_gpgcheck=0\n' bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d")) remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
@@ -200,11 +200,11 @@ class RpmPM(PackageManager): package_exclude = self.d.getVar('PACKAGE_EXCLUDE') exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exclude.split() if package_exclude else []) - output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) + - (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) + + output = self._invoke_dnf((["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) + (["--setopt=install_weak_deps=False"] if (hard_depends_only or self.d.getVar('NO_RECOMMENDATIONS') == "1") else []) + - (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) + + (["--no-gpgchecks"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=pkg_gpgcheck=True"]) + ["install"] + + (["--skip-broken"] if attempt_only else []) + pkgs) failed_scriptlets_pkgnames = collections.OrderedDict()
@@ -212,8 +212,9 @@ class RpmPM(PackageManager): if line.startswith("Error: Systemctl"): bb.error(line) - if line.startswith("Error in POSTIN scriptlet in rpm package"): - failed_scriptlets_pkgnames[line.split()[-1]] = True + if "%post(" in line and "scriptlet failed" in line: + package_name = re.search(r'\((.*?)\)', line).group(1) + failed_scriptlets_pkgnames[package_name] = True if len(failed_scriptlets_pkgnames) > 0: failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
@@ -313,10 +314,15 @@ class RpmPM(PackageManager): def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ): os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs + # Set XDG_CACHE_HOME to avoid dnf attempting to install oe-repo system cache to a /tmp/ directory on the host. + os.environ['XDG_CACHE_HOME'] = oe.path.join(os.path.join(self.target_rootfs, "var/cache/libdnf5")) + dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf") - standard_dnf_args = ["-v", "--rpmverbosity=info", "-y", - "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), + standard_dnf_args = ["-y", + "--config", os.path.join(self.d.getVar('STAGING_DIR_NATIVE'), "etc/dnf/dnf.conf"), + "--setopt=rpmverbosity=info", "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")), + "--setopt=pluginconfpath=%s" %(os.path.join(self.d.getVar('STAGING_DIR_NATIVE'), "etc/dnf/dnf.conf")), "--installroot=%s" % (self.target_rootfs), "--setopt=logdir=%s" % (self.d.getVar('T')), "--setopt=optional_metadata_types=filelists",
@@ -335,9 +341,9 @@ class RpmPM(PackageManager): e_output = e.output.decode("utf-8") # RPM 6 fails the entire transaction when a %post scriptlet # fails, causing dnf to exit non-zero. Let install_pkgs handle - # scriptlet failures via its existing "Error in POSTIN scriptlet" + # scriptlet failures via its existing "Error in %post scriptlet:" # scanning rather than treating this as a fatal dnf invocation error. - if "Error in POSTIN scriptlet in rpm package" in e_output: + if "%post(" in e_output and "scriptlet failed" in e_output: bb.note(e_output) return e_output extra_info = ""
meta/lib/oe/package_manager/rpm/rootfs.py +3 -0
@@ -17,6 +17,9 @@ class PkgRootfs(Rootfs): r'|exit 1\b|ERROR: |Error: |Error |ERROR '\ r'|Failed |Failed: |Failed$|Failed\(\d+\):)' + if self.d.getVar('RPM_SIGN_PACKAGES') != '1': + self.warn_check_regex = r'^(?!.*Warning: skipped OpenPGP checks)(warn|Warn|WARNING:)' + self.manifest = PkgManifest(d, manifest_dir) self.pm = RpmPM(d,
meta/lib/oeqa/runtime/cases/dnf.py +8 -8
@@ -17,7 +17,7 @@ from oeqa.runtime.decorator.package import OEHasPackage class DnfTest(OERuntimeTestCase): def dnf(self, command, expected = 0): - command = 'dnf %s' % command + command = 'dnf --setopt=protect_running_kernel=False %s' % command status, output = self.target.run(command, 1500) message = os.linesep.join([command, output]) self.assertEqual(status, expected, message)
@@ -48,7 +48,7 @@ class DnfBasicTest(DnfTest): @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) def test_dnf_history(self): - self.dnf('history') + self.dnf('history list') class DnfRepoTest(DnfTest):
@@ -68,7 +68,7 @@ class DnfRepoTest(DnfTest): deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port) cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs] - output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command) + output = self.dnf(" ".join(cmdlinerepoopts) + " --no-gpgchecks " + command) return output @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
@@ -96,7 +96,7 @@ class DnfRepoTest(DnfTest): def test_dnf_install_from_disk(self): self.dnf_with_repo('remove -y dnf-test-dep') self.dnf_with_repo('install -y --downloadonly dnf-test-dep') - status, output = self.target.run('find /var/cache/dnf -name dnf-test-dep*rpm') + status, output = self.target.run('find /var/cache/libdnf5 -name dnf-test-dep*rpm') self.assertEqual(status, 0, output) self.dnf_with_repo('install -y %s' % output)
@@ -134,8 +134,8 @@ class DnfRepoTest(DnfTest): self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500) self.target.run('cp /bin/sh %s/bin' % rootpath, 1500) self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500) - self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox' % rootpath) - status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500) + self.dnf_with_repo('install --installroot=%s -y busybox' % rootpath) + status, output = self.target.run('test -e %s/var/cache/libdnf5' % rootpath, 1500) self.assertEqual(0, status, output) status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500) self.assertEqual(0, status, output)
@@ -158,8 +158,8 @@ class DnfRepoTest(DnfTest): self.target.run('cp -r /etc/dnf %s/etc' % rootpath) self.target.run('cp /bin/busybox %s/bin/sh' % rootpath) self.target.run('mount -o bind /dev %s/dev/' % rootpath) - self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox' % rootpath) - status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath) + self.dnf_with_repo('install --installroot=%s -y busybox' % rootpath) + status, output = self.target.run('test -e %s/var/cache/libdnf5' % rootpath) self.assertEqual(0, status, output) status, output = self.target.run('test -e %s/bin/busybox' % rootpath) self.assertEqual(0, status, output)
meta/lib/oeqa/selftest/cases/runtime_test.py +5 -0
@@ -164,6 +164,11 @@ TEST_RUNQEMUPARAMS += " slirp" features += 'EXTRA_IMAGE_FEATURES += "package-management"\n' features += 'PACKAGE_CLASSES = "package_rpm"\n' + # librepo and rpm require sequoia + # https://github.com/rpm-software-management/dnf5/issues/2539 + features += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n' + features += 'PACKAGECONFIG:append:pn-librepo = " sequoia"\n' + bitbake('gnupg-native -c addto_recipe_sysroot') # Enable package feed signing
meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch deleted +0 -18
@@ -1,18 +0,0 @@ -From f70eb308c837f2c944e23bb680a501a605004d65 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 26 Jan 2017 16:36:20 +0200 -Subject: [PATCH] Corretly install tmpfiles.d configuration - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - etc/tmpfiles.d/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt -index f69c773e..3eb6d0e8 100644 ---- a/etc/tmpfiles.d/CMakeLists.txt -+++ b/etc/tmpfiles.d/CMakeLists.txt -@@ -1 +1 @@ --INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/) -+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From c2b2b91b58f4531d4baf0a01f5d868d71e577a84 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 26 Jan 2017 16:25:47 +0200 -Subject: [PATCH] Do not hardcode /etc and systemd unit directories - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e71e9517..8fcb2069 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,8 +3,8 @@ PROJECT (dnf NONE) - - INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake) - --SET( SYSCONFDIR /etc) --SET( SYSTEMD_DIR /usr/lib/systemd/system) -+SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR}) -+SET( SYSTEMD_DIR $ENV{systemd_system_unitdir}) - - IF (NOT PYTHON_DESIRED) - FIND_PACKAGE (PythonInterp REQUIRED)
meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 0987f45ca3d57e11a561232abbdd4a352f6ea22f Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Thu, 27 Nov 2025 11:07:48 +0100 +Subject: [PATCH] Do not hardcode the systemd unit directory + +Upstream-Status: Inappropriate [oe-core specific] + +Rebased for 5.4.3.0 +Signed-off-by: Adam Duskett <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e98c5a974..bdbbb034b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ project(dnf5 LANGUAGES CXX C VERSION ${VERSION_PRIME}.${VERSION_MAJOR}.${VERSION + cmake_policy(VERSION ${CMAKE_VERSION}) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +-set(SYSTEMD_DIR "/usr/lib/systemd/system" CACHE PATH "Directory for systemd unit files") ++set(SYSTEMD_DIR $ENV{systemd_system_unitdir} CACHE PATH "Directory for systemd unit files") + set(TMPFILES_DIR "/usr/lib/tmpfiles.d" CACHE PATH "Directory for systemd tmpfiles.d files") + + message("Building ${PROJECT_NAME} version ${PROJECT_VERSION}") +-- +2.55.0 +
meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 049e2832284ab883e185d9020c881518a68e6c38 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 28 Apr 2020 15:55:00 +0200 -Subject: [PATCH] dnf: write the log lock to root - -Writing it to /var/log appears to be racing with installation -of base-files, and if lock is created first, base-files -will refuse to install (due to the target directory -already existing, and base-files creating it as a symlink). - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - dnf/logging.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/logging.py b/dnf/logging.py -index ef0b25f3..94610af6 100644 ---- a/dnf/logging.py -+++ b/dnf/logging.py -@@ -118,7 +118,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): - def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False): - super(MultiprocessRotatingFileHandler, self).__init__( - filename, mode, maxBytes, backupCount, encoding, delay) -- self.rotate_lock = dnf.lock.build_log_lock("/var/log/", True) -+ self.rotate_lock = dnf.lock.build_log_lock("/", True) - - def emit(self, record): - while True:
meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch deleted +0 -62
62 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch deleted +0 -21
@@ -1,21 +0,0 @@ -From fa32c7dcabaa3c00d3620a3266e49629365c0cbe Mon Sep 17 00:00:00 2001 -From: Jeremy Puhlman <[email protected]> -Date: Wed, 11 Mar 2020 22:10:02 +0000 -Subject: [PATCH] set python path for completion_helper - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Jeremy Puhlman <[email protected]> ---- - dnf/cli/completion_helper.py.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/cli/completion_helper.py.in b/dnf/cli/completion_helper.py.in -index 0da0f2a2..9330d15b 100644 ---- a/dnf/cli/completion_helper.py.in -+++ b/dnf/cli/completion_helper.py.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # - # This file is part of dnf. - #
meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch new file +51 -0
51 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch new file +36 -0
@@ -0,0 +1,36 @@ +From d0718ed10c1c255850fff5922f533bceef10f659 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Thu, 27 Nov 2025 11:50:20 +0100 +Subject: [PATCH] Do not hardcode system_cachedir + +Because dnf is ran in a fakeroot environment, the UID of the +"user" is 0, and the hardcoded paths to the host system are +attempted, leading to the following error: + +[log_check] DEBUG: Failed to expire repository cache in path "/var/cache/libdnf5/ + +Remove the check for geteuid() == 0 and rely only on the +user cache dir. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Adam Duskett <[email protected]> +--- + libdnf5/conf/config_main.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdnf5/conf/config_main.cpp b/libdnf5/conf/config_main.cpp +index a83e4a2..ebdea4d 100644 +--- a/libdnf5/conf/config_main.cpp ++++ b/libdnf5/conf/config_main.cpp +@@ -244,7 +244,7 @@ class ConfigMain::Impl { + // Repo main config + + OptionNumber<std::uint32_t> retries{10}; +- OptionPath cachedir{geteuid() == 0 ? SYSTEM_CACHEDIR : libdnf5::xdg::get_user_cache_dir() / "libdnf5"}; ++ OptionPath cachedir{libdnf5::xdg::get_user_cache_dir() / "libdnf5"}; + OptionBool fastestmirror{false}; + OptionStringAppendList excludeenvs{std::vector<std::string>{}}; + OptionStringAppendList excludegroups{std::vector<std::string>{}}; +-- +2.52.0 +
meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch new file +97 -0
97 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 0e7fc4a8523aad616493e6ad33c509e1e530d852 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Wed, 11 Jan 2017 15:10:13 +0200 -Subject: [PATCH] Do not prepend installroot to logdir. - -This would otherwise write the logs into rootfs/var/log -(whereas we want them in $T), -and will break installation of base-files rpm. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - dnf/cli/cli.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py -index d3844df3..ac080f79 100644 ---- a/dnf/cli/cli.py -+++ b/dnf/cli/cli.py -@@ -954,7 +954,7 @@ class Cli(object): - logger.warning(_("Unable to detect release version (use '--releasever' to specify " - "release version)")) - -- for opt in ('cachedir', 'logdir', 'persistdir'): -+ for opt in ('cachedir', 'persistdir'): - conf.prepend_installroot(opt) - - self.base._logging._setup_from_dnf_conf(conf)
meta/recipes-devtools/dnf/dnf/0005-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch new file +59 -0
59 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf/0006-include-cstring-where-std-strcmp-is-used.patch new file +242 -0
242 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch deleted +0 -24
@@ -1,24 +0,0 @@ -From d5b154ea69afdcd862299a0b7f255f6ece3686c6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Fri, 30 Dec 2016 18:29:07 +0200 -Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9e2e9e9e..2056089d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -19,7 +19,7 @@ ELSE () - MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) - ENDIF() - --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) - MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") - - ADD_SUBDIRECTORY (dnf)
meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From d3556767b84f3687743fdad0a88af0739d736ea9 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Fri, 30 Dec 2016 18:29:37 +0200 -Subject: [PATCH] Run python scripts using env - -Otherwise the build tools hardcode the python path into them. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - bin/dnf-automatic.in | 2 +- - bin/dnf.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in -index 17e35a05..28827e38 100755 ---- a/bin/dnf-automatic.in -+++ b/bin/dnf-automatic.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # dnf-automatic executable. - # - # Copyright (C) 2014-2016 Red Hat, Inc. -diff --git a/bin/dnf.in b/bin/dnf.in -index 55ceb3f2..e38973c7 100755 ---- a/bin/dnf.in -+++ b/bin/dnf.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # The dnf executable script. - # - # Copyright (C) 2012-2016 Red Hat, Inc.
meta/recipes-devtools/dnf/dnf_4.24.0.bb deleted +0 -96
96 lines not on this page · raw message
meta/recipes-devtools/dnf/dnf_5.4.4.0.bb new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
2.55.0
Re: [OE-core] [PATCH v9 4/5] dnf: Upgrade to 5.4.4.0
Quoted 46 lines · Adam Duskett via lists.openembedded.org
Completely rewritten in C++, there are several changes needed to facilitate moving from DNF4 to DNF5. Below are some significant items to note:
- Added a negative lookahead filter for the following warning if
RPM_SIGN_PACKAGES!= '1': "Warning: skipped OpenPGP checks" This warning is hard-coded and piped to stderr if gpg checks are disabled. However, most users do not sign their RPM packages and use dnf to simply construct the rootfs.- The "-v/--verbose" cli option is removed. As such, remove the argument everywhere it was called.[1]
- the rpmverbosity cli option is replaced with --setopt=rpmverbosity
- Change gpgcheck to
pkg_gpgcheckas this is what the documentation recommends.[2]- --nogpgcheck is now --no-gpgchecks
- --setopt=protect_running_kernel=False has to be set or else every dnf transaction complains that
/boot/vmlinuz-${kernel_version}does not exist in/var/log/dnf5.log. There is an open issue on github[3] to enable the currently not-yet implementedautocheck_running_kernel option, but it has been open for quite some time and theprotect_running_kerneloption supresses the message.- Move --skip-broken to after the install argument as the global --skip-broken argument is removed.
-
/var/cache/dnfis replaced with/var/cache/libdnf5- Add
features += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n'features += 'PACKAGECONFIG:append:pn-librepo = " sequoia"\n'totest_testimage_dnfas librepo currently does not work with gpgme.- Change
if e_output.startswith("Error in POSTIN scriptlet in rpm package"):to `if "%post(" ine_outputand "scriptlet failed" ine_output.While DNF5 has many config options, unfortunately, the majority of them depends on sdbus-c++, which is not included in OE-core. However, the package is included in meta-openembedded, so it's best to include the PACKAGECONFIG options in the recipe and leave them off by default.
Quoted 6 lines
1: https://github.com/rpm-software-management/dnf5/issues/464
2: https://dnf5.readthedocs.io/en/latest/dnf5.conf.5.html
3: https://github.com/rpm-software-management/dnf5/issues/1255Signed-off-by Adam Duskett <[email protected]>---
Hi Adam,
This has been failing on my side:
ERROR: dnf-native-5.4.4.0-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/x86_64-linux/dnf-native/5.4.4.0/temp/run.do_compile.2140500' failed with exit code 1
...
| /srv/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/x86_64-linux/dnf-native/5.4.4.0/sources/dnf-5.4.4.0/libdnf5-cli/session.cpp:257:36: error: ‘parse’ is not a member of ‘std::chrono’
| 257 | ss >> std::chrono::parse("%F", tp);
| |...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/4618
Can you have a look at the issue?
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v9 5/5 libdnf: remove recipe
In reply to Adam Duskettlibdnf is now included in the dnf5 source tree.
--- meta/conf/distro/include/maintainers.inc | 1 - ...or-both-libsolv-and-libsolvext-libdn.patch | 26 ---------- ...FNM_EXTMATCH-if-not-already-like-und.patch | 39 -------------- .../0001-drop-FindPythonInstDir.cmake.patch | 39 -------------- ...-utils.cpp-fix-compilation-with-musl.patch | 51 ------------------- ...ables-with-pkg-config-cmake-s-own-mo.patch | 27 ---------- .../libdnf/libdnf/armarch.patch | 50 ------------------ meta/recipes-devtools/libdnf/libdnf_0.75.0.bb | 33 ------------ 8 files changed, 266 deletions(-) delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-dnf-repo-Define-FNM_EXTMATCH-if-not-already-like-und.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-utils-utils.cpp-fix-compilation-with-musl.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf/armarch.patch delete mode 100644 meta/recipes-devtools/libdnf/libdnf_0.75.0.bb
meta/conf/distro/include/maintainers.inc +0 -1
@@ -333,7 +333,6 @@ RECIPE_MAINTAINER:pn-libconvert-asn1-perl = "Tim Orling <[email protected] RECIPE_MAINTAINER:pn-libcxx = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-libdaemon = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libdisplay-info = "Hiago De Franco <[email protected]>" -RECIPE_MAINTAINER:pn-libdnf = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libdrm = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libedit = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-libepoxy = "Unassigned <[email protected]>"
meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From cd8a24156cefab80b673af233f66ff44c1b7c458 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 7 Feb 2017 12:16:03 +0200 -Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is - - using both) - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a6f14318..60c66e94 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -51,7 +51,7 @@ endif() - - - # build dependencies --PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) -+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext) - set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - -
meta/recipes-devtools/libdnf/libdnf/0001-dnf-repo-Define-FNM_EXTMATCH-if-not-already-like-und.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 486d1c7826efb9e42bbb18b6537fd23a0a33b324 Mon Sep 17 00:00:00 2001 -From: Wang Mingyu <[email protected]> -Date: Sun, 16 Nov 2025 23:29:18 +0000 -Subject: [PATCH] dnf-repo: Define FNM_EXTMATCH if not already (like under - musl). - -With musl, FNM_EXTMATCH is not defined: -dnf-repo.cpp -| dnf-repo.cpp: In function 'void dnf_repo_conf_load_overrides(DnfRepo*, const char*)': -| dnf-repo.cpp:971:50: error: 'FNM_EXTMATCH' was not declared in this scope; did you mean 'FNM_NOMATCH'? -| 971 | if (fnmatch(repo_id_pattern, repoId, FNM_EXTMATCH) != 0) { -| | ^~~~~~~~~~~~ -| | FNM_NOMATCH - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1737/commits/47ed831c1fdb32519f2d66fee91bc47f9521d1d4] - -Signed-off-by: Wang Mingyu <[email protected]> ---- - libdnf/dnf-repo.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp -index 44c0f8758..d53959414 100644 ---- a/libdnf/dnf-repo.cpp -+++ b/libdnf/dnf-repo.cpp -@@ -69,6 +69,10 @@ - #include <string> - #include <vector> - -+#if !defined(FNM_EXTMATCH) -+#define FNM_EXTMATCH 0 -+#endif -+ - typedef struct - { - DnfRepoEnabled enabled; --- -2.43.0 -
meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 5150fd9be924d2e9e74b2db664229423a4a00238 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <[email protected]> -Date: Tue, 1 Jun 2021 10:23:59 +0800 -Subject: [PATCH] drop FindPythonInstDir.cmake - -Since commit [1] applied, PYTHON_INSTALL_DIR is not right -on nativesdk build -... -|Building for python3 -|-- Python install dir is -|tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-libdnf/0.63.0-r0/ -recipe-sysroot-native/usr/lib/python3.9/site-packages -... - -Yocto manually set PYTHON_INSTALL_DIR from recipe, it is not -necessary to call FindPythonInstDir.cmake which will override -Yocto setting - -[1] https://github.com/rpm-software-management/libdnf/commit/f1cffbfb9f338da827e233c2d8ac3a25a6a59a69 - -Upstream-Status: Inappropriate [Yocto specific] - -Signed-off-by: Hongxu Jia <[email protected]> ---- - cmake/modules/FindPythonInstDir.cmake | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/cmake/modules/FindPythonInstDir.cmake b/cmake/modules/FindPythonInstDir.cmake -index ed098ded..8b137891 100644 ---- a/cmake/modules/FindPythonInstDir.cmake -+++ b/cmake/modules/FindPythonInstDir.cmake -@@ -1,6 +1 @@ --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " --from sys import stdout --from sysconfig import get_path --path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) --stdout.write(path)" --OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+
meta/recipes-devtools/libdnf/libdnf/0001-utils-utils.cpp-fix-compilation-with-musl.patch deleted +0 -51
51 lines not on this page · raw message
meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From a921a92f334a2a30741b906c206e041cef2d904d Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Fri, 30 Dec 2016 18:24:50 +0200 -Subject: [PATCH] Set libsolv variables with pkg-config (cmake's own module - - doesn't work properly). - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - CMakeLists.txt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c6bd46a6..a6f14318 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -51,7 +51,8 @@ endif() - - - # build dependencies --find_package(LibSolv 0.7.21 REQUIRED COMPONENTS ext) -+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv) -+set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES}) - - - # build dependencies via pkg-config
meta/recipes-devtools/libdnf/libdnf/armarch.patch deleted +0 -50
50 lines not on this page · raw message
meta/recipes-devtools/libdnf/libdnf_0.75.0.bb deleted +0 -33
@@ -1,33 +0,0 @@ -SUMMARY = "Library providing simplified C and Python API to libsolv" -HOMEPAGE = "https://github.com/rpm-software-management/libdnf" -DESCRIPTION = "This library provides a high level package-manager. It's core library of dnf, PackageKit and rpm-ostree. It's replacement for deprecated hawkey library which it contains inside and uses librepo under the hood." -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;protocol=https;tag=${PV} \ - file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ - file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ - file://0001-drop-FindPythonInstDir.cmake.patch \ - file://armarch.patch \ - file://0001-dnf-repo-Define-FNM_EXTMATCH-if-not-already-like-und.patch \ - file://0001-utils-utils.cpp-fix-compilation-with-musl.patch \ - " - -SRCREV = "d39573195e24b43687587a8d83b9f6ac274e2412" -UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!4\.90)\d+(\.\d+)+)" - -DEPENDS = "glib-2.0 libsolv librepo rpm libmodulemd json-c swig-native util-linux" - -inherit cmake pkgconfig setuptools3-base gettext - -COMPATIBLE_HOST_libc-musl = 'null' - -EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ - -DWITH_GTKDOC=OFF -DWITH_MAN=OFF -DWITH_HTML=OFF \ - -DWITH_TESTS=OFF \ - -DWITH_ZCHUNK=OFF \ - " - -BBCLASSEXTEND = "native nativesdk" - -SKIP_RECIPE[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'Does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}"
Signature · 1 line
2.55.0