diff options
5 files changed, 70 insertions, 81 deletions
diff --git a/recipes-containers/docker/docker-ce/0001-build-use-build-script-without-docker.patch b/recipes-containers/docker/docker-ce/0001-build-use-build-script-without-docker.patch new file mode 100644 index 00000000..070ebd63 --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-build-use-build-script-without-docker.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 45d03c7b04353d2e5955e573bc1063fcb0647a0c Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Thu, 15 Apr 2021 16:30:37 -0400 | ||
4 | Subject: [PATCH] build: use build script without docker | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
7 | --- | ||
8 | git/src/import/components/cli/Makefile | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git git/src/import/components/cli/Makefile git/src/import/components/cli/Makefile | ||
12 | index 9e62210c33..9c7631f674 100644 | ||
13 | --- git/src/import/components/cli/Makefile | ||
14 | +++ git/src/import/components/cli/Makefile | ||
15 | @@ -51,7 +51,7 @@ plugins-osx: ## build example CLI plugins for macOS | ||
16 | |||
17 | .PHONY: dynbinary | ||
18 | dynbinary: ## build dynamically linked binary | ||
19 | - USE_GLIBC=1 docker buildx bake dynbinary | ||
20 | + GO_LINKMODE=dynamic ./scripts/build/binary | ||
21 | |||
22 | vendor: vendor.conf ## check that vendor matches vendor.conf | ||
23 | rm -rf vendor | ||
24 | -- | ||
25 | 2.19.1 | ||
26 | |||
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 new file mode 100644 index 00000000..c4560d8a --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 650c882d3c53db118b01dd5e15fa1bc0ddaa36f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Thu, 15 Apr 2021 11:28:05 -0400 | ||
4 | Subject: [PATCH] cli: use external GO111MODULE and cross compiler | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
7 | --- | ||
8 | git/src/import/components/cli/scripts/build/binary | 3 +-- | ||
9 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
10 | |||
11 | diff --git git/src/import/components/cli/scripts/build/binary git/src/import/components/cli/scripts/build/binary | ||
12 | index e4c5e12a6b..7c47b75c2f 100755 | ||
13 | --- git/src/import/components/cli/scripts/build/binary | ||
14 | +++ git/src/import/components/cli/scripts/build/binary | ||
15 | @@ -73,8 +73,7 @@ fi | ||
16 | |||
17 | echo "Building $GO_LINKMODE $(basename "${TARGET}")" | ||
18 | |||
19 | -export GO111MODULE=auto | ||
20 | |||
21 | -go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}" | ||
22 | +${GO} build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}" | ||
23 | |||
24 | ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker" | ||
25 | -- | ||
26 | 2.19.1 | ||
27 | |||
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 c11c6e6a..f198b4ed 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,19 +8,16 @@ 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 | diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary | 11 | Index: git/src/import/components/engine/hack/make/.binary |
12 | index 53de6749e5..47ab2a754f 100644 | 12 | =================================================================== |
13 | --- a/src/import/components/engine/hack/make/.binary | 13 | --- git.orig/src/import/components/engine/hack/make/.binary |
14 | +++ b/src/import/components/engine/hack/make/.binary | 14 | +++ git/src/import/components/engine/hack/make/.binary |
15 | @@ -81,7 +81,7 @@ esac | 15 | @@ -81,7 +81,7 @@ |
16 | 16 | ||
17 | echo "Building: $DEST/$BINARY_FULLNAME" | 17 | echo "Building: $DEST/$BINARY_FULLNAME" |
18 | echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" | 18 | echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" |
19 | -go build \ | 19 | - go build \ |
20 | +${GO} build \ | 20 | + ${GO} build \ |
21 | -o "$DEST/$BINARY_FULLNAME" \ | 21 | -o "$DEST/$BINARY_FULLNAME" \ |
22 | "${BUILDFLAGS[@]}" \ | 22 | "${BUILDFLAGS[@]}" \ |
23 | -ldflags " | 23 | -ldflags " |
24 | -- | ||
25 | 2.19.1 | ||
26 | |||
diff --git a/recipes-containers/docker/docker-ce/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch b/recipes-containers/docker/docker-ce/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch deleted file mode 100644 index 70fdaf83..00000000 --- a/recipes-containers/docker/docker-ce/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 1263fdb50a540e9db742694b7cee08284ad986d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 17 Jul 2019 17:34:04 +0800 | ||
4 | Subject: [PATCH] imporve hardcoded CC on cross compile | ||
5 | |||
6 | Since commit applied in moby [61a3285 Support cross-compile for arm] | ||
7 | it hardcoded var-CC to support cross-compile for arm | ||
8 | |||
9 | Correct it with "${parameter:-word}" format, it is helpful for user | ||
10 | define toolchains | ||
11 | |||
12 | (Use Default Values. If parameter is unset or null, the expansion of | ||
13 | word is substituted. Otherwise, the value of parameter is substituted.) | ||
14 | |||
15 | Upstream-Status: Submitted [https://github.com/moby/moby/pull/39546] | ||
16 | |||
17 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
18 | --- | ||
19 | components/engine/hack/make/.binary | 10 +++++----- | ||
20 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary | ||
23 | index 53de6749e5..66f4ca05f3 100644 | ||
24 | --- a/src/import/components/engine/hack/make/.binary | ||
25 | +++ b/src/import/components/engine/hack/make/.binary | ||
26 | @@ -44,27 +44,27 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC | ||
27 | # must be cross-compiling! | ||
28 | case "$(go env GOOS)/$(go env GOARCH)" in | ||
29 | windows/amd64) | ||
30 | - export CC=x86_64-w64-mingw32-gcc | ||
31 | + export CC="${CC:-x86_64-w64-mingw32-gcc}" | ||
32 | export CGO_ENABLED=1 | ||
33 | ;; | ||
34 | linux/arm) | ||
35 | case "${GOARM}" in | ||
36 | 5|"") | ||
37 | - export CC=arm-linux-gnueabi-gcc | ||
38 | + export CC="${CC:-arm-linux-gnueabi-gcc}" | ||
39 | export CGO_ENABLED=1 | ||
40 | ;; | ||
41 | 7) | ||
42 | - export CC=arm-linux-gnueabihf-gcc | ||
43 | + export CC="${CC:-arm-linux-gnueabihf-gcc}" | ||
44 | export CGO_ENABLED=1 | ||
45 | ;; | ||
46 | esac | ||
47 | ;; | ||
48 | linux/arm64) | ||
49 | - export CC=aarch64-linux-gnu-gcc | ||
50 | + export CC="${CC:-aarch64-linux-gnu-gcc}" | ||
51 | export CGO_ENABLED=1 | ||
52 | ;; | ||
53 | linux/amd64) | ||
54 | - export CC=x86_64-linux-gnu-gcc | ||
55 | + export CC="${CC:-x86_64-linux-gnu-gcc}" | ||
56 | export CGO_ENABLED=1 | ||
57 | ;; | ||
58 | esac | ||
59 | -- | ||
60 | 2.23.0 | ||
61 | |||
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index 6337bb71..a1079348 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb | |||
@@ -18,16 +18,16 @@ DESCRIPTION = "Linux container runtime \ | |||
18 | subtle and/or glaring issues. \ | 18 | subtle and/or glaring issues. \ |
19 | " | 19 | " |
20 | 20 | ||
21 | SRCREV_docker = "99e3ed89195c4e551e87aad1e7453b65456b03ad" | 21 | SRCREV_docker = "42aa775803d44af077f0e0099c67708ad0814fe7" |
22 | SRCREV_libnetwork = "55e924b8a84231a065879156c0de95aefc5f5435" | 22 | SRCREV_libnetwork = "55e924b8a84231a065879156c0de95aefc5f5435" |
23 | SRC_URI = "\ | 23 | SRC_URI = "\ |
24 | git://github.com/docker/docker-ce.git;branch=19.03;name=docker \ | 24 | git://github.com/docker/docker-ce.git;branch=master;name=docker \ |
25 | git://github.com/docker/libnetwork.git;branch=bump_19.03;name=libnetwork;destsuffix=git/libnetwork \ | 25 | git://github.com/docker/libnetwork.git;branch=bump_19.03;name=libnetwork;destsuffix=git/libnetwork \ |
26 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | 26 | file://0001-libnetwork-use-GO-instead-of-go.patch \ |
27 | file://docker.init \ | 27 | file://docker.init \ |
28 | file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ | ||
29 | file://0001-dynbinary-use-go-cross-compiler.patch \ | 28 | file://0001-dynbinary-use-go-cross-compiler.patch \ |
30 | file://0001-cli-use-go-cross-compiler.patch \ | 29 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ |
30 | file://0001-build-use-build-script-without-docker.patch \ | ||
31 | " | 31 | " |
32 | 32 | ||
33 | require docker.inc | 33 | require docker.inc |
@@ -40,7 +40,7 @@ GO_IMPORT = "import" | |||
40 | 40 | ||
41 | S = "${WORKDIR}/git" | 41 | S = "${WORKDIR}/git" |
42 | 42 | ||
43 | DOCKER_VERSION = "v19.03.15-ce" | 43 | DOCKER_VERSION = "v20.10.0-beta1-ce" |
44 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" | 44 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" |
45 | 45 | ||
46 | PACKAGES =+ "${PN}-contrib" | 46 | PACKAGES =+ "${PN}-contrib" |