GNU bug report logs - #36542
[PATCH 0/6] Fix network-manager vpn plugins

Previous Next

Package: guix-patches;

Reported by: Jelle Licht <jlicht <at> fsfe.org>

Date: Sun, 7 Jul 2019 19:28:01 UTC

Severity: normal

Tags: patch

Done: Jelle Licht <jlicht <at> fsfe.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 36542 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: 36542 <at> debbugs.gnu.org
Cc: Jelle Licht <jlicht <at> fsfe.org>
Subject: [PATCH 5/6] gnu: network-manager-openvpn: Patch hardcoded paths.
Date: Sun,  7 Jul 2019 21:28:47 +0200
* gnu/packages/gnome.scm (network-manager-openvpn)[arguments]: Add custom
'patch-path' phase to replace references to openvpn and modprobe.
[inputs]: Add kmod.
---
 gnu/packages/gnome.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index df273d4dad..b68aed804f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2019 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2019 Florian Pelz <pelzflorian <at> pelzflorian.de>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2019 Jelle Licht <jlicht <at> fsfe.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5448,12 +5449,31 @@ services.")
                 "0gyrv46h9k17qym48qacq4zpxbap6hi17shn921824zm98m2bdvr"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--enable-absolute-paths" "--localstatedir=/var")))
+     `(#:configure-flags '("--enable-absolute-paths" "--localstatedir=/var")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-path
+           (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+             (let* ((ovpn (string-append (assoc-ref inputs "openvpn")
+                                         "/sbin/openvpn"))
+                    (modprobe (string-append (assoc-ref inputs "kmod")
+                                             "/bin/modprobe"))
+                    (pretty-ovpn (string-append "\"" ovpn "\"")))
+               (for-each
+                (lambda (file)
+                  (substitute* file
+                    (("\"/usr/local/sbin/openvpn\"") pretty-ovpn)
+                    (("\"/usr/sbin/openvpn\"") pretty-ovpn)
+                    (("\"/sbin/openvpn\"") pretty-ovpn)
+                    (("/sbin/modprobe") modprobe)))
+                '("src/nm-openvpn-service.c" "properties/nm-openvpn-editor.c")))
+             #t)))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("intltool" ,intltool)))
     (inputs
      `(("gtk+" ,gtk+)
+       ("kmod" ,kmod)
        ("openvpn" ,openvpn)
        ("network-manager" ,network-manager)
        ("network-manager-applet" ,network-manager-applet) ;for libnma
-- 
2.22.0





This bug report was last modified 6 years and 29 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.