summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorZhixiong Chi <Zhixiong.Chi@windriver.com>2016-09-05 12:08:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 15:27:05 +0100
commit6f60d91adcd01f1338e62bc70004b6407f4ecd3f (patch)
tree9e3a084ffc1730f60e9e1b7d0d905457bf1522d5 /meta/recipes-devtools
parent642890f5d011768c76a065e1e83f2370b2141c9d (diff)
downloadpoky-6f60d91adcd01f1338e62bc70004b6407f4ecd3f.tar.gz
rpm: ensure rpm2cpio call rpm relocation code
We need to call rpmcliInit to ensure the rpm relocation code is called. when we allow rpm2cpio to be relocatable, The adjusted path used to find the macro files was being built into the binary and this path was valid for the machine it was built on and some of our other build machines, but invalid on some others, and was not being properly overridden at runtime. when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t. we will get the following error : "rpm-5.4.14/rpmdb/dbconfig.c:493: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed. (From OE-Core rev: aea2bf5c8101ac0bb27776a5614be345835c4a03) (From OE-Core rev: b55e1de5b7371e06ec999fdf588052b4babbc3d2) Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.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-ensure-rpm2cpio-call-rpm-relocation-code.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb1
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch b/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
new file mode 100644
index 0000000000..63af100245
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
@@ -0,0 +1,25 @@
1We need to call rpmcliInit to ensure the rpm relocation code is called
2and it correctly honours the relocation environmental variables.
3
4when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t.
5we will get the following error :
6"rpm-5.4.14/rpmdb/dbconfig.c:493:
7db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
8
9Upstream-Status: Pending
10
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
13Index: rpm-5.4.15/tools/rpm2cpio.c
14===================================================================
15--- rpm-5.4.15.orig/tools/rpm2cpio.c 2012-04-27 01:46:51.000000000 +0800
16+++ rpm-5.4.15/tools/rpm2cpio.c 2016-09-05 11:07:30.419903338 +0800
17@@ -87,6 +87,8 @@
18 #endif
19 (void) rpmtsSetVSFlags(ts, vsflags);
20
21+ rpmcliInit(argc, argv, NULL);
22+
23 /*@-mustmod@*/ /* LCL: segfault */
24 rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h);
25 /*@=mustmod@*/
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index b737b9c107..2ffb3aa5cd 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -118,6 +118,7 @@ SRC_URI += " \
118 file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \ 118 file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
119 file://gcc6-stdlib.patch \ 119 file://gcc6-stdlib.patch \
120 file://0001-system.h-query.c-support-nosignature.patch \ 120 file://0001-system.h-query.c-support-nosignature.patch \
121 file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
121" 122"
122 123
123# OE specific changes 124# OE specific changes