From 929372946aeb85953d1ca6acc428d73fbac52a56 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 30 Jun 2020 23:21:42 -0400 Subject: docker-ce/docker-moby: fixup GO compiler calls With oe-core commit c23f9e80492e4b [tcmode-default: use go-binary-native by default], we must explictly call the proper cross go binary, versus just the go-native variant. These builds were working by luck, since the go compiler was capable of building the target binaries previously (in its build-from-source creation). We fixup the calls and we no longer see fpu build issues: fatal error: gnu/stubs-soft.h: No such file or directory 7 | # include | ^~~~~~~~~~~~~~~~~~ This commit also moves the docker-ce patches from "files" to a named directory to reduce confusion. Signed-off-by: Bruce Ashfield --- .../docker-ce/0001-cli-use-go-cross-compiler.patch | 25 ++++ .../0001-dynbinary-use-go-cross-compiler.patch | 26 ++++ ...e-hardcoded-CC-on-cross-compile-docker-ce.patch | 61 ++++++++++ .../0001-libnetwork-use-GO-instead-of-go.patch | 59 ++++++++++ .../docker/docker-ce/docker-registry.service | 19 +++ recipes-containers/docker/docker-ce/docker.init | 131 +++++++++++++++++++++ recipes-containers/docker/docker-ce_git.bb | 2 + recipes-containers/docker/docker-moby.bb | 2 + .../0001-cli-use-go-cross-compiler.patch | 25 ++++ .../0001-dynbinary-use-go-cross-compiler.patch | 26 ++++ .../0001-libnetwork-use-GO-instead-of-go.patch | 59 ++++++++++ ...e-hardcoded-CC-on-cross-compile-docker-ce.patch | 61 ---------- .../0001-libnetwork-use-GO-instead-of-go.patch | 59 ---------- .../docker/files/docker-registry.service | 19 --- recipes-containers/docker/files/docker.init | 131 --------------------- 15 files changed, 435 insertions(+), 270 deletions(-) create mode 100644 recipes-containers/docker/docker-ce/0001-cli-use-go-cross-compiler.patch create mode 100644 recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch create mode 100644 recipes-containers/docker/docker-ce/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch create mode 100644 recipes-containers/docker/docker-ce/0001-libnetwork-use-GO-instead-of-go.patch create mode 100644 recipes-containers/docker/docker-ce/docker-registry.service create mode 100644 recipes-containers/docker/docker-ce/docker.init create mode 100644 recipes-containers/docker/docker-moby/0001-cli-use-go-cross-compiler.patch create mode 100644 recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch create mode 100644 recipes-containers/docker/docker-moby/0001-libnetwork-use-GO-instead-of-go.patch delete mode 100644 recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch delete mode 100644 recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch delete mode 100644 recipes-containers/docker/files/docker-registry.service delete mode 100644 recipes-containers/docker/files/docker.init (limited to 'recipes-containers/docker') diff --git a/recipes-containers/docker/docker-ce/0001-cli-use-go-cross-compiler.patch b/recipes-containers/docker/docker-ce/0001-cli-use-go-cross-compiler.patch new file mode 100644 index 00000000..d9924112 --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-cli-use-go-cross-compiler.patch @@ -0,0 +1,25 @@ +From ae6f4a1e685394fb7b9539f134b66ca84ddc91c2 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Tue, 30 Jun 2020 22:19:56 -0400 +Subject: [PATCH] cli: use go cross compiler + +Signed-off-by: Bruce Ashfield +--- + git/cli/scripts/build/dynbinary | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git git/src/import/components/cli/scripts/build/dynbinary git/src/import/components/cli/scripts/build/dynbinary +index 4feb7e71d8..f990d0e040 100755 +--- git/src/import/components/cli/scripts/build/dynbinary ++++ git/src/import/components/cli/scripts/build/dynbinary +@@ -9,6 +9,6 @@ source ./scripts/build/.variables + + echo "Building dynamically linked $TARGET" + export CGO_ENABLED=1 +-go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" ++${GO} build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" + + ln -sf "$(basename "${TARGET}")" build/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 new file mode 100644 index 00000000..c11c6e6a --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch @@ -0,0 +1,26 @@ +From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Tue, 30 Jun 2020 22:23:33 -0400 +Subject: [PATCH] dynbinary: use go cross compiler + +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 + + 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 + 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 new file mode 100644 index 00000000..70fdaf83 --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch @@ -0,0 +1,61 @@ +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/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/docker-ce/0001-libnetwork-use-GO-instead-of-go.patch new file mode 100644 index 00000000..c623b260 --- /dev/null +++ b/recipes-containers/docker/docker-ce/0001-libnetwork-use-GO-instead-of-go.patch @@ -0,0 +1,59 @@ +From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Fri, 6 Apr 2018 23:58:22 -0400 +Subject: [PATCH] libnetwork: use $(GO) instead of go + +Ensure that the libnetwork makefile uses the go cross flags and +utilities. + +Signed-off-by: Bruce Ashfield +--- + Makefile | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +Index: git/libnetwork/Makefile +=================================================================== +--- git.orig/libnetwork/Makefile ++++ git/libnetwork/Makefile +@@ -45,9 +45,9 @@ + build-local: + @echo "🐳 $@" + @mkdir -p "bin" +- go build -tags experimental -o "bin/dnet" ./cmd/dnet +- go build -o "bin/docker-proxy" ./cmd/proxy +- CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic ++ $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet ++ $(GO) build -o "bin/proxy" ./cmd/proxy ++ CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic + CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go + + build-images: +@@ -82,8 +82,8 @@ + + cross-local: + @echo "🐳 $@" +- go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet +- go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy ++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy ++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet + + # Rebuild protocol buffers. + # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. +@@ -130,7 +130,7 @@ + if ls $$dir/*.go &> /dev/null; then \ + pushd . &> /dev/null ; \ + cd $$dir ; \ +- go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ ++ $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ + ret=$$? ;\ + if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ + popd &> /dev/null; \ +@@ -145,7 +145,7 @@ + # Depends on binaries because vet will silently fail if it can not load compiled imports + vet: ## run go vet + @echo "🐳 $@" +- @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" ++ @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" + + misspell: + @echo "🐳 $@" diff --git a/recipes-containers/docker/docker-ce/docker-registry.service b/recipes-containers/docker/docker-ce/docker-registry.service new file mode 100644 index 00000000..7b4bc468 --- /dev/null +++ b/recipes-containers/docker/docker-ce/docker-registry.service @@ -0,0 +1,19 @@ +[Unit] +Description=docker private registry service +After=docker.service + +[Service] +ExecStartPre=-/usr/bin/docker kill registry +ExecStartPre=-/usr/bin/docker rm registry +ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \ + -e "STANDALONE=true" \ + -e "MIRROR_SOURCE=https://registry-1.docker.io" \ + -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \ + -e "SETTINGS_FLAVOR=local" \ + registry +ExecStop=-/usr/bin/docker stop registry +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target diff --git a/recipes-containers/docker/docker-ce/docker.init b/recipes-containers/docker/docker-ce/docker.init new file mode 100644 index 00000000..24f8fea6 --- /dev/null +++ b/recipes-containers/docker/docker-ce/docker.init @@ -0,0 +1,131 @@ +#!/bin/sh +# +# /etc/rc.d/init.d/docker +# +# Daemon for docker.com +# +# chkconfig: 2345 95 95 +# description: Daemon for docker.com + +### BEGIN INIT INFO +# Provides: docker +# Required-Start: $network cgconfig +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop docker +# Description: Daemon for docker.com +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +prog="dockerd" +unshare=/usr/bin/unshare +exec="/usr/bin/$prog" +pidfile="/var/run/$prog.pid" +lockfile="/var/lock/subsys/$prog" +logfile="/var/log/$prog" +other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +start() { + [ -x $exec ] || exit 5 + + check_for_cleanup + + if ! [ -f $pidfile ]; then + printf "Starting $prog:\t" + echo -e "\n$(date)\n" >> $logfile + "$unshare" -m -- $exec $other_args >> $logfile 2>&1 & + pid=$! + touch $lockfile + # wait up to 10 seconds for the pidfile to exist. see + # https://github.com/docker/docker/issues/5359 + tries=0 + while [ ! -f $pidfile -a $tries -lt 10 ]; do + sleep 1 + tries=$((tries + 1)) + done + success + echo + else + failure + echo + printf "$pidfile still exists...\n" + exit 7 + fi +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +check_for_cleanup() { + if [ -f ${pidfile} ]; then + /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile} + fi +} + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index 9147e7b6..2140c243 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb @@ -26,6 +26,8 @@ SRC_URI = "\ 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 \ " require docker.inc diff --git a/recipes-containers/docker/docker-moby.bb b/recipes-containers/docker/docker-moby.bb index 634e5c0d..62759d94 100644 --- a/recipes-containers/docker/docker-moby.bb +++ b/recipes-containers/docker/docker-moby.bb @@ -45,6 +45,8 @@ SRC_URI = "\ file://docker.init \ file://0001-libnetwork-use-GO-instead-of-go.patch \ file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ + file://0001-cli-use-go-cross-compiler.patch \ + file://0001-dynbinary-use-go-cross-compiler.patch \ " require docker.inc diff --git a/recipes-containers/docker/docker-moby/0001-cli-use-go-cross-compiler.patch b/recipes-containers/docker/docker-moby/0001-cli-use-go-cross-compiler.patch new file mode 100644 index 00000000..9419d547 --- /dev/null +++ b/recipes-containers/docker/docker-moby/0001-cli-use-go-cross-compiler.patch @@ -0,0 +1,25 @@ +From ae6f4a1e685394fb7b9539f134b66ca84ddc91c2 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Tue, 30 Jun 2020 22:19:56 -0400 +Subject: [PATCH] cli: use go cross compiler + +Signed-off-by: Bruce Ashfield +--- + git/cli/scripts/build/dynbinary | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git git/cli/scripts/build/dynbinary git/cli/scripts/build/dynbinary +index 4feb7e71d8..f990d0e040 100755 +--- git/cli/scripts/build/dynbinary ++++ git/cli/scripts/build/dynbinary +@@ -9,6 +9,6 @@ source ./scripts/build/.variables + + echo "Building dynamically linked $TARGET" + export CGO_ENABLED=1 +-go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" ++${GO} build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" + + ln -sf "$(basename "${TARGET}")" build/docker +-- +2.19.1 + diff --git a/recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch new file mode 100644 index 00000000..d9cdfb01 --- /dev/null +++ b/recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch @@ -0,0 +1,26 @@ +From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Tue, 30 Jun 2020 22:23:33 -0400 +Subject: [PATCH] dynbinary: use go cross compiler + +Signed-off-by: Bruce Ashfield +--- + hack/make/.binary | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/import/hack/make/.binary b/src/import/hack/make/.binary +index 53de6749e5..47ab2a754f 100644 +--- a/src/import/hack/make/.binary ++++ b/src/import/hack/make/.binary +@@ -81,7 +81,7 @@ esac + + 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 + diff --git a/recipes-containers/docker/docker-moby/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/docker-moby/0001-libnetwork-use-GO-instead-of-go.patch new file mode 100644 index 00000000..c623b260 --- /dev/null +++ b/recipes-containers/docker/docker-moby/0001-libnetwork-use-GO-instead-of-go.patch @@ -0,0 +1,59 @@ +From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Fri, 6 Apr 2018 23:58:22 -0400 +Subject: [PATCH] libnetwork: use $(GO) instead of go + +Ensure that the libnetwork makefile uses the go cross flags and +utilities. + +Signed-off-by: Bruce Ashfield +--- + Makefile | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +Index: git/libnetwork/Makefile +=================================================================== +--- git.orig/libnetwork/Makefile ++++ git/libnetwork/Makefile +@@ -45,9 +45,9 @@ + build-local: + @echo "🐳 $@" + @mkdir -p "bin" +- go build -tags experimental -o "bin/dnet" ./cmd/dnet +- go build -o "bin/docker-proxy" ./cmd/proxy +- CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic ++ $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet ++ $(GO) build -o "bin/proxy" ./cmd/proxy ++ CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic + CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go + + build-images: +@@ -82,8 +82,8 @@ + + cross-local: + @echo "🐳 $@" +- go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet +- go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy ++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy ++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet + + # Rebuild protocol buffers. + # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. +@@ -130,7 +130,7 @@ + if ls $$dir/*.go &> /dev/null; then \ + pushd . &> /dev/null ; \ + cd $$dir ; \ +- go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ ++ $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ + ret=$$? ;\ + if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ + popd &> /dev/null; \ +@@ -145,7 +145,7 @@ + # Depends on binaries because vet will silently fail if it can not load compiled imports + vet: ## run go vet + @echo "🐳 $@" +- @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" ++ @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" + + misspell: + @echo "🐳 $@" diff --git a/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch b/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch deleted file mode 100644 index 70fdaf83..00000000 --- a/recipes-containers/docker/files/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/files/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch deleted file mode 100644 index c623b260..00000000 --- a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Fri, 6 Apr 2018 23:58:22 -0400 -Subject: [PATCH] libnetwork: use $(GO) instead of go - -Ensure that the libnetwork makefile uses the go cross flags and -utilities. - -Signed-off-by: Bruce Ashfield ---- - Makefile | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -Index: git/libnetwork/Makefile -=================================================================== ---- git.orig/libnetwork/Makefile -+++ git/libnetwork/Makefile -@@ -45,9 +45,9 @@ - build-local: - @echo "🐳 $@" - @mkdir -p "bin" -- go build -tags experimental -o "bin/dnet" ./cmd/dnet -- go build -o "bin/docker-proxy" ./cmd/proxy -- CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic -+ $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet -+ $(GO) build -o "bin/proxy" ./cmd/proxy -+ CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic - CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go - - build-images: -@@ -82,8 +82,8 @@ - - cross-local: - @echo "🐳 $@" -- go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet -- go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy -+ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy -+ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet - - # Rebuild protocol buffers. - # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. -@@ -130,7 +130,7 @@ - if ls $$dir/*.go &> /dev/null; then \ - pushd . &> /dev/null ; \ - cd $$dir ; \ -- go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ -+ $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ - ret=$$? ;\ - if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ - popd &> /dev/null; \ -@@ -145,7 +145,7 @@ - # Depends on binaries because vet will silently fail if it can not load compiled imports - vet: ## run go vet - @echo "🐳 $@" -- @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" -+ @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" - - misspell: - @echo "🐳 $@" diff --git a/recipes-containers/docker/files/docker-registry.service b/recipes-containers/docker/files/docker-registry.service deleted file mode 100644 index 7b4bc468..00000000 --- a/recipes-containers/docker/files/docker-registry.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=docker private registry service -After=docker.service - -[Service] -ExecStartPre=-/usr/bin/docker kill registry -ExecStartPre=-/usr/bin/docker rm registry -ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \ - -e "STANDALONE=true" \ - -e "MIRROR_SOURCE=https://registry-1.docker.io" \ - -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \ - -e "SETTINGS_FLAVOR=local" \ - registry -ExecStop=-/usr/bin/docker stop registry -Restart=always -RestartSec=10s - -[Install] -WantedBy=multi-user.target diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init deleted file mode 100644 index 24f8fea6..00000000 --- a/recipes-containers/docker/files/docker.init +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh -# -# /etc/rc.d/init.d/docker -# -# Daemon for docker.com -# -# chkconfig: 2345 95 95 -# description: Daemon for docker.com - -### BEGIN INIT INFO -# Provides: docker -# Required-Start: $network cgconfig -# Required-Stop: -# Should-Start: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: start and stop docker -# Description: Daemon for docker.com -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -prog="dockerd" -unshare=/usr/bin/unshare -exec="/usr/bin/$prog" -pidfile="/var/run/$prog.pid" -lockfile="/var/lock/subsys/$prog" -logfile="/var/log/$prog" -other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -start() { - [ -x $exec ] || exit 5 - - check_for_cleanup - - if ! [ -f $pidfile ]; then - printf "Starting $prog:\t" - echo -e "\n$(date)\n" >> $logfile - "$unshare" -m -- $exec $other_args >> $logfile 2>&1 & - pid=$! - touch $lockfile - # wait up to 10 seconds for the pidfile to exist. see - # https://github.com/docker/docker/issues/5359 - tries=0 - while [ ! -f $pidfile -a $tries -lt 10 ]; do - sleep 1 - tries=$((tries + 1)) - done - success - echo - else - failure - echo - printf "$pidfile still exists...\n" - exit 7 - fi -} - -stop() { - echo -n $"Stopping $prog: " - killproc $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -check_for_cleanup() { - if [ -f ${pidfile} ]; then - /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile} - fi -} - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac - -exit $? -- cgit v1.2.3-54-g00ecf