mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 12:32:13 +02: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>
70 lines
2.3 KiB
Diff
70 lines
2.3 KiB
Diff
From d7143dc4e75c8bcc5cc4c852a4b972942b7e4d07 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
Date: Fri, 20 Jan 2017 13:33:05 +0200
|
|
Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR
|
|
environment variable
|
|
|
|
This is needed so that rpm can pick up target-specific configuration
|
|
from target rootfs instead of its own native sysroot.
|
|
|
|
Upstream-Status: Inappropriate [oe-core specific]
|
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
---
|
|
lib/rpmrc.c | 19 ++++++++++++++-----
|
|
1 file changed, 14 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
|
|
index 483585ae4..ea858c290 100644
|
|
--- a/lib/rpmrc.c
|
|
+++ b/lib/rpmrc.c
|
|
@@ -456,10 +456,14 @@ const char * lookupInDefaultTable(const char * name,
|
|
static void setDefaults(void)
|
|
{
|
|
const char *confdir = rpmConfigDir();
|
|
+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
|
|
+ if (etcconfdir == NULL)
|
|
+ etcconfdir = "";
|
|
+
|
|
if (!defrcfiles) {
|
|
defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
|
|
confdir, "/" RPM_VENDOR "/rpmrc", ":",
|
|
- SYSCONFDIR "/rpmrc", NULL);
|
|
+ etcconfdir, SYSCONFDIR "/rpmrc", NULL);
|
|
}
|
|
|
|
#ifndef MACROFILES
|
|
@@ -469,9 +473,9 @@ static void setDefaults(void)
|
|
confdir, "/platform/%{_target}/macros", ":",
|
|
confdir, "/fileattrs/*.attr", ":",
|
|
confdir, "/" RPM_VENDOR "/macros", ":",
|
|
- SYSCONFDIR "/rpm/macros.*", ":",
|
|
- SYSCONFDIR "/rpm/macros", ":",
|
|
- SYSCONFDIR "/rpm/%{_target}/macros", NULL);
|
|
+ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":",
|
|
+ etcconfdir, SYSCONFDIR "/rpm/macros", ":",
|
|
+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL);
|
|
}
|
|
#else
|
|
macrofiles = MACROFILES;
|
|
@@ -1115,7 +1119,11 @@ static void read_auxv(void)
|
|
*/
|
|
static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
|
|
{
|
|
- const char * const platform_path = SYSCONFDIR "/rpm/platform";
|
|
+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
|
|
+ if (etcconfdir == NULL)
|
|
+ etcconfdir = "";
|
|
+
|
|
+ const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL);
|
|
static struct utsname un;
|
|
char * chptr;
|
|
canonEntry canon;
|
|
@@ -1435,6 +1443,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
|
|
|
|
if (arch) *arch = un.machine;
|
|
if (os) *os = un.sysname;
|
|
+ free(platform_path);
|
|
}
|
|
|
|
static
|