* [PATCH V2] lxc: fix RDEPENDS on bash
@ 2014-09-03 9:17 Chong Lu
2014-09-03 12:46 ` Bruce Ashfield
0 siblings, 1 reply; 3+ messages in thread
From: Chong Lu @ 2014-09-03 9:17 UTC (permalink / raw)
To: meta-virtualization; +Cc: bruce.ashfield
Split a ${PN}-template pkg to put ${datadir}/lxc/templates/, and debash in
${datadir}/lxc/hooks/*
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>
---
recipes-containers/lxc/lxc_1.0.5.bb | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/recipes-containers/lxc/lxc_1.0.5.bb b/recipes-containers/lxc/lxc_1.0.5.bb
index bea1ad0..c0603ee 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}"
PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "templates"
PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,,"
PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
+PACKAGECONFIG[templates] = ",,, ${PN}-templates"
inherit autotools pkgconfig ptest
@@ -48,6 +49,9 @@ FILES_${PN}-doc = "${mandir} ${infodir}"
# For LXC the docdir only contains example configuration files and should be included in the lxc package
FILES_${PN} += "${docdir}"
FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
+PACKAGES =+ "${PN}-templates"
+FILES_${PN}-templates += "${datadir}/lxc/templates"
+RDEPENDS_${PN}-templates += "bash"
PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
@@ -57,8 +61,11 @@ do_install_append() {
rm -rf ${D}${localstatedir}/cache
install -d ${D}${sysconfdir}/default/volatiles
echo "d root root 0755 ${localstatedir}/cache/lxc none" \
- > ${D}${sysconfdir}/default/volatiles/99_lxc
+ > ${D}${sysconfdir}/default/volatiles/99_lxc
+ # The checkbashisms shows there are no bashism, so use /bin/sh.
+ for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
+ sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
}
EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH V2] lxc: fix RDEPENDS on bash
2014-09-03 9:17 [PATCH V2] lxc: fix RDEPENDS on bash Chong Lu
@ 2014-09-03 12:46 ` Bruce Ashfield
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2014-09-03 12:46 UTC (permalink / raw)
To: Chong Lu, meta-virtualization
On 2014-09-03, 5:17 AM, Chong Lu wrote:
> Split a ${PN}-template pkg to put ${datadir}/lxc/templates/, and debash in
> ${datadir}/lxc/hooks/*
>
> 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>
> ---
> recipes-containers/lxc/lxc_1.0.5.bb | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/recipes-containers/lxc/lxc_1.0.5.bb b/recipes-containers/lxc/lxc_1.0.5.bb
> index bea1ad0..c0603ee 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}"
> PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
> EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
>
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "templates"
> PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,,"
> PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
> PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
> +PACKAGECONFIG[templates] = ",,, ${PN}-templates"
>
> inherit autotools pkgconfig ptest
>
> @@ -48,6 +49,9 @@ FILES_${PN}-doc = "${mandir} ${infodir}"
> # For LXC the docdir only contains example configuration files and should be included in the lxc package
> FILES_${PN} += "${docdir}"
> FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
> +PACKAGES =+ "${PN}-templates"
> +FILES_${PN}-templates += "${datadir}/lxc/templates"
> +RDEPENDS_${PN}-templates += "bash"
>
> PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
>
> @@ -57,8 +61,11 @@ do_install_append() {
> rm -rf ${D}${localstatedir}/cache
> install -d ${D}${sysconfdir}/default/volatiles
> echo "d root root 0755 ${localstatedir}/cache/lxc none" \
> - > ${D}${sysconfdir}/default/volatiles/99_lxc
> + > ${D}${sysconfdir}/default/volatiles/99_lxc
This change looks cosmetic. Don't mix whitespace and functional change.
>
> + # The checkbashisms shows there are no bashism, so use /bin/sh.
This belongs in the commit message as well, with a link to the upstream
site.
Bruce
> + for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
> + sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
> }
>
> EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH V2] lxc: fix RDEPENDS on bash
@ 2014-09-03 9:12 Chong Lu
0 siblings, 0 replies; 3+ messages in thread
From: Chong Lu @ 2014-09-03 9:12 UTC (permalink / raw)
To: meta-virtualization; +Cc: bruce.ashfield
Split a ${PN}-template pkg to put ${datadir}/lxc/templates/, and debash in
${datadir}/lxc/hooks/*
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>
---
recipes-containers/lxc/lxc_1.0.5.bb | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/recipes-containers/lxc/lxc_1.0.5.bb b/recipes-containers/lxc/lxc_1.0.5.bb
index bea1ad0..c0603ee 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}"
PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "templates"
PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,,"
PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
+PACKAGECONFIG[templates] = ",,, ${PN}-templates"
inherit autotools pkgconfig ptest
@@ -48,6 +49,9 @@ FILES_${PN}-doc = "${mandir} ${infodir}"
# For LXC the docdir only contains example configuration files and should be included in the lxc package
FILES_${PN} += "${docdir}"
FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
+PACKAGES =+ "${PN}-templates"
+FILES_${PN}-templates += "${datadir}/lxc/templates"
+RDEPENDS_${PN}-templates += "bash"
PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
@@ -57,8 +61,11 @@ do_install_append() {
rm -rf ${D}${localstatedir}/cache
install -d ${D}${sysconfdir}/default/volatiles
echo "d root root 0755 ${localstatedir}/cache/lxc none" \
- > ${D}${sysconfdir}/default/volatiles/99_lxc
+ > ${D}${sysconfdir}/default/volatiles/99_lxc
+ # The checkbashisms shows there are no bashism, so use /bin/sh.
+ for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
+ sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
}
EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-03 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 9:17 [PATCH V2] lxc: fix RDEPENDS on bash Chong Lu
2014-09-03 12:46 ` Bruce Ashfield
-- strict thread matches above, loose matches on Subject: below --
2014-09-03 9:12 Chong Lu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.