diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-29 17:09:31 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-29 17:09:31 -0400 |
| commit | 9d98a04b2646cfc1db9dc36e628ebdced7cff2d9 (patch) | |
| tree | b2ea2fd19c84870856af33d504402f99345108cf /recipes-containers/docker/docker-moby | |
| parent | cd5eead051128154bf8efa88c15b18b4e29340e2 (diff) | |
| download | meta-virtualization-9d98a04b2646cfc1db9dc36e628ebdced7cff2d9.tar.gz | |
docker: unify common parts of docker-ce and docker-moby recipes
Now that docker-ce is being built from the same repos as docker-moby,
the only unique things in the recipes are the SRCREVs.
We move the common packaging, compile/install routines and configuration
to the .inc files.
We also move the patches to the generic 'files' directory, so they
can be shared.
If we there are SRCREV bumps in the future that diverge moby and
docker, we'll hold patches in their named directorys and tweak
the compile/install routines as necessary.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/docker/docker-moby')
3 files changed, 0 insertions, 109 deletions
diff --git a/recipes-containers/docker/docker-moby/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch b/recipes-containers/docker/docker-moby/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch deleted file mode 100644 index dc322612..00000000 --- a/recipes-containers/docker/docker-moby/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 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/cli/scripts/build/binary | 3 +-- | ||
| 9 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 10 | |||
| 11 | diff --git git/cli/scripts/build/binary git/cli/scripts/build/binary | ||
| 12 | index e4c5e12a6b..7c47b75c2f 100755 | ||
| 13 | --- git/cli/scripts/build/binary | ||
| 14 | +++ git/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-moby/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch deleted file mode 100644 index 971c60d7..00000000 --- a/recipes-containers/docker/docker-moby/0001-dynbinary-use-go-cross-compiler.patch +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 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 | Index: git/src/import/hack/make/.binary | ||
| 12 | =================================================================== | ||
| 13 | --- git.orig/src/import/hack/make/.binary | ||
| 14 | +++ git/src/import/hack/make/.binary | ||
| 15 | @@ -81,7 +81,7 @@ | ||
| 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 " | ||
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 deleted file mode 100644 index c623b260..00000000 --- a/recipes-containers/docker/docker-moby/0001-libnetwork-use-GO-instead-of-go.patch +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 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 "🐳 $@" | ||
