diff options
| author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-05-28 09:14:46 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-05-29 10:27:52 -0400 |
| commit | 11c7379fc5577002a05f536e43969f1d80e59bdc (patch) | |
| tree | 99b6371634054415137d52466a8f0adb1a7c8ae6 | |
| parent | f26bdea05c499ba544198afc95e7a4b344c4d3ba (diff) | |
| download | meta-virtualization-11c7379fc5577002a05f536e43969f1d80e59bdc.tar.gz | |
lxc: drop the -setup package
For some packages we include a -setup package which can be installed
as part of an image to complete a more comprehensive setup of the main
package. This is common for example in meta-cloud-services since many
OpenStack packages have extensive setup.
The -setup package for lxc did at one point do comprehensive setup but
over time this has been moved to the -networking package. Now the
-setup package is only being used as a container for the systemd
service files or sysvinit scripts. This can better be accomplished by
setting appropriate runlevels for the initscripts or disabling or
masking the systemd services (via SYSTEMD_AUTO_ENABLE).
This also fixes some confusion or what might be considered a bug
around -setup and -networking packages as the -setup package was
mopping up the lxc-net.service file, instead of it being included in
the -networking package.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
| -rw-r--r-- | recipes-containers/lxc/lxc_2.0.8.bb | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/recipes-containers/lxc/lxc_2.0.8.bb b/recipes-containers/lxc/lxc_2.0.8.bb index 4918d913..547c44f0 100644 --- a/recipes-containers/lxc/lxc_2.0.8.bb +++ b/recipes-containers/lxc/lxc_2.0.8.bb | |||
| @@ -81,13 +81,17 @@ export STAGING_LIBDIR | |||
| 81 | 81 | ||
| 82 | inherit autotools pkgconfig ptest update-rc.d systemd python3native | 82 | inherit autotools pkgconfig ptest update-rc.d systemd python3native |
| 83 | 83 | ||
| 84 | SYSTEMD_PACKAGES = "${PN}-setup" | 84 | SYSTEMD_PACKAGES = "${PN} ${PN}-networking" |
| 85 | SYSTEMD_SERVICE_${PN}-setup = "lxc.service" | 85 | SYSTEMD_SERVICE_${PN} = "lxc.service" |
| 86 | SYSTEMD_AUTO_ENABLE_${PN}-setup = "disable" | 86 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" |
| 87 | 87 | SYSTEMD_SERVICE_${PN}-networking = "lxc-net.service" | |
| 88 | INITSCRIPT_PACKAGES = "${PN}-setup" | 88 | SYSTEMD_AUTO_ENABLE_${PN}-networking = "enable" |
| 89 | INITSCRIPT_NAME_{PN}-setup = "lxc" | 89 | |
| 90 | INITSCRIPT_PARAMS_${PN}-setup = "defaults" | 90 | INITSCRIPT_PACKAGES = "${PN} ${PN}-networking" |
| 91 | INITSCRIPT_NAME_${PN} = "lxc" | ||
| 92 | INITSCRIPT_PARAMS_${PN} = "defaults" | ||
| 93 | INITSCRIPT_NAME_${PN}-networking = "lxc-net" | ||
| 94 | INITSCRIPT_PARAMS_${PN}-networking = "defaults" | ||
| 91 | 95 | ||
| 92 | FILES_${PN}-doc = "${mandir} ${infodir}" | 96 | FILES_${PN}-doc = "${mandir} ${infodir}" |
| 93 | # For LXC the docdir only contains example configuration files and should be included in the lxc package | 97 | # For LXC the docdir only contains example configuration files and should be included in the lxc package |
| @@ -96,18 +100,13 @@ FILES_${PN} += "${libdir}/python3*" | |||
| 96 | FILES_${PN} += "${datadir}/bash-completion" | 100 | FILES_${PN} += "${datadir}/bash-completion" |
| 97 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" | 101 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" |
| 98 | FILES_${PN}-dbg += "${libexecdir}/lxc/hooks/.debug" | 102 | FILES_${PN}-dbg += "${libexecdir}/lxc/hooks/.debug" |
| 99 | PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking ${PN}-lua" | 103 | PACKAGES =+ "${PN}-templates ${PN}-networking ${PN}-lua" |
| 100 | FILES_lua-${PN} = "${datadir}/lua ${libdir}/lua" | 104 | FILES_lua-${PN} = "${datadir}/lua ${libdir}/lua" |
| 101 | FILES_lua-${PN}-dbg += "${libdir}/lua/lxc/.debug" | 105 | FILES_lua-${PN}-dbg += "${libdir}/lua/lxc/.debug" |
| 102 | FILES_${PN}-templates += "${datadir}/lxc/templates" | 106 | FILES_${PN}-templates += "${datadir}/lxc/templates" |
| 103 | RDEPENDS_${PN}-templates += "bash" | 107 | RDEPENDS_${PN}-templates += "bash" |
| 104 | 108 | ||
| 105 | ALLOW_EMPTY_${PN}-networking = "1" | 109 | FILES_${PN}-networking += "${sysconfdir}/init.d/lxc-net" |
| 106 | |||
| 107 | FILES_${PN}-setup += "/etc/tmpfiles.d" | ||
| 108 | FILES_${PN}-setup += "/lib/systemd/system" | ||
| 109 | FILES_${PN}-setup += "/usr/lib/systemd/system" | ||
| 110 | FILES_${PN}-setup += "/etc/init.d" | ||
| 111 | 110 | ||
| 112 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" | 111 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" |
| 113 | 112 | ||
| @@ -128,10 +127,8 @@ do_install_append() { | |||
| 128 | for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ | 127 | for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ |
| 129 | sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done | 128 | sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done |
| 130 | 129 | ||
| 131 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 130 | install -d ${D}${sysconfdir}/init.d |
| 132 | install -d ${D}${sysconfdir}/init.d | 131 | install -m 755 config/init/sysvinit/lxc* ${D}${sysconfdir}/init.d |
| 133 | install -m 755 config/init/sysvinit/lxc* ${D}${sysconfdir}/init.d | ||
| 134 | fi | ||
| 135 | 132 | ||
| 136 | # since python3-native is used for install location this will not be | 133 | # since python3-native is used for install location this will not be |
| 137 | # suitable for the target and we will have to correct the package install | 134 | # suitable for the target and we will have to correct the package install |
