diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch')
-rw-r--r-- | poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch new file mode 100644 index 000000000..b3dbc319b --- /dev/null +++ b/poky/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch @@ -0,0 +1,72 @@ +From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab 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 2/2] 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 19fe80f98..6b27b3941 100644 +--- a/lib/rpmrc.c ++++ b/lib/rpmrc.c +@@ -455,10 +455,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, "/" RPMCANONVENDOR "/rpmrc", ":", +- SYSCONFDIR "/rpmrc", ":"); ++ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL); + } + + #ifndef MACROFILES +@@ -468,9 +472,9 @@ static void setDefaults(void) + confdir, "/platform/%{_target}/macros", ":", + confdir, "/fileattrs/*.attr", ":", + confdir, "/" RPMCANONVENDOR "/macros", ":", +- SYSCONFDIR "/rpm/macros.*", ":", +- SYSCONFDIR "/rpm/macros", ":", +- SYSCONFDIR "/rpm/%{_target}/macros", ":"); ++ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":", ++ etcconfdir, SYSCONFDIR "/rpm/macros", ":", ++ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL); + } + #else + macrofiles = MACROFILES; +@@ -989,7 +993,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; +@@ -1286,6 +1294,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 +-- +2.11.0 + |