aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker/netns-mips64-fork.patch
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-05-27 22:10:27 +0000
committerAriadne Conill <ariadne@dereferenced.org>2020-05-27 22:10:27 +0000
commit5fb44497ae3a81502ee6e3ab967f4199e2c52177 (patch)
tree1bed96ffc10bbb376efaceeb97eac21d2536d484 /community/docker/netns-mips64-fork.patch
parent462830307ae011ba094533126675d013ea60ae5d (diff)
downloadaports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.tar.gz
aports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.tar.bz2
aports-5fb44497ae3a81502ee6e3ab967f4199e2c52177.tar.xz
community/docker: fix compilation on mips64
Diffstat (limited to 'community/docker/netns-mips64-fork.patch')
-rw-r--r--community/docker/netns-mips64-fork.patch433
1 files changed, 433 insertions, 0 deletions
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 @@
+diff --git a/components/cli/vendor/github.com/docker/docker/vendor.conf b/components/cli/vendor/github.com/docker/docker/vendor.conf
+index 6b4df60..581eb63 100644
+--- a/components/cli/vendor/github.com/docker/docker/vendor.conf
++++ b/components/cli/vendor/github.com/docker/docker/vendor.conf
+@@ -50,7 +50,7 @@ github.com/hashicorp/go-sockaddr 6d291a969b86c4b633730bfc6b8b
+ github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e
+ github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870
+ github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b
+-github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25
++github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab
+ github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e
+
+ # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly
+diff --git a/components/cli/vendor/github.com/moby/buildkit/go.mod b/components/cli/vendor/github.com/moby/buildkit/go.mod
+index 0d238c7..41af3ed 100644
+--- a/components/cli/vendor/github.com/moby/buildkit/go.mod
++++ b/components/cli/vendor/github.com/moby/buildkit/go.mod
+@@ -59,7 +59,7 @@ require (
+ github.com/uber/jaeger-lib v1.2.1 // indirect
+ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5
+ github.com/vishvananda/netlink v1.0.0 // indirect
+- github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect
++ github.com/jwh/netns v0.0.0-20180720170159-13995c7128cc // indirect
+ go.etcd.io/bbolt v1.3.2
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
+ golang.org/x/net v0.0.0-20190311183353-d8887717615a
+diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf
+index 8d1b34d..1cf4256 100644
+--- a/components/engine/vendor.conf
++++ b/components/engine/vendor.conf
+@@ -50,7 +50,7 @@ github.com/hashicorp/go-sockaddr c7188e74f6acae5a989bdc959aa7
+ github.com/hashicorp/go-multierror 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0
+ github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870
+ github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b
+-github.com/vishvananda/netns 7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0
++github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab
+ github.com/vishvananda/netlink a2ad57a690f3caf3015351d2d6e1c0b95c349752
+
+ # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly
+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
+index 4009df8..05473db 100644
+--- 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
+@@ -25,7 +25,7 @@ import (
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink"
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+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
+index 7338ea9..f020016 100644
+--- 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
+@@ -11,7 +11,7 @@ import (
+ "github.com/docker/libnetwork/osl"
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ var soTimeout = ns.NetlinkSocketsTimeout
+diff --git a/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go b/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go
+index 61b6f0a..46d635f 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/ipvs/ipvs.go
+@@ -8,7 +8,7 @@ import (
+ "time"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+diff --git a/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go b/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go
+index 7673659..950046c 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/ipvs/netlink.go
+@@ -17,7 +17,7 @@ import (
+
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ // For Quick Reference IPVS related netlink message is described at the end of this file.
+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
+index 1d08a02..e3c7ff3 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/ns/init_linux.go
+@@ -11,7 +11,7 @@ import (
+
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ var (
+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
+index 4f8ff3d..11d79b0 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/osl/interface_linux.go
+@@ -12,7 +12,7 @@ import (
+ "github.com/docker/libnetwork/types"
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ // IfaceOption is a function option type to set interface options
+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
+index ed44311..cfa675b 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/osl/namespace_linux.go
+@@ -20,7 +20,7 @@ import (
+ "github.com/docker/libnetwork/types"
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ const defaultPrefix = "/var/run/docker"
+diff --git a/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go b/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go
+index f4e4ad6..d27a64d 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/resolver_unix.go
+@@ -12,7 +12,7 @@ import (
+ "github.com/docker/docker/pkg/reexec"
+ "github.com/docker/libnetwork/iptables"
+ "github.com/sirupsen/logrus"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ func init() {
+diff --git a/components/engine/vendor/github.com/docker/libnetwork/service_linux.go b/components/engine/vendor/github.com/docker/libnetwork/service_linux.go
+index 451f760..7dcbddf 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/service_linux.go
++++ b/components/engine/vendor/github.com/docker/libnetwork/service_linux.go
+@@ -22,7 +22,7 @@ import (
+ "github.com/ishidawataru/sctp"
+ "github.com/sirupsen/logrus"
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ func init() {
+diff --git a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf
+index 78b8379..a125199 100644
+--- a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf
++++ b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf
+@@ -43,7 +43,7 @@ github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374
+ github.com/sirupsen/logrus f006c2ac4710855cf0f916dd6b77acf6b048dc6e # v1.0.3
+ github.com/ugorji/go b4c50a2b199d93b13dc15e78929cfb23bfdf21ab # v1.1.1
+ github.com/vishvananda/netlink a2ad57a690f3caf3015351d2d6e1c0b95c349752 # v1.0.0
+-github.com/vishvananda/netns 7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0
++github.com/jwh/netns efc5872c2d476c2ff4e40ce79497146e9af02bab
+ golang.org/x/crypto b7391e95e576cacdcdd422573063bc057239113d
+ golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1
+ golang.org/x/sys d455e41777fca6e8a5a79e34a14b8368bc11d9ba
+diff --git a/components/engine/vendor/github.com/vishvananda/netns/LICENSE b/components/engine/vendor/github.com/jwh/netns/LICENSE
+similarity index 100%
+rename from components/engine/vendor/github.com/vishvananda/netns/LICENSE
+rename to components/engine/vendor/github.com/jwh/netns/LICENSE
+diff --git a/components/engine/vendor/github.com/vishvananda/netns/README.md b/components/engine/vendor/github.com/jwh/netns/README.md
+similarity index 88%
+rename from components/engine/vendor/github.com/vishvananda/netns/README.md
+rename to components/engine/vendor/github.com/jwh/netns/README.md
+index 6b45cfb..61e3ee4 100644
+--- a/components/engine/vendor/github.com/vishvananda/netns/README.md
++++ b/components/engine/vendor/github.com/jwh/netns/README.md
+@@ -8,11 +8,11 @@ privileges, so in most cases this code needs to be run as root.
+
+ You can use go get command:
+
+- go get github.com/vishvananda/netns
++ go get github.com/jwh/netns
+
+ Testing (requires root):
+
+- sudo -E go test github.com/vishvananda/netns
++ sudo -E go test github.com/jwh/netns
+
+ ## Example ##
+
+@@ -23,7 +23,7 @@ import (
+ "fmt"
+ "net"
+ "runtime"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ func main() {
+diff --git a/components/engine/vendor/github.com/jwh/netns/go.mod b/components/engine/vendor/github.com/jwh/netns/go.mod
+new file mode 100644
+index 0000000..d6aabc4
+--- /dev/null
++++ b/components/engine/vendor/github.com/jwh/netns/go.mod
+@@ -0,0 +1,3 @@
++module github.com/jwh/netns
++
++go 1.12
+diff --git a/components/engine/vendor/github.com/jwh/netns/go.sum b/components/engine/vendor/github.com/jwh/netns/go.sum
+new file mode 100644
+index 0000000..e69de29
+diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns.go b/components/engine/vendor/github.com/jwh/netns/netns.go
+similarity index 100%
+rename from components/engine/vendor/github.com/vishvananda/netns/netns.go
+rename to components/engine/vendor/github.com/jwh/netns/netns.go
+diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns_linux.go b/components/engine/vendor/github.com/jwh/netns/netns_linux.go
+similarity index 98%
+rename from components/engine/vendor/github.com/vishvananda/netns/netns_linux.go
+rename to components/engine/vendor/github.com/jwh/netns/netns_linux.go
+index b1e3b07..66b5c1c 100644
+--- a/components/engine/vendor/github.com/vishvananda/netns/netns_linux.go
++++ b/components/engine/vendor/github.com/jwh/netns/netns_linux.go
+@@ -19,9 +19,10 @@ var SYS_SETNS = map[string]uintptr{
+ "amd64": 308,
+ "arm64": 268,
+ "arm": 375,
+- "mips": 4344,
+- "mipsle": 4344,
+- "mips64le": 4344,
++ "mips": 5303,
++ "mipsle": 5303,
++ "mips64": 5303,
++ "mips64le": 5303,
+ "ppc64": 350,
+ "ppc64le": 350,
+ "riscv64": 268,
+diff --git a/components/engine/vendor/github.com/jwh/netns/netns_test.go b/components/engine/vendor/github.com/jwh/netns/netns_test.go
+new file mode 100644
+index 0000000..e51981c
+--- /dev/null
++++ b/components/engine/vendor/github.com/jwh/netns/netns_test.go
+@@ -0,0 +1,66 @@
++package netns
++
++import (
++ "runtime"
++ "sync"
++ "testing"
++)
++
++func TestGetNewSetDelete(t *testing.T) {
++ runtime.LockOSThread()
++ defer runtime.UnlockOSThread()
++
++ origns, err := Get()
++ if err != nil {
++ t.Fatal(err)
++ }
++ newns, err := New()
++ if err != nil {
++ t.Fatal(err)
++ }
++ if origns.Equal(newns) {
++ t.Fatal("New ns failed")
++ }
++ if err := Set(origns); err != nil {
++ t.Fatal(err)
++ }
++ newns.Close()
++ if newns.IsOpen() {
++ t.Fatal("newns still open after close", newns)
++ }
++ ns, err := Get()
++ if err != nil {
++ t.Fatal(err)
++ }
++ if !ns.Equal(origns) {
++ t.Fatal("Reset ns failed", origns, newns, ns)
++ }
++}
++
++func TestNone(t *testing.T) {
++ ns := None()
++ if ns.IsOpen() {
++ t.Fatal("None ns is open", ns)
++ }
++}
++
++func TestThreaded(t *testing.T) {
++ ncpu := runtime.GOMAXPROCS(-1)
++ if ncpu < 2 {
++ t.Skip("-cpu=2 or larger required")
++ }
++
++ // Lock this thread simply to ensure other threads get used.
++ runtime.LockOSThread()
++ defer runtime.UnlockOSThread()
++
++ wg := &sync.WaitGroup{}
++ for i := 0; i < ncpu; i++ {
++ wg.Add(1)
++ go func() {
++ defer wg.Done()
++ TestGetNewSetDelete(t)
++ }()
++ }
++ wg.Wait()
++}
+diff --git a/components/engine/vendor/github.com/vishvananda/netns/netns_unspecified.go b/components/engine/vendor/github.com/jwh/netns/netns_unspecified.go
+similarity index 100%
+rename from components/engine/vendor/github.com/vishvananda/netns/netns_unspecified.go
+rename to components/engine/vendor/github.com/jwh/netns/netns_unspecified.go
+diff --git a/components/engine/vendor/github.com/moby/buildkit/go.mod b/components/engine/vendor/github.com/moby/buildkit/go.mod
+index cf1c7d6..c501e9d 100644
+--- a/components/engine/vendor/github.com/moby/buildkit/go.mod
++++ b/components/engine/vendor/github.com/moby/buildkit/go.mod
+@@ -60,7 +60,7 @@ require (
+ github.com/uber/jaeger-lib v1.2.1 // indirect
+ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5
+ github.com/vishvananda/netlink v1.0.0 // indirect
+- github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect
++ github.com/jwh/netns v0.0.0-20180720170159-13995c7128cc // indirect
+ go.etcd.io/bbolt v1.3.2
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
+ golang.org/x/net v0.0.0-20190311183353-d8887717615a
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/README.md b/components/engine/vendor/github.com/vishvananda/netlink/README.md
+index a88e2f4..863594a 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/README.md
++++ b/components/engine/vendor/github.com/vishvananda/netlink/README.md
+@@ -24,7 +24,7 @@ You can use go get command:
+
+ Testing dependencies:
+
+- go get github.com/vishvananda/netns
++ go get github.com/jwh/netns
+
+ Testing (requires root):
+
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go
+index d59c328..757b58b 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/addr_linux.go
+@@ -7,7 +7,7 @@ import (
+ "syscall"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go
+index 9f6d7fe..1485a95 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/handle_linux.go
+@@ -5,7 +5,7 @@ import (
+ "time"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go b/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go
+index 915b765..8fc0363 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/handle_unspecified.go
+@@ -6,7 +6,7 @@ import (
+ "net"
+ "time"
+
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ )
+
+ type Handle struct{}
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go
+index 540191e..da86410 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/link_linux.go
+@@ -10,7 +10,7 @@ import (
+ "unsafe"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+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
+index bc8e82c..f2ffeb1 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/nl/nl_linux.go
+@@ -12,7 +12,7 @@ import (
+ "syscall"
+ "unsafe"
+
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+diff --git a/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go b/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go
+index 3f85671..177002f 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/route_linux.go
+@@ -7,7 +7,7 @@ import (
+ "syscall"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+
+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
+index efe72dd..42ae754 100644
+--- a/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go
++++ b/components/engine/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go
+@@ -4,7 +4,7 @@ import (
+ "fmt"
+
+ "github.com/vishvananda/netlink/nl"
+- "github.com/vishvananda/netns"
++ "github.com/jwh/netns"
+ "golang.org/x/sys/unix"
+ )
+