diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-14 19:52:03 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-28 03:22:11 +0300 |
commit | d5ae7d902a40f26a8c26f4c6d300226689738716 (patch) | |
tree | 85c711404990dd5e37447cd7492c3017815790b7 /poky/meta/recipes-devtools/rpm | |
parent | 0639c5b2c542e0ed9465cc9d8e5100ac0063038f (diff) | |
download | openbmc-d5ae7d902a40f26a8c26f4c6d300226689738716.tar.xz |
Sumo refresh
Update external subtrees to latest Yocto sumo.
Change-Id: I8364f32bef079841c6e57f1c587f4b1bedf62fef
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/rpm')
-rw-r--r-- | poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch | 35 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb | 42 |
2 files changed, 58 insertions, 19 deletions
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch index 2be3cb5af..4020a3109 100644 --- a/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch +++ b/poky/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch @@ -1,4 +1,4 @@ -From a6f269f879221f2777169c5f7291322afe6b661b Mon Sep 17 00:00:00 2001 +From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 17 Jan 2017 14:07:17 +0200 Subject: [PATCH] When cross-installing, execute package scriptlets without @@ -7,17 +7,42 @@ Subject: [PATCH] When cross-installing, execute package scriptlets without This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined. Otherwise they will trigger an explosion of failures, obviously. +Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>: + + Remove leaking temporary scriptlet files + + Since we tell dnf to run rpm with debug output, this will result in rpm not + cleaning up written temporary scriptlet files (same flag controls both + behaviors). This wouldn't have been a problem since we normally would use the + target sysroot also for temporary files, but we need to chroot out to be able + to actually run the rpm scriptlets (purpose of this patch), so the temporary + files are written to the host's /var/tmp/ directory, causing a gradual + resource leakage on the host system for every RPM based do_rootfs task + executed. + + Signed-off-by: Olof Johansson <olofjn@axis.com> + Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - lib/rpmscript.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + lib/rpmscript.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 98d3f420d..b95b5d606 100644 +index cc98c4885..f8bd3df04 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -467,7 +467,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, +@@ -394,8 +394,7 @@ exit: + Fclose(out); /* XXX dup'd STDOUT_FILENO */ + + if (fn) { +- if (!rpmIsDebug()) +- unlink(fn); ++ unlink(fn); + free(fn); + } + free(mline); +@@ -428,7 +427,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, if (rc != RPMRC_FAIL) { if (script_type & RPMSCRIPTLET_EXEC) { diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb index 6012922ad..1a03a0fce 100644 --- a/poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb +++ b/poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb @@ -69,6 +69,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # 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 --without-dbus --disable-plugins" +EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins" BBCLASSEXTEND = "native nativesdk" @@ -77,21 +78,22 @@ 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 + +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() { - 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 + for tool in ${WRAPPER_TOOLS}; do create_wrapper ${D}$tool \ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ @@ -100,6 +102,18 @@ do_install_append_class-native() { 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', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/..} \ + MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/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 |