From db1e2522f6222594fc507ce7a7ba7b1c0ac5037d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 19 Mar 2019 21:32:13 +0100 Subject: Add (gnu system keyboard). * gnu/system/keyboard.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu.scm (%public-modules): Add it. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f957b8af62..079b42c11e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -538,6 +538,7 @@ GNU_SYSTEM_MODULES = \ %D%/system/accounts.scm \ %D%/system/file-systems.scm \ %D%/system/install.scm \ + %D%/system/keyboard.scm \ %D%/system/linux-container.scm \ %D%/system/linux-initrd.scm \ %D%/system/locale.scm \ -- cgit v1.2.3 From 516f6f55eb038238c23fb769169b4769e323438f Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 19 Mar 2019 09:16:25 +0100 Subject: gnu: docker: Use fewer modprobes. Fixes . Reported by Allan Adair . * gnu/packages/patches/docker-use-fewer-modprobes.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/docker.scm (docker)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/docker.scm | 5 +- .../patches/docker-use-fewer-modprobes.patch | 116 +++++++++++++++++++++ 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/docker-use-fewer-modprobes.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 079b42c11e..42d8f1ce18 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -729,6 +729,7 @@ dist_patch_DATA = \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/docker-engine-test-noinstall.patch \ %D%/packages/patches/docker-fix-tests.patch \ + %D%/packages/patches/docker-use-fewer-modprobes.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 88fc7fc6ec..a11ce266d2 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -227,6 +227,8 @@ (define-public containerd (home-page "http://containerd.io/") (license license:asl2.0))) +;; TODO: Patch out modprobes for ip_vs, nf_conntrack, +;; brige, nf_conntrack_netlink, aufs. (define-public docker (package (name "docker") @@ -242,7 +244,8 @@ (define-public docker (base32 "06yr5xwr181lalh8z1lk07nxlp7hn38aq8cyqjk617dfy4lz0ixx")) (patches (search-patches "docker-engine-test-noinstall.patch" - "docker-fix-tests.patch")))) + "docker-fix-tests.patch" + "docker-use-fewer-modprobes.patch")))) (build-system gnu-build-system) (arguments `(#:modules 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..ebee83329c --- /dev/null +++ b/gnu/packages/patches/docker-use-fewer-modprobes.patch @@ -0,0 +1,116 @@ +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". +--- 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("", "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/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("", "supportsOverlay") ++ 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 + } + -- cgit v1.2.3 From 01307bba9c00ada07f8a39bd8de7031beef12afd Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 28 Mar 2019 14:01:46 +0100 Subject: gnu: reptyr: Update to 0.7.0. * gnu/packages/screen.scm (reptyr): Update to 0.7.0. [source]: Remove patch. [arguments]: Add bash completion directory name. * gnu/packages/patches/reptyr-fix-gcc-7.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/reptyr-fix-gcc-7.patch | 38 ----------------------------- gnu/packages/screen.scm | 22 +++++++++-------- 3 files changed, 12 insertions(+), 49 deletions(-) delete mode 100644 gnu/packages/patches/reptyr-fix-gcc-7.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 42d8f1ce18..833944bfbd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1218,7 +1218,6 @@ dist_patch_DATA = \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/red-eclipse-remove-gamma-name-hack.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ - %D%/packages/patches/reptyr-fix-gcc-7.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ 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 . - -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 - #include - #include -+#include - #include - #include - #include diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index 38df2594f2..eb4c477a89 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2017 Mathieu Othacehe -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -153,23 +153,25 @@ (define-public byobu (define-public reptyr (package (name "reptyr") - (version "0.6.2") + (version "0.7.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/nelhage/reptyr/archive" "/reptyr-" version ".tar.gz")) - ;; XXX: To be removed on next reptyr release. - (patches (search-patches "reptyr-fix-gcc-7.patch")) (sha256 - (base32 - "07pfl0rkgm8m3f3jy8r9l2yvnhf8lgllpsk3mh57mhzdxq8fagf7")))) + (base32 "10s9blv8xljzfdn4xly5y2q66kd0ldj3wnflymsxb5g6r3s3kidi")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) - #:phases (modify-phases %standard-phases (delete 'configure)))) + '(#:tests? #f ; no tests + #:make-flags + (list "CC=gcc" + (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "BASHCOMPDIR=" (assoc-ref %outputs "out") + "/etc/bash_completion.d")) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) ; no configure script (home-page "https://github.com/nelhage/reptyr") (synopsis "Tool for reparenting a running program to a new terminal") (description -- cgit v1.2.3 From bc91562939ee002e84c95d13c907482b6d1e9339 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 29 Mar 2019 23:28:45 -0400 Subject: gnu: gtk+: Graft upstream fix for crashes in Emacs and IceCat. Fixes . * gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtk+/fixed): New variable. (gtk+)[replacement]: New field. --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 15 +++++++++++- .../patches/gtk3-fix-deprecation-macro-use.patch | 28 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 833944bfbd..e32b0298e1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -877,6 +877,7 @@ dist_patch_DATA = \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk2-theme-paths.patch \ + %D%/packages/patches/gtk3-fix-deprecation-macro-use.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index aab392758f..83aadfd177 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès -;;; Copyright © 2014, 2015, 2017, 2018 Mark H Weaver +;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2015 Paul van der Walt @@ -694,6 +694,7 @@ (define-public gtk+ ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in ;; mate.scm will also need to be updated. (version "3.24.2") + (replacement gtk+/fixed) (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -787,6 +788,18 @@ (define-public gtk+ (variable "GUIX_GTK3_PATH") (files '("lib/gtk-3.0"))))))) +;; Fixes a bug in Gtk that causes crashes in IceCat and Emacs. +;; See , , +;; and . +(define gtk+/fixed + (package + (inherit gtk+) + (source (origin + (inherit (package-source gtk+)) + (patches + (cons (search-patch "gtk3-fix-deprecation-macro-use.patch") + (origin-patches (package-source gtk+)))))))) + ;;; ;;; Guile bindings. ;;; 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 . +Fixes upstream bugs +and . + +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; + -- cgit v1.2.3 From f125c5a5ea03d53749f45d310694b79241d5888d Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Wed, 27 Mar 2019 21:41:58 +0100 Subject: gnu: emacs-zones: silence byte-compiler. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/emacs-zones-called-interactively.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 5 ++- .../patches/emacs-zones-called-interactively.patch | 43 ++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-zones-called-interactively.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e32b0298e1..45598d4e14 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -745,6 +745,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-realgud-fix-configure-ac.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ + %D%/packages/patches/emacs-zones-called-interactively.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/eudev-rules-directory.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index df5e2cf21e..1e8d703ce3 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -6037,7 +6037,10 @@ (define-public emacs-zones (file-name (git-file-name name version)) (sha256 (base32 - "0gwnw2giii2a14nlh62xp45f47cw6ikqphhzpmcw6c7mn9x5z2ar")))) + "0gwnw2giii2a14nlh62xp45f47cw6ikqphhzpmcw6c7mn9x5z2ar")) + (patches + (search-patches + "emacs-zones-called-interactively.patch")))) (build-system emacs-build-system) (home-page "https://www.emacswiki.org/emacs/Zones") (synopsis "Define and act on multiple zones of buffer text") 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 +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 + -- cgit v1.2.3