summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch')
-rw-r--r--meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch32
1 files changed, 16 insertions, 16 deletions
diff --git a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
index c5caa7dc5e..082fb343c2 100644
--- a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
+++ b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
@@ -1,4 +1,4 @@
1From d7143dc4e75c8bcc5cc4c852a4b972942b7e4d07 Mon Sep 17 00:00:00 2001 1From 7cc1c8cfcc620dec284204be0ae4416fd9fed95d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Jan 2017 13:33:05 +0200 3Date: Fri, 20 Jan 2017 13:33:05 +0200
4Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR 4Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR
@@ -10,21 +10,21 @@ from target rootfs instead of its own native sysroot.
10Upstream-Status: Inappropriate [oe-core specific] 10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12--- 12---
13 lib/rpmrc.c | 19 ++++++++++++++----- 13 lib/rpmrc.c | 18 +++++++++++++-----
14 1 file changed, 14 insertions(+), 5 deletions(-) 14 1 file changed, 13 insertions(+), 5 deletions(-)
15 15
16diff --git a/lib/rpmrc.c b/lib/rpmrc.c 16diff --git a/lib/rpmrc.c b/lib/rpmrc.c
17index 483585ae4..ea858c290 100644 17index dc8d42aeb..3f2996850 100644
18--- a/lib/rpmrc.c 18--- a/lib/rpmrc.c
19+++ b/lib/rpmrc.c 19+++ b/lib/rpmrc.c
20@@ -456,10 +456,14 @@ const char * lookupInDefaultTable(const char * name, 20@@ -481,11 +481,14 @@ static void setDefaults(void)
21 static void setDefaults(void) 21 userrc = xstrdup(oldrc);
22 { 22 }
23 const char *confdir = rpmConfigDir(); 23 }
24+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR"); 24+ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR");
25+ if (etcconfdir == NULL) 25+ if (etcconfdir == NULL)
26+ etcconfdir = ""; 26+ etcconfdir = "";
27+ 27
28 if (!defrcfiles) { 28 if (!defrcfiles) {
29 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", 29 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
30 confdir, "/" RPM_VENDOR "/rpmrc", ":", 30 confdir, "/" RPM_VENDOR "/rpmrc", ":",
@@ -32,11 +32,11 @@ index 483585ae4..ea858c290 100644
32+ etcconfdir, SYSCONFDIR "/rpmrc", NULL); 32+ etcconfdir, SYSCONFDIR "/rpmrc", NULL);
33 } 33 }
34 34
35 #ifndef MACROFILES 35 /* macrofiles may be pre-set from --macros */
36@@ -469,9 +473,9 @@ static void setDefaults(void) 36@@ -495,9 +498,9 @@ static void setDefaults(void)
37 confdir, "/platform/%{_target}/macros", ":", 37 confdir, "/platform/%{_target}/macros", ":",
38 confdir, "/fileattrs/*.attr", ":", 38 confdir, "/fileattrs/*.attr", ":",
39 confdir, "/" RPM_VENDOR "/macros", ":", 39 confdir, "/" RPM_VENDOR "/macros", ":",
40- SYSCONFDIR "/rpm/macros.*", ":", 40- SYSCONFDIR "/rpm/macros.*", ":",
41- SYSCONFDIR "/rpm/macros", ":", 41- SYSCONFDIR "/rpm/macros", ":",
42- SYSCONFDIR "/rpm/%{_target}/macros", NULL); 42- SYSCONFDIR "/rpm/%{_target}/macros", NULL);
@@ -44,9 +44,9 @@ index 483585ae4..ea858c290 100644
44+ etcconfdir, SYSCONFDIR "/rpm/macros", ":", 44+ etcconfdir, SYSCONFDIR "/rpm/macros", ":",
45+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL); 45+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL);
46 } 46 }
47 #else 47
48 macrofiles = MACROFILES; 48 free(usermacros);
49@@ -1115,7 +1119,11 @@ static void read_auxv(void) 49@@ -1142,7 +1145,11 @@ static void read_auxv(void)
50 */ 50 */
51 static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) 51 static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
52 { 52 {
@@ -59,7 +59,7 @@ index 483585ae4..ea858c290 100644
59 static struct utsname un; 59 static struct utsname un;
60 char * chptr; 60 char * chptr;
61 canonEntry canon; 61 canonEntry canon;
62@@ -1435,6 +1443,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) 62@@ -1462,6 +1469,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
63 63
64 if (arch) *arch = un.machine; 64 if (arch) *arch = un.machine;
65 if (os) *os = un.sysname; 65 if (os) *os = un.sysname;