diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-27 22:10:27 +0000 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-27 22:10:27 +0000 |
commit | 5fb44497ae3a81502ee6e3ab967f4199e2c52177 (patch) | |
tree | 1bed96ffc10bbb376efaceeb97eac21d2536d484 | |
parent | 462830307ae011ba094533126675d013ea60ae5d (diff) | |
download | alpine_aports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.tar.bz2 alpine_aports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.tar.xz alpine_aports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.zip |
community/docker: fix compilation on mips64
-rw-r--r-- | community/docker/APKBUILD | 18 | ||||
-rw-r--r-- | community/docker/configurable_buildmode.patch | 12 | ||||
-rw-r--r-- | community/docker/netns-mips64-fork.patch | 433 | ||||
-rw-r--r-- | community/docker/stat-struct-fixes-mips64.patch | 13 |
4 files changed, 473 insertions, 3 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD index 642c527d7a..4660ca4de4 100644 --- a/community/docker/APKBUILD +++ b/community/docker/APKBUILD | |||
@@ -7,7 +7,7 @@ _gitcommit=9d988398e765e4b97f27f93c4d04b272ac64c9c7 # https://github.com/docker/ | |||
7 | pkgrel=0 | 7 | pkgrel=0 |
8 | pkgdesc="Pack, ship and run any application as a lightweight container" | 8 | pkgdesc="Pack, ship and run any application as a lightweight container" |
9 | url="https://www.docker.io/" | 9 | url="https://www.docker.io/" |
10 | arch="all !mips !mips64" # blocked by containerd | 10 | arch="all" |
11 | license="Apache-2.0" | 11 | license="Apache-2.0" |
12 | depends="docker-engine docker-cli" | 12 | depends="docker-engine docker-cli" |
13 | makedepends="go go-md2man btrfs-progs-dev bash linux-headers coreutils lvm2-dev libtool | 13 | makedepends="go go-md2man btrfs-progs-dev bash linux-headers coreutils lvm2-dev libtool |
@@ -45,6 +45,9 @@ source=" | |||
45 | cobra-$_cobra_ver.tar.gz::https://github.com/spf13/cobra/archive/v$_cobra_ver.tar.gz | 45 | cobra-$_cobra_ver.tar.gz::https://github.com/spf13/cobra/archive/v$_cobra_ver.tar.gz |
46 | docker.initd | 46 | docker.initd |
47 | docker.confd | 47 | docker.confd |
48 | netns-mips64-fork.patch | ||
49 | stat-struct-fixes-mips64.patch | ||
50 | configurable_buildmode.patch | ||
48 | " | 51 | " |
49 | 52 | ||
50 | builddir="$srcdir"/docker-ce-$pkgver | 53 | builddir="$srcdir"/docker-ce-$pkgver |
@@ -54,6 +57,12 @@ _buildtags="seccomp" | |||
54 | 57 | ||
55 | _libnetwork_builddir="$srcdir"/libnetwork-$_libnetwork_ver | 58 | _libnetwork_builddir="$srcdir"/libnetwork-$_libnetwork_ver |
56 | 59 | ||
60 | case "$CARCH" in | ||
61 | mips64*) _buildmode=exe ;; | ||
62 | riscv64) _buildmode=exe ;; | ||
63 | *) _buildmode=pie ;; | ||
64 | esac | ||
65 | |||
57 | build() { | 66 | build() { |
58 | export AUTO_GOPATH=1 | 67 | export AUTO_GOPATH=1 |
59 | export GITCOMMIT=$_gitcommit # for cli | 68 | export GITCOMMIT=$_gitcommit # for cli |
@@ -85,7 +94,7 @@ build() { | |||
85 | cd "$_cli_builddir" | 94 | cd "$_cli_builddir" |
86 | mkdir -p "$GOPATH"/src/github.com/docker/ | 95 | mkdir -p "$GOPATH"/src/github.com/docker/ |
87 | ln -s "$_cli_builddir" "$GOPATH"/src/github.com/docker/cli | 96 | ln -s "$_cli_builddir" "$GOPATH"/src/github.com/docker/cli |
88 | LDFLAGS="" make VERSION="$pkgver" dynbinary | 97 | LDFLAGS="" make VERSION="$pkgver" BUILDMODE=$_buildmode dynbinary |
89 | 98 | ||
90 | # docker man | 99 | # docker man |
91 | msg "building docker man pages" | 100 | msg "building docker man pages" |
@@ -197,4 +206,7 @@ sha512sums="00ea7963f03fdc00c4df905ff8aebe6945e5d8aa391a31328fcab5ecd87b2a4c98b8 | |||
197 | 02b159ae14bbd6f313b3cd7f0227d93e9ad6b0322d6a7ca5687b0a4f2ecdd4546e7a8b6a73b20c88cb9690cd970e8cafa8e97dbd534aec8d7bafd0598e08f916 libnetwork-b9bcf0c3fba9ef8897c9676c5b70ba0345b84b17.tar.gz | 206 | 02b159ae14bbd6f313b3cd7f0227d93e9ad6b0322d6a7ca5687b0a4f2ecdd4546e7a8b6a73b20c88cb9690cd970e8cafa8e97dbd534aec8d7bafd0598e08f916 libnetwork-b9bcf0c3fba9ef8897c9676c5b70ba0345b84b17.tar.gz |
198 | c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb cobra-0.0.3.tar.gz | 207 | c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb cobra-0.0.3.tar.gz |
199 | db771b9142a7cb0c3e84cc5e2dfd10c4fb11422e6b488d3518eab5f631d39471c0c2b6c64714daf48869e0e3ad8052c69edc5bbfe065611b68d304198fff61a5 docker.initd | 208 | db771b9142a7cb0c3e84cc5e2dfd10c4fb11422e6b488d3518eab5f631d39471c0c2b6c64714daf48869e0e3ad8052c69edc5bbfe065611b68d304198fff61a5 docker.initd |
200 | f25523f43376ccef71a49618e556e0a16db3acad29eb09fe86c4e572562bdea0bc1eabab00159278835ad9d7c007f2cd10b2ed31f7213b0d9074582dc80a976f docker.confd" | 209 | f25523f43376ccef71a49618e556e0a16db3acad29eb09fe86c4e572562bdea0bc1eabab00159278835ad9d7c007f2cd10b2ed31f7213b0d9074582dc80a976f docker.confd |
210 | 2bdc5c226b7ebefe93bbe6b2900c259de43ee1fb49ac527966942b262e72f4ca441fecc7406c6c737f5c9694fc0141ba5e779bc7d269c8e644553efd89862b01 netns-mips64-fork.patch | ||
211 | 89b047fe8379d230572fba120ea8d5784a26467d9239558e77e29a8c1b4bd78d55d12c8fe5969dafd981a551c8c2b640b747fe3c4d89adc438c4a7911ea94aa0 stat-struct-fixes-mips64.patch | ||
212 | 04100dbeb03009beb0f4bdff5f7af481c5668c8e8d2f952603c78a51cb7551b671c980a321b058d2c570cea07e7213b1dab359dedb6907215eff33b7e5181887 configurable_buildmode.patch" | ||
diff --git a/community/docker/configurable_buildmode.patch b/community/docker/configurable_buildmode.patch new file mode 100644 index 0000000000..bc902ba4c2 --- /dev/null +++ b/community/docker/configurable_buildmode.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | diff --git a/components/cli/scripts/build/dynbinary b/components/cli/scripts/build/dynbinary | ||
2 | index 4feb7e7..46d910b 100755 | ||
3 | --- a/components/cli/scripts/build/dynbinary | ||
4 | +++ b/components/cli/scripts/build/dynbinary | ||
5 | @@ -9,6 +9,6 @@ source ./scripts/build/.variables | ||
6 | |||
7 | echo "Building dynamically linked $TARGET" | ||
8 | export CGO_ENABLED=1 | ||
9 | -go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" | ||
10 | +go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=${BUILDMODE:=pie} "${SOURCE}" | ||
11 | |||
12 | ln -sf "$(basename "${TARGET}")" build/docker | ||
diff --git a/community/docker/netns-mips64-fork.patch b/community/docker/netns-mips64-fork.patch new file mode 100644 index 0000000000..8703beb681 --- /dev/null +++ b/community/docker/netns-mips64-fork.patch | |||
@@ -0,0 +1,433 @@ | |||
1 | diff --git a/components/cli/vendor/github.com/docker/docker/vendor.conf b/components/cli/vendor/github.com/docker/docker/vendor.conf | ||
2 | index 6b4df60..581eb63 100644 | ||
3 | --- a/components/cli/vendor/github.com/docker/docker/vendor.conf | ||
4 | +++ b/components/cli/vendor/github.com/docker/docker/vendor.conf | ||
5 | @@ -50,7 +50,7 @@ github.com/hashicorp/go-sockaddr 6d291a969b86c4b633730bfc6b8b | ||
6 | github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e | ||
7 | github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 | ||
8 | github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b | ||
9 | -github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25 | ||
10 | +github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab | ||
11 | github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e | ||
12 | |||
13 | # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly | ||
14 | diff --git a/components/cli/vendor/github.com/moby/buildkit/go.mod b/components/cli/vendor/github.com/moby/buildkit/go.mod | ||
15 | index 0d238c7..41af3ed 100644 | ||
16 | --- a/components/cli/vendor/github.com/moby/buildkit/go.mod | ||
17 | +++ b/components/cli/vendor/github.com/moby/buildkit/go.mod | ||
18 | @@ -59,7 +59,7 @@ require ( | ||
19 | github.com/uber/jaeger-lib v1.2.1 // indirect | ||
20 | github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 | ||
21 | github.com/vishvananda/netlink v1.0.0 // indirect | ||
22 | - github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect | ||
23 | + github.com/jwh/netns v0.0.0-20180720170159-13995c7128cc // indirect | ||
24 | go.etcd.io/bbolt v1.3.2 | ||
25 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 | ||
26 | golang.org/x/net v0.0.0-20190311183353-d8887717615a | ||
27 | diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf | ||
28 | index 8d1b34d..1cf4256 100644 | ||
29 | --- a/components/engine/vendor.conf | ||
30 | +++ b/components/engine/vendor.conf | ||
31 | @@ -50,7 +50,7 @@ github.com/hashicorp/go-sockaddr c7188e74f6acae5a989bdc959aa7 | ||
32 | github.com/hashicorp/go-multierror 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0 | ||
33 | github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 | ||
34 | github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b | ||
35 | -github.com/vishvananda/netns 7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0 | ||
36 | +github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab | ||
37 | github.com/vishvananda/netlink a2ad57a690f3caf3015351d2d6e1c0b95c349752 | ||
38 | |||
39 | # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly | ||
40 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_network.go b/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_network.go | ||
41 | index 4009df8..05473db 100644 | ||
42 | --- a/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_network.go | ||
43 | +++ b/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_network.go | ||
44 | @@ -25,7 +25,7 @@ import ( | ||
45 | "github.com/sirupsen/logrus" | ||
46 | "github.com/vishvananda/netlink" | ||
47 | "github.com/vishvananda/netlink/nl" | ||
48 | - "github.com/vishvananda/netns" | ||
49 | + "github.com/jwh/netns" | ||
50 | "golang.org/x/sys/unix" | ||
51 | ) | ||
52 | |||
53 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_utils.go b/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_utils.go | ||
54 | index 7338ea9..f020016 100644 | ||
55 | --- a/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_utils.go | ||
56 | +++ b/components/engine/vendor/github.com/docker/libnetwork/drivers/overlay/ov_utils.go | ||
57 | @@ -11,7 +11,7 @@ import ( | ||
58 | "github.com/docker/libnetwork/osl" | ||
59 | "github.com/sirupsen/logrus" | ||
60 | "github.com/vishvananda/netlink" | ||
61 | - "github.com/vishvananda/netns" | ||
62 | + "github.com/jwh/netns" | ||
63 | ) | ||
64 | |||
65 | var soTimeout = ns.NetlinkSocketsTimeout | ||
66 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go b/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go | ||
67 | index 61b6f0a..46d635f 100644 | ||
68 | --- a/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go | ||
69 | +++ b/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go | ||
70 | @@ -8,7 +8,7 @@ import ( | ||
71 | "time" | ||
72 | |||
73 | "github.com/vishvananda/netlink/nl" | ||
74 | - "github.com/vishvananda/netns" | ||
75 | + "github.com/jwh/netns" | ||
76 | "golang.org/x/sys/unix" | ||
77 | ) | ||
78 | |||
79 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go b/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go | ||
80 | index 7673659..950046c 100644 | ||
81 | --- a/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go | ||
82 | +++ b/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go | ||
83 | @@ -17,7 +17,7 @@ import ( | ||
84 | |||
85 | "github.com/sirupsen/logrus" | ||
86 | "github.com/vishvananda/netlink/nl" | ||
87 | - "github.com/vishvananda/netns" | ||
88 | + "github.com/jwh/netns" | ||
89 | ) | ||
90 | |||
91 | // For Quick Reference IPVS related netlink message is described at the end of this file. | ||
92 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go b/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go | ||
93 | index 1d08a02..e3c7ff3 100644 | ||
94 | --- a/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go | ||
95 | +++ b/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go | ||
96 | @@ -11,7 +11,7 @@ import ( | ||
97 | |||
98 | "github.com/sirupsen/logrus" | ||
99 | "github.com/vishvananda/netlink" | ||
100 | - "github.com/vishvananda/netns" | ||
101 | + "github.com/jwh/netns" | ||
102 | ) | ||
103 | |||
104 | var ( | ||
105 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go b/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go | ||
106 | index 4f8ff3d..11d79b0 100644 | ||
107 | --- a/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go | ||
108 | +++ b/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go | ||
109 | @@ -12,7 +12,7 @@ import ( | ||
110 | "github.com/docker/libnetwork/types" | ||
111 | "github.com/sirupsen/logrus" | ||
112 | "github.com/vishvananda/netlink" | ||
113 | - "github.com/vishvananda/netns" | ||
114 | + "github.com/jwh/netns" | ||
115 | ) | ||
116 | |||
117 | // IfaceOption is a function option type to set interface options | ||
118 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go b/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go | ||
119 | index ed44311..cfa675b 100644 | ||
120 | --- a/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go | ||
121 | +++ b/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go | ||
122 | @@ -20,7 +20,7 @@ import ( | ||
123 | "github.com/docker/libnetwork/types" | ||
124 | "github.com/sirupsen/logrus" | ||
125 | "github.com/vishvananda/netlink" | ||
126 | - "github.com/vishvananda/netns" | ||
127 | + "github.com/jwh/netns" | ||
128 | ) | ||
129 | |||
130 | const defaultPrefix = "/var/run/docker" | ||
131 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go b/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go | ||
132 | index f4e4ad6..d27a64d 100644 | ||
133 | --- a/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go | ||
134 | +++ b/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go | ||
135 | @@ -12,7 +12,7 @@ import ( | ||
136 | "github.com/docker/docker/pkg/reexec" | ||
137 | "github.com/docker/libnetwork/iptables" | ||
138 | "github.com/sirupsen/logrus" | ||
139 | - "github.com/vishvananda/netns" | ||
140 | + "github.com/jwh/netns" | ||
141 | ) | ||
142 | |||
143 | func init() { | ||
144 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/service_linux.go b/components/engine/vendor/github.com/docker/libnetwork/service_linux.go | ||
145 | index 451f760..7dcbddf 100644 | ||
146 | --- a/components/engine/vendor/github.com/docker/libnetwork/service_linux.go | ||
147 | +++ b/components/engine/vendor/github.com/docker/libnetwork/service_linux.go | ||
148 | @@ -22,7 +22,7 @@ import ( | ||
149 | "github.com/ishidawataru/sctp" | ||
150 | "github.com/sirupsen/logrus" | ||
151 | "github.com/vishvananda/netlink/nl" | ||
152 | - "github.com/vishvananda/netns" | ||
153 | + "github.com/jwh/netns" | ||
154 | ) | ||
155 | |||
156 | func init() { | ||
157 | diff --git a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf | ||
158 | index 78b8379..a125199 100644 | ||
159 | --- a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf | ||
160 | +++ b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf | ||
161 | @@ -43,7 +43,7 @@ github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374 | ||
162 | github.com/sirupsen/logrus f006c2ac4710855cf0f916dd6b77acf6b048dc6e # v1.0.3 | ||
163 | github.com/ugorji/go b4c50a2b199d93b13dc15e78929cfb23bfdf21ab # v1.1.1 | ||
164 | github.com/vishvananda/netlink a2ad57a690f3caf3015351d2d6e1c0b95c349752 # v1.0.0 | ||
165 | -github.com/vishvananda/netns 7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0 | ||
166 | +github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab | ||
167 | golang.org/x/crypto b7391e95e576cacdcdd422573063bc057239113d | ||
168 | golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1 | ||
169 | golang.org/x/sys d455e41777fca6e8a5a79e34a14b8368bc11d9ba | ||
170 | diff --git a/components/engine/vendor/github.com/vishvananda/netns/LICENSE b/components/engine/vendor/github.com/jwh/netns/LICENSE | ||
171 | similarity index 100% | ||
172 | rename from components/engine/vendor/github.com/vishvananda/netns/LICENSE | ||
173 | rename to components/engine/vendor/github.com/jwh/netns/LICENSE | ||
174 | diff --git a/components/engine/vendor/github.com/vishvananda/netns/README.md b/components/engine/vendor/github.com/jwh/netns/README.md | ||
175 | similarity index 88% | ||
176 | rename from components/engine/vendor/github.com/vishvananda/netns/README.md | ||
177 | rename to components/engine/vendor/github.com/jwh/netns/README.md | ||
178 | index 6b45cfb..61e3ee4 100644 | ||
179 | --- a/components/engine/vendor/github.com/vishvananda/netns/README.md | ||
180 | +++ b/components/engine/vendor/github.com/jwh/netns/README.md | ||
181 | @@ -8,11 +8,11 @@ privileges, so in most cases this code needs to be run as root. | ||
182 | |||
183 | You can use go get command: | ||
184 | |||
185 | - go get github.com/vishvananda/netns | ||
186 | + go get github.com/jwh/netns | ||
187 | |||
188 | Testing (requires root): | ||
189 | |||
190 | - sudo -E go test github.com/vishvananda/netns | ||
191 | + sudo -E go test github.com/jwh/netns | ||
192 | |||
193 | ## Example ## | ||
194 | |||
195 | @@ -23,7 +23,7 @@ import ( | ||
196 | "fmt" | ||
197 | "net" | ||
198 | "runtime" | ||
199 | - "github.com/vishvananda/netns" | ||
200 | + "github.com/jwh/netns" | ||
201 | ) | ||
202 | |||
203 | func main() { | ||
204 | diff --git a/components/engine/vendor/github.com/jwh/netns/go.mod b/components/engine/vendor/github.com/jwh/netns/go.mod | ||
205 | new file mode 100644 | ||
206 | index 0000000..d6aabc4 | ||
207 | --- /dev/null | ||
208 | +++ b/components/engine/vendor/github.com/jwh/netns/go.mod | ||
209 | @@ -0,0 +1,3 @@ | ||
210 | +module github.com/jwh/netns | ||
211 | + | ||
212 | +go 1.12 | ||
213 | diff --git a/components/engine/vendor/github.com/jwh/netns/go.sum b/components/engine/vendor/github.com/jwh/netns/go.sum | ||
214 | new file mode 100644 | ||
215 | index 0000000..e69de29 | ||
216 | diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns.go b/components/engine/vendor/github.com/jwh/netns/netns.go | ||
217 | similarity index 100% | ||
218 | rename from components/engine/vendor/github.com/vishvananda/netns/netns.go | ||
219 | rename to components/engine/vendor/github.com/jwh/netns/netns.go | ||
220 | diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns_linux.go b/components/engine/vendor/github.com/jwh/netns/netns_linux.go | ||
221 | similarity index 98% | ||
222 | rename from components/engine/vendor/github.com/vishvananda/netns/netns_linux.go | ||
223 | rename to components/engine/vendor/github.com/jwh/netns/netns_linux.go | ||
224 | index b1e3b07..66b5c1c 100644 | ||
225 | --- a/components/engine/vendor/github.com/vishvananda/netns/netns_linux.go | ||
226 | +++ b/components/engine/vendor/github.com/jwh/netns/netns_linux.go | ||
227 | @@ -19,9 +19,10 @@ var SYS_SETNS = map[string]uintptr{ | ||
228 | "amd64": 308, | ||
229 | "arm64": 268, | ||
230 | "arm": 375, | ||
231 | - "mips": 4344, | ||
232 | - "mipsle": 4344, | ||
233 | - "mips64le": 4344, | ||
234 | + "mips": 5303, | ||
235 | + "mipsle": 5303, | ||
236 | + "mips64": 5303, | ||
237 | + "mips64le": 5303, | ||
238 | "ppc64": 350, | ||
239 | "ppc64le": 350, | ||
240 | "riscv64": 268, | ||
241 | diff --git a/components/engine/vendor/github.com/jwh/netns/netns_test.go b/components/engine/vendor/github.com/jwh/netns/netns_test.go | ||
242 | new file mode 100644 | ||
243 | index 0000000..e51981c | ||
244 | --- /dev/null | ||
245 | +++ b/components/engine/vendor/github.com/jwh/netns/netns_test.go | ||
246 | @@ -0,0 +1,66 @@ | ||
247 | +package netns | ||
248 | + | ||
249 | +import ( | ||
250 | + "runtime" | ||
251 | + "sync" | ||
252 | + "testing" | ||
253 | +) | ||
254 | + | ||
255 | +func TestGetNewSetDelete(t *testing.T) { | ||
256 | + runtime.LockOSThread() | ||
257 | + defer runtime.UnlockOSThread() | ||
258 | + | ||
259 | + origns, err := Get() | ||
260 | + if err != nil { | ||
261 | + t.Fatal(err) | ||
262 | + } | ||
263 | + newns, err := New() | ||
264 | + if err != nil { | ||
265 | + t.Fatal(err) | ||
266 | + } | ||
267 | + if origns.Equal(newns) { | ||
268 | + t.Fatal("New ns failed") | ||
269 | + } | ||
270 | + if err := Set(origns); err != nil { | ||
271 | + t.Fatal(err) | ||
272 | + } | ||
273 | + newns.Close() | ||
274 | + if newns.IsOpen() { | ||
275 | + t.Fatal("newns still open after close", newns) | ||
276 | + } | ||
277 | + ns, err := Get() | ||
278 | + if err != nil { | ||
279 | + t.Fatal(err) | ||
280 | + } | ||
281 | + if !ns.Equal(origns) { | ||
282 | + t.Fatal("Reset ns failed", origns, newns, ns) | ||
283 | + } | ||
284 | +} | ||
285 | + | ||
286 | +func TestNone(t *testing.T) { | ||
287 | + ns := None() | ||
288 | + if ns.IsOpen() { | ||
289 | + t.Fatal("None ns is open", ns) | ||
290 | + } | ||
291 | +} | ||
292 | + | ||
293 | +func TestThreaded(t *testing.T) { | ||
294 | + ncpu := runtime.GOMAXPROCS(-1) | ||
295 | + if ncpu < 2 { | ||
296 | + t.Skip("-cpu=2 or larger required") | ||
297 | + } | ||
298 | + | ||
299 | + // Lock this thread simply to ensure other threads get used. | ||
300 | + runtime.LockOSThread() | ||
301 | + defer runtime.UnlockOSThread() | ||
302 | + | ||
303 | + wg := &sync.WaitGroup{} | ||
304 | + for i := 0; i < ncpu; i++ { | ||
305 | + wg.Add(1) | ||
306 | + go func() { | ||
307 | + defer wg.Done() | ||
308 | + TestGetNewSetDelete(t) | ||
309 | + }() | ||
310 | + } | ||
311 | + wg.Wait() | ||
312 | +} | ||
313 | diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns_unspecified.go b/components/engine/vendor/github.com/jwh/netns/netns_unspecified.go | ||
314 | similarity index 100% | ||
315 | rename from components/engine/vendor/github.com/vishvananda/netns/netns_unspecified.go | ||
316 | rename to components/engine/vendor/github.com/jwh/netns/netns_unspecified.go | ||
317 | diff --git a/components/engine/vendor/github.com/moby/buildkit/go.mod b/components/engine/vendor/github.com/moby/buildkit/go.mod | ||
318 | index cf1c7d6..c501e9d 100644 | ||
319 | --- a/components/engine/vendor/github.com/moby/buildkit/go.mod | ||
320 | +++ b/components/engine/vendor/github.com/moby/buildkit/go.mod | ||
321 | @@ -60,7 +60,7 @@ require ( | ||
322 | github.com/uber/jaeger-lib v1.2.1 // indirect | ||
323 | github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 | ||
324 | github.com/vishvananda/netlink v1.0.0 // indirect | ||
325 | - github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect | ||
326 | + github.com/jwh/netns v0.0.0-20180720170159-13995c7128cc // indirect | ||
327 | go.etcd.io/bbolt v1.3.2 | ||
328 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 | ||
329 | golang.org/x/net v0.0.0-20190311183353-d8887717615a | ||
330 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/README.md b/components/engine/vendor/github.com/vishvananda/netlink/README.md | ||
331 | index a88e2f4..863594a 100644 | ||
332 | --- a/components/engine/vendor/github.com/vishvananda/netlink/README.md | ||
333 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/README.md | ||
334 | @@ -24,7 +24,7 @@ You can use go get command: | ||
335 | |||
336 | Testing dependencies: | ||
337 | |||
338 | - go get github.com/vishvananda/netns | ||
339 | + go get github.com/jwh/netns | ||
340 | |||
341 | Testing (requires root): | ||
342 | |||
343 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go | ||
344 | index d59c328..757b58b 100644 | ||
345 | --- a/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go | ||
346 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go | ||
347 | @@ -7,7 +7,7 @@ import ( | ||
348 | "syscall" | ||
349 | |||
350 | "github.com/vishvananda/netlink/nl" | ||
351 | - "github.com/vishvananda/netns" | ||
352 | + "github.com/jwh/netns" | ||
353 | "golang.org/x/sys/unix" | ||
354 | ) | ||
355 | |||
356 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go | ||
357 | index 9f6d7fe..1485a95 100644 | ||
358 | --- a/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go | ||
359 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go | ||
360 | @@ -5,7 +5,7 @@ import ( | ||
361 | "time" | ||
362 | |||
363 | "github.com/vishvananda/netlink/nl" | ||
364 | - "github.com/vishvananda/netns" | ||
365 | + "github.com/jwh/netns" | ||
366 | "golang.org/x/sys/unix" | ||
367 | ) | ||
368 | |||
369 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go b/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go | ||
370 | index 915b765..8fc0363 100644 | ||
371 | --- a/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go | ||
372 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go | ||
373 | @@ -6,7 +6,7 @@ import ( | ||
374 | "net" | ||
375 | "time" | ||
376 | |||
377 | - "github.com/vishvananda/netns" | ||
378 | + "github.com/jwh/netns" | ||
379 | ) | ||
380 | |||
381 | type Handle struct{} | ||
382 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go | ||
383 | index 540191e..da86410 100644 | ||
384 | --- a/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go | ||
385 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go | ||
386 | @@ -10,7 +10,7 @@ import ( | ||
387 | "unsafe" | ||
388 | |||
389 | "github.com/vishvananda/netlink/nl" | ||
390 | - "github.com/vishvananda/netns" | ||
391 | + "github.com/jwh/netns" | ||
392 | "golang.org/x/sys/unix" | ||
393 | ) | ||
394 | |||
395 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go | ||
396 | index bc8e82c..f2ffeb1 100644 | ||
397 | --- a/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go | ||
398 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go | ||
399 | @@ -12,7 +12,7 @@ import ( | ||
400 | "syscall" | ||
401 | "unsafe" | ||
402 | |||
403 | - "github.com/vishvananda/netns" | ||
404 | + "github.com/jwh/netns" | ||
405 | "golang.org/x/sys/unix" | ||
406 | ) | ||
407 | |||
408 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go | ||
409 | index 3f85671..177002f 100644 | ||
410 | --- a/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go | ||
411 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go | ||
412 | @@ -7,7 +7,7 @@ import ( | ||
413 | "syscall" | ||
414 | |||
415 | "github.com/vishvananda/netlink/nl" | ||
416 | - "github.com/vishvananda/netns" | ||
417 | + "github.com/jwh/netns" | ||
418 | "golang.org/x/sys/unix" | ||
419 | ) | ||
420 | |||
421 | diff --git a/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go | ||
422 | index efe72dd..42ae754 100644 | ||
423 | --- a/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go | ||
424 | +++ b/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go | ||
425 | @@ -4,7 +4,7 @@ import ( | ||
426 | "fmt" | ||
427 | |||
428 | "github.com/vishvananda/netlink/nl" | ||
429 | - "github.com/vishvananda/netns" | ||
430 | + "github.com/jwh/netns" | ||
431 | "golang.org/x/sys/unix" | ||
432 | ) | ||
433 | |||
diff --git a/community/docker/stat-struct-fixes-mips64.patch b/community/docker/stat-struct-fixes-mips64.patch new file mode 100644 index 0000000000..f9f7f4fd49 --- /dev/null +++ b/community/docker/stat-struct-fixes-mips64.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/docker-ce-19.03.8/components/cli/vendor/github.com/docker/docker/pkg/system/stat_linux.go b/docker-ce-19.03.8/components/cli/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
2 | index 98c9eb1..8a090a5 100644 | ||
3 | --- a/components/cli/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
4 | +++ b/components/cli/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
5 | @@ -8,7 +8,7 @@ func fromStatT(s *syscall.Stat_t) (*StatT, error) { | ||
6 | mode: s.Mode, | ||
7 | uid: s.Uid, | ||
8 | gid: s.Gid, | ||
9 | - rdev: s.Rdev, | ||
10 | + rdev: uint64(s.Rdev), | ||
11 | mtim: s.Mtim}, nil | ||
12 | } | ||
13 | |||