From 4b740dc9fdbca604749cf15f7ea0e6ead345b5a0 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Tue, 5 May 2020 08:54:39 -0500 Subject: poky: subtree update:a8544811d7..b5763b2f48 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alexander Kanavin (29): rpm: upgrade to 4.15.1 libmodulemd: move from 1.x to 2.x version libdnf: upgrade 0.28.1 -> 0.47.0 dnf: upgrade 4.2.2 -> 4.2.21 dnf: add a patch for base-files installation failures logrotate: update to 3.16.0 rt-tests: further exclusion of development versions kmscube: update to latest commit xcb-proto: update to 1.14 libxcb: update to 1.14 ghostscript: do not hardcode version in SRC_URI ghostscript: update 9.50 -> 9.52 webkitgtk: update to 2.28.2 python3-gitdb: update to 4.0.4 libevdev: update to 1.9.0 python3-dbusmock: add recipe from meta-oe mc: update to 4.8.24 coreutils: update to 8.32 glib-2.0: update 2.62.4 -> 2.64.2 glib-networking: update to 2.64.2 gptfdisk: update to 1.0.5 clutter-1.0: update to 1.26.4 diffoscope: update to 143 wpe: update to 1.6.0 vte: update to 0.60.2 libnotify: update to 0.7.9 connman: update to 1.38 xkeyboard-config: update to 2.29 gcr: update to 3.36.0 Andreas M?ller (1): libsecret: upgrade 0.20.1 -> 0.20.3 / port to meson Anibal Limon (2): ptest-runner: Bump to 2.4.0 oeqa/runtime: Use libdir to run ptest-runner Bartłomiej Burdukiewicz (2): libva: add PACKAGECONFIG and additonal rules for glx. libva: removed opengl from REQUIRED_DISTRO_FEATURES. Benjamin Fair (1): util-linux: fix build error in kill Bruce Ashfield (4): linux-yocto/5.4: update to v5.4.28 linux-yocto/5.4: update to v5.4.32 linux-yocto-dev: bump to v5.7-rc linux-yocto/5.4: update to v5.4.34 Frazer Clews (2): bitbake: lib/toaster: fixup codebase so pydocstyle can parse bitbake: lib/bs4/testing.py: fix bs4 testing Jan Luebbe (1): openssl: upgrade 1.1.1f -> 1.1.1g Joshua Watt (1): jquery: Upgrade 3.4.1 -> 3.5.0 Khem Raj (2): dpkg: Add riscv32 CPU support musl: Remove spurious unused patch Mingli Yu (1): iputils: Initialize libgcrypt Peter Kjellerstedt (1): libdnf: Use single-quotes around string literals used in SQL statements Pierre-Jean Texier (3): timezone: upgrade 2019c -> 2020a curl: upgrade 7.69.1 -> 7.70.0 curl: support mqtt in PACKAGECONFIG Richard Purdie (6): sanity: Require gcc 6 or later gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native abi_version/staging: Bump versions to force rebuild after sstate corruption bitbake: bitdoc: Remove it utils: Drop FILESPATHPKG usage utils: Drop is_machine_specific()/machine_paths() Robert P. J. Day (5): ref-manual: fix excessive command indentation ref-manual: IMAGE_TYPES, add tar.zst, delete elf ref-manual: typo "SSTATE_MIRROR" -> "SSTATE_MIRRORS" ref-manual: Remove long-dead PACKAGE_GROUP variable bitbake: docs: delete reference to obsolete recipe-depends.dot Sakib Sajal (1): sqlite: backport CVE fixes Tim Orling (2): atk: upgrade 2.34.1 -> 2.36.0 at-spi2-core: upgrade 2.34.0 -> 2.36.0 Vyacheslav Yurkov (1): os-release: sanitize required fields Wang Mingyu (1): icu: CVE-2020-10531 Change-Id: Iae5641be5ca6424275d2e0d63ba3a7a5ba90cde2 Signed-off-by: Andrew Geissler --- .../dnf/0001-dnf-write-the-log-lock-to-root.patch | 29 ++ .../dnf/dnf/Fix-SyntaxWarning.patch | 34 --- poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb | 90 ------ poky/meta/recipes-devtools/dnf/dnf_4.2.21.bb | 90 ++++++ .../dpkg/0001-Add-support-for-riscv32-CPU.patch | 39 +++ poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb | 1 + ...0001-gptcurses-correctly-include-curses.h.patch | 27 ++ poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb | 33 -- poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb | 35 +++ poky/meta/recipes-devtools/gcc/gcc-target.inc | 10 +- poky/meta/recipes-devtools/jquery/jquery_3.4.1.bb | 31 -- poky/meta/recipes-devtools/jquery/jquery_3.5.0.bb | 31 ++ .../libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | 12 +- ...inx-only-if-documentation-is-actually-ena.patch | 42 +++ ...quotes-around-string-literals-used-in-SQL.patch | 36 +++ .../0001-include-stdexcept-for-runtime_error.patch | 65 ---- .../libdnf/libdnf/fix-deprecation-warning.patch | 71 ----- poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 32 -- poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb | 34 +++ ...01-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch | 22 -- .../libmodulemd/libmodulemd-v1_git.bb | 25 -- ...nerate-the-manpage-only-if-the-feature-is.patch | 28 ++ ...n.build-do-not-install-python-gi-bindings.patch | 23 ++ .../libmodulemd/libmodulemd_git.bb | 25 ++ poky/meta/recipes-devtools/python/python-gitdb.inc | 5 +- .../python/python3-dbusmock_0.19.bb | 16 + .../recipes-devtools/python/python3-gitdb_2.0.6.bb | 3 - .../recipes-devtools/python/python3-gitdb_4.0.4.bb | 3 + ...an-unsatisfiable-dependency-when-building.patch | 28 +- ...code-lib-rpm-as-the-installation-path-for.patch | 14 +- ...y-package-building-into-a-separate-functi.patch | 84 ------ ...rovides-requires-do-not-use-monodis-from-.patch | 58 ---- ...o-not-run-file-classification-in-parallel.patch | 65 ++++ ...-binary-package-creation-via-thread-pools.patch | 127 -------- ...c-make-operations-over-string-pools-threa.patch | 207 ------------- ...c-remove-static-local-variables-from-buil.patch | 336 --------------------- poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 155 ---------- poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb | 149 +++++++++ 38 files changed, 706 insertions(+), 1409 deletions(-) create mode 100644 poky/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch delete mode 100644 poky/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch delete mode 100644 poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb create mode 100644 poky/meta/recipes-devtools/dnf/dnf_4.2.21.bb create mode 100644 poky/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch create mode 100644 poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch delete mode 100644 poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb create mode 100644 poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb delete mode 100644 poky/meta/recipes-devtools/jquery/jquery_3.4.1.bb create mode 100644 poky/meta/recipes-devtools/jquery/jquery_3.5.0.bb create mode 100644 poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch create mode 100644 poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch delete mode 100644 poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch delete mode 100644 poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch delete mode 100644 poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb create mode 100644 poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb delete mode 100644 poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch delete mode 100644 poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb create mode 100644 poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch create mode 100644 poky/meta/recipes-devtools/libmodulemd/libmodulemd/0002-meson.build-do-not-install-python-gi-bindings.patch create mode 100644 poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb create mode 100644 poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb delete mode 100644 poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb create mode 100644 poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb delete mode 100644 poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch delete mode 100644 poky/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch create mode 100644 poky/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch delete mode 100644 poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch delete mode 100644 poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch delete mode 100644 poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch delete mode 100644 poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb create mode 100644 poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb (limited to 'poky/meta/recipes-devtools') diff --git a/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch b/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch new file mode 100644 index 0000000000..21b50dee01 --- /dev/null +++ b/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch @@ -0,0 +1,29 @@ +From 5e07c16a506b19cbb107d5e99fca41d679b23b9a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 28 Apr 2020 15:55:00 +0200 +Subject: [PATCH] dnf: write the log lock to root + +Writing it to /var/log appears to be racing with installation +of base-files, and if lock is created first, base-files +will refuse to install (due to the target directory +already existing, and base-files creating it as a symlink). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + dnf/logging.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/logging.py b/dnf/logging.py +index bd660470..a9d808b1 100644 +--- a/dnf/logging.py ++++ b/dnf/logging.py +@@ -94,7 +94,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): + def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False): + super(MultiprocessRotatingFileHandler, self).__init__( + filename, mode, maxBytes, backupCount, encoding, delay) +- self.rotate_lock = dnf.lock.build_log_lock("/var/log/", True) ++ self.rotate_lock = dnf.lock.build_log_lock("/", True) + + def emit(self, record): + while True: diff --git a/poky/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch b/poky/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch deleted file mode 100644 index 1bd8b09594..0000000000 --- a/poky/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 23c5b15efe42e5e6ee695e54798bac248532d8d6 Mon Sep 17 00:00:00 2001 - -Date: Tue, 28 May 2019 13:14:51 +0200 -Subject: [oe-core][PATCH 1/1] Fix SyntaxWarning: "is" with a literal. Did you - mean "=="? - ---- - dnf/cli/commands/repoquery.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) ---- - -Unchanged. Appears in version 4.2.7. - -Upstream-Status: Backport [git://github.com/rpm-software-management/dnf.git] - -Signed-off-by: Joe Slater - - -diff --git a/dnf/cli/commands/repoquery.py b/dnf/cli/commands/repoquery.py -index 941a470..63fc668 100644 ---- a/dnf/cli/commands/repoquery.py -+++ b/dnf/cli/commands/repoquery.py -@@ -611,7 +611,7 @@ class RepoQueryCommand(commands.Command): - - def tree_seed(self, query, aquery, opts, level=-1, usedpkgs=None): - for pkg in sorted(set(query.run()), key=lambda p: p.name): -- usedpkgs = set() if usedpkgs is None or level is -1 else usedpkgs -+ usedpkgs = set() if usedpkgs is None or level == -1 else usedpkgs - if pkg.name.startswith("rpmlib") or pkg.name.startswith("solvable"): - return - self.grow_tree(level, pkg, opts) --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb deleted file mode 100644 index a046ffc05d..0000000000 --- a/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb +++ /dev/null @@ -1,90 +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." -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://Fix-SyntaxWarning.patch \ - file://0001-set-python-path-for-completion_helper.patch \ - " - -SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d" -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/poky/meta/recipes-devtools/dnf/dnf_4.2.21.bb b/poky/meta/recipes-devtools/dnf/dnf_4.2.21.bb new file mode 100644 index 0000000000..44dab1d8a6 --- /dev/null +++ b/poky/meta/recipes-devtools/dnf/dnf_4.2.21.bb @@ -0,0 +1,90 @@ +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." +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 = "864c381baabf024c299dca75abfda96139b8f583" +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/poky/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch new file mode 100644 index 0000000000..52e85705fa --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch @@ -0,0 +1,39 @@ +From 279e4c274f5f295823cf9fa95d3ba131f6d711db Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 29 Apr 2020 22:02:23 -0700 +Subject: [PATCH] Add support for riscv32 CPU + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + data/cputable | 1 + + scripts/Dpkg/Vendor/Debian.pm | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/data/cputable b/data/cputable +index 9f2a8e0..1d935b1 100644 +--- a/data/cputable ++++ b/data/cputable +@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big + powerpcel powerpcle powerpcle 32 little + ppc64 powerpc64 (powerpc|ppc)64 64 big + ppc64el powerpc64le powerpc64le 64 little ++riscv32 riscv32 riscv32 32 little + riscv64 riscv64 riscv64 64 little + s390 s390 s390 32 big + s390x s390x s390x 64 big +diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm +index a352bbd..fa1d90b 100644 +--- a/scripts/Dpkg/Vendor/Debian.pm ++++ b/scripts/Dpkg/Vendor/Debian.pm +@@ -306,6 +306,7 @@ sub _add_build_flags { + powerpc + ppc64 + ppc64el ++ riscv32 + riscv64 + s390x + sparc +-- +2.26.2 + diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb index e9dec337b3..50fe54dee1 100644 --- a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb +++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb @@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ file://0001-dpkg-Support-muslx32-build.patch \ file://pager.patch \ + file://0001-Add-support-for-riscv32-CPU.patch \ " SRC_URI_append_class-native = " \ file://tweak-options-require-tar-1.27.patch \ diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch b/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch new file mode 100644 index 0000000000..67689e838a --- /dev/null +++ b/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch @@ -0,0 +1,27 @@ +From 607b0bed5e8a5f5c3754cd6ffcf499d8134c37f9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 30 Mar 2020 17:11:19 +0200 +Subject: [PATCH] gptcurses: correctly include curses.h + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gptcurses.cc | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/gptcurses.cc b/gptcurses.cc +index 1b18cf2..4ebfde1 100644 +--- a/gptcurses.cc ++++ b/gptcurses.cc +@@ -23,11 +23,7 @@ + #include + #include + #include +-#ifdef __APPLE__ + #include +-#else +-#include +-#endif + #include "gptcurses.h" + #include "support.h" + diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb deleted file mode 100644 index b043c96543..0000000000 --- a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Utility for modifying GPT disk partitioning" -DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -DEPENDS = "util-linux" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz" -SRC_URI[md5sum] = "5ecc3c44913bb6b53d3708d1ac7ac295" -SRC_URI[sha256sum] = "b663391a6876f19a3cd901d862423a16e2b5ceaa2f4a3b9bb681e64b9c7ba78d" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" -UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" - -EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}' gdisk fixparts ${PACKAGECONFIG_CONFARGS}" - -PACKAGECONFIG ??= "ncurses popt" -PACKAGECONFIG[ncurses] = "cgdisk,,ncurses" -PACKAGECONFIG[popt] = "sgdisk,,popt" - -do_install() { - install -d ${D}${sbindir} - for f in cgdisk sgdisk; do - if [ -x $f ]; then - install -m 0755 $f ${D}${sbindir} - fi - done - install -m 0755 gdisk ${D}${sbindir} - install -m 0755 fixparts ${D}${sbindir} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb new file mode 100644 index 0000000000..c7850f03ca --- /dev/null +++ b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb @@ -0,0 +1,35 @@ +SUMMARY = "Utility for modifying GPT disk partitioning" +DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +DEPENDS = "util-linux" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \ + file://0001-gptcurses-correctly-include-curses.h.patch \ + " +SRC_URI[md5sum] = "58dac67c85e46ca87b587231549aefe6" +SRC_URI[sha256sum] = "0e7d3987cd0488ecaf4b48761bc97f40b1dc089e5ff53c4b37abe30bc67dcb2f" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" +UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}' gdisk fixparts ${PACKAGECONFIG_CONFARGS}" + +PACKAGECONFIG ??= "ncurses popt" +PACKAGECONFIG[ncurses] = "cgdisk,,ncurses" +PACKAGECONFIG[popt] = "sgdisk,,popt" + +do_install() { + install -d ${D}${sbindir} + for f in cgdisk sgdisk; do + if [ -x $f ]; then + install -m 0755 $f ${D}${sbindir} + fi + done + install -m 0755 gdisk ${D}${sbindir} + install -m 0755 fixparts ${D}${sbindir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/gcc/gcc-target.inc b/poky/meta/recipes-devtools/gcc/gcc-target.inc index 8cb432780f..6263e81497 100644 --- a/poky/meta/recipes-devtools/gcc/gcc-target.inc +++ b/poky/meta/recipes-devtools/gcc/gcc-target.inc @@ -15,11 +15,11 @@ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" ARMFPARCHEXT ?= "" -EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}" -EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}" -EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}" -EXTRA_OECONF_append_arc = " --with-cpu=${TUNE_PKGARCH}" -EXTRA_OECONF_append_x86-64 = " --with-arch=native" +EXTRA_OECONF_append_armv6_class-target = " --with-arch=armv6${ARMFPARCHEXT}" +EXTRA_OECONF_append_armv7a_class-target = " --with-arch=armv7-a${ARMFPARCHEXT}" +EXTRA_OECONF_append_armv7ve_class-target = " --with-arch=armv7ve${ARMFPARCHEXT}" +EXTRA_OECONF_append_arc_class-target = " --with-cpu=${TUNE_PKGARCH}" +EXTRA_OECONF_append_x86-64_class-target = " --with-arch=native" # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is # set in subdir gcc, so subdir libcc1 can't use it, export it here to diff --git a/poky/meta/recipes-devtools/jquery/jquery_3.4.1.bb b/poky/meta/recipes-devtools/jquery/jquery_3.4.1.bb deleted file mode 100644 index 1bf6ef5c98..0000000000 --- a/poky/meta/recipes-devtools/jquery/jquery_3.4.1.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "jQuery is a fast, small, and feature-rich JavaScript library" -HOMEPAGE = "https://jquery.com/" -LICENSE = "MIT" -SECTION = "devel" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}.js;startline=8;endline=10;md5=cdb86f5bda90caec023592d2e768357c" - -SRC_URI = "\ - https://code.jquery.com/${BP}.js;name=js \ - https://code.jquery.com/${BP}.min.js;name=min \ - https://code.jquery.com/${BP}.min.map;name=map \ - " - -SRC_URI[js.sha256sum] = "5a93a88493aa32aab228bf4571c01207d3b42b0002409a454d404b4d8395bd55" -SRC_URI[min.sha256sum] = "0925e8ad7bd971391a8b1e98be8e87a6971919eb5b60c196485941c3c1df089a" -SRC_URI[map.sha256sum] = "8da74aec0fcdd7678a2663b3cc9bafbaf009e6d6929b28bb3dd95bced18206f6" - -UPSTREAM_CHECK_REGEX = "jquery-(?P\d+(\.\d+)+)\.js" - -inherit allarch - -do_install() { - install -d ${D}${datadir}/javascript/${BPN}/ - install -m 644 ${WORKDIR}/${BP}.js ${D}${datadir}/javascript/${BPN}/${BPN}.js - install -m 644 ${WORKDIR}/${BP}.min.js ${D}${datadir}/javascript/${BPN}/${BPN}.min.js - install -m 644 ${WORKDIR}/${BP}.min.map ${D}${datadir}/javascript/${BPN}/${BPN}.min.map -} - -PACKAGES = "${PN}" -FILES_${PN} = "${datadir}" - -BBCLASSEXTEND += "native nativesdk" diff --git a/poky/meta/recipes-devtools/jquery/jquery_3.5.0.bb b/poky/meta/recipes-devtools/jquery/jquery_3.5.0.bb new file mode 100644 index 0000000000..5c6f9cddbe --- /dev/null +++ b/poky/meta/recipes-devtools/jquery/jquery_3.5.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "jQuery is a fast, small, and feature-rich JavaScript library" +HOMEPAGE = "https://jquery.com/" +LICENSE = "MIT" +SECTION = "devel" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}.js;startline=8;endline=10;md5=b1e67ece919e852643f1541a54492d65" + +SRC_URI = "\ + https://code.jquery.com/${BP}.js;name=js \ + https://code.jquery.com/${BP}.min.js;name=min \ + https://code.jquery.com/${BP}.min.map;name=map \ + " + +SRC_URI[js.sha256sum] = "aff01a147aeccc9b70a5efad1f2362fd709f3316296ec460d94aa7d31decdb37" +SRC_URI[min.sha256sum] = "c4dccdd9ae25b64078e0c73f273de94f8894d5c99e4741645ece29aeefc9c5a4" +SRC_URI[map.sha256sum] = "3149351c8cbc3fb230bbf6188617c7ffda77d9e14333f4f5f0aa1aae379df892" + +UPSTREAM_CHECK_REGEX = "jquery-(?P\d+(\.\d+)+)\.js" + +inherit allarch + +do_install() { + install -d ${D}${datadir}/javascript/${BPN}/ + install -m 644 ${WORKDIR}/${BP}.js ${D}${datadir}/javascript/${BPN}/${BPN}.js + install -m 644 ${WORKDIR}/${BP}.min.js ${D}${datadir}/javascript/${BPN}/${BPN}.min.js + install -m 644 ${WORKDIR}/${BP}.min.map ${D}${datadir}/javascript/${BPN}/${BPN}.min.map +} + +PACKAGES = "${PN}" +FILES_${PN} = "${datadir}" + +BBCLASSEXTEND += "native nativesdk" diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch index 3c87d4d8b3..ac9400c48d 100644 --- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch +++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch @@ -1,4 +1,4 @@ -From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001 +From 56fa2bbdbd29377a6ef0d0b7aadbac8b5ea8c95b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 6 Nov 2018 13:54:43 +0100 Subject: [PATCH] Add WITH_TESTS option @@ -14,18 +14,18 @@ Signed-off-by: Alexander Kanavin 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index ce88b9e3..7a99320a 100644 +index 881152a..965c992 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON) - option(WITH_MAN "Enables hawkey man page generation" ON) +@@ -33,6 +33,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON) + option(WITH_ZCHUNK "Build with zchunk support" ON) option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF) option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF) +option(WITH_TESTS "Enables unit tests" ON) # load pkg-config first; it's required by other modules -@@ -158,8 +159,10 @@ endif() +@@ -165,8 +166,10 @@ endif() # build tests @@ -37,7 +37,7 @@ index ce88b9e3..7a99320a 100644 add_subdirectory(python/hawkey) endif() diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt -index d9645346..84d17204 100644 +index d964534..84d1720 100644 --- a/python/hawkey/CMakeLists.txt +++ b/python/hawkey/CMakeLists.txt @@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY}) diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch new file mode 100644 index 0000000000..6dd7c71aae --- /dev/null +++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch @@ -0,0 +1,42 @@ +From b570c7f8bd089deec7da2b108aa789a27025a473 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 19 Nov 2019 13:46:09 +0100 +Subject: [PATCH] Look fo sphinx only if documentation is actually enabled + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + docs/hawkey/CMakeLists.txt | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +diff --git a/docs/hawkey/CMakeLists.txt b/docs/hawkey/CMakeLists.txt +index 52cc35c6..63c7672f 100644 +--- a/docs/hawkey/CMakeLists.txt ++++ b/docs/hawkey/CMakeLists.txt +@@ -2,15 +2,17 @@ + # tell sphinx-build to do them both in one go: + + +-find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") +-if(NOT EXISTS ${SPHINX_PROGRAM}) +- find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR}) +-endif() +-if(NOT EXISTS ${SPHINX_PROGRAM}) +- find_program(SPHINX_PROGRAM NAMES sphinx-build) +-endif() +-if(NOT EXISTS ${SPHINX_PROGRAM}) +- message(FATAL_ERROR "Sphinx program not found." ) ++if (WITH_HTML OR WITH_MAN) ++ find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") ++ if(NOT EXISTS ${SPHINX_PROGRAM}) ++ find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR}) ++ endif() ++ if(NOT EXISTS ${SPHINX_PROGRAM}) ++ find_program(SPHINX_PROGRAM NAMES sphinx-build) ++ endif() ++ if(NOT EXISTS ${SPHINX_PROGRAM}) ++ message(FATAL_ERROR "Sphinx program not found." ) ++ endif() + endif() + + if(WITH_HTML) diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch new file mode 100644 index 0000000000..6be484fea3 --- /dev/null +++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch @@ -0,0 +1,36 @@ +From 96ca7d0049461df2293dd0000edcbc69b64255e0 Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt +Date: Sun, 3 May 2020 22:40:39 +0200 +Subject: [PATCH] Use single-quotes around string literals used in SQL + statements + +If sqlite is built with -DSQLITE_DQS=0 in accordance with +https://sqlite.org/quirks.html#dblquote, migration to version 1.2 of the +history database would fail with: + + History database cannot be created: /var/lib/dnf/history.sqlite. + Error: SQLite error on ":memory:": Executing an SQL statement failed: + no such column: 1.2 + +Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/951] +Signed-off-by: Peter Kjellerstedt +--- + libdnf/transaction/sql/migrate_tables_1_2.sql | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libdnf/transaction/sql/migrate_tables_1_2.sql b/libdnf/transaction/sql/migrate_tables_1_2.sql +index 49b75315..f80ad1c4 100644 +--- a/libdnf/transaction/sql/migrate_tables_1_2.sql ++++ b/libdnf/transaction/sql/migrate_tables_1_2.sql +@@ -1,9 +1,9 @@ + R"**( + BEGIN TRANSACTION; + ALTER TABLE trans +- ADD comment TEXT DEFAULT ""; ++ ADD comment TEXT DEFAULT ''; + UPDATE config +- SET value = "1.2" ++ SET value = '1.2' + WHERE key = 'version'; + COMMIT; + )**" diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch deleted file mode 100644 index cedf539243..0000000000 --- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-stdexcept-for-runtime_error.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5f8eee5040d7074710cd542fc50f7a40918321fc Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 23 Dec 2019 14:30:22 -0800 -Subject: [PATCH] include for runtime_error - -Fixes - -error: class 'libdnf::ModulePackageContainer::Exception' does not have any field named 'runtime_error' - explicit Exception(const std::string &what) : runtime_error(what) {} - ^~~~~~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/867] -Signed-off-by: Khem Raj ---- - libdnf/goal/Goal.hpp | 1 + - libdnf/module/ModulePackageContainer.hpp | 1 + - libdnf/repo/solvable/Dependency.cpp | 3 ++- - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp -index f33dfa24..7b8d822c 100644 ---- a/libdnf/goal/Goal.hpp -+++ b/libdnf/goal/Goal.hpp -@@ -22,6 +22,7 @@ - #define __GOAL_HPP - - #include -+#include - - #include "../dnf-types.h" - #include "../hy-goal.h" -diff --git a/libdnf/module/ModulePackageContainer.hpp b/libdnf/module/ModulePackageContainer.hpp -index 1f815fda..37a8832d 100644 ---- a/libdnf/module/ModulePackageContainer.hpp -+++ b/libdnf/module/ModulePackageContainer.hpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - //class ModulePackageContainer; - //typedef std::shared_ptr ModulePackageContainerPtr; -diff --git a/libdnf/repo/solvable/Dependency.cpp b/libdnf/repo/solvable/Dependency.cpp -index 6682b729..0fc8b5cd 100644 ---- a/libdnf/repo/solvable/Dependency.cpp -+++ b/libdnf/repo/solvable/Dependency.cpp -@@ -18,6 +18,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#include - #include "Dependency.hpp" - #include "libdnf/utils/utils.hpp" - #include "libdnf/repo/DependencySplitter.hpp" -@@ -106,4 +107,4 @@ Dependency::getReldepId(DnfSack *sack, const char * reldepStr) - } - } - --} -\ No newline at end of file -+} --- -2.24.1 - diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch b/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch deleted file mode 100644 index 3a3e02f352..0000000000 --- a/poky/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 66d9b2ba3fbc7b04f2b5ad9d0e5371340c037b5f Mon Sep 17 00:00:00 2001 -From: Marek Blaha -Date: Wed, 10 Jul 2019 10:11:01 +0200 -Subject: [oe-core][PATCH 1/1] Fix Python 3.8 deprecation warning - (RhBug:1724244) - -This deprecation warning was introduced in Python 3.8 by -https://bugs.python.org/issue36381: - -/usr/lib/python3.8/site-packages/dnf/package.py:57: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats - return super(Package, self).chksum - -https://bugzilla.redhat.com/show_bug.cgi?id=1724244 ---- - python/hawkey/package-py.cpp | 3 ++- - python/hawkey/packagedelta-py.cpp | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) ---- - -Unchanged. Appears in version 0.35.2. - -Upstream-Status: Backport [git://github.com/rpm-software-management/libdnf.git] - -Signed-off-by: Joe Slater - - -diff --git a/python/hawkey/package-py.cpp b/python/hawkey/package-py.cpp -index 5102bba..68e03cb 100644 ---- a/python/hawkey/package-py.cpp -+++ b/python/hawkey/package-py.cpp -@@ -18,6 +18,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#define PY_SSIZE_T_CLEAN - #include - #include - -@@ -251,7 +252,7 @@ get_chksum(_PackageObject *self, void *closure) - #if PY_MAJOR_VERSION < 3 - res = Py_BuildValue("is#", type, cs, checksum_length); - #else -- res = Py_BuildValue("iy#", type, cs, checksum_length); -+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length); - #endif - - return res; -diff --git a/python/hawkey/packagedelta-py.cpp b/python/hawkey/packagedelta-py.cpp -index ca1cb7d..1a64836 100644 ---- a/python/hawkey/packagedelta-py.cpp -+++ b/python/hawkey/packagedelta-py.cpp -@@ -18,6 +18,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#define PY_SSIZE_T_CLEAN - #include - - // hawkey -@@ -92,7 +93,7 @@ get_chksum(_PackageDeltaObject *self, void *closure) - #if PY_MAJOR_VERSION < 3 - res = Py_BuildValue("is#", type, cs, checksum_length); - #else -- res = Py_BuildValue("iy#", type, cs, checksum_length); -+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length); - #endif - - return res; --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb deleted file mode 100644 index cc2ceb8816..0000000000 --- a/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Library providing simplified C and Python API to libsolv" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/libdnf \ - file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ - file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ - file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ - file://0001-Add-WITH_TESTS-option.patch \ - file://0001-include-stdexcept-for-runtime_error.patch \ - file://fix-deprecation-warning.patch \ - " - -SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd-v1 json-c swig-native" - -inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base - -EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ - -DWITH_TESTS=OFF \ - " -EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" -EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" - -BBCLASSEXTEND = "native nativesdk" -PNBLACKLIST[libdnf] ?= "${@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/poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb new file mode 100644 index 0000000000..1b06d66b19 --- /dev/null +++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Library providing simplified C and Python API to libsolv" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \ + file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \ + file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \ + file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ + file://0001-Add-WITH_TESTS-option.patch \ + file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \ + file://0001-Use-single-quotes-around-string-literals-used-in-SQL.patch \ + " + +SRCREV = "8330eea6985c4e4b53796f858de5b6b38b1ddf5c" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native" + +inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base + +EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \ + -DWITH_TESTS=OFF \ + -DWITH_ZCHUNK=OFF \ + -DWITH_HTML=OFF \ + " +EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" +EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF" + +BBCLASSEXTEND = "native nativesdk" +PNBLACKLIST[libdnf] ?= "${@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/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch b/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch deleted file mode 100644 index 847b5f700b..0000000000 --- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 4e67f6049b3f822fe6f5af46790a51ace581bf82 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 6 Nov 2018 13:41:29 +0100 -Subject: [PATCH] spec_tmpl.sh: use /bin/sh, not /usr/bin/sh - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - spec_tmpl.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/spec_tmpl.sh b/spec_tmpl.sh -index 0238087..126853c 100755 ---- a/spec_tmpl.sh -+++ b/spec_tmpl.sh -@@ -1,4 +1,4 @@ --#!/usr/bin/sh -+#!/bin/sh - - version=$1 - template=$2 diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb deleted file mode 100644 index 5409051d79..0000000000 --- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "C Library for manipulating module metadata files" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb" - -SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=1.x-maint \ - file://0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch \ - " - -PV = "1.8.16" -SRCREV = "d0dcf7b373b3cf85cd39eb3bc23d31e06195a75a" -UPSTREAM_CHECK_GITTAGREGEX = "libmodulemd-(?P1.*\d)" - -S = "${WORKDIR}/git" - -inherit meson gobject-introspection - -EXTRA_OEMESON = "-Ddeveloper_build=false -Dwith_docs=false" - -DEPENDS += "glib-2.0 libyaml glib-2.0-native python3" - -BBCLASSEXTEND = "native nativesdk" - -GIR_MESON_OPTION = 'skip_introspection' -GIR_MESON_ENABLE_FLAG = 'false' -GIR_MESON_DISABLE_FLAG = 'true' diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch new file mode 100644 index 0000000000..d5c87a1154 --- /dev/null +++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch @@ -0,0 +1,28 @@ +From a04fd2c8ac9e0f7a6fc17f02b2a95227b3d0aae4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 31 Mar 2020 16:06:39 +0200 +Subject: [PATCH] modulemd: generate the manpage only if the feature is enabled + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + modulemd/meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index 9ef1902..9f71e72 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -494,6 +494,7 @@ if with_docs + ) + endif + ++if with_manpages == 'enabled' + help2man_opts = [ + '--no-info', + '--section=1', +@@ -506,3 +507,4 @@ custom_target( + ], + install: true, + install_dir: join_paths(get_option('mandir'), 'man1')) ++endif diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0002-meson.build-do-not-install-python-gi-bindings.patch b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0002-meson.build-do-not-install-python-gi-bindings.patch new file mode 100644 index 0000000000..a97fb73907 --- /dev/null +++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0002-meson.build-do-not-install-python-gi-bindings.patch @@ -0,0 +1,23 @@ +From d7eeac90fe02ccf5c5e4334e41ec75fc33803643 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 31 Mar 2020 16:12:28 +0200 +Subject: [PATCH] meson.build: do not install python gi bindings + +These are unnecessary for oe-core, and the install location +is incorrectly determined using native python. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + meson.build | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/meson.build b/meson.build +index a8b02b4..8ff737b 100644 +--- a/meson.build ++++ b/meson.build +@@ -171,4 +171,3 @@ configure_file( + ) + + subdir('modulemd') +-subdir('bindings/python') diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb new file mode 100644 index 0000000000..d440e60ee6 --- /dev/null +++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "C Library for manipulating module metadata files" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb" + +SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https \ + file://0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch \ + file://0002-meson.build-do-not-install-python-gi-bindings.patch \ + " + +PV = "2.9.2" +SRCREV = "780750eab8a0587b20d033f335301f16d00ab9c9" + +S = "${WORKDIR}/git" + +inherit meson gobject-introspection + +EXTRA_OEMESON = "-Ddeveloper_build=false -Dwith_docs=false -Drpmio=disabled -Dlibmagic=disabled -Dwith_manpages=disabled" + +DEPENDS += "glib-2.0 libyaml glib-2.0-native python3" + +BBCLASSEXTEND = "native nativesdk" + +GIR_MESON_OPTION = 'skip_introspection' +GIR_MESON_ENABLE_FLAG = 'false' +GIR_MESON_DISABLE_FLAG = 'true' diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc index 23ec2986b1..a91bb32c3b 100644 --- a/poky/meta/recipes-devtools/python/python-gitdb.inc +++ b/poky/meta/recipes-devtools/python/python-gitdb.inc @@ -6,10 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528" inherit pypi -PYPI_PACKAGE = "gitdb2" +PYPI_PACKAGE = "gitdb" -SRC_URI[md5sum] = "1a7ea3362e405f8a5634f7ee53636094" -SRC_URI[sha256sum] = "1b6df1433567a51a4a9c1a5a0de977aa351a405cc56d7d35f3388bad1f630350" +SRC_URI[sha256sum] = "6f0ecd46f99bb4874e5678d628c3a198e2b4ef38daea2756a2bfd8df7dd5c1a5" DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap" diff --git a/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb new file mode 100644 index 0000000000..5389e48973 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb @@ -0,0 +1,16 @@ +SUMMARY = "With this program/Python library you can easily create mock objects on D-Bus" + +LICENSE = "GPL-3.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI[sha256sum] = "497f30eed2fcd5deaa2633b9622e4e99af4bdfba4e972b350ba630bac6fc86c2" + +PYPI_PACKAGE = "python-dbusmock" + +inherit pypi setuptools3 + +RDEPENDS_${PN} += "\ + ${PYTHON_PN}-dbus \ + ${PYTHON_PN}-pygobject \ + ${PYTHON_PN}-xml \ + " diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb b/poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb deleted file mode 100644 index 2dcd9c8aff..0000000000 --- a/poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb +++ /dev/null @@ -1,3 +0,0 @@ -inherit setuptools3 -require python-gitdb.inc - diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb new file mode 100644 index 0000000000..2dcd9c8aff --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb @@ -0,0 +1,3 @@ +inherit setuptools3 +require python-gitdb.inc + diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch index 80e2f0fad7..4029233fb7 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch @@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in @@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index 1261cdbba..bb2d6f4f6 100644 +index e6cec1816..810cd7351 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat, &errorString); --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch index 82e7328757..52440d6818 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch @@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac -index 09af7c4..9bd6903 100644 +index d3aeab86e..1a1f3f91f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,7 +1055,7 @@ else +@@ -1086,7 +1086,7 @@ else usrprefix=$prefix fi @@ -27,10 +27,10 @@ index 09af7c4..9bd6903 100644 AC_SUBST(OBJDUMP) diff --git a/macros.in b/macros.in -index a3aa7a9..62cee5c 100644 +index fe9803aad..d128675bf 100644 --- a/macros.in +++ b/macros.in -@@ -970,7 +970,7 @@ package or when debugging this package.\ +@@ -985,7 +985,7 @@ package or when debugging this package.\ %_sharedstatedir %{_prefix}/com %_localstatedir %{_prefix}/var %_lib lib @@ -40,7 +40,7 @@ index a3aa7a9..62cee5c 100644 %_infodir %{_datadir}/info %_mandir %{_datadir}/man diff --git a/rpm.am b/rpm.am -index 82c2d7c..6341b51 100644 +index 40b4ec55f..3139ce8f6 100644 --- a/rpm.am +++ b/rpm.am @@ -1,10 +1,10 @@ @@ -55,4 +55,4 @@ index 82c2d7c..6341b51 100644 +rpmconfigdir = $(libdir)/rpm # Libtool version (current-revision-age) for all our libraries - rpm_version_info = 9:0:1 + rpm_version_info = 9:1:0 diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted file mode 100644 index 6e44f0b7fc..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 25 May 2017 18:15:27 +0300 -Subject: [PATCH 1/4] Split binary package building into a separate function - -So that it can be run as a thread pool task. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] -Signed-off-by: Alexander Kanavin - ---- - build/pack.c | 33 +++++++++++++++++++++------------ - 1 file changed, 21 insertions(+), 12 deletions(-) - -diff --git a/build/pack.c b/build/pack.c -index 518f4e92a..ccfd614cc 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck) - return RPMRC_OK; - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename) - { -- rpmRC rc; -- const char *errorString; -- Package pkg; -- char *pkglist = NULL; -- -- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -- char *fn; -+ const char *errorString; -+ rpmRC rc = RPMRC_OK; - - if (pkg->fileList == NULL) -- continue; -+ return rc; - - if ((rc = processScriptFiles(spec, pkg))) - return rc; -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerGetString(pkg->header, RPMTAG_NAME), errorString); - return RPMRC_FAIL; - } -- fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL); -+ *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL); - if ((binDir = strchr(binRpm, '/')) != NULL) { - struct stat st; - char *dn; -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - free(binRpm); - } - -- rc = writeRPM(pkg, NULL, fn, NULL); -+ rc = writeRPM(pkg, NULL, *filename, NULL); - if (rc == RPMRC_OK) { - /* Do check each written package if enabled */ -- char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL); -+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL); - if (pkgcheck[0] != ' ') { - rc = checkPackages(pkgcheck); - } - free(pkgcheck); -+ } -+ return rc; -+} -+ -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+{ -+ rpmRC rc; -+ Package pkg; -+ char *pkglist = NULL; -+ -+ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -+ char *fn = NULL; -+ rc = packageBinary(spec, pkg, cookie, cheating, &fn); -+ if (rc == RPMRC_OK) { - rstrcat(&pkglist, fn); - rstrcat(&pkglist, " "); - } --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/poky/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted file mode 100644 index 24aa4c7fff..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 27 Aug 2019 17:42:34 +0200 -Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host - -There was a host contamination issue here: if monodis was installed -on the host, do_package would use that to resolve dependencies -of mono libraries (and often fail in that). Without monodis, -no dependencies are resolved, which is seemingly how things -are supposed to work. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - scripts/mono-find-provides | 8 ++++---- - scripts/mono-find-requires | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides -index 9348457d3..b28872ffb 100644 ---- a/scripts/mono-find-provides -+++ b/scripts/mono-find-provides -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$")) - build_bindir="$2/usr/bin" - build_libdir="$2$3" - --if [ -x $build_bindir/monodis ]; then -- monodis="$build_bindir/monodis" -+if [ -x $build_bindir/monodis.bogus ]; then -+ monodis="$build_bindir/monodis.bogus" - export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} --elif [ -x /usr/bin/monodis ]; then -- monodis="/usr/bin/monodis" -+elif [ -x /usr/bin/monodis.bogus ]; then -+ monodis="/usr/bin/monodis.bogus" - else - exit 0; - fi -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires -index ea58cae48..d270169e1 100644 ---- a/scripts/mono-find-requires -+++ b/scripts/mono-find-requires -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$")) - build_bindir="$2/usr/bin" - build_libdir="$2$3" - --if [ -x $build_bindir/monodis ]; then -- monodis="$build_bindir/monodis" -+if [ -x $build_bindir/monodis.bogus ]; then -+ monodis="$build_bindir/monodis.bogus" - export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} --elif [ -x /usr/bin/monodis ]; then -- monodis="/usr/bin/monodis" -+elif [ -x /usr/bin/monodis.bogus ]; then -+ monodis="/usr/bin/monodis.bogus" - else - exit 0; - fi diff --git a/poky/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/poky/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file mode 100644 index 0000000000..d8d338792d --- /dev/null +++ b/poky/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch @@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question is compressed: +https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inappropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin +--- + build/rpmfc.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 3db7a9352..17afdd57a 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful + /* Add attributes on libmagic type & path pattern matches */ + if (matches(&(*attr)->incl, ftype, path, is_executable)) { + argvAddTokens(&fc->fattrs[ix], (*attr)->name); +- #pragma omp critical(fahash) + fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix); + } + } +@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a private handle */ + magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + if (ms == NULL) { + rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), + msflags, strerror(errno)); +- #pragma omp cancel parallel + } + + if (magic_load(ms, NULL) == -1) { + rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms)); +- #pragma omp cancel parallel + } + +- #pragma omp for ordered reduction(+:nerrors) + for (int ix = 0; ix < fc->nfiles; ix++) { + rpmsid ftypeId; + const char * ftype; +@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + fc->fcolor[ix] = fcolor; + + /* Add to file class dictionary and index array */ +- #pragma omp ordered + if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) { + ftypeId = rpmstrPoolId(fc->cdict, ftype, 1); +- #pragma omp atomic + fc->fknown++; + } else { + ftypeId = rpmstrPoolId(fc->cdict, "", 1); +- #pragma omp atomic + fc->fwhite++; + } + /* Pool id's start from 1, for headers we want it from 0 */ diff --git a/poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted file mode 100644 index d10041c2e1..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 25 May 2017 19:30:20 +0300 -Subject: [PATCH 1/3] Run binary package creation via thread pools. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] -Signed-off-by: Alexander Kanavin - ---- - build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++----------- - configure.ac | 3 +++ - 2 files changed, 70 insertions(+), 14 deletions(-) - -diff --git a/build/pack.c b/build/pack.c -index ccfd614cc..ed5b9ab4e 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch - return rc; - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+struct binaryPackageTaskData - { -- rpmRC rc; - Package pkg; -+ char *filename; -+ rpmRC result; -+ struct binaryPackageTaskData *next; -+}; -+ -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating) -+{ -+ struct binaryPackageTaskData *tasks = NULL; -+ struct binaryPackageTaskData *task = NULL; -+ struct binaryPackageTaskData *prev = NULL; -+ -+ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -+ task = rcalloc(1, sizeof(*task)); -+ task->pkg = pkg; -+ if (pkg == spec->packages) { -+ // the first package needs to be processed ahead of others, as they copy -+ // changelog data from it, and so otherwise data races would happen -+ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename)); -+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); -+ tasks = task; -+ } -+ if (prev != NULL) { -+ prev->next = task; -+ } -+ prev = task; -+ } -+ -+ #pragma omp parallel -+ #pragma omp single -+ // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults -+ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { -+ if (task != tasks) -+ #pragma omp task -+ { -+ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename)); -+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); -+ } -+ } -+ -+ return tasks; -+} -+ -+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks) -+{ -+ while (tasks != NULL) { -+ struct binaryPackageTaskData* next = tasks->next; -+ rfree(tasks->filename); -+ rfree(tasks); -+ tasks = next; -+ } -+} -+ -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+{ - char *pkglist = NULL; - -- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -- char *fn = NULL; -- rc = packageBinary(spec, pkg, cookie, cheating, &fn); -- if (rc == RPMRC_OK) { -- rstrcat(&pkglist, fn); -- rstrcat(&pkglist, " "); -- } -- free(fn); -- if (rc != RPMRC_OK) { -- pkglist = _free(pkglist); -- return rc; -- } -+ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating); -+ -+ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { -+ if (task->result == RPMRC_OK) { -+ rstrcat(&pkglist, task->filename); -+ rstrcat(&pkglist, " "); -+ } else { -+ _free(pkglist); -+ freeBinaryPackageTasks(tasks); -+ return RPMRC_FAIL; -+ } - } -+ freeBinaryPackageTasks(tasks); - - /* Now check the package set if enabled */ - if (pkglist != NULL) { -diff --git a/configure.ac b/configure.ac -index a506ec819..59fa0acaf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC - - PKG_PROG_PKG_CONFIG - -+AC_OPENMP -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS" -+ - dnl Checks for programs. - AC_PROG_CXX - AC_PROG_AWK --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted file mode 100644 index c348ae5330..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch +++ /dev/null @@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 30 May 2017 13:58:30 +0300 -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools - thread-safe - -Otherwise multithreaded rpm building explodes in various ways due -to data races. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] -Signed-off-by: Alexander Kanavin - ---- - rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++--------- - 1 file changed, 47 insertions(+), 9 deletions(-) - -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c -index 30a57eb10..58ba95a02 100644 ---- a/rpmio/rpmstrpool.c -+++ b/rpmio/rpmstrpool.c -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets) - return ht; - } - -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid); -+ - static void poolHashResize(rpmstrPool pool, int numBuckets) - { - poolHash ht = pool->hash; -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets) - - for (int i=0; inumBuckets; i++) { - if (!ht->buckets[i].keyid) continue; -- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid)); -+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid)); - for (unsigned int j=0;;j++) { - unsigned int hash = hashbucket(keyHash, j) % numBuckets; - if (!buckets[hash].keyid) { -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke - ht->buckets[hash].keyid = keyid; - ht->keyCount++; - break; -- } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) { -+ } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) { - return; - } - } -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool) - int maxcollisions = 0; - - for (i=0; inumBuckets; i++) { -- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid)); -+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid)); - for (unsigned int j=0;;j++) { - unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets; - if (hash==i) { -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool) - - pool->hash = poolHashCreate(sizehint); - for (int i = 1; i <= pool->offs_size; i++) -- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i); -+ poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i); - } - - rpmstrPool rpmstrPoolCreate(void) -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void) - - rpmstrPool rpmstrPoolFree(rpmstrPool pool) - { -+ #pragma omp critical(rpmstrpool) -+ { - if (pool) { - if (pool->nrefs > 1) { - pool->nrefs--; -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool) - free(pool); - } - } -+ } - return NULL; - } - - rpmstrPool rpmstrPoolLink(rpmstrPool pool) - { -+ #pragma omp critical(rpmstrpool) -+ { - if (pool) - pool->nrefs++; -+ } - return pool; - } - - void rpmstrPoolFreeze(rpmstrPool pool, int keephash) - { -+ #pragma omp critical(rpmstrpool) -+ { - if (pool && !pool->frozen) { - if (!keephash) { - pool->hash = poolHashFree(pool->hash); -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash) - pool->offs_alloced * sizeof(*pool->offs)); - pool->frozen = 1; - } -+ } - } - - void rpmstrPoolUnfreeze(rpmstrPool pool) - { -+ #pragma omp critical(rpmstrpool) -+ { - if (pool) { - if (pool->hash == NULL) { - rpmstrPoolRehash(pool); - } - pool->frozen = 0; - } -+ } - } - - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash) -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen, - return 0; - } - -- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid); -+ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid); - /* pool string could be longer than keylen, require exact matche */ - if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0') - return ht->buckets[hash].keyid; -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen, - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create) - { - rpmsid sid = 0; -- -+ #pragma omp critical(rpmstrpool) -+ { - if (s != NULL) { - unsigned int hash = rstrnhash(s, slen); - sid = strn2id(pool, s, slen, hash, create); - } -+ } - return sid; - } - - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create) - { - rpmsid sid = 0; -- -+ #pragma omp critical(rpmstrpool) -+ { - if (s != NULL) { - size_t slen; - unsigned int hash = rstrlenhash(s, &slen); - sid = strn2id(pool, s, slen, hash, create); - } -+ } - return sid; - } - --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid) - { - const char *s = NULL; - if (pool && sid > 0 && sid <= pool->offs_size) -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) - return s; - } - -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid) -+{ -+ const char *s = NULL; -+ #pragma omp critical(rpmstrpool) -+ { -+ s = rpmstrPoolStrNoLock(pool, sid); -+ } -+ return s; -+} -+ - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid) - { - size_t slen = 0; -+ #pragma omp critical(rpmstrpool) -+ { - if (pool && sid > 0 && sid <= pool->offs_size) { - slen = strlen(pool->offs[sid]); - } -+ } - return slen; - } - -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA, - - rpmsid rpmstrPoolNumStr(rpmstrPool pool) - { -- return (pool != NULL) ? pool->offs_size : 0; -+ rpmsid id = 0; -+ #pragma omp critical(rpmstrpool) -+ { -+ if (pool) { -+ id = pool->offs_size; -+ } -+ } -+ return id; - } --- -2.11.0 - diff --git a/poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted file mode 100644 index 652e30b3e4..0000000000 --- a/poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch +++ /dev/null @@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 8 Jun 2017 17:08:09 +0300 -Subject: [PATCH] build/pack.c: remove static local variables from buildHost() - and getBuildTime() - -Their use is causing difficult to diagnoze data races when building multiple -packages in parallel, and is a bad idea in general, as it also makes it more -difficult to reason about code. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226] -Signed-off-by: Alexander Kanavin - -Signed-off-by: Alexander Kanavin - ---- - build/build.c | 54 ++++++++++++++++++++++++++++-- - build/pack.c | 84 +++++++++-------------------------------------- - build/rpmbuild_internal.h | 8 +++-- - 3 files changed, 74 insertions(+), 72 deletions(-) - -diff --git a/build/build.c b/build/build.c -index 13c3df2..b154f08 100644 ---- a/build/build.c -+++ b/build/build.c -@@ -6,6 +6,8 @@ - #include "system.h" - - #include -+#include -+#include - #include - - #include -@@ -16,6 +18,50 @@ - - #include "debug.h" - -+static rpm_time_t getBuildTime(void) -+{ -+ rpm_time_t buildTime = 0; -+ char *srcdate; -+ time_t epoch; -+ char *endptr; -+ -+ srcdate = getenv("SOURCE_DATE_EPOCH"); -+ if (srcdate) { -+ errno = 0; -+ epoch = strtol(srcdate, &endptr, 10); -+ if (srcdate == endptr || *endptr || errno != 0) -+ rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n")); -+ else -+ buildTime = (int32_t) epoch; -+ } else -+ buildTime = (int32_t) time(NULL); -+ -+ return buildTime; -+} -+ -+static char * buildHost(void) -+{ -+ char* hostname; -+ struct hostent *hbn; -+ char *bhMacro; -+ -+ bhMacro = rpmExpand("%{?_buildhost}", NULL); -+ if (strcmp(bhMacro, "") != 0) { -+ rasprintf(&hostname, "%s", bhMacro); -+ } else { -+ hostname = rcalloc(1024, sizeof(*hostname)); -+ (void) gethostname(hostname, 1024); -+ hbn = gethostbyname(hostname); -+ if (hbn) -+ strcpy(hostname, hbn->h_name); -+ else -+ rpmlog(RPMLOG_WARNING, -+ _("Could not canonicalize hostname: %s\n"), hostname); -+ } -+ free(bhMacro); -+ return(hostname); -+} -+ - /** - */ - static rpmRC doRmSource(rpmSpec spec) -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) - rpmRC rc = RPMRC_OK; - int test = (what & RPMBUILD_NOBUILD); - char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL; -+ const char* host = buildHost(); -+ rpm_time_t buildTime = getBuildTime(); -+ - - if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") && - getenv("SOURCE_DATE_EPOCH") == NULL) { -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) - goto exit; - - if (((what & RPMBUILD_PACKAGESOURCE) && !test) && -- (rc = packageSources(spec, &cookie))) -+ (rc = packageSources(spec, &cookie, buildTime, host))) - goto exit; - - if (((what & RPMBUILD_PACKAGEBINARY) && !test) && -- (rc = packageBinaries(spec, cookie, (didBuild == 0)))) -+ (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host))) - goto exit; - - if ((what & RPMBUILD_CLEAN) && -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) - (void) unlink(spec->specFile); - - exit: -+ free(host); - free(cookie); - spec->rootDir = NULL; - if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) { -diff --git a/build/pack.c b/build/pack.c -index df15876..17a4b09 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -6,8 +6,6 @@ - #include "system.h" - - #include --#include --#include - #include - - #include /* RPMSIGTAG*, rpmReadPackageFile */ -@@ -152,57 +150,6 @@ exit: - return rc; - } - --static rpm_time_t * getBuildTime(void) --{ -- static rpm_time_t buildTime[1]; -- char *srcdate; -- time_t epoch; -- char *endptr; -- -- if (buildTime[0] == 0) { -- srcdate = getenv("SOURCE_DATE_EPOCH"); -- if (srcdate) { -- errno = 0; -- epoch = strtol(srcdate, &endptr, 10); -- if (srcdate == endptr || *endptr || errno != 0) -- rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n")); -- else -- buildTime[0] = (int32_t) epoch; -- } else -- buildTime[0] = (int32_t) time(NULL); -- } -- -- return buildTime; --} -- --static const char * buildHost(void) --{ -- static char hostname[1024]; -- static int oneshot = 0; -- struct hostent *hbn; -- char *bhMacro; -- -- if (! oneshot) { -- bhMacro = rpmExpand("%{?_buildhost}", NULL); -- if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) { -- strcpy(hostname, bhMacro); -- } else { -- if (strcmp(bhMacro, "") != 0) -- rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n")); -- (void) gethostname(hostname, sizeof(hostname)); -- hbn = gethostbyname(hostname); -- if (hbn) -- strcpy(hostname, hbn->h_name); -- else -- rpmlog(RPMLOG_WARNING, -- _("Could not canonicalize hostname: %s\n"), hostname); -- } -- free(bhMacro); -- oneshot = 1; -- } -- return(hostname); --} -- - static rpmRC processScriptFiles(rpmSpec spec, Package pkg) - { - struct TriggerFileEntry *p; -@@ -476,7 +423,8 @@ exit: - * order to how the RPM format is laid on disk. - */ - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp, -- const char *fileName, char **cookie) -+ const char *fileName, char **cookie, -+ rpm_time_t buildTime, const char* buildHost) - { - FD_t fd = NULL; - char * rpmio_flags = NULL; -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp, - - /* Create and add the cookie */ - if (cookie) { -- rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime())); -+ rasprintf(cookie, "%s %d", buildHost, buildTime); - headerPutString(pkg->header, RPMTAG_COOKIE, *cookie); - } - -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck) - return RPMRC_OK; - } - --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename) -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost) - { - const char *errorString; - rpmRC rc = RPMRC_OK; -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch - headerCopyTags(spec->packages->header, pkg->header, copyTags); - - headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION); -- headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost()); -- headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); -+ headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost); -+ headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1); - - if (spec->sourcePkgId != NULL) { - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch - free(binRpm); - } - -- rc = writeRPM(pkg, NULL, *filename, NULL); -+ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost); - if (rc == RPMRC_OK) { - /* Do check each written package if enabled */ - char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL); -@@ -719,7 +667,7 @@ struct binaryPackageTaskData - struct binaryPackageTaskData *next; - }; - --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating) -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost) - { - struct binaryPackageTaskData *tasks = NULL; - struct binaryPackageTaskData *task = NULL; -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c - if (pkg == spec->packages) { - // the first package needs to be processed ahead of others, as they copy - // changelog data from it, and so otherwise data races would happen -- task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename)); -+ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost); - rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); - tasks = task; - } -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c - if (task != tasks) - #pragma omp task - { -- task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename)); -+ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost); - rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename); - } - } -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks) - } - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost) - { - char *pkglist = NULL; - -- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating); -+ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost); - - for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) { - if (task->result == RPMRC_OK) { -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - return RPMRC_OK; - } - --rpmRC packageSources(rpmSpec spec, char **cookie) -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost) - { - Package sourcePkg = spec->sourcePackage; - rpmRC rc; -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie) - - /* Add some cruft */ - headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION); -- headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost()); -- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1); -+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost); -+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1); - headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1); - - /* XXX this should be %_srpmdir */ -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie) - char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL); - - spec->sourcePkgId = NULL; -- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie); -+ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost); - - /* Do check SRPM package if enabled */ - if (rc == RPMRC_OK && pkgcheck[0] != ' ') { -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h -index 439b7d3..07e8338 100644 ---- a/build/rpmbuild_internal.h -+++ b/build/rpmbuild_internal.h -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags); - * @param spec spec file control structure - * @param cookie build identifier "cookie" or NULL - * @param cheating was build shortcircuited? -+ * @param buildTime the build timestamp that goes into packages -+ * @param buildHost the hostname where the build is happening - * @return RPMRC_OK on success - */ - RPM_GNUC_INTERNAL --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating); -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost); - - /** \ingroup rpmbuild - * Generate source package. - * @param spec spec file control structure - * @retval cookie build identifier "cookie" or NULL -+ * @param buildTime the build timestamp that goes into packages -+ * @param buildHost the hostname where the build is happening - * @return RPMRC_OK on success - */ - RPM_GNUC_INTERNAL --rpmRC packageSources(rpmSpec spec, char **cookie); -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost); - - RPM_GNUC_INTERNAL - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag, diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb deleted file mode 100644 index 17255dc87a..0000000000 --- a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +++ /dev/null @@ -1,155 +0,0 @@ -SUMMARY = "The RPM package management system" -DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ -package management system capable of installing, uninstalling, \ -verifying, querying, and updating software packages. Each software \ -package consists of an archive of files along with information about \ -the package like its version, a description, etc." - -SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" -DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ -development files will simplify the process of writing programs that \ -manipulate RPM packages and databases. These files are intended to \ -simplify the process of creating graphical package managers or any \ -other tools that need an intimate knowledge of RPM packages in order \ -to function." - -SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \ -written in the Python programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -HOMEPAGE = "http://www.rpm.org" - -# libraries are also LGPL - how to express this? -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" - -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \ - file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ - file://0001-Do-not-read-config-files-from-HOME.patch \ - file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ - file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \ - file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \ - file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \ - file://0001-Fix-build-with-musl-C-library.patch \ - file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ - file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \ - file://0001-Split-binary-package-building-into-a-separate-functi.patch \ - file://0002-Run-binary-package-creation-via-thread-pools.patch \ - file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ - file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ - file://0001-perl-disable-auto-reqs.patch \ - file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ - file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ - file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \ - file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \ - file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \ - " - -PE = "1" -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa" - -S = "${WORKDIR}/git" - -DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3" -DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" - -inherit autotools gettext pkgconfig python3native -export PYTHON_ABI - -# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe -EXTRA_AUTORECONF_append = " --exclude=gnu-configize" - -EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl" -EXTRA_OECONF_append_libc-musl = " --disable-nls" - -# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs -# -# --localstatedir prevents rpm from writing its database to native sysroot when building images -# -# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. -# Also disable plugins by default for native. -EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" -EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" - -BBCLASSEXTEND = "native nativesdk" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" - -ASNEEDED = "" - -# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in -# libmagic also has sysroot path contamination, so override it - -WRAPPER_TOOLS = " \ - ${bindir}/rpm \ - ${bindir}/rpm2archive \ - ${bindir}/rpm2cpio \ - ${bindir}/rpmbuild \ - ${bindir}/rpmdb \ - ${bindir}/rpmgraph \ - ${bindir}/rpmkeys \ - ${bindir}/rpmsign \ - ${bindir}/rpmspec \ - ${libdir}/rpm/rpmdeps \ -" - -do_install_append_class-native() { - for tool in ${WRAPPER_TOOLS}; do - create_wrapper ${D}$tool \ - RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ - MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 - done -} - -do_install_append_class-nativesdk() { - for tool in ${WRAPPER_TOOLS}; do - create_wrapper ${D}$tool \ - RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ - RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ - MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 - done - - rm -rf ${D}/var -} - -# Rpm's make install creates var/tmp which clashes with base-files packaging -do_install_append_class-target() { - rm -rf ${D}/var -} - -do_install_append () { - sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ - ${D}/${libdir}/rpm/macros - - sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ - ${D}${libdir}/rpm/pythondistdeps.py \ - ${D}${libdir}/rpm/python-macro-helper -} - -FILES_${PN} += "${libdir}/rpm-plugins/*.so \ - " - -FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ - " - -PACKAGES += "python3-rpm" -PROVIDES += "python3-rpm" -FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" - -# rpm 5.x was packaging the rpm build tools separately -RPROVIDES_${PN} += "rpm-build" - -RDEPENDS_${PN} = "bash perl python3-core" - -PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" - -# Do not specify a sysroot when compiling on a target. -rpm_package_preprocess () { - sed -i -e 's:--sysroot[^ ]*::g' \ - ${PKGD}/${libdir}/rpm/macros -} diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb new file mode 100644 index 0000000000..5c1190a3df --- /dev/null +++ b/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb @@ -0,0 +1,149 @@ +SUMMARY = "The RPM package management system" +DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ +package management system capable of installing, uninstalling, \ +verifying, querying, and updating software packages. Each software \ +package consists of an archive of files along with information about \ +the package like its version, a description, etc." + +SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" +DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ +development files will simplify the process of writing programs that \ +manipulate RPM packages and databases. These files are intended to \ +simplify the process of creating graphical package managers or any \ +other tools that need an intimate knowledge of RPM packages in order \ +to function." + +SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages" +DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \ +written in the Python programming language to use the interface \ +supplied by the RPM Package Manager libraries." + +HOMEPAGE = "http://www.rpm.org" + +# libraries are also LGPL - how to express this? +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" + +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \ + file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ + file://0001-Do-not-read-config-files-from-HOME.patch \ + file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ + file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \ + file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \ + file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \ + file://0001-Fix-build-with-musl-C-library.patch \ + file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ + file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \ + file://0001-perl-disable-auto-reqs.patch \ + file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ + file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ + file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \ + file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \ + " + +PE = "1" +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3" + +S = "${WORKDIR}/git" + +DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3" +DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" + +inherit autotools gettext pkgconfig python3native +export PYTHON_ABI + +# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe +EXTRA_AUTORECONF_append = " --exclude=gnu-configize" + +EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl" +EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" + +# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs +# +# --localstatedir prevents rpm from writing its database to native sysroot when building images +# +# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. +# Also disable plugins by default for native. +EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" +EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" + +ASNEEDED = "" + +# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in +# libmagic also has sysroot path contamination, so override it + +WRAPPER_TOOLS = " \ + ${bindir}/rpm \ + ${bindir}/rpm2archive \ + ${bindir}/rpm2cpio \ + ${bindir}/rpmbuild \ + ${bindir}/rpmdb \ + ${bindir}/rpmgraph \ + ${bindir}/rpmkeys \ + ${bindir}/rpmsign \ + ${bindir}/rpmspec \ + ${libdir}/rpm/rpmdeps \ +" + +do_install_append_class-native() { + for tool in ${WRAPPER_TOOLS}; do + create_wrapper ${D}$tool \ + RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ + MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 + done +} + +do_install_append_class-nativesdk() { + for tool in ${WRAPPER_TOOLS}; do + create_wrapper ${D}$tool \ + RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ + RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ + MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 + done + + rm -rf ${D}/var +} + +# Rpm's make install creates var/tmp which clashes with base-files packaging +do_install_append_class-target() { + rm -rf ${D}/var +} + +do_install_append () { + sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ + ${D}/${libdir}/rpm/macros + + sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ + ${D}${libdir}/rpm/pythondistdeps.py +} + +FILES_${PN} += "${libdir}/rpm-plugins/*.so \ + " + +FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ + " + +PACKAGES += "python3-rpm" +PROVIDES += "python3-rpm" +FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" + +# rpm 5.x was packaging the rpm build tools separately +RPROVIDES_${PN} += "rpm-build" + +RDEPENDS_${PN} = "bash perl python3-core" + +PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" + +# Do not specify a sysroot when compiling on a target. +rpm_package_preprocess () { + sed -i -e 's:--sysroot[^ ]*::g' \ + ${PKGD}/${libdir}/rpm/macros +} -- cgit v1.2.3