Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Gyorgy Sarvari <skandigraun@gmail.com>
To: adam.duskett@amarulasolutions.com,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 5/5] dnf5: bump to 5.3.0.0
Date: Wed, 10 Dec 2025 15:27:42 +0100	[thread overview]
Message-ID: <b1e90355-721c-4942-aaca-209e43e29096@gmail.com> (raw)
In-Reply-To: <20251210110340.3631065-5-adam.duskett@amarulasolutions.com>

On 12/10/25 12:03, Adam Duskett via lists.openembedded.org wrote:
<SNIP>
> diff --git a/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb b/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb
> new file mode 100644
> index 0000000000..961e889fdb
> --- /dev/null
> +++ b/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb
> @@ -0,0 +1,196 @@
> +SUMMARY = "DNF package manager rewritten in C++, using libsolv as a dependency resolver"
> +DESCRIPTION = "\
> +    DNF5 is a command-line package manager that automates the process of \
> +    installing, upgrading, configuring, and removing computer programs in a \
> +    consistent manner. It supports RPM packages, modulemd modules, and comps \
> +    groups and environments. \
> +"
> +HOMEPAGE = "https://github.com/rpm-software-management/dnf5"
> +BUGTRACKER = "https://github.com/rpm-software-management/dnf5/issues"
> +CVE_PRODUCT = "RPM:Dnf5"

While the cpe-vendor is matched case-insensitive way, product matching
is case-sensitive, it should be lowercase. Also, there seem to be at
least 2 valid CVE_PRODUCTS:
$ sqlite3 nvdfkie_1-1.db "select vendor, product from products where
product like 'dnf5';"
rpm|dnf5
rpm-software-management|dnf5

> +SECTION = "base"
> +
> +LICENSE = "GPL-2.0-or-later & LGPL-2.1-only"
> +LIC_FILES_CHKSUM = "\
> +    file://COPYING.md;md5=9733192df318d0f806fd668b92ba0ba6 \
> +    file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> +    file://lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
> +"
> +
> +DEPENDS = "\
> +    fmt \
> +    glib-2.0 \
> +    json-c \
> +    libcomps \
> +    libmodulemd \
> +    librepo \
> +    libsolv \
> +    libtoml11 \
> +    libxml2 \
> +    sqlite3 \
> +    util-linux \
> +"
> +
> +SRC_URI = "\
> +    git://github.com/rpm-software-management/dnf5.git;branch=main;protocol=https \

You could add ;tag=${PV} at the end.

> +    file://0002-cmake-set-CMP0190-to-OLD.patch \
> +    file://0003-Do-not-hardcode-system_cachedir.patch \
> +    file://0004-add-support-for-gcc-12-and-below.patch \
> +    file://0005-fix-string-concatenation-errors-for-musl.patch \
> +    file://0006-add-missing-headers-for-musl.patch \
> +    file://0007-Define-FNM_EXTMATCH-for-musl.patch \
> +    file://0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch \
> +"
> +SRC_URI:append:class-native = " file://0001-Do-not-hardcode-the-systemd-unit-directory.patch"
> +SRCREV = "c6a42c2e7e9ee0a04d46e6820a5962925a99b085"
> +
> +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
> +
> +inherit bash-completion cmake gettext pkgconfig siteinfo systemd
> +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3targetconfig', '', d)}
> +
> +PACKAGECONFIG[dnfdaemon-client] = "-DWITH_DNF5DAEMON_CLIENT=ON,-DWITH_DNF5DAEMON_CLIENT=OFF,sdbus-c++"
> +PACKAGECONFIG[dnfdaemon-server] = "-DWITH_DNF5DAEMON_SERVER=ON,-DWITH_DNF5DAEMON_SERVER=OFF,sdbus-c++"
> +PACKAGECONFIG[plugins] = "-DWITH_DNF5_PLUGINS=ON,-DWITH_DNF5_PLUGINS=OFF,curl sdbus-c++ zlib"
> +PACKAGECONFIG[plugin-actions] = "-DWITH_PLUGIN_ACTIONS=ON,-DWITH_PLUGIN_ACTIONS=OFF"
> +PACKAGECONFIG[plugin-appstream] = "-DWITH_PLUGIN_APPSTREAM=ON,-DWITH_PLUGIN_APPSTREAM=OFF,appstream"
> +PACKAGECONFIG[plugin-expired-pgp-keys] = "-DWITH_PLUGIN_EXPIRED_PGP_KEYS=ON,-DWITH_PLUGIN_EXPIRED_PGP_KEYS=OFF,gnupg"
> +PACKAGECONFIG[plugin-manifest] = "-DWITH_PLUGIN_MANIFEST=ON,-DWITH_PLUGIN_MANIFEST=OFF,sdbus-c++ libpkgmanifest"

