From e1345b76c04b5a829b7219c12772bec1fb301850 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 11 Dec 2012 08:09:40 -0600 Subject: rpm/smart: Fix runtime-relocation issues w/ RPM and Smart Fix runtime-relocation issues with the RPM and Smart wrappers. In addition the patches were necessary to fix related problems. The changes to the includes three categories of issues: *) Incorrect pathname evaluations *) Incorrect evaluation of the /etc/rpm/platform file contents *) Confusing vendor #define checks Finally, a simple way to debug the platformScore was added as that is necessary to debug how this works and into the smart system. (From OE-Core rev: 355a621caca66ed393d36fff6be8918921cf45ae) Signed-off-by: Mark Hatle Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-devtools/rpm/rpm_5.4.9.bb | 41 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'meta/recipes-devtools/rpm/rpm_5.4.9.bb') diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 7311d0e015..be76f2470a 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb @@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" -PR = "r58" +PR = "r59" # 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... @@ -86,6 +86,11 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex file://rpm-platform2.patch \ " +# Uncomment the following line to enable platform score debugging +# This is useful when identifying issues with Smart being unable +# to process certain package feeds. +#SRC_URI += "file://rpm-debug-platform.patch" + SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" SRC_URI[sha256sum] = "bac7cc5bd9d0e8262fdc0099349924608da8f680f5cb243751f696552239dde8" @@ -150,7 +155,7 @@ PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," PACAKGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," EXTRA_OECONF += "--verbose \ - --sysconfdir=/etc \ + --sysconfdir=${sysconfdir} \ --with-file \ --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ --with-syck=internal \ @@ -226,7 +231,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \ FILES_${PN}-common = "${bindir}/rpm2cpio \ ${bindir}/gendiff \ - /etc/rpm \ + ${sysconfdir}/rpm \ /var/spool/repackage \ " @@ -444,30 +449,30 @@ do_install_append() { do_install_append_class-native() { create_wrapper ${D}/${bindir}/rpm \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ + RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale create_wrapper ${D}/${bindir}/rpm2cpio \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ + RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale create_wrapper ${D}/${bindir}/rpmbuild \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ + RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale create_wrapper ${D}/${bindir}/rpmconstant \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale + RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ + RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/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 + RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ + RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ + RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale done # Adjust popt macros to match... -- cgit v1.2.3-54-g00ecf