diff options
11 files changed, 165 insertions, 0 deletions
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 @@ | |||
| 1 | From ae6f4a1e685394fb7b9539f134b66ca84ddc91c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Tue, 30 Jun 2020 22:19:56 -0400 | ||
| 4 | Subject: [PATCH] cli: use go cross compiler | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 7 | --- | ||
| 8 | git/cli/scripts/build/dynbinary | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git git/src/import/components/cli/scripts/build/dynbinary git/src/import/components/cli/scripts/build/dynbinary | ||
| 12 | index 4feb7e71d8..f990d0e040 100755 | ||
| 13 | --- git/src/import/components/cli/scripts/build/dynbinary | ||
| 14 | +++ git/src/import/components/cli/scripts/build/dynbinary | ||
| 15 | @@ -9,6 +9,6 @@ source ./scripts/build/.variables | ||
| 16 | |||
| 17 | echo "Building dynamically linked $TARGET" | ||
| 18 | export CGO_ENABLED=1 | ||
| 19 | -go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" | ||
| 20 | +${GO} build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" | ||
| 21 | |||
| 22 | ln -sf "$(basename "${TARGET}")" build/docker | ||
| 23 | -- | ||
| 24 | 2.19.1 | ||
| 25 | |||
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 @@ | |||
| 1 | From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Tue, 30 Jun 2020 22:23:33 -0400 | ||
| 4 | Subject: [PATCH] dynbinary: use go cross compiler | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 7 | --- | ||
| 8 | hack/make/.binary | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary | ||
| 12 | index 53de6749e5..47ab2a754f 100644 | ||
| 13 | --- a/src/import/components/engine/hack/make/.binary | ||
| 14 | +++ b/src/import/components/engine/hack/make/.binary | ||
| 15 | @@ -81,7 +81,7 @@ esac | ||
| 16 | |||
| 17 | echo "Building: $DEST/$BINARY_FULLNAME" | ||
| 18 | echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" | ||
| 19 | -go build \ | ||
| 20 | +${GO} build \ | ||
| 21 | -o "$DEST/$BINARY_FULLNAME" \ | ||
| 22 | "${BUILDFLAGS[@]}" \ | ||
| 23 | -ldflags " | ||
| 24 | -- | ||
| 25 | 2.19.1 | ||
| 26 | |||
diff --git a/recipes-containers/docker/files/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 index 70fdaf83..70fdaf83 100644 --- a/recipes-containers/docker/files/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 | |||
diff --git a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/docker-ce/0001-libnetwork-use-GO-instead-of-go.patch index c623b260..c623b260 100644 --- a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch +++ b/recipes-containers/docker/docker-ce/0001-libnetwork-use-GO-instead-of-go.patch | |||
diff --git a/recipes-containers/docker/files/docker-registry.service b/recipes-containers/docker/docker-ce/docker-registry.service index 7b4bc468..7b4bc468 100644 --- a/recipes-containers/docker/files/docker-registry.service +++ b/recipes-containers/docker/docker-ce/docker-registry.service | |||
diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/docker-ce/docker.init index 24f8fea6..24f8fea6 100644 --- a/recipes-containers/docker/files/docker.init +++ b/recipes-containers/docker/docker-ce/docker.init | |||
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 = "\ | |||
| 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 \ | 28 | file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ |
| 29 | file://0001-dynbinary-use-go-cross-compiler.patch \ | ||
| 30 | file://0001-cli-use-go-cross-compiler.patch \ | ||
| 29 | " | 31 | " |
| 30 | 32 | ||
| 31 | require docker.inc | 33 | 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 = "\ | |||
| 45 | file://docker.init \ | 45 | file://docker.init \ |
| 46 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | 46 | file://0001-libnetwork-use-GO-instead-of-go.patch \ |
| 47 | file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ | 47 | file://0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch \ |
| 48 | file://0001-cli-use-go-cross-compiler.patch \ | ||
| 49 | file://0001-dynbinary-use-go-cross-compiler.patch \ | ||
| 48 | " | 50 | " |
| 49 | 51 | ||
| 50 | require docker.inc | 52 | 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 @@ | |||
| 1 | From ae6f4a1e685394fb7b9539f134b66ca84ddc91c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Tue, 30 Jun 2020 22:19:56 -0400 | ||
| 4 | Subject: [PATCH] cli: use go cross compiler | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 7 | --- | ||
| 8 | git/cli/scripts/build/dynbinary | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git git/cli/scripts/build/dynbinary git/cli/scripts/build/dynbinary | ||
| 12 | index 4feb7e71d8..f990d0e040 100755 | ||
| 13 | --- git/cli/scripts/build/dynbinary | ||
| 14 | +++ git/cli/scripts/build/dynbinary | ||
| 15 | @@ -9,6 +9,6 @@ source ./scripts/build/.variables | ||
| 16 | |||
| 17 | echo "Building dynamically linked $TARGET" | ||
| 18 | export CGO_ENABLED=1 | ||
| 19 | -go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" | ||
| 20 | +${GO} build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" | ||
| 21 | |||
| 22 | ln -sf "$(basename "${TARGET}")" build/docker | ||
| 23 | -- | ||
| 24 | 2.19.1 | ||
| 25 | |||
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 @@ | |||
| 1 | From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Tue, 30 Jun 2020 22:23:33 -0400 | ||
| 4 | Subject: [PATCH] dynbinary: use go cross compiler | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 7 | --- | ||
| 8 | hack/make/.binary | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/src/import/hack/make/.binary b/src/import/hack/make/.binary | ||
| 12 | index 53de6749e5..47ab2a754f 100644 | ||
| 13 | --- a/src/import/hack/make/.binary | ||
| 14 | +++ b/src/import/hack/make/.binary | ||
| 15 | @@ -81,7 +81,7 @@ esac | ||
| 16 | |||
| 17 | echo "Building: $DEST/$BINARY_FULLNAME" | ||
| 18 | echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\"" | ||
| 19 | -go build \ | ||
| 20 | +${GO} build \ | ||
| 21 | -o "$DEST/$BINARY_FULLNAME" \ | ||
| 22 | "${BUILDFLAGS[@]}" \ | ||
| 23 | -ldflags " | ||
| 24 | -- | ||
| 25 | 2.19.1 | ||
| 26 | |||
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 @@ | |||
| 1 | From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 3 | Date: Fri, 6 Apr 2018 23:58:22 -0400 | ||
| 4 | Subject: [PATCH] libnetwork: use $(GO) instead of go | ||
| 5 | |||
| 6 | Ensure that the libnetwork makefile uses the go cross flags and | ||
| 7 | utilities. | ||
| 8 | |||
| 9 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 10 | --- | ||
| 11 | Makefile | 14 +++++++------- | ||
| 12 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 13 | |||
| 14 | Index: git/libnetwork/Makefile | ||
| 15 | =================================================================== | ||
| 16 | --- git.orig/libnetwork/Makefile | ||
| 17 | +++ git/libnetwork/Makefile | ||
| 18 | @@ -45,9 +45,9 @@ | ||
| 19 | build-local: | ||
| 20 | @echo "🐳 $@" | ||
| 21 | @mkdir -p "bin" | ||
| 22 | - go build -tags experimental -o "bin/dnet" ./cmd/dnet | ||
| 23 | - go build -o "bin/docker-proxy" ./cmd/proxy | ||
| 24 | - CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic | ||
| 25 | + $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet | ||
| 26 | + $(GO) build -o "bin/proxy" ./cmd/proxy | ||
| 27 | + CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic | ||
| 28 | CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go | ||
| 29 | |||
| 30 | build-images: | ||
| 31 | @@ -82,8 +82,8 @@ | ||
| 32 | |||
| 33 | cross-local: | ||
| 34 | @echo "🐳 $@" | ||
| 35 | - go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
| 36 | - go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
| 37 | + @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
| 38 | + @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
| 39 | |||
| 40 | # Rebuild protocol buffers. | ||
| 41 | # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. | ||
| 42 | @@ -130,7 +130,7 @@ | ||
| 43 | if ls $$dir/*.go &> /dev/null; then \ | ||
| 44 | pushd . &> /dev/null ; \ | ||
| 45 | cd $$dir ; \ | ||
| 46 | - go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
| 47 | + $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
| 48 | ret=$$? ;\ | ||
| 49 | if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ | ||
| 50 | popd &> /dev/null; \ | ||
| 51 | @@ -145,7 +145,7 @@ | ||
| 52 | # Depends on binaries because vet will silently fail if it can not load compiled imports | ||
| 53 | vet: ## run go vet | ||
| 54 | @echo "🐳 $@" | ||
| 55 | - @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)" | ||
| 56 | + @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)" | ||
| 57 | |||
| 58 | misspell: | ||
| 59 | @echo "🐳 $@" | ||
