From 5623065801b977aa6e27f2d75f3a471224731d64 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 4 Oct 2017 17:39:46 +0300 Subject: dnf: update to 2.7.5 Drop upstreamed patch. Rebase the other patches. (From OE-Core rev: 17a537bb5d28ceb9fec0320dc18e6e3688d5993c) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...eck-conf.releasever-instead-of-releasever.patch | 31 ------------- ...Corretly-install-tmpfiles.d-configuration.patch | 7 +-- ...hardcode-etc-and-systemd-unit-directories.patch | 9 ++-- ...0001-Do-not-prepend-installroot-to-logdir.patch | 31 ------------- ...0005-Do-not-prepend-installroot-to-logdir.patch | 31 +++++++++++++ ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 9 ++-- .../dnf/0030-Run-python-scripts-using-env.patch | 11 ++--- meta/recipes-devtools/dnf/dnf_2.6.3.bb | 52 ---------------------- meta/recipes-devtools/dnf/dnf_2.7.5.bb | 52 ++++++++++++++++++++++ 9 files changed, 103 insertions(+), 130 deletions(-) delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch delete mode 100644 meta/recipes-devtools/dnf/dnf_2.6.3.bb create mode 100644 meta/recipes-devtools/dnf/dnf_2.7.5.bb (limited to 'meta/recipes-devtools/dnf') diff --git a/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch b/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch deleted file mode 100644 index 05f3141517..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 166833a88a928a574bf9143b9b65f544be482c77 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 18 Aug 2017 15:55:15 +0300 -Subject: [PATCH] Check conf.releasever instead of releasever - -The substitutions may actually set the conf.releasever correctly, -and so the check should use that instead of the passed-in function -parameter. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/901] -Signed-off-by: Alexander Kanavin ---- - 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 2d63420c..167943b8 100644 ---- a/dnf/cli/cli.py -+++ b/dnf/cli/cli.py -@@ -914,7 +914,7 @@ class Cli(object): - conf.releasever = releasever - subst = conf.substitutions - subst.update_from_etc(conf.installroot) -- if releasever is None: -+ if conf.releasever is None: - logger.warning(_("Unable to detect release version (use '--releasever' to specify " - "release version)")) - --- -2.14.1 - diff --git a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch index c9df458974..6692b41a16 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch @@ -1,10 +1,11 @@ -From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001 +From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 26 Jan 2017 16:36:20 +0200 -Subject: [PATCH] Corretly install tmpfiles.d configuration +Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- etc/tmpfiles.d/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -17,5 +18,5 @@ index f69c773e..3eb6d0e8 100644 -INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/) +INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/) -- -2.11.0 +2.14.2 diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch index 0f261e5c5d..15a7bfc732 100644 --- a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch +++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch @@ -1,16 +1,17 @@ -From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001 +From a8ef81c115a45f05dad145c98e10f3c4940e4e29 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 26 Jan 2017 16:25:47 +0200 -Subject: [PATCH] Do not hardcode /etc and systemd unit directories +Subject: [PATCH 3/5] Do not hardcode /etc and systemd unit directories Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6a319935..db20ccd4 100644 +index 650b624a..10199618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED) @@ -25,5 +26,5 @@ index 6a319935..db20ccd4 100644 if (${PYTHON_DESIRED} STREQUAL "2") FIND_PACKAGE (PythonInterp REQUIRED) -- -2.11.0 +2.14.2 diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch deleted file mode 100644 index a90e77cbf1..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -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 ---- - 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 b764801a..893f4bda 100644 ---- a/dnf/cli/cli.py -+++ b/dnf/cli/cli.py -@@ -881,7 +881,7 @@ class Cli(object): - subst = conf.substitutions - subst.update_from_etc(conf.installroot) - -- for opt in ('cachedir', 'logdir', 'persistdir'): -+ for opt in ('cachedir', 'persistdir'): - conf.prepend_installroot(opt) - - self.base._logging._setup_from_dnf_conf(conf) --- -2.11.0 - diff --git a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch new file mode 100644 index 0000000000..aa20009cef --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch @@ -0,0 +1,31 @@ +From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 11 Jan 2017 15:10:13 +0200 +Subject: [PATCH 5/5] 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 +--- + 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 d2d9c082..82270ecf 100644 +--- a/dnf/cli/cli.py ++++ b/dnf/cli/cli.py +@@ -920,7 +920,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) +-- +2.14.2 + 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 8c59f9f670..6e011915df 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,16 +1,17 @@ -From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001 +From 7205033e44d8fba1d3b18b490e7eaab82da1ffa3 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:29:07 +0200 -Subject: [PATCH 29/30] Do not set PYTHON_INSTALL_DIR by running python +Subject: [PATCH 1/5] Do not set PYTHON_INSTALL_DIR by running python Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6a319935..466ca1e6 100644 +index 23e5f889..650b624a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ else() @@ -23,5 +24,5 @@ index 6a319935..466ca1e6 100644 MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") -- -2.11.0 +2.14.2 diff --git a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch index 1abd880da9..eedbb5723f 100644 --- a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch +++ b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch @@ -1,19 +1,20 @@ -From 9c8d545152b35d8943be72b9503414a53e1ebf7c Mon Sep 17 00:00:00 2001 +From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 30 Dec 2016 18:29:37 +0200 -Subject: [PATCH 30/30] Run python scripts using env +Subject: [PATCH 2/5] 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 + --- 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 5b06aa26..9f6f703e 100755 +index 5b06aa26..891b4c24 100755 --- a/bin/dnf-automatic.in +++ b/bin/dnf-automatic.in @@ -1,4 +1,4 @@ @@ -23,7 +24,7 @@ index 5b06aa26..9f6f703e 100755 # # Copyright (C) 2014-2016 Red Hat, Inc. diff --git a/bin/dnf.in b/bin/dnf.in -index 645d0f06..ab141abd 100755 +index 645d0f06..bdf7b3c4 100755 --- a/bin/dnf.in +++ b/bin/dnf.in @@ -1,4 +1,4 @@ @@ -33,5 +34,5 @@ index 645d0f06..ab141abd 100755 # # Copyright (C) 2012-2016 Red Hat, Inc. -- -2.11.0 +2.14.2 diff --git a/meta/recipes-devtools/dnf/dnf_2.6.3.bb b/meta/recipes-devtools/dnf/dnf_2.6.3.bb deleted file mode 100644 index 3ed6a74570..0000000000 --- a/meta/recipes-devtools/dnf/dnf_2.6.3.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \ - " - -SRC_URI = "git://github.com/rpm-software-management/dnf.git \ - file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0030-Run-python-scripts-using-env.patch \ - file://0001-Do-not-prepend-installroot-to-logdir.patch \ - file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ - file://0001-Corretly-install-tmpfiles.d-configuration.patch \ - file://0001-Check-conf.releasever-instead-of-releasever.patch \ - " - -SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065" -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}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg" -# Recommend gnupg so that GPG signature check on repository metadata is possible -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 -} - -SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.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 \ -" diff --git a/meta/recipes-devtools/dnf/dnf_2.7.5.bb b/meta/recipes-devtools/dnf/dnf_2.7.5.bb new file mode 100644 index 0000000000..fbd3bd4571 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf_2.7.5.bb @@ -0,0 +1,52 @@ +SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://PACKAGE-LICENSING;md5=bfc29916e11321be06924c4fb096fdcc \ + " + +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 \ + " + +SRCREV = "564c44667c7014843fa6f1732621093114ec59b2" +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}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg" +# Recommend gnupg so that GPG signature check on repository metadata is possible +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 +} + +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 \ +" -- cgit v1.2.3-54-g00ecf