From d19fda374317daab673ed1b78f68010c14eebf47 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 21 Mar 2019 10:47:46 -0400 Subject: docker: consolidate common depends/options The split between docker-ce and docker (moby) was initially quite different, and docker-ce was more of a reference versus a supported / working package. Upstream has evolved such that both are valid options, and may be chosen due to different requirements. Rather than duplicating all the settings, we can move the dependencies, init, rdepends, users, etc, into a .inc file and share them. For now, we keep the build separate, since depending on the uprev status, they still can require different build options and packaging. Signed-off-by: Bruce Ashfield --- recipes-containers/docker/docker.inc | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 recipes-containers/docker/docker.inc (limited to 'recipes-containers/docker/docker.inc') diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc new file mode 100644 index 00000000..168d2965 --- /dev/null +++ b/recipes-containers/docker/docker.inc @@ -0,0 +1,56 @@ +DEPENDS = " \ + go-cli \ + go-pty \ + go-context \ + go-mux \ + go-patricia \ + go-logrus \ + go-fsnotify \ + go-dbus \ + go-capability \ + go-systemd \ + btrfs-tools \ + sqlite3 \ + go-distribution \ + compose-file \ + go-connections \ + notary \ + grpc-go \ + libtool-native \ + libtool \ + " + +DEPENDS_append_class-target = " lvm2" +RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \ + ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ + bridge-utils \ + ca-certificates \ + " +RDEPENDS_${PN} += "virtual/containerd virtual/runc" + +RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat" + +inherit pkgconfig +PACKAGECONFIG ??= "" +PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" + +inherit systemd update-rc.d + +SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',d)}" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" + +INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" +INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}" +INITSCRIPT_PARAMS_${PN} = "defaults" + +inherit useradd +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-r docker" + +COMPATIBLE_HOST = "^(?!(qemu)?mips).*" + +# DO NOT STRIP docker +INHIBIT_PACKAGE_STRIP = "1" +INSANE_SKIP_${PN} += "ldflags textrel" -- cgit v1.2.3-54-g00ecf