summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-01-20 13:19:50 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-01-20 15:49:06 -0500
commite764db31c1b9c4807a461c002e85ab84a9aae225 (patch)
treeee99f970c1592e2ded550efb557ab66468f43b59
parente20ee824e070f6c7a752a3ce5363a15699d215ce (diff)
downloadmeta-virtualization-e764db31c1b9c4807a461c002e85ab84a9aae225.tar.gz
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 <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/docker/docker_git.bb2
-rw-r--r--recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch116
2 files changed, 117 insertions, 1 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 1eb24a51..c208a025 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "\
24 file://docker.service \ 24 file://docker.service \
25 file://docker.init \ 25 file://docker.init \
26 file://hi.Dockerfile \ 26 file://hi.Dockerfile \
27 file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
27 " 28 "
28 29
29# Apache-2.0 for docker 30# Apache-2.0 for docker
@@ -130,7 +131,6 @@ do_install() {
130 mkdir -p ${D}/${bindir} 131 mkdir -p ${D}/${bindir}
131 cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker 132 cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker
132 cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd 133 cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
133 cp ${S}/bundles/latest/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy
134 134
135 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 135 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
136 install -d ${D}${systemd_unitdir}/system 136 install -d ${D}${systemd_unitdir}/system
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 @@
1From de69555afaf05efcdeea7b7c20c6f7b12f3e1bac Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Fri, 20 Jan 2017 11:58:44 -0500
4Subject: [PATCH] context: use golang.org/x/net pkg until we move to go 1.7
5
6In go 1.6 the context.go is not yet integrated and as such we will get
7build errors like:
8
9walwrap.go:4:2: cannot find package "context" in any of:
10...
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 client/README.md | 2 +-
15 client/client.go | 2 +-
16 daemon/info_unix.go | 2 +-
17 integration-cli/docker_api_attach_test.go | 2 +-
18 integration-cli/docker_cli_save_load_unix_test.go | 2 +-
19 vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go | 2 +-
20 vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +-
21 7 files changed, 7 insertions(+), 7 deletions(-)
22
23diff --git a/client/README.md b/client/README.md
24index 059dfb3..9de54aa 100644
25--- a/client/README.md
26+++ b/client/README.md
27@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`):
28 package main
29
30 import (
31- "context"
32+ "golang.org/x/net/context"
33 "fmt"
34
35 "github.com/docker/docker/api/types"
36diff --git a/client/client.go b/client/client.go
37index a9bdab6..95933af 100644
38--- a/client/client.go
39+++ b/client/client.go
40@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"):
41 package main
42
43 import (
44- "context"
45+ "golang.org/x/net/context"
46 "fmt"
47
48 "github.com/docker/docker/api/types"
49diff --git a/daemon/info_unix.go b/daemon/info_unix.go
50index 9c41c0e..57f8a7b 100644
51--- a/daemon/info_unix.go
52+++ b/daemon/info_unix.go
53@@ -3,7 +3,7 @@
54 package daemon
55
56 import (
57- "context"
58+ "golang.org/x/net/context"
59 "os/exec"
60 "strings"
61
62diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
63index d43bf3a..e5802a7 100644
64--- a/integration-cli/docker_api_attach_test.go
65+++ b/integration-cli/docker_api_attach_test.go
66@@ -3,7 +3,7 @@ package main
67 import (
68 "bufio"
69 "bytes"
70- "context"
71+ "golang.org/x/net/context"
72 "io"
73 "net"
74 "net/http"
75diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go
76index 22445e5..d0afc8c 100644
77--- a/integration-cli/docker_cli_save_load_unix_test.go
78+++ b/integration-cli/docker_cli_save_load_unix_test.go
79@@ -3,7 +3,7 @@
80 package main
81
82 import (
83- "context"
84+ "golang.org/x/net/context"
85 "fmt"
86 "io/ioutil"
87 "os"
88diff --git a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
89index 6b3295a..cbfcf7e 100644
90--- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
91+++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
92@@ -1,7 +1,7 @@
93 package logbroker
94
95 import (
96- "context"
97+ "golang.org/x/net/context"
98 "fmt"
99 "strings"
100 "sync"
101diff --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
102index 5a6c71a..efe5921 100644
103--- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
104+++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
105@@ -1,7 +1,7 @@
106 package storage
107
108 import (
109- "context"
110+ "golang.org/x/net/context"
111 "io"
112 "io/ioutil"
113 "os"
114--
1152.7.4
116