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 @@ +From 45d03c7b04353d2e5955e573bc1063fcb0647a0c Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Thu, 15 Apr 2021 16:30:37 -0400 +Subject: [PATCH] build: use build script without docker + +Signed-off-by: Bruce Ashfield +--- + git/src/import/components/cli/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git git/src/import/components/cli/Makefile git/src/import/components/cli/Makefile +index 9e62210c33..9c7631f674 100644 +--- git/src/import/components/cli/Makefile ++++ git/src/import/components/cli/Makefile +@@ -51,7 +51,7 @@ plugins-osx: ## build example CLI plugins for macOS + + .PHONY: dynbinary + dynbinary: ## build dynamically linked binary +- USE_GLIBC=1 docker buildx bake dynbinary ++ GO_LINKMODE=dynamic ./scripts/build/binary + + vendor: vendor.conf ## check that vendor matches vendor.conf + rm -rf vendor +-- +2.19.1 + 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 @@ +From 650c882d3c53db118b01dd5e15fa1bc0ddaa36f1 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Thu, 15 Apr 2021 11:28:05 -0400 +Subject: [PATCH] cli: use external GO111MODULE and cross compiler + +Signed-off-by: Bruce Ashfield +--- + git/src/import/components/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 +index e4c5e12a6b..7c47b75c2f 100755 +--- git/src/import/components/cli/scripts/build/binary ++++ git/src/import/components/cli/scripts/build/binary +@@ -73,8 +73,7 @@ fi + + echo "Building $GO_LINKMODE $(basename "${TARGET}")" + +-export GO111MODULE=auto + +-go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}" ++${GO} build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}" + + ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker" +-- +2.19.1 + 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 hack/make/.binary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary -index 53de6749e5..47ab2a754f 100644 ---- a/src/import/components/engine/hack/make/.binary -+++ b/src/import/components/engine/hack/make/.binary -@@ -81,7 +81,7 @@ esac +Index: git/src/import/components/engine/hack/make/.binary +=================================================================== +--- git.orig/src/import/components/engine/hack/make/.binary ++++ git/src/import/components/engine/hack/make/.binary +@@ -81,7 +81,7 @@ - echo "Building: $DEST/$BINARY_FULLNAME" - echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" --go build \ -+${GO} build \ - -o "$DEST/$BINARY_FULLNAME" \ - "${BUILDFLAGS[@]}" \ - -ldflags " --- -2.19.1 - + echo "Building: $DEST/$BINARY_FULLNAME" + echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" +- go build \ ++ ${GO} build \ + -o "$DEST/$BINARY_FULLNAME" \ + "${BUILDFLAGS[@]}" \ + -ldflags " 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 @@ -From 1263fdb50a540e9db742694b7cee08284ad986d0 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 17 Jul 2019 17:34:04 +0800 -Subject: [PATCH] imporve hardcoded CC on cross compile - -Since commit applied in moby [61a3285 Support cross-compile for arm] -it hardcoded var-CC to support cross-compile for arm - -Correct it with "${parameter:-word}" format, it is helpful for user -define toolchains - -(Use Default Values. If parameter is unset or null, the expansion of -word is substituted. Otherwise, the value of parameter is substituted.) - -Upstream-Status: Submitted [https://github.com/moby/moby/pull/39546] - -Signed-off-by: Hongxu Jia ---- - components/engine/hack/make/.binary | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary -index 53de6749e5..66f4ca05f3 100644 ---- a/src/import/components/engine/hack/make/.binary -+++ b/src/import/components/engine/hack/make/.binary -@@ -44,27 +44,27 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC - # must be cross-compiling! - case "$(go env GOOS)/$(go env GOARCH)" in - windows/amd64) -- export CC=x86_64-w64-mingw32-gcc -+ export CC="${CC:-x86_64-w64-mingw32-gcc}" - export CGO_ENABLED=1 - ;; - linux/arm) - case "${GOARM}" in - 5|"") -- export CC=arm-linux-gnueabi-gcc -+ export CC="${CC:-arm-linux-gnueabi-gcc}" - export CGO_ENABLED=1 - ;; - 7) -- export CC=arm-linux-gnueabihf-gcc -+ export CC="${CC:-arm-linux-gnueabihf-gcc}" - export CGO_ENABLED=1 - ;; - esac - ;; - linux/arm64) -- export CC=aarch64-linux-gnu-gcc -+ export CC="${CC:-aarch64-linux-gnu-gcc}" - export CGO_ENABLED=1 - ;; - linux/amd64) -- export CC=x86_64-linux-gnu-gcc -+ export CC="${CC:-x86_64-linux-gnu-gcc}" - export CGO_ENABLED=1 - ;; - esac --- -2.23.0 - 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 \ subtle and/or glaring issues. \ " -SRCREV_docker = "99e3ed89195c4e551e87aad1e7453b65456b03ad" +SRCREV_docker = "42aa775803d44af077f0e0099c67708ad0814fe7" SRCREV_libnetwork = "55e924b8a84231a065879156c0de95aefc5f5435" SRC_URI = "\ - git://github.com/docker/docker-ce.git;branch=19.03;name=docker \ + 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 \ file://0001-libnetwork-use-GO-instead-of-go.patch \ file://docker.init \ - file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ file://0001-dynbinary-use-go-cross-compiler.patch \ - file://0001-cli-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 @@ -40,7 +40,7 @@ GO_IMPORT = "import" S = "${WORKDIR}/git" -DOCKER_VERSION = "v19.03.15-ce" +DOCKER_VERSION = "v20.10.0-beta1-ce" PV = "${DOCKER_VERSION}+git${SRCREV_docker}" PACKAGES =+ "${PN}-contrib"