summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 11:26:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 15:33:07 +0000
commit40f95685e6a3b4359d2ab2fea1418fe5e4bd0aa1 (patch)
tree09616e11de8c05ea9a3b22367cccc00a03861e32
parent01218e29f963120c77885964702198d9bce77e11 (diff)
downloadpoky-40f95685e6a3b4359d2ab2fea1418fe5e4bd0aa1.tar.gz
gzip/pigz-native: Install into a prefix to avoid clashing with system binaries
Due to the system providing a copy of gzip, we face some issues when we 'shadow' that copy with our own leading to a varient of race type bugs, and issues for example if a dependency such as libz is missing but the binary is still present. We usually rely on our dependency logic to protect us from this but for gzip, we don't have this protection since its not listed by all its users (and doing so would be impractical). This patch installed pigz and gzip into their own directory which we only add to PATH when we explictly want these binaries in much the same way we do with perl-native. This means dependency logic is correct when we use the binary and everything should work well. The patch adds an explict dependency into image.bbclass since the accelerated speed of compression is most appreciated at rootfs time. (From OE-Core rev: 7a98c0ef28822ae1fcee45b14db3edcfd4c7ad8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/gzipnative.bbclass3
-rw-r--r--meta/classes/image.bbclass2
-rw-r--r--meta/classes/native.bbclass2
-rw-r--r--meta/recipes-core/expat/expat.inc2
-rw-r--r--meta/recipes-extended/gzip/gzip_1.4.bb4
-rw-r--r--meta/recipes-extended/pigz/pigz_2.2.4.bb4
6 files changed, 13 insertions, 4 deletions
diff --git a/meta/classes/gzipnative.bbclass b/meta/classes/gzipnative.bbclass
new file mode 100644
index 0000000000..4a411434a4
--- /dev/null
+++ b/meta/classes/gzipnative.bbclass
@@ -0,0 +1,3 @@
1PATH_prepend = "${STAGING_BINDIR_NATIVE}/pigz-native:${STAGING_BINDIR_NATIVE}/gzip-native:"
2DEPENDS += "gzip-native"
3
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ccfcaba40e..907c59ba0f 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -3,6 +3,8 @@ inherit rootfs_${IMAGE_PKGTYPE}
3IMAGETEST ?= "dummy" 3IMAGETEST ?= "dummy"
4inherit imagetest-${IMAGETEST} 4inherit imagetest-${IMAGETEST}
5 5
6inherit gzipnative
7
6LICENSE = "MIT" 8LICENSE = "MIT"
7PACKAGES = "" 9PACKAGES = ""
8RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}" 10RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 871dda0426..ffab971cbb 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -77,7 +77,7 @@ baselib = "lib"
77# Libtool's default paths are correct for the native machine 77# Libtool's default paths are correct for the native machine
78lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1" 78lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1"
79 79
80NATIVE_PACKAGE_PATH_SUFFIX = "" 80NATIVE_PACKAGE_PATH_SUFFIX ?= ""
81bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" 81bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
82libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" 82libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
83libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" 83libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
diff --git a/meta/recipes-core/expat/expat.inc b/meta/recipes-core/expat/expat.inc
index d902b7afdf..459ccb3b5b 100644
--- a/meta/recipes-core/expat/expat.inc
+++ b/meta/recipes-core/expat/expat.inc
@@ -7,7 +7,7 @@ LICENSE = "MIT"
7SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \ 7SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \
8 file://autotools.patch" 8 file://autotools.patch"
9 9
10inherit autotools lib_package 10inherit autotools lib_package gzipnative
11 11
12# This package uses an archive format known to have issue with some 12# This package uses an archive format known to have issue with some
13# versions of gzip 13# versions of gzip
diff --git a/meta/recipes-extended/gzip/gzip_1.4.bb b/meta/recipes-extended/gzip/gzip_1.4.bb
index ab8a744327..8f4a237ec3 100644
--- a/meta/recipes-extended/gzip/gzip_1.4.bb
+++ b/meta/recipes-extended/gzip/gzip_1.4.bb
@@ -1,6 +1,8 @@
1require gzip.inc 1require gzip.inc
2 2
3PR = "r0" 3PR = "r1"
4
5NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
4 6
5BBCLASSEXTEND = "native" 7BBCLASSEXTEND = "native"
6 8
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb b/meta/recipes-extended/pigz/pigz_2.2.4.bb
index 598bbe35ba..eaf00c6705 100644
--- a/meta/recipes-extended/pigz/pigz_2.2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -1,6 +1,8 @@
1require pigz.inc 1require pigz.inc
2 2
3PR = "r0" 3PR = "r1"
4
5NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
4 6
5BBCLASSEXTEND = "native" 7BBCLASSEXTEND = "native"
6 8