From e764db31c1b9c4807a461c002e85ab84a9aae225 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 20 Jan 2017 13:19:50 -0500 Subject: docker: fixup builds broken by uprev to 1.13 This new version of docker starts to assume that go 1.7 is used. Specifically in go 1.7 golang.org/x/net/context has been merged so the include is starting to be shortened to simply "context" which does not work when using go 1.6. We can continue to use go 1.6 by using the full pkg path. Additionally the docker-proxy is not built when using the hacks build mechanism, as we do to build docker (ie. we don't build docker in a docker container). We could probably find a way to build docker-proxy using the build hacks, but for now we will simply drop docker-proxy from the package. In an embedded env. using the proxy doesn't make a lot of sense anyways. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- ...-golang.org-x-net-pkg-until-we-move-to-go.patch | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch (limited to 'recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch') 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 new file mode 100644 index 00000000..240b7441 --- /dev/null +++ b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch @@ -0,0 +1,116 @@ +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 +- + vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go | 2 +- + vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/client/README.md b/client/README.md +index 059dfb3..9de54aa 100644 +--- a/client/README.md ++++ b/client/README.md +@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`): + package main + + import ( +- "context" ++ "golang.org/x/net/context" + "fmt" + + "github.com/docker/docker/api/types" +diff --git a/client/client.go b/client/client.go +index a9bdab6..95933af 100644 +--- a/client/client.go ++++ b/client/client.go +@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"): + package main + + import ( +- "context" ++ "golang.org/x/net/context" + "fmt" + + "github.com/docker/docker/api/types" +diff --git a/daemon/info_unix.go b/daemon/info_unix.go +index 9c41c0e..57f8a7b 100644 +--- a/daemon/info_unix.go ++++ b/daemon/info_unix.go +@@ -3,7 +3,7 @@ + package daemon + + import ( +- "context" ++ "golang.org/x/net/context" + "os/exec" + "strings" + +diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go +index d43bf3a..e5802a7 100644 +--- a/integration-cli/docker_api_attach_test.go ++++ b/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" +diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go +index 22445e5..d0afc8c 100644 +--- a/integration-cli/docker_cli_save_load_unix_test.go ++++ b/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" +diff --git a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go +index 6b3295a..cbfcf7e 100644 +--- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go ++++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go +@@ -1,7 +1,7 @@ + package logbroker + + import ( +- "context" ++ "golang.org/x/net/context" + "fmt" + "strings" + "sync" +diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go +index 5a6c71a..efe5921 100644 +--- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go ++++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go +@@ -1,7 +1,7 @@ + package storage + + import ( +- "context" ++ "golang.org/x/net/context" + "io" + "io/ioutil" + "os" +-- +2.7.4 + -- cgit v1.2.3-54-g00ecf