mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
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>
This commit is contained in:
parent
57fe8d0364
commit
fc423a7cb8
|
@ -45,15 +45,12 @@ DESCRIPTION = "Linux container runtime \
|
||||||
#
|
#
|
||||||
|
|
||||||
SRCREV_moby = "43fc912ef59a83054ea7f6706df4d53a7dea4d80"
|
SRCREV_moby = "43fc912ef59a83054ea7f6706df4d53a7dea4d80"
|
||||||
SRCREV_libnetwork = "67e0588f1ddfaf2faf4c8cae8b7ea2876434d91c"
|
|
||||||
SRCREV_cli = "d41cb083c352853f94b292a87df4859c4a96dcc2"
|
SRCREV_cli = "d41cb083c352853f94b292a87df4859c4a96dcc2"
|
||||||
SRCREV_FORMAT = "moby_libnetwork"
|
SRCREV_FORMAT = "moby"
|
||||||
SRC_URI = "\
|
SRC_URI = "\
|
||||||
git://github.com/moby/moby.git;nobranch=1;name=moby;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \
|
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 \
|
git://github.com/docker/cli;nobranch=1;name=cli;destsuffix=git/cli;protocol=https \
|
||||||
file://docker.init \
|
file://docker.init \
|
||||||
file://0001-libnetwork-use-GO-instead-of-go.patch \
|
|
||||||
file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \
|
file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \
|
||||||
file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \
|
file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \
|
||||||
file://0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch;patchdir=src/import \
|
file://0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch;patchdir=src/import \
|
||||||
|
|
|
@ -64,7 +64,6 @@ do_compile() {
|
||||||
ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
|
ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
|
||||||
|
|
||||||
mkdir -p .gopath/src/github.com/docker
|
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
|
ln -sf ${S}/cli .gopath/src/github.com/docker/cli
|
||||||
|
|
||||||
export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor"
|
export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor"
|
||||||
|
@ -94,17 +93,13 @@ do_compile() {
|
||||||
export LDFLAGS=""
|
export LDFLAGS=""
|
||||||
export DOCKER_VERSION=${DOCKER_VERSION}
|
export DOCKER_VERSION=${DOCKER_VERSION}
|
||||||
VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary
|
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() {
|
do_install() {
|
||||||
mkdir -p ${D}/${bindir}
|
mkdir -p ${D}/${bindir}
|
||||||
cp ${S}/cli/build/docker ${D}/${bindir}/docker
|
cp ${S}/cli/build/docker ${D}/${bindir}/docker
|
||||||
cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
|
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
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||||
install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
||||||
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 <bruce.ashfield@windriver.com>
|
|
||||||
---
|
|
||||||
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 "🐳 $@"
|
|
Loading…
Reference in New Issue
Block a user