]> code.ossystems Code Review - meta-freescale.git/commitdiff
meta-fsl-ppc: lxc: add patch to fix 64-bit lib mount issue
authorStuart Yoder <stuart.yoder@freescale.com>
Thu, 13 Sep 2012 00:26:29 +0000 (00:26 +0000)
committerMatthew McClintock <msm@freescale.com>
Wed, 12 Sep 2012 18:29:26 +0000 (13:29 -0500)
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
meta-fsl-ppc/recipes-tools/lxc/libmounts.patch [new file with mode: 0644]
meta-fsl-ppc/recipes-tools/lxc/lxc_0.8.0-rc1.bb

diff --git a/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch b/meta-fsl-ppc/recipes-tools/lxc/libmounts.patch
new file mode 100644 (file)
index 0000000..7e092f1
--- /dev/null
@@ -0,0 +1,48 @@
+From dfef62f0334c65397254215f809a8f25364ea6ef Mon Sep 17 00:00:00 2001
+From: Stuart Yoder <stuart.yoder@freescale.com>
+Date: Wed, 12 Sep 2012 11:05:07 -0500
+Subject: [PATCH] create lib mounts only if the host directories exist
+
+Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
+---
+ templates/lxc-busybox.in |   24 +++++++++++-------------
+ 1 file changed, 11 insertions(+), 13 deletions(-)
+
+diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
+index 720ceef..f6cb1ba 100644
+--- a/templates/lxc-busybox.in
++++ b/templates/lxc-busybox.in
+@@ -235,19 +235,17 @@ lxc.pts = 1
+ lxc.rootfs = $rootfs
+ EOF
+-if [ -d "$rootfs/lib" ]; then
+-cat <<EOF >> $path/config
+-lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0
+-lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0
+-EOF
+-fi
+-
+-if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then
+-cat <<EOF >> $path/config
+-lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0
+-lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0
+-EOF
+-fi
++    libdirs="\
++        /lib \
++        /usr/lib \
++        /lib64 \
++        /usr/lib64"
++
++    for dir in $libdirs; do
++        if [ -d $dir ]; then
++            echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config
++        fi
++    done
+ }
+ usage()
+-- 
+1.7.9.7
+
index d5e145f51eb8c55a01ec1e7dd20fcee40032f2ea..51a34f40a7bfda666df0f98b4990ddbd5c9979c6 100644 (file)
@@ -3,6 +3,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
 PRIORITY = "optional"
+PR = "r1"
 DEPENDS = "libxml2 libcap"
 RDEPENDS_${PN} = " \
                rsync \
@@ -20,6 +21,7 @@ RDEPENDS_${PN} = " \
 
 SRC_URI = "http://lxc.sourceforge.net/download/lxc/${PN}-${PV}.tar.gz \
        file://noldconfig.patch \
+       file://libmounts.patch \
        "
 
 SRC_URI[md5sum] ="06ceecf4dbe1be988fc903ad8dd34d29"