diff options
| -rw-r--r-- | recipes-containers/lxc/lxc_1.0.7.bb | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/recipes-containers/lxc/lxc_1.0.7.bb b/recipes-containers/lxc/lxc_1.0.7.bb index 952c9262..b1f47391 100644 --- a/recipes-containers/lxc/lxc_1.0.7.bb +++ b/recipes-containers/lxc/lxc_1.0.7.bb | |||
| @@ -47,16 +47,28 @@ PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparm | |||
| 47 | PACKAGECONFIG[templates] = ",,, ${PN}-templates" | 47 | PACKAGECONFIG[templates] = ",,, ${PN}-templates" |
| 48 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" | 48 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" |
| 49 | 49 | ||
| 50 | inherit autotools pkgconfig ptest | 50 | inherit autotools pkgconfig ptest update-rc.d systemd |
| 51 | |||
| 52 | SYSTEMD_PACKAGES = "${PN}-setup" | ||
| 53 | SYSTEMD_SERVICE_${PN}-setup = "lxc.service" | ||
| 54 | SYSTEMD_AUTO_ENABLE_${PN}-setup = "enable" | ||
| 55 | |||
| 56 | INITSCRIPT_PACKAGES = "${PN}-setup" | ||
| 57 | INITSCRIPT_NAME_{PN}-setup = "lxc" | ||
| 58 | INITSCRIPT_PARAMS_${PN}-setup = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | ||
| 51 | 59 | ||
| 52 | FILES_${PN}-doc = "${mandir} ${infodir}" | 60 | FILES_${PN}-doc = "${mandir} ${infodir}" |
| 53 | # For LXC the docdir only contains example configuration files and should be included in the lxc package | 61 | # For LXC the docdir only contains example configuration files and should be included in the lxc package |
| 54 | FILES_${PN} += "${docdir}" | 62 | FILES_${PN} += "${docdir}" |
| 55 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" | 63 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" |
| 56 | PACKAGES =+ "${PN}-templates" | 64 | PACKAGES =+ "${PN}-templates ${PN}-setup" |
| 57 | FILES_${PN}-templates += "${datadir}/lxc/templates" | 65 | FILES_${PN}-templates += "${datadir}/lxc/templates" |
| 58 | RDEPENDS_${PN}-templates += "bash" | 66 | RDEPENDS_${PN}-templates += "bash" |
| 59 | 67 | ||
| 68 | FILES_${PN}-setup += "/etc/tmpfiles.d" | ||
| 69 | FILES_${PN}-setup += "/lib/systemd/system" | ||
| 70 | FILES_${PN}-setup += "/etc/init.d" | ||
| 71 | |||
| 60 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" | 72 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" |
| 61 | 73 | ||
| 62 | do_install_append() { | 74 | do_install_append() { |
| @@ -69,6 +81,15 @@ do_install_append() { | |||
| 69 | 81 | ||
| 70 | for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ | 82 | for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ |
| 71 | sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done | 83 | sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done |
| 84 | |||
| 85 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 86 | install -d ${D}${sysconfdir}/init.d | ||
| 87 | cp ${S}/config/init/sysvinit/lxc ${D}${sysconfdir}/init.d | ||
| 88 | else | ||
| 89 | install -d ${D}${systemd_unitdir}/system | ||
| 90 | install -m 755 ${S}/config/init/systemd/lxc.service ${D}${systemd_unitdir}/system/lxc.service | ||
| 91 | install -m 755 ${S}/config/init/systemd/lxc-devsetup ${D}${libexecdir}/lxc/ | ||
| 92 | fi | ||
| 72 | } | 93 | } |
| 73 | 94 | ||
| 74 | EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" | 95 | EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" |
