From fc423a7cb882553fe4a29a23e6135c9f1cc8e4d0 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Thu, 23 Jan 2025 12:23:19 +0100 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-containers/docker/docker-moby_git.bb | 5 +- recipes-containers/docker/docker.inc | 7 +-- .../0001-libnetwork-use-GO-instead-of-go.patch | 63 ---------------------- 3 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch 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 \ # SRCREV_moby = "43fc912ef59a83054ea7f6706df4d53a7dea4d80" -SRCREV_libnetwork = "67e0588f1ddfaf2faf4c8cae8b7ea2876434d91c" SRCREV_cli = "d41cb083c352853f94b292a87df4859c4a96dcc2" -SRCREV_FORMAT = "moby_libnetwork" +SRCREV_FORMAT = "moby" SRC_URI = "\ git://github.com/moby/moby.git;nobranch=1;name=moby;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ - git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ git://github.com/docker/cli;nobranch=1;name=cli;destsuffix=git/cli;protocol=https \ file://docker.init \ - file://0001-libnetwork-use-GO-instead-of-go.patch \ file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \ 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() { ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" mkdir -p .gopath/src/github.com/docker - ln -sf ${S}/libnetwork .gopath/src/github.com/docker/libnetwork ln -sf ${S}/cli .gopath/src/github.com/docker/cli export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" @@ -94,17 +93,13 @@ do_compile() { export LDFLAGS="" export DOCKER_VERSION=${DOCKER_VERSION} VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary - - # build the proxy - cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork - oe_runmake cross-local } do_install() { mkdir -p ${D}/${bindir} cp ${S}/cli/build/docker ${D}/${bindir}/docker cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd - cp ${S}/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy + cp ${S}/src/import/bundles/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 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 @@ -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. - -Upstream-Status: Inappropriate [embedded specific] - -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,10 +45,10 @@ - build-local: - @echo "🐳 $@" - @mkdir -p "bin" -- GO111MODULE=off go build -tags experimental -o "bin/dnet" ./cmd/dnet -- GO111MODULE=off go build -o "bin/docker-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 -+ GO111MODULE=off $(GO) build -trimpath -tags experimental -o "bin/dnet" ./cmd/dnet -+ GO111MODULE=off $(GO) build -trimpath -o "bin/docker-proxy" ./cmd/proxy -+ CGO_ENABLED=0 $(GO) build -trimpath -o "bin/diagnosticClient" ./cmd/diagnostic -+ CGO_ENABLED=0 $(GO) build -trimpath -o "bin/testMain" ./cmd/networkdb-test/testMain.go - - build-images: - @echo "🐳 $@" -@@ -82,8 +82,8 @@ - - cross-local: - @echo "🐳 $@" -- GO111MODULE=off go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet -- GO111MODULE=off go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy -+ GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet -+ GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy - - # 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 "🐳 $@" -- cgit v1.2.3-54-g00ecf