diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-29 12:58:59 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-29 12:58:59 -0400 |
commit | 614a254bf2da5ab8ed898f693c95a49fbceed470 (patch) | |
tree | 249da96f2c8a5826d69dc6b2dda87b9ead092cbd | |
parent | bf4f56ab8aca98a4c3b96972f741680b0f3d97dc (diff) | |
download | meta-virtualization-614a254bf2da5ab8ed898f693c95a49fbceed470.tar.gz |
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 <bruce.ashfield@gmail.com>
3 files changed, 38 insertions, 23 deletions
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 | |||
5 | 5 | ||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> |
7 | --- | 7 | --- |
8 | git/src/import/components/cli/scripts/build/binary | 3 +-- | 8 | git/cli/scripts/build/binary | 3 +-- |
9 | 1 file changed, 1 insertion(+), 2 deletions(-) | 9 | 1 file changed, 1 insertion(+), 2 deletions(-) |
10 | 10 | ||
11 | diff --git git/src/import/components/cli/scripts/build/binary git/src/import/components/cli/scripts/build/binary | 11 | diff --git git/cli/scripts/build/binary git/cli/scripts/build/binary |
12 | index e4c5e12a6b..7c47b75c2f 100755 | 12 | index e4c5e12a6b..7c47b75c2f 100755 |
13 | --- git/src/import/components/cli/scripts/build/binary | 13 | --- git/cli/scripts/build/binary |
14 | +++ git/src/import/components/cli/scripts/build/binary | 14 | +++ git/cli/scripts/build/binary |
15 | @@ -73,8 +73,7 @@ fi | 15 | @@ -73,8 +73,7 @@ fi |
16 | 16 | ||
17 | echo "Building $GO_LINKMODE $(basename "${TARGET}")" | 17 | 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 <bruce.ashfield@gmail.com> | |||
8 | hack/make/.binary | 2 +- | 8 | hack/make/.binary | 2 +- |
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
10 | 10 | ||
11 | Index: git/src/import/components/engine/hack/make/.binary | 11 | Index: git/src/import/hack/make/.binary |
12 | =================================================================== | 12 | =================================================================== |
13 | --- git.orig/src/import/components/engine/hack/make/.binary | 13 | --- git.orig/src/import/hack/make/.binary |
14 | +++ git/src/import/components/engine/hack/make/.binary | 14 | +++ git/src/import/hack/make/.binary |
15 | @@ -81,7 +81,7 @@ | 15 | @@ -81,7 +81,7 @@ |
16 | 16 | ||
17 | echo "Building: $DEST/$BINARY_FULLNAME" | 17 | 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 \ | |||
18 | subtle and/or glaring issues. \ | 18 | subtle and/or glaring issues. \ |
19 | " | 19 | " |
20 | 20 | ||
21 | SRCREV_docker = "24ee78d705ae57b2cea7666dc1b1db56f2a94454" | 21 | # |
22 | SRCREV_libnetwork = "55e924b8a84231a065879156c0de95aefc5f5435" | 22 | # https://github.com/docker/docker-ce-packaging.git |
23 | # common.mk: | ||
24 | # DOCKER_CLI_REPO ?= https://github.com/docker/cli.git | ||
25 | # DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git | ||
26 | # REF ?= HEAD | ||
27 | # DOCKER_CLI_REF ?= $(REF) | ||
28 | # DOCKER_ENGINE_REF ?= $(REF) | ||
29 | # | ||
30 | # These follow the tags for our releases in the listed repositories | ||
31 | # so we get that tag, and make it our SRCREVS: | ||
32 | # | ||
33 | |||
34 | SRCREV_docker = "8728dd246c3ab53105434eef8ffe997b6fd14dc6" | ||
35 | SRCREV_libnetwork = "b3507428be5b458cb0e2b4086b13531fb0706e46" | ||
36 | SRCREV_cli = "370c28948e3c12dce3d1df60b6f184990618553f" | ||
23 | SRC_URI = "\ | 37 | SRC_URI = "\ |
24 | git://github.com/docker/docker-ce.git;branch=master;name=docker \ | 38 | git://github.com/docker/docker.git;branch=20.10;name=docker \ |
25 | git://github.com/docker/libnetwork.git;branch=bump_19.03;name=libnetwork;destsuffix=git/libnetwork \ | 39 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork \ |
40 | git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli \ | ||
26 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | 41 | file://0001-libnetwork-use-GO-instead-of-go.patch \ |
27 | file://docker.init \ | 42 | file://docker.init \ |
28 | file://0001-dynbinary-use-go-cross-compiler.patch \ | 43 | file://0001-dynbinary-use-go-cross-compiler.patch \ |
29 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ | 44 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ |
30 | file://0001-build-use-build-script-without-docker.patch \ | ||
31 | " | 45 | " |
32 | 46 | ||
33 | require docker.inc | 47 | require docker.inc |
34 | 48 | ||
35 | # Apache-2.0 for docker | 49 | # Apache-2.0 for docker |
36 | LICENSE = "Apache-2.0" | 50 | LICENSE = "Apache-2.0" |
37 | LIC_FILES_CHKSUM = "file://src/import/components/engine/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" | 51 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" |
38 | 52 | ||
39 | GO_IMPORT = "import" | 53 | GO_IMPORT = "import" |
40 | 54 | ||
41 | S = "${WORKDIR}/git" | 55 | S = "${WORKDIR}/git" |
42 | 56 | ||
43 | DOCKER_VERSION = "v20.10.0-beta1-ce" | 57 | DOCKER_VERSION = "20.10.6-ce" |
44 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" | 58 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" |
45 | 59 | ||
46 | PACKAGES =+ "${PN}-contrib" | 60 | PACKAGES =+ "${PN}-contrib" |
@@ -62,9 +76,10 @@ do_compile() { | |||
62 | cd ${S}/src/import | 76 | cd ${S}/src/import |
63 | rm -rf .gopath | 77 | rm -rf .gopath |
64 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" | 78 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" |
65 | ln -sf ../../../../components/engine/ .gopath/src/"${DOCKER_PKG}" | 79 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" |
66 | 80 | ||
67 | ln -sf ${S}/src/import/components/cli .gopath/src/github.com/docker/cli | 81 | ln -sf ${WORKDIR}/git/libnetwork .gopath/src/github.com/docker/libnetwork |
82 | ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli | ||
68 | 83 | ||
69 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | 84 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" |
70 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | 85 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" |
@@ -80,7 +95,7 @@ do_compile() { | |||
80 | export DISABLE_WARN_OUTSIDE_CONTAINER=1 | 95 | export DISABLE_WARN_OUTSIDE_CONTAINER=1 |
81 | export GO111MODULE=off | 96 | export GO111MODULE=off |
82 | 97 | ||
83 | cd ${S}/src/import/components/engine | 98 | cd ${S}/src/import/ |
84 | 99 | ||
85 | # this is the unsupported build structure that doesn't rely on an | 100 | # this is the unsupported build structure that doesn't rely on an |
86 | # existing docker to build this: | 101 | # existing docker to build this: |
@@ -93,7 +108,7 @@ do_compile() { | |||
93 | oe_runmake cross-local | 108 | oe_runmake cross-local |
94 | 109 | ||
95 | # build the cli | 110 | # build the cli |
96 | cd ${S}/src/import/components/cli | 111 | cd ${S}/src/import/.gopath/src/github.com/docker/cli |
97 | export CFLAGS="" | 112 | export CFLAGS="" |
98 | export LDFLAGS="" | 113 | export LDFLAGS="" |
99 | export DOCKER_VERSION=${DOCKER_VERSION} | 114 | export DOCKER_VERSION=${DOCKER_VERSION} |
@@ -102,15 +117,15 @@ do_compile() { | |||
102 | 117 | ||
103 | do_install() { | 118 | do_install() { |
104 | mkdir -p ${D}/${bindir} | 119 | mkdir -p ${D}/${bindir} |
105 | cp ${S}/src/import/components/cli/build/docker ${D}/${bindir}/docker | 120 | cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker |
106 | cp ${S}/src/import/components/engine/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd | 121 | cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd |
107 | cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy | 122 | cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy |
108 | 123 | ||
109 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 124 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
110 | install -d ${D}${systemd_unitdir}/system | 125 | install -d ${D}${systemd_unitdir}/system |
111 | install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system | 126 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system |
112 | # replaces one copied from above with one that uses the local registry for a mirror | 127 | # replaces one copied from above with one that uses the local registry for a mirror |
113 | install -m 644 ${S}/src/import/components/engine/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system | 128 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system |
114 | rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm | 129 | rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm |
115 | else | 130 | else |
116 | install -d ${D}${sysconfdir}/init.d | 131 | install -d ${D}${sysconfdir}/init.d |
@@ -125,7 +140,7 @@ do_install() { | |||
125 | fi | 140 | fi |
126 | 141 | ||
127 | mkdir -p ${D}${datadir}/docker/ | 142 | mkdir -p ${D}${datadir}/docker/ |
128 | install -m 0755 ${S}/src/import/components/engine/contrib/check-config.sh ${D}${datadir}/docker/ | 143 | install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ |
129 | } | 144 | } |
130 | 145 | ||
131 | FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" | 146 | FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" |