diff options
author | Chong Lu <Chong.Lu@windriver.com> | 2014-09-04 15:48:11 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-09-04 15:39:36 -0400 |
commit | f5d690a773052c3406936d7e0f2e6af6b24c77c2 (patch) | |
tree | 99133beedc135043460dafa44d719d99cd2f0e95 | |
parent | b94455174264240bf8519e4148ea5f1fb38d55c6 (diff) | |
download | meta-virtualization-f5d690a773052c3406936d7e0f2e6af6b24c77c2.tar.gz |
lxc: fix RDEPENDS on bash
Split a ${PN}-template pkg to put ${datadir}/lxc/templates/, and debash in
${datadir}/lxc/hooks/* since the checkbashisms shows there are no bashism, so
use /bin/sh.
checkbashisms is from devscripts package:
http://packages.ubuntu.com/trusty/devscripts
Bash scripts:
lxc/usr/share/lxc/hooks/mountcgroups:#!/bin/bash
lxc/usr/share/lxc/hooks/ubuntu-cloud-prep:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-debian:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-openmandriva:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-archlinux:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-centos:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-plamo:1:#!/bin/bash -eu
lxc/usr/share/lxc/templates/lxc-ubuntu-cloud:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-opensuse:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-gentoo:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-altlinux:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-sshd:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-ubuntu:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-cirros:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-busybox:1:#!/bin/bash
lxc/usr/share/lxc/templates/lxc-fedora:1:#!/bin/bash
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-containers/lxc/lxc_1.0.5.bb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/recipes-containers/lxc/lxc_1.0.5.bb b/recipes-containers/lxc/lxc_1.0.5.bb index bea1ad08..04c027d4 100644 --- a/recipes-containers/lxc/lxc_1.0.5.bb +++ b/recipes-containers/lxc/lxc_1.0.5.bb | |||
@@ -37,10 +37,11 @@ S = "${WORKDIR}/${BPN}-${PV}" | |||
37 | PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}" | 37 | PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}" |
38 | EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" | 38 | EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" |
39 | 39 | ||
40 | PACKAGECONFIG ??= "" | 40 | PACKAGECONFIG ??= "templates" |
41 | PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,," | 41 | PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,," |
42 | PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," | 42 | PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," |
43 | PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" | 43 | PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" |
44 | PACKAGECONFIG[templates] = ",,, ${PN}-templates" | ||
44 | 45 | ||
45 | inherit autotools pkgconfig ptest | 46 | inherit autotools pkgconfig ptest |
46 | 47 | ||
@@ -48,6 +49,9 @@ FILES_${PN}-doc = "${mandir} ${infodir}" | |||
48 | # For LXC the docdir only contains example configuration files and should be included in the lxc package | 49 | # For LXC the docdir only contains example configuration files and should be included in the lxc package |
49 | FILES_${PN} += "${docdir}" | 50 | FILES_${PN} += "${docdir}" |
50 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" | 51 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" |
52 | PACKAGES =+ "${PN}-templates" | ||
53 | FILES_${PN}-templates += "${datadir}/lxc/templates" | ||
54 | RDEPENDS_${PN}-templates += "bash" | ||
51 | 55 | ||
52 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" | 56 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" |
53 | 57 | ||
@@ -59,6 +63,8 @@ do_install_append() { | |||
59 | echo "d root root 0755 ${localstatedir}/cache/lxc none" \ | 63 | echo "d root root 0755 ${localstatedir}/cache/lxc none" \ |
60 | > ${D}${sysconfdir}/default/volatiles/99_lxc | 64 | > ${D}${sysconfdir}/default/volatiles/99_lxc |
61 | 65 | ||
66 | for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ | ||
67 | sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done | ||
62 | } | 68 | } |
63 | 69 | ||
64 | EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" | 70 | EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" |