From 4a6b872bd47d003009911f040724294561d45664 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 1 Feb 2018 20:01:52 +0200 Subject: rpm: update to 4.14.1 Drop two upstreamed patches. License-Update: grammar fixes (From OE-Core rev: c74bbe70988e7dd3ee1b7977de68a7ffe64fc8ef) Signed-off-by: Alexander Kanavin Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...code-lib-rpm-as-the-installation-path-for.patch | 16 +-- ...ure-cope-with-multiple-users-groups-with-.patch | 43 ------ .../0013-Add-a-new-option-alldeps-to-rpmdeps.patch | 153 --------------------- meta/recipes-devtools/rpm/rpm_4.14.0.bb | 134 ------------------ meta/recipes-devtools/rpm/rpm_4.14.1.bb | 133 ++++++++++++++++++ 5 files changed, 141 insertions(+), 338 deletions(-) delete mode 100644 meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch delete mode 100644 meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch delete mode 100644 meta/recipes-devtools/rpm/rpm_4.14.0.bb create mode 100644 meta/recipes-devtools/rpm/rpm_4.14.1.bb (limited to 'meta/recipes-devtools/rpm') diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch index d7b1145bc5..5604cb9037 100644 --- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch @@ -1,7 +1,7 @@ -From 2b1a3f900f15034943fc41661eaab41bcc0d4d84 Mon Sep 17 00:00:00 2001 +From c82c19dc583843b1a975f2e3f2e151656a6f377c Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 27 Feb 2017 09:43:30 +0200 -Subject: [PATCH 06/15] Do not hardcode "lib/rpm" as the installation path for +Subject: [PATCH 06/14] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263] @@ -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 373d69484..c04a2e8d1 100644 +index 7155d9f00..21b95ae5f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1038,7 +1038,7 @@ else +@@ -1047,7 +1047,7 @@ else usrprefix=$prefix fi @@ -27,7 +27,7 @@ index 373d69484..c04a2e8d1 100644 AC_SUBST(OBJDUMP) diff --git a/macros.in b/macros.in -index 3f8dbba61..da4812540 100644 +index d08624856..68a972f1e 100644 --- a/macros.in +++ b/macros.in @@ -954,7 +954,7 @@ package or when debugging this package.\ @@ -40,7 +40,7 @@ index 3f8dbba61..da4812540 100644 %_infodir %{_datadir}/info %_mandir %{_datadir}/man diff --git a/rpm.am b/rpm.am -index f0df0202f..37205a5eb 100644 +index 51225892d..e0c834d37 100644 --- a/rpm.am +++ b/rpm.am @@ -1,10 +1,10 @@ @@ -55,7 +55,7 @@ index f0df0202f..37205a5eb 100644 +rpmconfigdir = $(libdir)/rpm # Libtool version (current-revision-age) for all our libraries - rpm_version_info = 8:0:0 + rpm_version_info = 8:1:0 -- -2.14.2 +2.15.1 diff --git a/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch b/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch deleted file mode 100644 index 31024bd7e8..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch +++ /dev/null @@ -1,43 +0,0 @@ -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/a3652af66fa2a1f272d771323fee019f23d350f5] - -From 68a7b60f89419e53a4bd3c412f816f0576ffd8c4 Mon Sep 17 00:00:00 2001 -From: Mike Crowe -Date: Thu, 4 Jan 2018 14:39:51 +0000 -Subject: [PATCH] Make configure cope with multiple users/groups with ID 0 - -If /etc/passwd contains multiple users with UID 0 then user_with_uid0 will -contain a line feed which results in config.h containing: - - #define UID_0_USER "root - -(i.e. without a closing quote.) - -The same problem occurs with /etc/group. - -Let's only emit the first match in each case so that there is only ever a -single result. - -Signed-off-by: Mike Crowe - ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ab8ca4f54..5259ad243 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -996,8 +996,8 @@ if test "$with_dmalloc" = yes ; then - LIBS="$LIBS -ldmalloc" - fi - --user_with_uid0=$(awk -F: '$3==0 {print $1}' /etc/passwd) --group_with_gid0=$(awk -F: '$3==0 {print $1}' /etc/group) -+user_with_uid0=$(awk -F: '$3==0 {print $1;exit}' /etc/passwd) -+group_with_gid0=$(awk -F: '$3==0 {print $1;exit}' /etc/group) - AC_DEFINE_UNQUOTED([UID_0_USER],["$user_with_uid0"],[Get the user name having userid 0]) - AC_DEFINE_UNQUOTED([GID_0_GROUP],["$group_with_gid0"],[Get the group name having groupid 0]) - --- -2.11.0 - diff --git a/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch b/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch deleted file mode 100644 index d84e8b54d8..0000000000 --- a/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch +++ /dev/null @@ -1,153 +0,0 @@ -From ef9f8c17c3e5c35d3b55db9ca76b0fa0d6336421 Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt -Date: Mon, 15 May 2017 11:23:26 +0200 -Subject: [PATCH 10/15] Add a new option --alldeps to rpmdeps - -This will send the output from rpmfcPrint() to stdout. This is an -alternative to using the --rpmfcdebug option, which will send the same -output to stderr. The two options have totally different use cases -though. While --alldeps is used when the output from rpmfcPrint() is -what is wanted, --rpmfcdebug can be used together with the other -output options, e.g., --requires, without affecting their output. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/220] -Signed-off-by: Peter Kjellerstedt - ---- - build/rpmfc.c | 27 ++++++++++++++------------- - build/rpmfc.h | 1 - - tools/rpmdeps.c | 44 +++++++++++++++++++++++++------------------- - 3 files changed, 39 insertions(+), 33 deletions(-) - -diff --git a/build/rpmfc.c b/build/rpmfc.c -index b8aea76d0..d04ffb297 100644 ---- a/build/rpmfc.c -+++ b/build/rpmfc.c -@@ -692,7 +692,6 @@ static rpm_color_t rpmfcColor(const char * fmstr) - - void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp) - { -- rpm_color_t fcolor; - int ndx; - int dx; - int fx; -@@ -704,21 +703,23 @@ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp) - - if (fc) - for (fx = 0; fx < fc->nfiles; fx++) { -- rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */ -- fcolor = fc->fcolor[fx]; -- ARGV_t fattrs = fc->fattrs[fx]; -- - fprintf(fp, "%3d %s", fx, fc->fn[fx]); -- if (fcolor != RPMFC_BLACK) -+ if (_rpmfc_debug) { -+ rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */ -+ rpm_color_t fcolor = fc->fcolor[fx]; -+ ARGV_t fattrs = fc->fattrs[fx]; -+ -+ if (fcolor != RPMFC_BLACK) - fprintf(fp, "\t0x%x", fc->fcolor[fx]); -- else -+ else - fprintf(fp, "\t%s", rpmstrPoolStr(fc->cdict, cx)); -- if (fattrs) { -- char *attrs = argvJoin(fattrs, ","); -- fprintf(fp, " [%s]", attrs); -- free(attrs); -- } else { -- fprintf(fp, " [none]"); -+ if (fattrs) { -+ char *attrs = argvJoin(fattrs, ","); -+ fprintf(fp, " [%s]", attrs); -+ free(attrs); -+ } else { -+ fprintf(fp, " [none]"); -+ } - } - fprintf(fp, "\n"); - -diff --git a/build/rpmfc.h b/build/rpmfc.h -index dae8ea5b1..3d87b31cf 100644 ---- a/build/rpmfc.h -+++ b/build/rpmfc.h -@@ -45,7 +45,6 @@ typedef const struct rpmfcTokens_s * rpmfcToken; - - /** \ingroup rpmfc - * Print results of file classification. -- * @todo Remove debugging routine. - * @param msg message prefix (NULL for none) - * @param fc file classifier - * @param fp output file handle (NULL for stderr) -diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c -index 419befce1..f260a38c4 100644 ---- a/tools/rpmdeps.c -+++ b/tools/rpmdeps.c -@@ -23,6 +23,8 @@ static int print_conflicts; - - static int print_obsoletes; - -+static int print_alldeps; -+ - static void rpmdsPrint(const char * msg, rpmds ds, FILE * fp) - { - if (fp == NULL) fp = stderr; -@@ -57,6 +59,8 @@ static struct poptOption optionsTable[] = { - NULL, NULL }, - { "obsoletes", '\0', POPT_ARG_VAL, &print_obsoletes, -1, - NULL, NULL }, -+ { "alldeps", '\0', POPT_ARG_VAL, &print_alldeps, -1, -+ NULL, NULL }, - - POPT_AUTOALIAS - POPT_AUTOHELP -@@ -100,25 +104,27 @@ main(int argc, char *argv[]) - if (rpmfcClassify(fc, av, NULL) || rpmfcApply(fc)) - goto exit; - -- if (_rpmfc_debug) -- rpmfcPrint(NULL, fc, NULL); -- -- if (print_provides) -- rpmdsPrint(NULL, rpmfcProvides(fc), stdout); -- if (print_requires) -- rpmdsPrint(NULL, rpmfcRequires(fc), stdout); -- if (print_recommends) -- rpmdsPrint(NULL, rpmfcRecommends(fc), stdout); -- if (print_suggests) -- rpmdsPrint(NULL, rpmfcSuggests(fc), stdout); -- if (print_supplements) -- rpmdsPrint(NULL, rpmfcSupplements(fc), stdout); -- if (print_enhances) -- rpmdsPrint(NULL, rpmfcEnhances(fc), stdout); -- if (print_conflicts) -- rpmdsPrint(NULL, rpmfcConflicts(fc), stdout); -- if (print_obsoletes) -- rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout); -+ if (print_alldeps || _rpmfc_debug) -+ rpmfcPrint(NULL, fc, print_alldeps ? stdout : NULL); -+ -+ if (!print_alldeps) { -+ if (print_provides) -+ rpmdsPrint(NULL, rpmfcProvides(fc), stdout); -+ if (print_requires) -+ rpmdsPrint(NULL, rpmfcRequires(fc), stdout); -+ if (print_recommends) -+ rpmdsPrint(NULL, rpmfcRecommends(fc), stdout); -+ if (print_suggests) -+ rpmdsPrint(NULL, rpmfcSuggests(fc), stdout); -+ if (print_supplements) -+ rpmdsPrint(NULL, rpmfcSupplements(fc), stdout); -+ if (print_enhances) -+ rpmdsPrint(NULL, rpmfcEnhances(fc), stdout); -+ if (print_conflicts) -+ rpmdsPrint(NULL, rpmfcConflicts(fc), stdout); -+ if (print_obsoletes) -+ rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout); -+ } - - ec = 0; - --- -2.14.2 - diff --git a/meta/recipes-devtools/rpm/rpm_4.14.0.bb b/meta/recipes-devtools/rpm/rpm_4.14.0.bb deleted file mode 100644 index aa2579e3bf..0000000000 --- a/meta/recipes-devtools/rpm/rpm_4.14.0.bb +++ /dev/null @@ -1,134 +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=f5259151d26ff18e78023450a5ac8d96" - -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://0013-Add-a-new-option-alldeps-to-rpmdeps.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-Make-configure-cope-with-multiple-users-groups-with-.patch \ - " - -PE = "1" -SRCREV = "da3720f62e57648fb1dc2a632744d38866139971" - -S = "${WORKDIR}/git" - -DEPENDS = "nss 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" -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 -# -# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus -EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" - -BBCLASSEXTEND = "native nativesdk" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" - -# 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 -do_install_append_class-native() { - tools="\ - ${bindir}/rpm \ - ${bindir}/rpm2archive \ - ${bindir}/rpm2cpio \ - ${bindir}/rpmbuild \ - ${bindir}/rpmdb \ - ${bindir}/rpmgraph \ - ${bindir}/rpmkeys \ - ${bindir}/rpmsign \ - ${bindir}/rpmspec \ - ${libdir}/rpm/rpmdeps \ - " - - for tool in $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 -} - -# 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 -} diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb new file mode 100644 index 0000000000..d75902788e --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.14.1.bb @@ -0,0 +1,133 @@ +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 \ + " + +PE = "1" +SRCREV = "bfee1410af51c1cc9724791fb8d985260a62102b" + +S = "${WORKDIR}/git" + +DEPENDS = "nss 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" +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 +# +# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus +EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" + +# 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 +do_install_append_class-native() { + tools="\ + ${bindir}/rpm \ + ${bindir}/rpm2archive \ + ${bindir}/rpm2cpio \ + ${bindir}/rpmbuild \ + ${bindir}/rpmdb \ + ${bindir}/rpmgraph \ + ${bindir}/rpmkeys \ + ${bindir}/rpmsign \ + ${bindir}/rpmspec \ + ${libdir}/rpm/rpmdeps \ + " + + for tool in $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 +} + +# 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 +} -- cgit v1.2.3-54-g00ecf