From 432352dddc97eb19cefacd8644fb59b1f10bc2d3 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 5 May 2021 17:18:19 +0200 Subject: dnf: upgrade 4.6.0 -> 4.7.0 Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch | 39 +++++++++ ...cutils.py-do-not-hardcode-usr-bin-rpmkeys.patch | 37 +++++++++ meta/recipes-devtools/dnf/dnf_4.6.0.bb | 91 --------------------- meta/recipes-devtools/dnf/dnf_4.7.0.bb | 93 ++++++++++++++++++++++ 4 files changed, 169 insertions(+), 91 deletions(-) create mode 100644 meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch delete mode 100644 meta/recipes-devtools/dnf/dnf_4.6.0.bb create mode 100644 meta/recipes-devtools/dnf/dnf_4.7.0.bb (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch b/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch new file mode 100644 index 0000000000..99afe09840 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch @@ -0,0 +1,39 @@ +From 2729c00f0060beab8537a9bebc796b170949093d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 4 May 2021 22:03:30 +0200 +Subject: [PATCH 1/2] dnf/rpm/miscutils.py: fix usage of _() + +Specifically: +- an import of _ was missing +- _ was reused for a different purpose + +Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/1762] +Signed-off-by: Alexander Kanavin +--- + dnf/rpm/miscutils.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dnf/rpm/miscutils.py b/dnf/rpm/miscutils.py +index 235aaf28f..7e33d4c42 100644 +--- a/dnf/rpm/miscutils.py ++++ b/dnf/rpm/miscutils.py +@@ -22,6 +22,7 @@ import subprocess + import logging + + from dnf.i18n import ucd ++from dnf.i18n import _ + from shutil import which + + +@@ -46,7 +47,7 @@ def _verifyPkgUsingRpmkeys(package, installroot): + env={'LC_ALL': 'C'}, + stdout=subprocess.PIPE, + cwd='/') as p: +- data, _ = p.communicate() ++ data, err = p.communicate() + if p.returncode != 0 or data != (package.encode('ascii', 'strict') + b': digests signatures OK\n'): + return 0 + else: +-- +2.31.1 + diff --git a/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch b/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch new file mode 100644 index 0000000000..b4c9e074d6 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch @@ -0,0 +1,37 @@ +From dc14022a99dc017c52c484efb32729729baf854c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 4 May 2021 22:07:32 +0200 +Subject: [PATCH 2/2] dnf/rpm/miscutils.py: do not hardcode /usr/bin/rpmkeys + +Some build systems (e.g. Yocto) place a specially configured +rpmkeys executable elsewhere and set up PATH accordingly; +it's better to always take it from there. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/1763] +Signed-off-by: Alexander Kanavin +--- + dnf/rpm/miscutils.py | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/dnf/rpm/miscutils.py b/dnf/rpm/miscutils.py +index 7e33d4c42..fcd956db9 100644 +--- a/dnf/rpm/miscutils.py ++++ b/dnf/rpm/miscutils.py +@@ -30,11 +30,9 @@ logger = logging.getLogger('dnf') + + + def _verifyPkgUsingRpmkeys(package, installroot): +- rpmkeys_binary = '/usr/bin/rpmkeys' +- if not os.path.isfile(rpmkeys_binary): +- rpmkeys_binary = which("rpmkeys") +- logger.info(_('Using rpmkeys executable from {path} to verify signature for package: {package}.').format( +- path=rpmkeys_binary, package=package)) ++ rpmkeys_binary = which("rpmkeys") ++ logger.info(_('Using rpmkeys executable from {path} to verify signature for package: {package}.').format( ++ path=rpmkeys_binary, package=package)) + + if not os.path.isfile(rpmkeys_binary): + logger.critical(_('Cannot find rpmkeys executable to verify signatures.')) +-- +2.31.1 + diff --git a/meta/recipes-devtools/dnf/dnf_4.6.0.bb b/meta/recipes-devtools/dnf/dnf_4.6.0.bb deleted file mode 100644 index 6651e64352..0000000000 --- a/meta/recipes-devtools/dnf/dnf_4.6.0.bb +++ /dev/null @@ -1,91 +0,0 @@ -SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" -DESCRIPTION = "Software package manager that installs, updates, and removes \ -packages on RPM-based Linux distributions. It automatically computes \ -dependencies and determines the actions required to install packages." -HOMEPAGE = "https://github.com/rpm-software-management/dnf" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \ - " - -SRC_URI = "git://github.com/rpm-software-management/dnf.git \ - file://0001-Corretly-install-tmpfiles.d-configuration.patch \ - file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ - file://0005-Do-not-prepend-installroot-to-logdir.patch \ - file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0030-Run-python-scripts-using-env.patch \ - file://0001-set-python-path-for-completion_helper.patch \ - file://0001-dnf-write-the-log-lock-to-root.patch \ - " - -SRCREV = "c826d7db401ebf9b59b2fa74570a919e4af2673e" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -inherit cmake gettext bash-completion distutils3-base systemd - -DEPENDS += "libdnf librepo libcomps python3-iniparse" - -# manpages generation requires http://www.sphinx-doc.org/ -EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" - -BBCLASSEXTEND = "native nativesdk" - -RDEPENDS_${PN} += " \ - python3-core \ - python3-codecs \ - python3-netclient \ - python3-email \ - python3-threading \ - python3-distutils \ - python3-logging \ - python3-fcntl \ - librepo \ - python3-shell \ - libcomps \ - libdnf \ - python3-sqlite3 \ - python3-compression \ - python3-rpm \ - python3-iniparse \ - python3-json \ - python3-curses \ - python3-misc \ - python3-gpg \ - " - -RDEPENDS_${PN}_class-native = "" - -RRECOMMENDS_${PN}_class-target += "gnupg" - -# 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() { - lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf - lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/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 \ - 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} = "dnf-makecache.service dnf-makecache.timer \ - dnf-automatic.service dnf-automatic.timer \ - dnf-automatic-download.service dnf-automatic-download.timer \ - dnf-automatic-install.service dnf-automatic-install.timer \ - dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ -" -SYSTEMD_AUTO_ENABLE ?= "disable" - -PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" diff --git a/meta/recipes-devtools/dnf/dnf_4.7.0.bb b/meta/recipes-devtools/dnf/dnf_4.7.0.bb new file mode 100644 index 0000000000..7314eaf7b8 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf_4.7.0.bb @@ -0,0 +1,93 @@ +SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" +DESCRIPTION = "Software package manager that installs, updates, and removes \ +packages on RPM-based Linux distributions. It automatically computes \ +dependencies and determines the actions required to install packages." +HOMEPAGE = "https://github.com/rpm-software-management/dnf" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \ + " + +SRC_URI = "git://github.com/rpm-software-management/dnf.git \ + file://0001-Corretly-install-tmpfiles.d-configuration.patch \ + file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ + file://0005-Do-not-prepend-installroot-to-logdir.patch \ + file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ + file://0030-Run-python-scripts-using-env.patch \ + file://0001-set-python-path-for-completion_helper.patch \ + file://0001-dnf-write-the-log-lock-to-root.patch \ + file://0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch \ + file://0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch \ + " + +SRCREV = "395541fbf8f87f81cdca7567f22be1182e55bea7" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +inherit cmake gettext bash-completion distutils3-base systemd + +DEPENDS += "libdnf librepo libcomps python3-iniparse" + +# manpages generation requires http://www.sphinx-doc.org/ +EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN} += " \ + python3-core \ + python3-codecs \ + python3-netclient \ + python3-email \ + python3-threading \ + python3-distutils \ + python3-logging \ + python3-fcntl \ + librepo \ + python3-shell \ + libcomps \ + libdnf \ + python3-sqlite3 \ + python3-compression \ + python3-rpm \ + python3-iniparse \ + python3-json \ + python3-curses \ + python3-misc \ + python3-gpg \ + " + +RDEPENDS_${PN}_class-native = "" + +RRECOMMENDS_${PN}_class-target += "gnupg" + +# 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() { + lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf + lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/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 \ + 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} = "dnf-makecache.service dnf-makecache.timer \ + dnf-automatic.service dnf-automatic.timer \ + dnf-automatic-download.service dnf-automatic-download.timer \ + dnf-automatic-install.service dnf-automatic-install.timer \ + dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ +" +SYSTEMD_AUTO_ENABLE ?= "disable" + +PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" -- cgit 1.2.3-korg