In which layer is libpkgmanifest? I couldn't find it the layer index.

> +PACKAGECONFIG[plugin-local] = "-DWITH_PLUGIN_LOCAL=ON,-DWITH_PLUGIN_LOCAL=OFF"
> +
> +# sdbus-c++ and journalctl integration.
> +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,sdbus-c++"
> +
> +# build options - bindings
> +PACKAGECONFIG[python3] = "-DWITH_PYTHON3=ON,-DWITH_PYTHON3=OFF, python3 swig-native"
> +
> +# No sdbus-c++-native package.
> +PACKAGECONFIG:remove:class-native = "\
> +    dnfdaemon-client \
> +    dnfdaemon-server \
> +    plugins \
> +    plugin-manifest \
> +    systemd \
> +"
> +
> +PACKAGE_BEFORE_PN += "\
> +    ${PN}-dnfdaemon-server \
> +    ${PN}-plugins \
> +    ${PN}-python3 \
> +"
> +
> +# manpages generation requires http://www.sphinx-doc.org/
> +EXTRA_OECMAKE:append = " \
> +    -DENABLE_SOLV_FOCUSNEW=ON \
> +    -DWITH_DNF5_OBSOLETES_DNF=OFF \
> +    -DWITH_DNF5=ON \
> +    -DWITH_GO=OFF \
> +    -DWITH_HTML=OFF \
> +    -DWITH_LIBDNF5_CLI=ON \
> +    -DWITH_MAN=OFF \
> +    -DWITH_PERL5=OFF \
> +    -DWITH_PLUGIN_RHSM=OFF \
> +    -DWITH_RUBY=OFF \
> +    -DWITH_TESTS=OFF \
> +"
> +
> +# No sdbus-c++-native package exists so remove all options that depend on it.
> +EXTRA_OECMAKE:append:class-native = " \
> +    -DWITH_DNF5DAEMON_CLIENT=OFF \
> +    -DWITH_DNF5DAEMON_SERVER=OFF \
> +    -DWITH_DNF5_PLUGINS=OFF \
> +    -DWITH_PLUGIN_MANIFEST=OFF \
> +    -DWITH_SYSTEMD=OFF \
> +"
> +
> +# Create a symlink called 'dnf' as 'make install' does not do it, but
> +# .spec file in dnf source tree does (and then Fedora and dnf documentation
> +# says that dnf binary is plain 'dnf').
> +do_install:append() {
> +    ln -rs ${D}/${bindir}/dnf5 ${D}/${bindir}/dnf
> +    install -d ${D}${sysconfdir}/dnf
> +
> +    # DNF always installs service files to /usr/lib/systemd, even if usrmerge is not
> +    # selected. Also, remove systemd files if systemd isn't selected.
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
> +        rm -rf ${D}${libdir}/systemd
> +    fi
> +
> +    # Breaks dnf because the builddep plugin is provided in the
> +    # dnf-plugins-core package which is not available in oe-core.
> +    rm -f ${D}${datadir}/dnf5/aliases.d/compatibility-plugins.conf
> +}
> +
> +do_install:append:${PN}-plugins() {
> +    ln -rs ${D}/${bindir}/dnf5-automatic ${D}/${bindir}/dnf-automatic
> +}

1. Is that ${PN}-plugins override needed? Couldn't it just be part of
the do_install, if the file exists?
2. The cmake file does install[1] a wrapper script[2] with the same name
and location. Does it not have the same function? (I'm asking, it might
be different)

[1]:
https://github.com/rpm-software-management/dnf5/blob/5.3.0.0/dnf5-plugins/automatic_plugin/CMakeLists.txt#L17
[2]:
https://github.com/rpm-software-management/dnf5/blob/5.3.0.0/dnf5-plugins/automatic_plugin/bin/dnf-automatic

