From 8c7eb58453870f380a077c7cfd8dafa97bb8e13f Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Fri, 3 Jan 2020 02:34:33 +0100 Subject: gnu: docker: Update to 19.03.5. * gnu/packages/docker.scm (docker-cli): Update to 19.03.5. (docker)[source]: Remove patches. [arguments]<#:phases>[patch-paths]: Modify. [native-inputs]: Add gotestsum. * gnu/packages/patches/docker-adjust-tests-for-changes-in-go.patch: Delete file. * gnu/packages/patches/docker-engine-test-noinstall.patch: Delete file. * gnu/packages/patches/docker-use-fewer-modprobes.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove them. --- .../docker-adjust-tests-for-changes-in-go.patch | 67 ---------- .../patches/docker-engine-test-noinstall.patch | 23 ---- .../patches/docker-use-fewer-modprobes.patch | 137 --------------------- 3 files changed, 227 deletions(-) delete mode 100644 gnu/packages/patches/docker-adjust-tests-for-changes-in-go.patch delete mode 100644 gnu/packages/patches/docker-engine-test-noinstall.patch delete mode 100644 gnu/packages/patches/docker-use-fewer-modprobes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/docker-adjust-tests-for-changes-in-go.patch b/gnu/packages/patches/docker-adjust-tests-for-changes-in-go.patch deleted file mode 100644 index 82d92cd4de..0000000000 --- a/gnu/packages/patches/docker-adjust-tests-for-changes-in-go.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 4983ef7c1693ad6dfbe4e3809b12541241d7ff56 Mon Sep 17 00:00:00 2001 -From: Sebastiaan van Stijn -Date: Wed, 14 Aug 2019 02:51:08 +0200 -Subject: [PATCH] Adjust tests for changes in Go 1.12.8 / 1.11.13 - -``` -00:38:11 === Failed -00:38:11 === FAIL: opts TestParseDockerDaemonHost (0.00s) -00:38:11 hosts_test.go:87: tcp tcp:a.b.c.d address expected error "Invalid bind address format: tcp:a.b.c.d" return, got "parse tcp://tcp:a.b.c.d: invalid port \":a.b.c.d\" after host" and addr -00:38:11 hosts_test.go:87: tcp tcp:a.b.c.d/path address expected error "Invalid bind address format: tcp:a.b.c.d/path" return, got "parse tcp://tcp:a.b.c.d/path: invalid port \":a.b.c.d\" after host" and addr -00:38:11 -00:38:11 === FAIL: opts TestParseTCP (0.00s) -00:38:11 hosts_test.go:129: tcp tcp:a.b.c.d address expected error Invalid bind address format: tcp:a.b.c.d return, got parse tcp://tcp:a.b.c.d: invalid port ":a.b.c.d" after host and addr -00:38:11 hosts_test.go:129: tcp tcp:a.b.c.d/path address expected error Invalid bind address format: tcp:a.b.c.d/path return, got parse tcp://tcp:a.b.c.d/path: invalid port ":a.b.c.d" after host and addr -``` - -Signed-off-by: Sebastiaan van Stijn -Upstream-commit: 683766613a8c1dca8f95b19ddb7e083bb3aef266 -Component: engine ---- - opts/hosts_test.go | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/opts/hosts_test.go b/opts/hosts_test.go -index 8c54ec0f4b..7a0a943adf 100644 ---- a/opts/hosts_test.go -+++ b/opts/hosts_test.go -@@ -53,8 +53,8 @@ func TestParseHost(t *testing.T) { - func TestParseDockerDaemonHost(t *testing.T) { - invalids := map[string]string{ - -- "tcp:a.b.c.d": "Invalid bind address format: tcp:a.b.c.d", -- "tcp:a.b.c.d/path": "Invalid bind address format: tcp:a.b.c.d/path", -+ "tcp:a.b.c.d": "", -+ "tcp:a.b.c.d/path": "", - "udp://127.0.0.1": "Invalid bind address format: udp://127.0.0.1", - "udp://127.0.0.1:2375": "Invalid bind address format: udp://127.0.0.1:2375", - "tcp://unix:///run/docker.sock": "Invalid proto, expected tcp: unix:///run/docker.sock", -@@ -83,7 +83,7 @@ func TestParseDockerDaemonHost(t *testing.T) { - "localhost:5555/path": "tcp://localhost:5555/path", - } - for invalidAddr, expectedError := range invalids { -- if addr, err := parseDaemonHost(invalidAddr); err == nil || err.Error() != expectedError { -+ if addr, err := parseDaemonHost(invalidAddr); err == nil || expectedError != "" && err.Error() != expectedError { - t.Errorf("tcp %v address expected error %q return, got %q and addr %v", invalidAddr, expectedError, err, addr) - } - } -@@ -99,8 +99,8 @@ func TestParseTCP(t *testing.T) { - defaultHTTPHost = "tcp://127.0.0.1:2376" - ) - invalids := map[string]string{ -- "tcp:a.b.c.d": "Invalid bind address format: tcp:a.b.c.d", -- "tcp:a.b.c.d/path": "Invalid bind address format: tcp:a.b.c.d/path", -+ "tcp:a.b.c.d": "", -+ "tcp:a.b.c.d/path": "", - "udp://127.0.0.1": "Invalid proto, expected tcp: udp://127.0.0.1", - "udp://127.0.0.1:2375": "Invalid proto, expected tcp: udp://127.0.0.1:2375", - } -@@ -125,7 +125,7 @@ func TestParseTCP(t *testing.T) { - "localhost:5555/path": "tcp://localhost:5555/path", - } - for invalidAddr, expectedError := range invalids { -- if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || err.Error() != expectedError { -+ if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || expectedError != "" && err.Error() != expectedError { - t.Errorf("tcp %v address expected error %v return, got %s and addr %v", invalidAddr, expectedError, err, addr) - } - } diff --git a/gnu/packages/patches/docker-engine-test-noinstall.patch b/gnu/packages/patches/docker-engine-test-noinstall.patch deleted file mode 100644 index 85d56a3465..0000000000 --- a/gnu/packages/patches/docker-engine-test-noinstall.patch +++ /dev/null @@ -1,23 +0,0 @@ -Last-Update: 2018-06-18 -Forwarded: not-needed -Author: Dmitry Smirnov -Description: prevents test-time installation that causes FTBFS. -~~~~ - go test net: open /usr/lib/go-1.10/pkg/linux_amd64/net.a: permission denied -~~~~ - ---- a/hack/test/unit -+++ b/hack/test/unit -@@ -18,12 +18,8 @@ - - exclude_paths="/vendor/|/integration" - pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)") - --# install test dependencies once before running tests for each package. This --# significantly reduces the runtime. --go test -i "${BUILDFLAGS[@]}" $pkg_list -- - for pkg in $pkg_list; do - go test "${BUILDFLAGS[@]}" \ - -cover \ - -coverprofile=profile.out \ diff --git a/gnu/packages/patches/docker-use-fewer-modprobes.patch b/gnu/packages/patches/docker-use-fewer-modprobes.patch deleted file mode 100644 index 4e4a45b6ce..0000000000 --- a/gnu/packages/patches/docker-use-fewer-modprobes.patch +++ /dev/null @@ -1,137 +0,0 @@ -This patch makes docker find out whether a filesystem type is supported -by trying to mount a filesystem of that type rather than invoking "modprobe". - -See . - ---- docker-18.09.0-checkout/daemon/graphdriver/overlay/overlay.go.orig 1970-01-01 01:00:00.000000000 +0100 -+++ docker-18.09.0-checkout/daemon/graphdriver/overlay/overlay.go 2019-03-19 09:16:03.487087490 +0100 -@@ -8,7 +8,6 @@ - "io" - "io/ioutil" - "os" -- "os/exec" - "path" - "path/filepath" - "strconv" -@@ -201,9 +200,16 @@ - } - - func supportsOverlay() error { -- // We can try to modprobe overlay first before looking at -- // proc/filesystems for when overlay is supported -- exec.Command("modprobe", "overlay").Run() -+ // Access overlay filesystem so that Linux loads it (if possible). -+ mountTarget, err := ioutil.TempDir("", "supportsOverlay") -+ if err != nil { -+ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.") -+ return graphdriver.ErrNotSupported -+ } else { -+ /* The mounting will fail--after the module has been loaded.*/ -+ defer os.RemoveAll(mountTarget) -+ unix.Mount("overlay", mountTarget, "overlay", 0, "") -+ } - - f, err := os.Open("/proc/filesystems") - if err != nil { ---- docker-18.09.0-checkout/daemon/graphdriver/overlay2/overlay.go.orig 2019-03-18 23:42:23.728525231 +0100 -+++ docker-18.09.0-checkout/daemon/graphdriver/overlay2/overlay.go 2019-03-19 08:54:31.411906113 +0100 -@@ -10,7 +10,6 @@ - "io" - "io/ioutil" - "os" -- "os/exec" - "path" - "path/filepath" - "strconv" -@@ -261,9 +260,16 @@ - } - - func supportsOverlay() error { -- // We can try to modprobe overlay first before looking at -- // proc/filesystems for when overlay is supported -- exec.Command("modprobe", "overlay").Run() -+ // Access overlay filesystem so that Linux loads it (if possible). -+ mountTarget, err := ioutil.TempDir("", "supportsOverlay2") -+ if err != nil { -+ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.") -+ return graphdriver.ErrNotSupported -+ } else { -+ /* The mounting will fail--after the module has been loaded.*/ -+ defer os.RemoveAll(mountTarget) -+ unix.Mount("overlay", mountTarget, "overlay", 0, "") -+ } - - f, err := os.Open("/proc/filesystems") - if err != nil { ---- docker-18.09.0-checkout/daemon/graphdriver/devmapper/deviceset.go.orig 2019-03-19 09:19:16.592844887 +0100 -+++ docker-18.09.0-checkout/daemon/graphdriver/devmapper/deviceset.go 2019-03-19 09:21:18.019361761 +0100 -@@ -540,8 +539,14 @@ - return err // error text is descriptive enough - } - -- // Check if kernel supports xfs filesystem or not. -- exec.Command("modprobe", "xfs").Run() -+ mountTarget, err := ioutil.TempDir("", "supportsXFS") -+ if err != nil { -+ return errors.Wrapf(err, "error checking for xfs support") -+ } else { -+ /* The mounting will fail--after the module has been loaded.*/ -+ defer os.RemoveAll(mountTarget) -+ unix.Mount("none", mountTarget, "xfs", 0, "") -+ } - - f, err := os.Open("/proc/filesystems") - if err != nil { ---- docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/iptables/iptables.go.orig 2019-03-19 09:47:19.430111170 +0100 -+++ docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/iptables/iptables.go 2019-03-19 10:38:01.445136177 +0100 -@@ -72,11 +71,12 @@ - } - - func probe() { -- if out, err := exec.Command("modprobe", "-va", "nf_nat").CombinedOutput(); err != nil { -- logrus.Warnf("Running modprobe nf_nat failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) -+ path, err := exec.LookPath("iptables") -+ if err != nil { -+ return - } -- if out, err := exec.Command("modprobe", "-va", "xt_conntrack").CombinedOutput(); err != nil { -- logrus.Warnf("Running modprobe xt_conntrack failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) -+ if out, err := exec.Command(path, "--wait", "-t", "nat", "-L", "-n").CombinedOutput(); err != nil { -+ logrus.Warnf("Running iptables --wait -t nat -L -n failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) - } - } - ---- docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go.orig 2019-03-19 11:23:20.738316699 +0100 -+++ docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go 2019-03-19 11:27:57.149753073 +0100 -@@ -76,12 +76,8 @@ func NlHandle() *netlink.Handle { - func getSupportedNlFamilies() []int { - fams := []int{syscall.NETLINK_ROUTE} - // NETLINK_XFRM test -- if err := loadXfrmModules(); err != nil { -- if checkXfrmSocket() != nil { -- logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err) -- } else { -- fams = append(fams, syscall.NETLINK_XFRM) -- } -+ if err := checkXfrmSocket(); err != nil { -+ logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err) - } else { - fams = append(fams, syscall.NETLINK_XFRM) - } -@@ -99,16 +95,6 @@ func getSupportedNlFamilies() []int { - return fams - } - --func loadXfrmModules() error { -- if out, err := exec.Command("modprobe", "-va", "xfrm_user").CombinedOutput(); err != nil { -- return fmt.Errorf("Running modprobe xfrm_user failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) -- } -- if out, err := exec.Command("modprobe", "-va", "xfrm_algo").CombinedOutput(); err != nil { -- return fmt.Errorf("Running modprobe xfrm_algo failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) -- } -- return nil --} -- - // API check on required xfrm modules (xfrm_user, xfrm_algo) - func checkXfrmSocket() error { - fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_RAW, syscall.NETLINK_XFRM) -- cgit v1.2.3