From 614a254bf2da5ab8ed898f693c95a49fbceed470 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 29 Apr 2021 12:58:59 -0400 Subject: docker-ce: update to 20.10.6 Updating docker-ce to 20.10.6, we also restructure the recipe to build as mentioned in: https://github.com/docker/docker-ce This now makes the docker-ce recipe virtually identical to the moby variant, with only SRCREV differences being signficant. The docker-ce recipe will build the tags as identified by the docker-packaging repository. We keep this as a separate recipe for this update, so we can backport the 20.10.6 change to older branches (for CVEs, etc), but the moby and docker-ce recipes will (re)unify in following updates. root@qemux86-64:~# docker --version Docker version 20.10.6-ce, build 370c28948e root@qemux86-64:~# docker pull alpine Using default tag: latest latest: Pulling from library/alpine 540db60ca938: Pull complete Digest: sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f Status: Downloaded newer image for alpine:latest docker.io/library/alpine:latest root@qemux86-64:~# docker run -it alpine /bin/sh [ 4099.428945] docker0: port 1(veth33cc29a) entered blocking state [ 4099.430548] docker0: port 1(veth33cc29a) entered disabled state [ 4099.434641] device veth33cc29a entered promiscuous mode [ 4100.219415] cgroup: cgroup: disabling cgroup2 socket matching due to net_prio or net_cls activation [ 4100.739037] eth0: renamed from vethe948f63 [ 4100.746450] IPv6: ADDRCONF(NETDEV_CHANGE): veth33cc29a: link becomes ready [ 4100.748508] docker0: port 1(veth33cc29a) entered blocking state [ 4100.750150] docker0: port 1(veth33cc29a) entered forwarding state [ 4100.754370] IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready / # cat /etc/issue Welcome to Alpine Linux 3.13 Kernel \r on an \m (\l) Signed-off-by: Bruce Ashfield --- ...e-external-GO111MODULE-and-cross-compiler.patch | 8 ++-- .../0001-dynbinary-use-go-cross-compiler.patch | 6 +-- recipes-containers/docker/docker-ce_git.bb | 47 ++++++++++++++-------- 3 files changed, 38 insertions(+), 23 deletions(-) (limited to 'recipes-containers/docker') diff --git a/recipes-containers/docker/docker-ce/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch b/recipes-containers/docker/docker-ce/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch index c4560d8a..dc322612 100644 --- a/recipes-containers/docker/docker-ce/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch +++ b/recipes-containers/docker/docker-ce/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch @@ -5,13 +5,13 @@ Subject: [PATCH] cli: use external GO111MODULE and cross compiler Signed-off-by: Bruce Ashfield --- - git/src/import/components/cli/scripts/build/binary | 3 +-- + git/cli/scripts/build/binary | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git git/src/import/components/cli/scripts/build/binary git/src/import/components/cli/scripts/build/binary +diff --git git/cli/scripts/build/binary git/cli/scripts/build/binary index e4c5e12a6b..7c47b75c2f 100755 ---- git/src/import/components/cli/scripts/build/binary -+++ git/src/import/components/cli/scripts/build/binary +--- git/cli/scripts/build/binary ++++ git/cli/scripts/build/binary @@ -73,8 +73,7 @@ fi echo "Building $GO_LINKMODE $(basename "${TARGET}")" diff --git a/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch index f198b4ed..971c60d7 100644 --- a/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch +++ b/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch @@ -8,10 +8,10 @@ Signed-off-by: Bruce Ashfield hack/make/.binary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: git/src/import/components/engine/hack/make/.binary +Index: git/src/import/hack/make/.binary =================================================================== ---- git.orig/src/import/components/engine/hack/make/.binary -+++ git/src/import/components/engine/hack/make/.binary +--- git.orig/src/import/hack/make/.binary ++++ git/src/import/hack/make/.binary @@ -81,7 +81,7 @@ echo "Building: $DEST/$BINARY_FULLNAME" diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index 2c97cb21..54cfa5d8 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb @@ -18,29 +18,43 @@ DESCRIPTION = "Linux container runtime \ subtle and/or glaring issues. \ " -SRCREV_docker = "24ee78d705ae57b2cea7666dc1b1db56f2a94454" -SRCREV_libnetwork = "55e924b8a84231a065879156c0de95aefc5f5435" +# +# https://github.com/docker/docker-ce-packaging.git +# common.mk: +# DOCKER_CLI_REPO ?= https://github.com/docker/cli.git +# DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git +# REF ?= HEAD +# DOCKER_CLI_REF ?= $(REF) +# DOCKER_ENGINE_REF ?= $(REF) +# +# These follow the tags for our releases in the listed repositories +# so we get that tag, and make it our SRCREVS: +# + +SRCREV_docker = "8728dd246c3ab53105434eef8ffe997b6fd14dc6" +SRCREV_libnetwork = "b3507428be5b458cb0e2b4086b13531fb0706e46" +SRCREV_cli = "370c28948e3c12dce3d1df60b6f184990618553f" SRC_URI = "\ - git://github.com/docker/docker-ce.git;branch=master;name=docker \ - git://github.com/docker/libnetwork.git;branch=bump_19.03;name=libnetwork;destsuffix=git/libnetwork \ + git://github.com/docker/docker.git;branch=20.10;name=docker \ + git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork \ + git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli \ file://0001-libnetwork-use-GO-instead-of-go.patch \ file://docker.init \ file://0001-dynbinary-use-go-cross-compiler.patch \ file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ - file://0001-build-use-build-script-without-docker.patch \ " require docker.inc # Apache-2.0 for docker LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://src/import/components/engine/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" GO_IMPORT = "import" S = "${WORKDIR}/git" -DOCKER_VERSION = "v20.10.0-beta1-ce" +DOCKER_VERSION = "20.10.6-ce" PV = "${DOCKER_VERSION}+git${SRCREV_docker}" PACKAGES =+ "${PN}-contrib" @@ -62,9 +76,10 @@ do_compile() { cd ${S}/src/import rm -rf .gopath mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" - ln -sf ../../../../components/engine/ .gopath/src/"${DOCKER_PKG}" + ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" - ln -sf ${S}/src/import/components/cli .gopath/src/github.com/docker/cli + 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 GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" @@ -80,7 +95,7 @@ do_compile() { export DISABLE_WARN_OUTSIDE_CONTAINER=1 export GO111MODULE=off - cd ${S}/src/import/components/engine + cd ${S}/src/import/ # this is the unsupported build structure that doesn't rely on an # existing docker to build this: @@ -93,7 +108,7 @@ do_compile() { oe_runmake cross-local # build the cli - cd ${S}/src/import/components/cli + cd ${S}/src/import/.gopath/src/github.com/docker/cli export CFLAGS="" export LDFLAGS="" export DOCKER_VERSION=${DOCKER_VERSION} @@ -102,15 +117,15 @@ do_compile() { do_install() { mkdir -p ${D}/${bindir} - cp ${S}/src/import/components/cli/build/docker ${D}/${bindir}/docker - cp ${S}/src/import/components/engine/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd + cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker + cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system - install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system + install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system # replaces one copied from above with one that uses the local registry for a mirror - install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system + install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm else install -d ${D}${sysconfdir}/init.d @@ -125,7 +140,7 @@ do_install() { fi mkdir -p ${D}${datadir}/docker/ - install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/ + install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ } FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" -- cgit v1.2.3-54-g00ecf