diff options
author | Paolo Barbolini <paolo.barbolini@m4ss.net> | 2025-01-23 12:23:19 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-01-30 18:52:31 +0000 |
commit | fc423a7cb882553fe4a29a23e6135c9f1cc8e4d0 (patch) | |
tree | 390daf73d72ca24e5311b240779b1bc6d139daec | |
parent | 57fe8d036440625153bf26258248adcdd20855c6 (diff) | |
download | meta-virtualization-fc423a7cb882553fe4a29a23e6135c9f1cc8e4d0.tar.gz |
docker: switch libnetwork to moby version
Some time ago libnetwork was moved from it's own repository to moby.
This patch updates the docker recipe to use the new location
Signed-off-by: Paolo Barbolini <paolo.barbolini@m4ss.net>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/docker/docker-moby_git.bb | 5 | ||||
-rw-r--r-- | recipes-containers/docker/docker.inc | 7 | ||||
-rw-r--r-- | recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch | 63 |
3 files changed, 2 insertions, 73 deletions
diff --git a/recipes-containers/docker/docker-moby_git.bb b/recipes-containers/docker/docker-moby_git.bb index d8634da3..9f45f175 100644 --- a/recipes-containers/docker/docker-moby_git.bb +++ b/recipes-containers/docker/docker-moby_git.bb | |||
@@ -45,15 +45,12 @@ DESCRIPTION = "Linux container runtime \ | |||
45 | # | 45 | # |
46 | 46 | ||
47 | SRCREV_moby = "43fc912ef59a83054ea7f6706df4d53a7dea4d80" | 47 | SRCREV_moby = "43fc912ef59a83054ea7f6706df4d53a7dea4d80" |
48 | SRCREV_libnetwork = "67e0588f1ddfaf2faf4c8cae8b7ea2876434d91c" | ||
49 | SRCREV_cli = "d41cb083c352853f94b292a87df4859c4a96dcc2" | 48 | SRCREV_cli = "d41cb083c352853f94b292a87df4859c4a96dcc2" |
50 | SRCREV_FORMAT = "moby_libnetwork" | 49 | SRCREV_FORMAT = "moby" |
51 | SRC_URI = "\ | 50 | SRC_URI = "\ |
52 | git://github.com/moby/moby.git;nobranch=1;name=moby;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ | 51 | git://github.com/moby/moby.git;nobranch=1;name=moby;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ |
53 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ | ||
54 | git://github.com/docker/cli;nobranch=1;name=cli;destsuffix=git/cli;protocol=https \ | 52 | git://github.com/docker/cli;nobranch=1;name=cli;destsuffix=git/cli;protocol=https \ |
55 | file://docker.init \ | 53 | file://docker.init \ |
56 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | ||
57 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ | 54 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ |
58 | file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \ | 55 | file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \ |
59 | file://0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch;patchdir=src/import \ | 56 | file://0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch;patchdir=src/import \ |
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc index 2abca502..4e0aa14f 100644 --- a/recipes-containers/docker/docker.inc +++ b/recipes-containers/docker/docker.inc | |||
@@ -64,7 +64,6 @@ do_compile() { | |||
64 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" | 64 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" |
65 | 65 | ||
66 | mkdir -p .gopath/src/github.com/docker | 66 | mkdir -p .gopath/src/github.com/docker |
67 | ln -sf ${S}/libnetwork .gopath/src/github.com/docker/libnetwork | ||
68 | ln -sf ${S}/cli .gopath/src/github.com/docker/cli | 67 | ln -sf ${S}/cli .gopath/src/github.com/docker/cli |
69 | 68 | ||
70 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" | 69 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" |
@@ -94,17 +93,13 @@ do_compile() { | |||
94 | export LDFLAGS="" | 93 | export LDFLAGS="" |
95 | export DOCKER_VERSION=${DOCKER_VERSION} | 94 | export DOCKER_VERSION=${DOCKER_VERSION} |
96 | VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary | 95 | VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary |
97 | |||
98 | # build the proxy | ||
99 | cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork | ||
100 | oe_runmake cross-local | ||
101 | } | 96 | } |
102 | 97 | ||
103 | do_install() { | 98 | do_install() { |
104 | mkdir -p ${D}/${bindir} | 99 | mkdir -p ${D}/${bindir} |
105 | cp ${S}/cli/build/docker ${D}/${bindir}/docker | 100 | cp ${S}/cli/build/docker ${D}/${bindir}/docker |
106 | cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd | 101 | cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd |
107 | cp ${S}/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy | 102 | cp ${S}/src/import/bundles/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy |
108 | 103 | ||
109 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 104 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
110 | install -d ${D}${systemd_unitdir}/system | 105 | install -d ${D}${systemd_unitdir}/system |
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 f94f73e4..00000000 --- a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch +++ /dev/null | |||
@@ -1,63 +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 | Upstream-Status: Inappropriate [embedded specific] | ||
10 | |||
11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
12 | --- | ||
13 | Makefile | 14 +++++++------- | ||
14 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
15 | |||
16 | Index: git/libnetwork/Makefile | ||
17 | =================================================================== | ||
18 | --- git.orig/libnetwork/Makefile | ||
19 | +++ git/libnetwork/Makefile | ||
20 | @@ -45,10 +45,10 @@ | ||
21 | build-local: | ||
22 | @echo "🐳 $@" | ||
23 | @mkdir -p "bin" | ||
24 | - GO111MODULE=off go build -tags experimental -o "bin/dnet" ./cmd/dnet | ||
25 | - GO111MODULE=off go build -o "bin/docker-proxy" ./cmd/proxy | ||
26 | - CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic | ||
27 | - CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go | ||
28 | + GO111MODULE=off $(GO) build -trimpath -tags experimental -o "bin/dnet" ./cmd/dnet | ||
29 | + GO111MODULE=off $(GO) build -trimpath -o "bin/docker-proxy" ./cmd/proxy | ||
30 | + CGO_ENABLED=0 $(GO) build -trimpath -o "bin/diagnosticClient" ./cmd/diagnostic | ||
31 | + CGO_ENABLED=0 $(GO) build -trimpath -o "bin/testMain" ./cmd/networkdb-test/testMain.go | ||
32 | |||
33 | build-images: | ||
34 | @echo "🐳 $@" | ||
35 | @@ -82,8 +82,8 @@ | ||
36 | |||
37 | cross-local: | ||
38 | @echo "🐳 $@" | ||
39 | - GO111MODULE=off go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
40 | - GO111MODULE=off go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
41 | + GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
42 | + GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
43 | |||
44 | # Rebuild protocol buffers. | ||
45 | # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. | ||
46 | @@ -130,7 +130,7 @@ | ||
47 | if ls $$dir/*.go &> /dev/null; then \ | ||
48 | pushd . &> /dev/null ; \ | ||
49 | cd $$dir ; \ | ||
50 | - go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
51 | + $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
52 | ret=$$? ;\ | ||
53 | if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ | ||
54 | popd &> /dev/null; \ | ||
55 | @@ -145,7 +145,7 @@ | ||
56 | # Depends on binaries because vet will silently fail if it can not load compiled imports | ||
57 | vet: ## run go vet | ||
58 | @echo "🐳 $@" | ||
59 | - @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)" | ||
60 | + @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)" | ||
61 | |||
62 | misspell: | ||
63 | @echo "🐳 $@" | ||