diff options
Diffstat (limited to 'recipes-containers/docker/docker.inc')
-rw-r--r-- | recipes-containers/docker/docker.inc | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc index 40a3642c..48f7d3ec 100644 --- a/recipes-containers/docker/docker.inc +++ b/recipes-containers/docker/docker.inc @@ -1,21 +1,6 @@ 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 \ " @@ -27,7 +12,7 @@ RDEPENDS:${PN} = "util-linux util-linux-unshare iptables \ bridge-utils \ ca-certificates \ " -RDEPENDS:${PN} += "virtual-containerd virtual-runc" +RDEPENDS:${PN} += "virtual-containerd ${VIRTUAL-RUNTIME_container_runtime}" RRECOMMENDS:${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype kernel-module-xt-masquerade" @@ -41,7 +26,7 @@ RPROVIDES:${PN}-dev += "docker-dev" RPROVIDES:${PN}-contrip += "docker-dev" inherit pkgconfig -PACKAGECONFIG ??= "docker-init" +PACKAGECONFIG ??= "docker-init seccomp" PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" PACKAGECONFIG[docker-init] = ",,,docker-init" PACKAGECONFIG[transient-config] = "transient-config" @@ -58,6 +43,9 @@ inherit pkgconfig do_configure[noexec] = "1" +# Export for possible use in Makefiles, default value comes from go.bbclass +export GO_LINKSHARED + DOCKER_PKG="github.com/docker/docker" # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" @@ -75,7 +63,7 @@ do_compile() { ln -sf ${WORKDIR}/git/libnetwork .gopath/src/github.com/docker/libnetwork ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli - export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Pass the needed cflags/ldflags so that cgo @@ -94,14 +82,14 @@ do_compile() { # this is the unsupported built structure # that doesn't rely on an existing docker # to build this: - VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" ./hack/make.sh dynbinary + VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" ./hack/make.sh dynbinary # build the cli cd ${S}/src/import/.gopath/src/github.com/docker/cli export CFLAGS="" export LDFLAGS="" export DOCKER_VERSION=${DOCKER_VERSION} - VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" make dynbinary + VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary # build the proxy cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork @@ -120,8 +108,7 @@ do_install() { # replaces one copied from above with one that uses the local registry for a mirror install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm - fi - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + else install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init fi @@ -142,8 +129,10 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','', SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',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)}" +# inverted logic warning. We ony want the sysvinit init to be installed if systemd +# is NOT in the distro features +INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','systemd','', '${PN}',d)}" +INITSCRIPT_NAME:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','', 'docker.init',d)}" INITSCRIPT_PARAMS:${PN} = "defaults" inherit useradd |