summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-04-01 00:02:39 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-04-01 00:02:39 +0200
commit571fb008a576378883c053be186d2c620290ea39 (patch)
tree5279a2c2772a9b76299a48d697d568f208a89722 /gnu/packages/patches
parent7c86fdda7ceed11377b0e17b47c91598be59be52 (diff)
parentf125c5a5ea03d53749f45d310694b79241d5888d (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/docker-use-fewer-modprobes.patch119
-rw-r--r--gnu/packages/patches/emacs-zones-called-interactively.patch43
-rw-r--r--gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch28
-rw-r--r--gnu/packages/patches/reptyr-fix-gcc-7.patch38
4 files changed, 190 insertions, 38 deletions
diff --git a/gnu/packages/patches/docker-use-fewer-modprobes.patch b/gnu/packages/patches/docker-use-fewer-modprobes.patch
new file mode 100644
index 0000000000..2779e1be5d
--- /dev/null
+++ b/gnu/packages/patches/docker-use-fewer-modprobes.patch
@@ -0,0 +1,119 @@
+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 <https://github.com/moby/moby/pull/38930>.
+
+--- 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
+@@ -100,12 +100,7 @@
+ }
+
+ 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)
+- }
++ // Those are automatically loaded when someone opens the socket anyway.
+ return nil
+ }
+
diff --git a/gnu/packages/patches/emacs-zones-called-interactively.patch b/gnu/packages/patches/emacs-zones-called-interactively.patch
new file mode 100644
index 0000000000..b60f390a7e
--- /dev/null
+++ b/gnu/packages/patches/emacs-zones-called-interactively.patch
@@ -0,0 +1,43 @@
+From fb56fbb706804215ef9af0cc575db97c373046c6 Mon Sep 17 00:00:00 2001
+From: Brian Leung <bkleung89@gmail.com>
+Date: Sun, 17 Mar 2019 01:32:04 +0100
+Subject: [PATCH] This patch silences the byte-compiler.
+
+---
+ zones.el | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/zones.el b/zones.el
+index 1bf94f0..94fa9a6 100644
+--- a/zones.el
++++ b/zones.el
+@@ -1031,7 +1031,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
+
+ This is a destructive operation. The list structure of the variable
+ value can be modified."
+- (zz-narrow-advice (interactive-p)))
++ (zz-narrow-advice (called-interactively-p)))
+
+ (defadvice narrow-to-defun (after zz-add-zone--defun activate)
+ "Push the defun limits to the current `zz-izones-var'.
+@@ -1039,7 +1039,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
+
+ This is a destructive operation. The list structure of the variable
+ value can be modified."
+- (zz-narrow-advice (interactive-p)))
++ (zz-narrow-advice (called-interactively-p)))
+
+ ;; Call `zz-add-zone' if interactive or `zz-add-zone-anyway-p'.
+ ;;
+@@ -1049,7 +1049,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
+
+ This is a destructive operation. The list structure of the variable
+ value can be modified."
+- (zz-narrow-advice (interactive-p)))
++ (zz-narrow-advice (called-interactively-p)))
+
+ ;;(@* "General Commands")
+
+--
+2.21.0
+
diff --git a/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch b/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch
new file mode 100644
index 0000000000..e933555ffb
--- /dev/null
+++ b/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch
@@ -0,0 +1,28 @@
+Copied from <https://gitlab.gnome.org/GNOME/gtk/commit/e3a1593a>.
+Fixes upstream bugs <https://gitlab.gnome.org/GNOME/gtk/issues/1523>
+and <https://gitlab.gnome.org/GNOME/gtk/issues/1280>.
+
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index 97ada6d73919fba3dfe192dd66929e90bc7677bb..764e39495f7edb0c3efe41cca25b8bee4778887d 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -2985,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow *window,
+ double r, g, b, a;
+ cairo_surface_t *surface;
+ cairo_matrix_t matrix;
++ cairo_pattern_t *parent_relative_pattern;
+
+ if (GDK_WINDOW_DESTROYED (window))
+ return;
+@@ -2997,8 +2998,10 @@ gdk_window_x11_set_background (GdkWindow *window,
+ }
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+- if (pattern == gdk_x11_get_parent_relative_pattern ())
++ parent_relative_pattern = gdk_x11_get_parent_relative_pattern ();
+ G_GNUC_END_IGNORE_DEPRECATIONS
++
++ if (pattern == parent_relative_pattern)
+ {
+ GdkWindow *parent;
+
diff --git a/gnu/packages/patches/reptyr-fix-gcc-7.patch b/gnu/packages/patches/reptyr-fix-gcc-7.patch
deleted file mode 100644
index 5e0e581218..0000000000
--- a/gnu/packages/patches/reptyr-fix-gcc-7.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches
-fa0d63f and b45fd92.
-
-https://github.com/nelhage/reptyr/commit/fa0d63ff8c488be15976e5353580b565e85586a1
-https://github.com/nelhage/reptyr/commit/b45fd9238958fcf2d8f3d6fc23e6d491febea2ac
-
-Patch by Nelson Elhage <nelhage@nelhage.com>.
-
-diff --git a/attach.c b/attach.c
-index bd8ef8c..8d9cbf8 100644
---- a/attach.c
-+++ b/attach.c
-@@ -389,8 +389,11 @@ int setup_steal_socket(struct steal_pty_state *steal) {
- return errno;
-
- steal->addr_un.sun_family = AF_UNIX;
-- snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path),
-- "%s/reptyr.sock", steal->tmpdir);
-+ if (snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path),
-+ "%s/reptyr.sock", steal->tmpdir) >= sizeof(steal->addr_un.sun_path)) {
-+ error("tmpdir path too long!");
-+ return ENAMETOOLONG;
-+ }
-
- if ((steal->sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
- return errno;
-diff --git a/platform/linux/linux.h b/platform/linux/linux.h
-index 9e6b78a..3ec5a99 100644
---- a/platform/linux/linux.h
-+++ b/platform/linux/linux.h
-@@ -40,6 +40,7 @@
- #include <sys/ptrace.h>
- #include <asm/ptrace.h>
- #include <sys/types.h>
-+#include <sys/sysmacros.h>
- #include <sys/user.h>
- #include <unistd.h>
- #include <stdlib.h>