From 01a8d4537012ad93dc8510e9b762acdc8c4536c7 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Wed, 13 Sep 2017 12:39:46 -0700 Subject: nets, docker, runc, oci-*tools: go.bbclass compile fixes Recently in the oe-core the go.bbclass changed and requires the defition of the GO_IMPORT variable. This was intended to simplify how the compilation works with go packages and it is still a work in progress. This patch set makes the recipes compatible to generate the same end result as before using the new go.bbclass from oe-core. Any patches that were included in the recipes had to have the paths adjusted because the new go.bbclass manipulates the notion of S to be S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch and compile. Signed-off-by: Jason Wessel Signed-off-by: Bruce Ashfield --- recipes-containers/docker/docker_git.bb | 29 +++++++++++----------- ...-golang.org-x-net-pkg-until-we-move-to-go.patch | 20 +++++++-------- 2 files changed, 25 insertions(+), 24 deletions(-) (limited to 'recipes-containers/docker') diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 1ced8f47..4d6c17c9 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb @@ -32,7 +32,9 @@ SRC_URI = "\ # Apache-2.0 for docker LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9740d093a080530b5c5c6573df9af45a" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=9740d093a080530b5c5c6573df9af45a" + +GO_IMPORT = "import" S = "${WORKDIR}/git" @@ -81,18 +83,17 @@ do_compile() { # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently. - cd ${S} + cd ${S}/src/import rm -rf .gopath mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" mkdir -p .gopath/src/github.com/docker - ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork - ln -sf ../../../../../cli .gopath/src/github.com/docker/cli + ln -sf ${WORKDIR}/libnetwork .gopath/src/github.com/docker/libnetwork + ln -sf ${WORKDIR}/cli .gopath/src/github.com/docker/cli - export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" - cd - # Pass the needed cflags/ldflags so that cgo # can find the needed headers files and libraries @@ -109,10 +110,10 @@ do_compile() { ./hack/make.sh dynbinary # build the proxy - go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy + go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy # build the cli - go build -o ${S}/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker + go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker } SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" @@ -126,15 +127,15 @@ INITSCRIPT_PARAMS_${PN} = "defaults" do_install() { mkdir -p ${D}/${bindir} - cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker - cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd - cp ${S}/docker-proxy ${D}/${bindir}/docker-proxy + cp ${S}/src/import/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker + cp ${S}/src/import/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd + cp ${S}/src/import/docker-proxy ${D}/${bindir}/docker-proxy if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system - install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system + install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system # replaces one copied from above with one that uses the local registry for a mirror - install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system + install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system else install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init @@ -142,7 +143,7 @@ do_install() { mkdir -p ${D}${datadir}/docker/ cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/ - install -m 0755 ${S}/contrib/check-config.sh ${D}${datadir}/docker/ + install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ } inherit useradd diff --git a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch index c43a7e74..7ed606ff 100644 --- a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch +++ b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch @@ -18,8 +18,8 @@ Signed-off-by: Mark Asselstine integration-cli/docker_cli_save_load_unix_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) ---- a/client/README.md -+++ b/client/README.md +--- a/src/import/client/README.md ++++ b/src/import/client/README.md @@ -8,7 +8,7 @@ For example, to list running containers package main @@ -29,8 +29,8 @@ Signed-off-by: Mark Asselstine "fmt" "github.com/docker/docker/api/types" ---- a/client/client.go -+++ b/client/client.go +--- a/src/import/client/client.go ++++ b/src/import/client/client.go @@ -19,7 +19,7 @@ For example, to list running containers package main @@ -40,8 +40,8 @@ Signed-off-by: Mark Asselstine "fmt" "github.com/docker/docker/api/types" ---- a/daemon/info_unix.go -+++ b/daemon/info_unix.go +--- a/src/import/daemon/info_unix.go ++++ b/src/import/daemon/info_unix.go @@ -3,7 +3,7 @@ package daemon @@ -51,8 +51,8 @@ Signed-off-by: Mark Asselstine "os/exec" "strings" ---- a/integration-cli/docker_api_attach_test.go -+++ b/integration-cli/docker_api_attach_test.go +--- a/src/import/integration-cli/docker_api_attach_test.go ++++ b/src/import/integration-cli/docker_api_attach_test.go @@ -3,7 +3,7 @@ package main import ( "bufio" @@ -62,8 +62,8 @@ Signed-off-by: Mark Asselstine "io" "net" "net/http" ---- a/integration-cli/docker_cli_save_load_unix_test.go -+++ b/integration-cli/docker_cli_save_load_unix_test.go +--- a/src/import/integration-cli/docker_cli_save_load_unix_test.go ++++ b/src/import/integration-cli/docker_cli_save_load_unix_test.go @@ -3,7 +3,7 @@ package main -- cgit v1.2.3-54-g00ecf