summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-09-27 13:13:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-28 11:47:22 +0100
commite94d1e7ac1b7952690c37554e618f84b84e561a0 (patch)
tree4c5d8552b37c0aac21bbaf1d26fb63f88f608fd2 /meta/recipes-devtools/rpm
parentbee3699510a31158f9e2095fe8b6e4cb75ed3651 (diff)
downloadopenembedded-core-e94d1e7ac1b7952690c37554e618f84b84e561a0.tar.gz
openembedded-core-e94d1e7ac1b7952690c37554e618f84b84e561a0.tar.bz2
openembedded-core-e94d1e7ac1b7952690c37554e618f84b84e561a0.zip
rpm: ensure that magic file is relocatable
rpm-native was reading from /usr/share/misc/magic which is wrong it needs to be set to read from the sysroot. This also adds wrappers to the rpm-build tools to ensure they know were to find the macros that point to the right directories. Fixes [YOCTO #1532] Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index a7b360d64f..356512aa5d 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -44,8 +44,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
extrarpmdeps = "python perl"
-extrarpmdeps_virtclass-native = ""
-PR = "r21"
+extrarpmdeps_virtclass-native = "file-native"
+PR = "r22"
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
# in order to extract the distribution SRPM into a format we can extract...
@@ -119,7 +119,7 @@ EXTRA_OECONF = "--verbose \
${WITH_DB} \
${WITH_Z} \
--with-file \
- --with-path-magic=/usr/share/misc/magic \
+ --with-path-magic=%{_usrlibrpm}/../../share/misc/magic \
--without-lua \
--without-tcl \
--with-syck=internal \
@@ -289,6 +289,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
${libdir}/rpm/vpkg-provides2.sh \
${libdir}/rpm/perfile_rpmdeps.sh \
"
+RDEPENDS_${PN}-build = "file"
#%rpmattr %{_rpmhome}/gem_helper.rb
#%rpmattr %{_rpmhome}/symclash.*
@@ -420,6 +421,13 @@ do_install_append_virtclass-native() {
RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
+ for rpm_binary in ${D}/${libdir}/rpm/bin/rpm*; do
+ create_wrapper $rpm_binary
+ RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
+ RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
+ done
+
# Adjust popt macros to match...
cat ${D}/${libdir}/rpm/rpmpopt | sed -e "s,^\(rpm[^ ]*\)\([ ]\),\1.real\2," > ${D}/${libdir}/rpm/rpmpopt.new
mv ${D}/${libdir}/rpm/rpmpopt.new ${D}/${libdir}/rpm/rpmpopt