From cd66d0c0b08f2e5a64a67f257350456f0f2cbc02 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 22 Jun 2021 13:21:12 +0200 Subject: dnf: updatee 4.7.0 -> 4.8.0 Remove patches merged upstream. (From OE-Core rev: f647f368899c88b64d9feffb8d1cde7c3f96bdaa) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni --- .../0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch | 39 --------- ...cutils.py-do-not-hardcode-usr-bin-rpmkeys.patch | 37 --------- ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 8 +- meta/recipes-devtools/dnf/dnf_4.7.0.bb | 93 ---------------------- meta/recipes-devtools/dnf/dnf_4.8.0.bb | 91 +++++++++++++++++++++ 5 files changed, 95 insertions(+), 173 deletions(-) delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch delete 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.7.0.bb create mode 100644 meta/recipes-devtools/dnf/dnf_4.8.0.bb (limited to 'meta/recipes-devtools/dnf') 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 deleted file mode 100644 index 99afe09840..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index b4c9e074d6..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch +++ /dev/null @@ -1,37 +0,0 @@ -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/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch index 0ed9afc58d..5cffc9dce1 100644 --- a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch +++ b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch @@ -1,4 +1,4 @@ -From 6be13143a54c79085d400d5bd4c7a6e1cb6ffaf5 Mon Sep 17 00:00:00 2001 +From ceb1043c4f3de095e36908232320b74a4128a94e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:29:07 +0200 Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python @@ -11,15 +11,15 @@ Signed-off-by: Alexander Kanavin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 38cf4fbf..6c5debd8 100644 +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 distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" 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) ++#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) diff --git a/meta/recipes-devtools/dnf/dnf_4.7.0.bb b/meta/recipes-devtools/dnf/dnf_4.7.0.bb deleted file mode 100644 index 7314eaf7b8..0000000000 --- a/meta/recipes-devtools/dnf/dnf_4.7.0.bb +++ /dev/null @@ -1,93 +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 \ - 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)}" diff --git a/meta/recipes-devtools/dnf/dnf_4.8.0.bb b/meta/recipes-devtools/dnf/dnf_4.8.0.bb new file mode 100644 index 0000000000..44c4405939 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf_4.8.0.bb @@ -0,0 +1,91 @@ +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 = "e7b29753dce94769d30f92e671f55863985d24f0" +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