> +
> +# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
> +do_install:append:class-native() {
> +    create_wrapper ${D}/${bindir}/dnf \
> +        SEQUOIA_CRYPTO_POLICY=${STAGING_DATADIR_NATIVE}/crypto-policies/back-ends/rpm-sequoia.config \
> +        RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
> +        RPM_NO_CHROOT_FOR_SCRIPTS=1
> +}
> +
> +do_install:append:class-nativesdk() {
> +    create_wrapper ${D}/${bindir}/dnf \
> +        RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
> +        RPM_NO_CHROOT_FOR_SCRIPTS=1
> +}
> +
> +SYSTEMD_SERVICE:${PN} = "\
> +    dnf5-makecache.service \
> +    dnf5-makecache.timer \
> +"
> +
> +SYSTEMD_AUTO_ENABLE ?= "disable"
> +
> +# Packages for testing purposes
> +PACKAGES += "${PN}-test-main ${PN}-test-dep"
> +
> +FILES:${PN} += "\
> +    ${bindir}/dnf* \
> +    ${datadir}/dbus-1/system-services/org.rpm.dnf.v0.service \
> +    ${datadir}/dnf5 \
> +    ${datadir}/polkit-1/actions/org.rpm.dnf* \
> +    ${datadir}/polkit-1/rules.d/org.rpm.dnf* \
> +    ${libdir}/dnf5 \
> +    ${libdir}/libdnf5* \
> +    ${sysconfdir}/dnf \
> +"
> +
> +FILES:${PN}-bash-completion += "\
> +    ${datadir}/bash-completion/completions/dnf5 \
> +"
> +
> +FILES:${PN}-dnfdaemon-server += "\
> +    ${systemd_system_unitdir}/dnf5daemon-server.service \
> +    ${datadir}/dbus-1/interfaces/org.rpm.dnf* \
> +    ${datadir}/dbus-1/system.d/org.rpm.dnf* \
> +"
> +
> +FILES:${PN}-plugins += "\
> +    ${systemd_system_unitdir}/dnf-automatic.service \
> +    ${systemd_system_unitdir}/dnf-automatic.timer \
> +    ${systemd_system_unitdir}/dnf5-automatic.service \
> +    ${systemd_system_unitdir}/dnf5-automatic.timer \
> +"
> +
> +FILES:${PN}-python3 += "\
> +    ${libdir}/${PYTHON_DIR}/site-packages/libdnf* \
> +"
> +
> +FILES:${PN}-systemd += "\
> +    ${systemd_system_unitdir}/dnf5-offline-transaction.service \
> +    ${systemd_system_unitdir}/dnf5-offline-transaction-cleanup.service \
> +"
> +
> +RRECOMMENDS:${PN}:class-target += "bash-completion gnupg"
> +RRECOMMENDS:${PN}-test-main = "${PN}-test-dep"
> +ALLOW_EMPTY:${PN}-test-main = "1"
> +ALLOW_EMPTY:${PN}-test-dep = "1"
> +
> +SKIP_RECIPE[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}"

Since it is being updated, could you please also fix this typo: "due" ->
"due to" ?

> +
> +BBCLASSEXTEND = "native nativesdk"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#227470): https://lists.openembedded.org/g/openembedded-core/message/227470
> Mute This Topic: https://lists.openembedded.org/mt/116710030/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>



  reply	other threads:[~2025-12-10 14:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 11:03 [PATCH 1/5] signing-keys.bb: Fix DISTRO_CODENAME truncation Adam Duskett
2025-12-10 11:03 ` [PATCH 2/5] libtoml: new recipe Adam Duskett
2025-12-10 11:41   ` [OE-core] " Gyorgy Sarvari
2025-12-11 11:26   ` Quentin Schulz
2025-12-10 11:03 ` [PATCH 3/5] libsolv: explicitly enable comps for rpm packageconfig Adam Duskett
2025-12-10 11:03 ` [PATCH 4/5] librepo: add PACKAGECONFIG[sequoia] Adam Duskett
2025-12-10 11:03 ` [PATCH 5/5] dnf5: bump to 5.3.0.0 Adam Duskett
2025-12-10 14:27   ` Gyorgy Sarvari [this message]
2025-12-10 14:40     ` [OE-core] " Alexander Kanavin
2025-12-10 17:53       ` Khem Raj
2025-12-10 15:45     ` Adam Duskett
2025-12-10 14:38   ` Paul Barker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1e90355-721c-4942-aaca-209e43e29096@gmail.com \
    --to=skandigraun@gmail.com \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox