From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:48885) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkCrP-0004HQ-AR for guix-patches@gnu.org; Sun, 07 Jul 2019 15:30:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkCrO-0008Mk-6t for guix-patches@gnu.org; Sun, 07 Jul 2019 15:30:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkCrO-0008MQ-0i for guix-patches@gnu.org; Sun, 07 Jul 2019 15:30:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkCrN-0005Rd-Rv for guix-patches@gnu.org; Sun, 07 Jul 2019 15:30:05 -0400 Subject: [bug#36542] [PATCH 5/6] gnu: network-manager-openvpn: Patch hardcoded paths. Resent-Message-ID: From: Jelle Licht Date: Sun, 7 Jul 2019 21:28:47 +0200 Message-Id: <20190707192848.10049-5-jlicht@fsfe.org> In-Reply-To: <20190707192848.10049-1-jlicht@fsfe.org> References: <20190707192848.10049-1-jlicht@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36542@debbugs.gnu.org * 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 ;;; Copyright © 2019 Florian Pelz ;;; Copyright © 2019 Giacomo Leidi +;;; Copyright © 2019 Jelle Licht ;;; ;;; 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