diff options
-rw-r--r-- | recipes-containers/lxc/files/lxc-helper-create-local-action-function.patch | 38 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_1.0.7.bb | 10 |
2 files changed, 43 insertions, 5 deletions
diff --git a/recipes-containers/lxc/files/lxc-helper-create-local-action-function.patch b/recipes-containers/lxc/files/lxc-helper-create-local-action-function.patch new file mode 100644 index 00000000..d1d31eea --- /dev/null +++ b/recipes-containers/lxc/files/lxc-helper-create-local-action-function.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From aada9da49caca9e4a25764df2d2a2c11d9d95dbb Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Fri, 10 Apr 2015 10:55:49 -0400 | ||
4 | Subject: [PATCH] lxc-helper: create local action() function | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
7 | --- | ||
8 | config/init/sysvinit/lxc.in | 14 ++++++++++++++ | ||
9 | 1 file changed, 14 insertions(+) | ||
10 | |||
11 | diff --git a/config/init/sysvinit/lxc.in b/config/init/sysvinit/lxc.in | ||
12 | index 19c102e74c86..9f96a4f7496f 100644 | ||
13 | --- a/config/init/sysvinit/lxc.in | ||
14 | +++ b/config/init/sysvinit/lxc.in | ||
15 | @@ -52,6 +52,20 @@ test ! -r "$sysconfdir"/sysconfig/lxc || | ||
16 | # Check for needed utility program | ||
17 | [ -x "$bindir"/lxc-autostart ] || exit 1 | ||
18 | |||
19 | +action() | ||
20 | +{ | ||
21 | + local STRING rc | ||
22 | + | ||
23 | + STRING=$1 | ||
24 | + echo -n "$STRING " | ||
25 | + | ||
26 | + shift | ||
27 | + "$@" && success $"$STRING" || failure $"$STRING" | ||
28 | + rc=$? | ||
29 | + | ||
30 | + return $rc | ||
31 | +} | ||
32 | + | ||
33 | # If libvirtd is providing the bridge, it might not be | ||
34 | # immediately available, so wait a bit for it before starting | ||
35 | # up the containers or else any that use the bridge will fail | ||
36 | -- | ||
37 | 2.1.0 | ||
38 | |||
diff --git a/recipes-containers/lxc/lxc_1.0.7.bb b/recipes-containers/lxc/lxc_1.0.7.bb index c9eef754..55da522f 100644 --- a/recipes-containers/lxc/lxc_1.0.7.bb +++ b/recipes-containers/lxc/lxc_1.0.7.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
27 | file://run-ptest \ | 27 | file://run-ptest \ |
28 | file://automake-ensure-VPATH-builds-correctly.patch \ | 28 | file://automake-ensure-VPATH-builds-correctly.patch \ |
29 | file://add-lxc.rebootsignal.patch \ | 29 | file://add-lxc.rebootsignal.patch \ |
30 | file://lxc-helper-create-local-action-function.patch \ | ||
30 | file://document-lxc.rebootsignal.patch \ | 31 | file://document-lxc.rebootsignal.patch \ |
31 | file://lxc-busybox-use-lxc.rebootsignal-SIGTERM.patch \ | 32 | file://lxc-busybox-use-lxc.rebootsignal-SIGTERM.patch \ |
32 | file://ppc-add-seccomp-support-for-lxc.patch \ | 33 | file://ppc-add-seccomp-support-for-lxc.patch \ |
@@ -42,6 +43,8 @@ S = "${WORKDIR}/${BPN}-${PV}" | |||
42 | PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}" | 43 | PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}" |
43 | EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" | 44 | EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" |
44 | 45 | ||
46 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--with-init-script=sysvinit', '--with-init-script=systemd', d)}" | ||
47 | |||
45 | PACKAGECONFIG ??= "templates \ | 48 | PACKAGECONFIG ??= "templates \ |
46 | ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | 49 | ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ |
47 | " | 50 | " |
@@ -56,7 +59,7 @@ inherit autotools pkgconfig ptest update-rc.d systemd | |||
56 | 59 | ||
57 | SYSTEMD_PACKAGES = "${PN}-setup" | 60 | SYSTEMD_PACKAGES = "${PN}-setup" |
58 | SYSTEMD_SERVICE_${PN}-setup = "lxc.service" | 61 | SYSTEMD_SERVICE_${PN}-setup = "lxc.service" |
59 | SYSTEMD_AUTO_ENABLE_${PN}-setup = "enable" | 62 | SYSTEMD_AUTO_ENABLE_${PN}-setup = "disable" |
60 | 63 | ||
61 | INITSCRIPT_PACKAGES = "${PN}-setup" | 64 | INITSCRIPT_PACKAGES = "${PN}-setup" |
62 | INITSCRIPT_NAME_{PN}-setup = "lxc" | 65 | INITSCRIPT_NAME_{PN}-setup = "lxc" |
@@ -72,6 +75,7 @@ RDEPENDS_${PN}-templates += "bash" | |||
72 | 75 | ||
73 | FILES_${PN}-setup += "/etc/tmpfiles.d" | 76 | FILES_${PN}-setup += "/etc/tmpfiles.d" |
74 | FILES_${PN}-setup += "/lib/systemd/system" | 77 | FILES_${PN}-setup += "/lib/systemd/system" |
78 | FILES_${PN}-setup += "/usr/lib/systemd/system" | ||
75 | FILES_${PN}-setup += "/etc/init.d" | 79 | FILES_${PN}-setup += "/etc/init.d" |
76 | 80 | ||
77 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" | 81 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" |
@@ -90,10 +94,6 @@ do_install_append() { | |||
90 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 94 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
91 | install -d ${D}${sysconfdir}/init.d | 95 | install -d ${D}${sysconfdir}/init.d |
92 | cp ${S}/config/init/sysvinit/lxc ${D}${sysconfdir}/init.d | 96 | cp ${S}/config/init/sysvinit/lxc ${D}${sysconfdir}/init.d |
93 | else | ||
94 | install -d ${D}${systemd_unitdir}/system | ||
95 | install -m 755 ${S}/config/init/systemd/lxc.service ${D}${systemd_unitdir}/system/lxc.service | ||
96 | install -m 755 ${S}/config/init/systemd/lxc-devsetup ${D}${libexecdir}/lxc/ | ||
97 | fi | 97 | fi |
98 | } | 98 | } |
99 | 99 | ||