Hi Gyorgy! Thanks for the review!
On Wed, Dec 10, 2025 at 3:27 PM Gyorgy Sarvari <[email protected]> wrote: > 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 > Great catch! I'll add them properly and keep the sqlite query in the back of my head from now on! > > > +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. > No worries! I'll also change the order to ;protocol=https;branch=main;tag=${PV} > > > + 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) > Good call. It's not needed and was left over cruft from debugging. I'll remove it entirely! > > [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" ? > No problem! > > > + > > +BBCLASSEXTEND = "native nativesdk" > > > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#227485): https://lists.openembedded.org/g/openembedded-core/message/227485 Mute This Topic: https://lists.openembedded.org/mt/116710030/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
