aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-11 13:19:00 -0500
committerAndreas Oberritter <obi@opendreambox.org>2014-03-05 00:36:40 +0100
commite557c0fd32b369a51f133a6074d4ce2e7f2f0de1 (patch)
treea7a150284b59cccd74194ec421364f911b97194f
parent8695e0537fba1b2b14b86cce2033287678fde429 (diff)
downloadopenembedded-core-contrib-e557c0fd32b369a51f133a6074d4ce2e7f2f0de1.tar.gz
rpm: Ensure pkgconfig deps don't stray from the package being built
Force pkg-config to only look in the install directory, and not be able to fall back to system pkg-config directories for resolution. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7afcfeb1db00c800485b2f3a89dad1ed84083979) Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch34
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
new file mode 100644
index 0000000000..4aba400602
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
@@ -0,0 +1,34 @@
+pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory
+
+Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths,
+we don't want this as it may lead to inaccurate results in some corner cases.
+
+PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur rpm-5.4.9.orig/scripts/pkgconfigdeps.sh rpm-5.4.9/scripts/pkgconfigdeps.sh
+--- rpm-5.4.9.orig/scripts/pkgconfigdeps.sh 2009-02-13 08:13:37.000000000 -0600
++++ rpm-5.4.9/scripts/pkgconfigdeps.sh 2012-06-07 17:35:42.730003847 -0500
+@@ -18,8 +18,8 @@
+ *.pc)
+ # Query the dependencies of the package.
+ DIR=`dirname ${filename}`
+- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
+- export PKG_CONFIG_PATH
++ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
++ export PKG_CONFIG_LIBDIR
+ $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
+ [ -n "$n" ] || continue
+ # We have a dependency. Make a note that we need the pkgconfig
+@@ -42,8 +42,8 @@
+ [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
+ # Query the dependencies of the package.
+ DIR=`dirname ${filename}`
+- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
+- export PKG_CONFIG_PATH
++ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
++ export PKG_CONFIG_LIBDIR
+ $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
+ [ -n "$n" ] || continue
+ if [ -n "$r" ] && [ -n "$v" ]; then
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index a38a684ff4..51cf93ba76 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"
-PR = "r42"
+PR = "r43"
# 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...
@@ -71,6 +71,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
file://rpm-lua.patch \
file://rpm-ossp-uuid.patch \
file://rpm-packageorigin.patch \
+ file://rpm-pkgconfigdeps.patch \
"
SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"