From a5074cecf18faea1a325c8ac9220d2df41250af5 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 2 Apr 2018 00:30:50 -0400 Subject: docker: uprev to 18.03.0 Uprev the docker daemon, proxy and cli to 18.03.0. The SRCREVs for these updates come from the versions logged in the docker-ce 18.03.0 release. The docker-ce recipe has a pure docker-ce single repository build, but here, we continue to assemble the individual parts for maximum flexibility. Along with the uprev, we add new dependencies required to build the new version; libtool and pkcconfig (although unused by the recipe itself). Finally we switch to a Makefile based build of the cli to allow the commit and docker version to be properly captured in the docker executable. Signed-off-by: Bruce Ashfield --- recipes-containers/docker/docker_git.bb | 26 +++++--- ...-golang.org-x-net-pkg-until-we-move-to-go.patch | 75 ---------------------- 2 files changed, 17 insertions(+), 84 deletions(-) delete mode 100644 recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 28781fa0..13c27313 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb @@ -18,16 +18,15 @@ DESCRIPTION = "Linux container runtime \ subtle and/or glaring issues. \ " -SRCREV_docker = "e639a70fbe999d96354a5bcf560231b7b8aa935c" -SRCREV_libnetwork = "26addf43a5d925ff79d262dbbdb5344bc2b6e198" -SRCREV_cli = "a765218f1988e85b68aa3977f34893ec7b059a60" +SRCREV_docker = "708b068d3095c6a6be939eb2da78c921d2e945e2" +SRCREV_libnetwork = "4cb38c2987c236dce03c868d99b57b1e28a4b81c" +SRCREV_cli = "0f1bb353423e45e02315e985bd9ddebe6da18457" SRC_URI = "\ git://github.com/moby/moby.git;nobranch=1;name=docker \ git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \ git://github.com/docker/cli;branch=master;name=cli;destsuffix=cli \ file://docker.init \ file://hi.Dockerfile \ - file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \ " # Apache-2.0 for docker @@ -38,7 +37,7 @@ GO_IMPORT = "import" S = "${WORKDIR}/git" -DOCKER_VERSION = "17.06.0" +DOCKER_VERSION = "18.03.0" PV = "${DOCKER_VERSION}+git${SRCREV_docker}" DEPENDS = " \ @@ -59,6 +58,7 @@ DEPENDS = " \ go-connections \ notary \ grpc-go \ + libtool \ " PACKAGES =+ "${PN}-contrib" @@ -77,6 +77,7 @@ DOCKER_PKG="github.com/docker/docker" inherit systemd update-rc.d inherit go inherit goarch +inherit pkgconfig do_configure[noexec] = "1" @@ -105,17 +106,24 @@ do_compile() { # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper' + export DISABLE_WARN_OUTSIDE_CONTAINER=1 + + cd ${S}/src/import/ + # this is the unsupported built structure # that doesn't rely on an existing docker # to build this: - DOCKER_GITCOMMIT="${SRCREV}" \ - ./hack/make.sh dynbinary + VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" ./hack/make.sh dynbinary # build the proxy go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy # build the cli - go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker + cd ${S}/src/import/.gopath/src/github.com/docker/cli + export CFLAGS="" + export LDFLAGS="" + export DOCKER_VERSION=${DOCKER_VERSION} + VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_docker}" make dynbinary } SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" @@ -129,7 +137,7 @@ INITSCRIPT_PARAMS_${PN} = "defaults" do_install() { mkdir -p ${D}/${bindir} - cp ${S}/src/import/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker + cp ${WORKDIR}/cli/build/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 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 deleted file mode 100644 index 7ed606ff..00000000 --- a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch +++ /dev/null @@ -1,75 +0,0 @@ -From de69555afaf05efcdeea7b7c20c6f7b12f3e1bac Mon Sep 17 00:00:00 2001 -From: Mark Asselstine -Date: Fri, 20 Jan 2017 11:58:44 -0500 -Subject: [PATCH] context: use golang.org/x/net pkg until we move to go 1.7 - -In go 1.6 the context.go is not yet integrated and as such we will get -build errors like: - -walwrap.go:4:2: cannot find package "context" in any of: -... - -Signed-off-by: Mark Asselstine ---- - client/README.md | 2 +- - client/client.go | 2 +- - daemon/info_unix.go | 2 +- - integration-cli/docker_api_attach_test.go | 2 +- - integration-cli/docker_cli_save_load_unix_test.go | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - ---- a/src/import/client/README.md -+++ b/src/import/client/README.md -@@ -8,7 +8,7 @@ For example, to list running containers - package main - - import ( -- "context" -+ "golang.org/x/net/context" - "fmt" - - "github.com/docker/docker/api/types" ---- a/src/import/client/client.go -+++ b/src/import/client/client.go -@@ -19,7 +19,7 @@ For example, to list running containers - package main - - import ( -- "context" -+ "golang.org/x/net/context" - "fmt" - - "github.com/docker/docker/api/types" ---- a/src/import/daemon/info_unix.go -+++ b/src/import/daemon/info_unix.go -@@ -3,7 +3,7 @@ - package daemon - - import ( -- "context" -+ "golang.org/x/net/context" - "os/exec" - "strings" - ---- 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" - "bytes" -- "context" -+ "golang.org/x/net/context" - "io" - "net" - "net/http" ---- 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 - - import ( -- "context" -+ "golang.org/x/net/context" - "fmt" - "io/ioutil" - "os" -- cgit v1.2.3-54-g00ecf