summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/docker.inc
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-07-28 14:22:43 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-08-02 17:17:53 -0400
commitd876cfc5bfafa516dee55d04b50b319a22165640 (patch)
treeea03c34f999bd85e440c85fc8e722df8666e2e68 /recipes-containers/docker/docker.inc
parent5fdf66c1e2ec0c6b08573bf0a6aa9f84d2fc4ae6 (diff)
downloadmeta-virtualization-d876cfc5bfafa516dee55d04b50b319a22165640.tar.gz
global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides separator. This is pass one of updating the meta-virt recipes to use that syntax. This has only been minimally build/runtime tested, more changes will be required for missed overrides, or incorrect conversions Note: A recent bitbake is required: commit 75fad23fc06c008a03414a1fc288a8614c6af9ca Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sun Jul 18 12:59:15 2021 +0100 bitbake: data_smart/parse: Allow ':' characters in variable/function names It is becomming increasingly clear we need to find a way to show what is/is not an override in our syntax. We need to do this in a way which is clear to users, readable and in a way we can transition to. The most effective way I've found to this is to use the ":" charater to directly replace "_" where an override is being specified. This includes "append", "prepend" and "remove" which are effectively special override directives. This patch simply adds the character to the parser so bitbake accepts the value but maps it back to "_" internally so there is no behaviour change. This change is simple enough it could potentially be backported to older version of bitbake meaning layers using the new syntax/markup could work with older releases. Even if other no other changes are accepted at this time and we don't backport, it does set us on a path where at some point in future we could require a more explict syntax. I've tested this patch by converting oe-core/meta-yocto to the new syntax for overrides (9000+ changes) and then seeing that builds continue to work with this patch. (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/docker/docker.inc')
-rw-r--r--recipes-containers/docker/docker.inc38
1 files changed, 19 insertions, 19 deletions
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc
index 610da568..d22aae1e 100644
--- a/recipes-containers/docker/docker.inc
+++ b/recipes-containers/docker/docker.inc
@@ -20,25 +20,25 @@ DEPENDS = " \
20 libtool \ 20 libtool \
21 " 21 "
22 22
23DEPENDS_append_class-target = " lvm2" 23DEPENDS:append:class-target = " lvm2"
24RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \ 24RDEPENDS:${PN} = "util-linux util-linux-unshare iptables \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ 25 ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ 26 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
27 bridge-utils \ 27 bridge-utils \
28 ca-certificates \ 28 ca-certificates \
29 " 29 "
30RDEPENDS_${PN} += "virtual/containerd virtual/runc" 30RDEPENDS:${PN} += "virtual/containerd virtual/runc"
31 31
32RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype kernel-module-xt-masquerade" 32RRECOMMENDS:${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype kernel-module-xt-masquerade"
33 33
34PROVIDES += "virtual/docker" 34PROVIDES += "virtual/docker"
35 35
36# we want all the docker variant recpes to be installable via "docker" 36# we want all the docker variant recpes to be installable via "docker"
37PACKAGE_NAME = "docker" 37PACKAGE_NAME = "docker"
38RPROVIDES_${PN} += "docker" 38RPROVIDES:${PN} += "docker"
39RPROVIDES_${PN}-dbg += "docker-dbg" 39RPROVIDES:${PN}-dbg += "docker-dbg"
40RPROVIDES_${PN}-dev += "docker-dev" 40RPROVIDES:${PN}-dev += "docker-dev"
41RPROVIDES_${PN}-contrip += "docker-dev" 41RPROVIDES:${PN}-contrip += "docker-dev"
42 42
43inherit pkgconfig 43inherit pkgconfig
44PACKAGECONFIG ??= "docker-init" 44PACKAGECONFIG ??= "docker-init"
@@ -139,26 +139,26 @@ do_install() {
139 139
140 140
141SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" 141SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
142SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}" 142SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}"
143SYSTEMD_AUTO_ENABLE_${PN} = "enable" 143SYSTEMD_AUTO_ENABLE:${PN} = "enable"
144 144
145INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" 145INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
146INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}" 146INITSCRIPT_NAME:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
147INITSCRIPT_PARAMS_${PN} = "defaults" 147INITSCRIPT_PARAMS:${PN} = "defaults"
148 148
149inherit useradd 149inherit useradd
150USERADD_PACKAGES = "${PN}" 150USERADD_PACKAGES = "${PN}"
151GROUPADD_PARAM_${PN} = "-r docker" 151GROUPADD_PARAM:${PN} = "-r docker"
152 152
153COMPATIBLE_HOST = "^(?!(qemu)?mips).*" 153COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
154 154
155INSANE_SKIP_${PN} += "ldflags textrel" 155INSANE_SKIP:${PN} += "ldflags textrel"
156 156
157FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" 157FILES:${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker"
158 158
159PACKAGES =+ "${PN}-contrib" 159PACKAGES =+ "${PN}-contrib"
160FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" 160FILES:${PN}-contrib += "${datadir}/docker/check-config.sh"
161RDEPENDS_${PN}-contrib += "bash" 161RDEPENDS:${PN}-contrib += "bash"
162 162
163# By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods 163# By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods
164# docker is packaged by most distros with a split between the engine and the CLI. 164# docker is packaged by most distros with a split between the engine and the CLI.
@@ -171,9 +171,9 @@ RDEPENDS_${PN}-contrib += "bash"
171# set the DOCKER_UNIFIED_PACKAGE variable to False 171# set the DOCKER_UNIFIED_PACKAGE variable to False
172# 172#
173PACKAGES =+ "${PN}-cli" 173PACKAGES =+ "${PN}-cli"
174FILES_${PN}-cli += "${bindir}/docker" 174FILES:${PN}-cli += "${bindir}/docker"
175 175
176# set to "False" if packages should be generated for the cli and engine, and 176# set to "False" if packages should be generated for the cli and engine, and
177# NOT rdepend to get a classic one-package install 177# NOT rdepend to get a classic one-package install
178DOCKER_UNIFIED_PACKAGE ?= "True" 178DOCKER_UNIFIED_PACKAGE ?= "True"
179RDEPENDS_${PN} += "${@bb.utils.contains("DOCKER_UNIFIED_PACKAGE", "True", "${PN}-cli", "", d)}" 179RDEPENDS:${PN} += "${@bb.utils.contains("DOCKER_UNIFIED_PACKAGE", "True", "${PN}-cli", "", d)}"