mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
* Rebased: 0001-When-cross-installing-execute-package-scriptlets-wit.patch 0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch * Removed the one which already merged: 0001-Set-RPM_PLUGINDIR-in-top-level-CMakeLists.txt.patch * Added a patch to fix rpm-native build error: gcc: error: unrecognized command-line option -fhardened 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch * License-Update: Minor formatting changes as the commit messages said in 41143b27b6f7320f280aea6014e8f532eb0239d6 (From OE-Core rev: 5d25e1ba4d8850e2c281fc7f24493239bf2f9866) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 3603cf181b69ab1e0077dcd8a124e669dcb9dd9c 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
|
|
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 <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>
|
|
|
|
Rebased to 4.20.1
|
|
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
---
|
|
lib/rpmscript.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
|
|
index eb14870b3..1785e8f30 100644
|
|
--- a/lib/rpmscript.c
|
|
+++ b/lib/rpmscript.c
|
|
@@ -456,8 +456,7 @@ exit:
|
|
Fclose(out); /* XXX dup'd STDOUT_FILENO */
|
|
|
|
if (fn) {
|
|
- if (!rpmIsDebug())
|
|
- unlink(fn);
|
|
+ unlink(fn);
|
|
free(fn);
|
|
}
|
|
free(mline);
|
|
@@ -491,7 +490,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
|
|
|
|
if (rc != RPMRC_FAIL) {
|
|
if (script_type & RPMSCRIPTLET_EXEC) {
|
|
+ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) {
|
|
+ rpmChrootOut();
|
|
rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
|
|
+ rpmChrootIn();
|
|
+ } else {
|
|
+ rc = runExtScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
|
|
+ }
|
|
} else {
|
|
rc = runLuaScript(plugins, prefixes, script, lvl, scriptFd, &args, arg1, arg2);
|
|
}
|