mirror of
https://git.yoctoproject.org/poky
synced 2026-03-18 05:09:41 +01:00
Summary of changes from RPM 4.19.1 Fixes Packaging: Don’t warn about missing user/group on skipped files [Regression] (#2814) Packaging: Make user/group lookup caching thread-safe [Regression] (#2843) Lua interface: Fix regression in Lua scriptlet runaway child detection [Regression] (#2818) Build: CMakeLists.txt: restore readline support as an explicit option [Regression] (#2852) Build: Fix unconditional uses of Linux-specific extensions [Regression] (#2812) Build: Add missing include for check_symbol_exists (#2831) Build: Don’t use _nl_msg_cat_cntr if it’s not available (#2856) Drop patches: files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch (upstream resolved the issue) files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch (backports) (From OE-Core rev: d05416b6d6ec197b42f20652ed53ada1eb697d67) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d233e33a5ca12f95878c3ee9e34d9d9c61e49f68) Signed-off-by: Steve Sakoman <steve@sakoman.com>
60 lines
2.4 KiB
Diff
60 lines
2.4 KiB
Diff
From 34c0d3263f3e0b366a2320e0823f46673f7ba928 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>
|
|
---
|
|
lib/rpmscript.c | 11 ++++++++---
|
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
|
|
index 3f6313278..57689bb68 100644
|
|
--- a/lib/rpmscript.c
|
|
+++ b/lib/rpmscript.c
|
|
@@ -448,8 +448,7 @@ exit:
|
|
Fclose(out); /* XXX dup'd STDOUT_FILENO */
|
|
|
|
if (fn) {
|
|
- if (!rpmIsDebug())
|
|
- unlink(fn);
|
|
+ unlink(fn);
|
|
free(fn);
|
|
}
|
|
free(mline);
|
|
@@ -483,7 +482,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);
|
|
}
|