X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-integ%2Frecipes-devtools%2Frpm%2Ffiles%2F0001-When-cross-installing-execute-package-scriptlets-wit.patch;fp=meta-starlingx%2Fmeta-stx-integ%2Frecipes-devtools%2Frpm%2Ffiles%2F0001-When-cross-installing-execute-package-scriptlets-wit.patch;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=4020a3109267e843df7f2026539ee94bcb1b173f;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-integ/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta-starlingx/meta-stx-integ/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch deleted file mode 100644 index 4020a31..0000000 --- a/meta-starlingx/meta-stx-integ/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch +++ /dev/null @@ -1,62 +0,0 @@ -From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 17 Jan 2017 14:07:17 +0200 -Subject: [PATCH] When cross-installing, execute package scriptlets without - chrooting into destination rootfs - -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 : - - 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 - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - lib/rpmscript.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index cc98c4885..f8bd3df04 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c -@@ -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) { -- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); -+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { -+ rpmChrootOut(); -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); -+ rpmChrootIn(); -+ } else { -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); -+ } - } else { - rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); - } --- -2.11.0 -