summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMing Liu <ming.liu@windriver.com>2014-10-21 19:10:54 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:43 +0000
commita4814ac1b0ac62c7bfdefc66c06f90188efba8b5 (patch)
treeffaf094e4ec38f7530f7cd59524965bb0516c072 /meta/recipes-devtools
parent9b0df21b87180bda83a4b217c1affbb7dd9e2fe6 (diff)
downloadpoky-a4814ac1b0ac62c7bfdefc66c06f90188efba8b5.tar.gz
rpm: realpath is required before expanding _dbpath in chroot
A regression is introduced by commit 66573093: [ rpm: Fix rpm relocation macro usage ] _usr turned out to be a relative path to support dyanmic config after that, but it's being used somewhere as a indicator to locate substrings, so we must get the real path of it in advance. (From OE-Core rev: 1247955a907f51aac7efd305d26856e263c11a65) (From OE-Core rev: 4b9ae27e3ac9cf55bff5418fe884738b8ec5ab9b) Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-realpath.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4+cvs.bb1
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.14.bb1
3 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
new file mode 100644
index 0000000000..58863774f6
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
@@ -0,0 +1,24 @@
1chroot: realpath is required before expanding _dbpath
2
3_usr turned out to be a relative path to support dyanmic config, but it's
4being used somewhere as a indicator to locate substrings, so we must get
5the real path of it in advance.
6
7Upstream-Status: Inapproriate (OpenEmbedded specific)
8
9Signed-off-by: Ming Liu <ming.liu@windriver.com>
10
11diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
12--- a/rpmio/rpmrpc.c
13+++ b/rpmio/rpmrpc.c
14@@ -257,7 +257,9 @@ int Open(const char * path, int flags, m
15 /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */
16 if (fdno < 0 && errno == ENOENT) {
17 const char *dbpath = rpmExpand("%{?_dbpath}/", NULL);
18- const char * fn = strstr(path + 1, dbpath);
19+ char resolved_dbpath[PATH_MAX];
20+ realpath(dbpath, resolved_dbpath);
21+ const char * fn = strstr(path + 1, resolved_dbpath);
22 if (fn)
23 fdno = open(fn, flags, mode);
24 dbpath = _free(dbpath);
diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index d2dec5f3d1..a85e28fa1f 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -109,6 +109,7 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
109 file://rpm-db5-or-db6.patch \ 109 file://rpm-db5-or-db6.patch \
110 file://rpm-rpmpgp-fix.patch \ 110 file://rpm-rpmpgp-fix.patch \
111 file://rpm-disable-Wno-override-init.patch \ 111 file://rpm-disable-Wno-override-init.patch \
112 file://rpm-realpath.patch \
112 " 113 "
113 114
114# Uncomment the following line to enable platform score debugging 115# Uncomment the following line to enable platform score debugging
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index fb8a50706f..6cd932d5e9 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -93,6 +93,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
93 file://rpm-db5-or-db6.patch \ 93 file://rpm-db5-or-db6.patch \
94 file://rpm-disable-Wno-override-init.patch \ 94 file://rpm-disable-Wno-override-init.patch \
95 file://rpmqv_cc_b_gone.patch \ 95 file://rpmqv_cc_b_gone.patch \
96 file://rpm-realpath.patch \
96 " 97 "
97 98
98# Uncomment the following line to enable platform score debugging 99# Uncomment the following line to enable platform score debugging