unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick
@ 2020-05-11 18:43 Brice Waegeneire
  2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-11 18:43 UTC (permalink / raw)
  To: 41192

Brice Waegeneire (2):
  gnu: Add openresolv.
  gnu: wireguard-tools: Fix wg-quick.

 gnu/local.mk                                  |  2 ++
 gnu/packages/dns.scm                          | 34 +++++++++++++++++++
 .../patches/openresolv-restartcmd-guix.patch  | 30 ++++++++++++++++
 gnu/packages/vpn.scm                          | 33 +++++++++++++++++-
 4 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/openresolv-restartcmd-guix.patch

-- 
2.26.2





^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 1/2] gnu: Add openresolv.
  2020-05-11 18:43 [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick Brice Waegeneire
@ 2020-05-11 18:53 ` Brice Waegeneire
  2020-05-11 19:52   ` Leo Famulari
  2020-05-11 18:53 ` [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
  2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
  2 siblings, 1 reply; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-11 18:53 UTC (permalink / raw)
  To: 41192

* gnu/packages/dns.scm (openresolv): New variable.
---
 gnu/local.mk                                  |  2 ++
 gnu/packages/dns.scm                          | 34 +++++++++++++++++++
 .../patches/openresolv-restartcmd-guix.patch  | 30 ++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 gnu/packages/patches/openresolv-restartcmd-guix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 90c1c64888..48169fcdb6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -34,6 +34,7 @@
 # Copyright © 2020 Felix Gruber <felgru@posteo.net>
 # Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
+# Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 #
 # This file is part of GNU Guix.
 #
@@ -1323,6 +1324,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/openmpi-mtl-priorities.patch		\
   %D%/packages/patches/openocd-nrf52.patch			\
   %D%/packages/patches/openssh-hurd.patch			\
+  %D%/packages/patches/openresolv-restartcmd-guix.patch	\
   %D%/packages/patches/openssl-runpath.patch			\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-c-rehash-in.patch		\
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 7ac1611cbf..c33f690b15 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1001,3 +1002,36 @@ known public suffixes.")
 consists of a UDP-only authoritative DNS server for hosting domains, and a UDP
 and TCP-capable recursive DNS server for finding domains on the internet.")
     (license license:bsd-2)))
+
+(define-public openresolv
+  (package
+    (name "openresolv")
+    (version "3.10.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://roy.marples.name/openresolv.git")
+                    (commit (string-append name "-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gh7d0lczpxcap4fsxlvy2jxk9km4dg0chidlmgfvxbq61xpagbl"))
+              (patches
+               (search-patches "openresolv-restartcmd-guix.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No test suite
+       #:configure-flags
+       (list (string-append "--sysconfdir=/etc"))
+       #:make-flags
+       (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
+    (home-page "https://roy.marples.name/projects/openresolv/")
+    (synopsis "A POSIX resolvconf implementation, a middleman for resolv.conf")
+    (description "openresolv is an implementation of @command{resolvconf}, the
+the middleman between the network configuration services and
+@file{/etc/resolv.conf}.  @command{resolvconf} itself is just a script that
+stores, removes and lists a full @file{resolv.conf} generated for the
+interface.  It then calls all the helper scripts it knows about so it can
+configure the real @file{/etc/resolv.conf} and optionally any local
+nameservers other than libc.")
+    (license license:bsd-2)))
diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch
new file mode 100644
index 0000000000..2fd0e87590
--- /dev/null
+++ b/gnu/packages/patches/openresolv-restartcmd-guix.patch
@@ -0,0 +1,30 @@
+From 7f0ce36828ec1e130bee857b8236ca091e4d8a2c Mon Sep 17 00:00:00 2001
+From: Brice Waegeneire <brice@waegenei.re>
+Date: Sat, 9 May 2020 15:52:06 +0200
+Subject: [PATCH] Add RESTARTCMD for Guix System.
+
+---
+ resolvconf.in | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/resolvconf.in b/resolvconf.in
+index 3cad04d..5ef5294 100644
+--- a/resolvconf.in
++++ b/resolvconf.in
+@@ -369,6 +369,13 @@ detect_init()
+ 			then
+ 				/etc/rc.d/$1 restart
+ 			fi'
++	elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then
++		# Guix System
++		RESTARTCMD='
++			if /run/current-system/profile/bin/herd status $1 2>&1
++			then
++				/run/current-system/profile/bin/herd restart $1
++			fi'
+ 	else
+ 		for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
+ 			[ -d $x ] || continue
+-- 
+2.26.0
+
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-11 18:43 [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick Brice Waegeneire
  2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
@ 2020-05-11 18:53 ` Brice Waegeneire
  2020-05-11 19:58   ` Leo Famulari
  2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
  2 siblings, 1 reply; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-11 18:53 UTC (permalink / raw)
  To: 41192

* gnu/packages/vpn.scm (wireguard-tools)[arguments]: Add phase
'wrap-wg-quick'.
[inputs]: Add 'openresolv', 'iproute' and 'iptables'.
---
 gnu/packages/vpn.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index ebae1c43f7..1e31f05c98 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -40,7 +40,9 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages dns)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
@@ -541,7 +543,36 @@ WireGuard was added to Linux 5.6.")
        #:phases
        (modify-phases %standard-phases
          ;; No configure script
-         (delete 'configure))))
+         (delete 'configure)
+         (add-after 'install 'install-contrib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "contrib/"
+                                 (string-append out "/share/doc/wireguard-tools"))
+               #t)))
+         (add-after 'install 'wrap-wg-quick
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (inputs-sbin (map (lambda (input)
+                                        (string-append (assoc-ref inputs input) "/sbin"))
+                                      (list "resolvconf" "iproute" "procps"
+                                            "iptables")))
+                   (coreutils (string-append (assoc-ref inputs "coreutils")
+                                             "/bin")))
+               (wrap-program (string-append out "/bin/wg-quick")
+                 `("PATH" ":" = ,(append inputs-sbin
+                                         (list coreutils
+                                               "/run/setuid-programs"))))
+               #t))))))
+    (native-inputs
+     `(("bash" ,bash)))  ; for contrib scripts using /dev/tcp
+    (inputs
+     `(("resolvconf" ,openresolv)
+       ("coreutils" ,coreutils)
+       ("bash" ,bash)                   ; for contrib scripts using /dev/tcp
+       ("procps" ,procps)
+       ("iproute" ,iproute)
+       ("iptables" ,iptables)))
     (home-page "https://www.wireguard.com/")
     (synopsis "Tools for configuring WireGuard tunnels")
     (description
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 1/2] gnu: Add openresolv.
  2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
@ 2020-05-11 19:52   ` Leo Famulari
  2020-05-12 20:34     ` Brice Waegeneire
  0 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2020-05-11 19:52 UTC (permalink / raw)
  To: Brice Waegeneire; +Cc: 41192

On Mon, May 11, 2020 at 08:53:09PM +0200, Brice Waegeneire wrote:
> +(define-public openresolv

Thanks, it will be great to fix wg-quick.

> +                    (url "git://roy.marples.name/openresolv.git")

We should avoid the Git protocol if possible, preferring, first,
tarballs and, second, HTTPS or HTTP Git URLS. Is that possible for this
package? The Git protocol depends on access to an unusual port, and it's
not private or authenticated.

> diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch

Is this just for sysvinit? If so, can you add a comment saying so? Or
explain the context of the patch a little more?




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-11 18:53 ` [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
@ 2020-05-11 19:58   ` Leo Famulari
  2020-05-12 20:57     ` Brice Waegeneire
  0 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2020-05-11 19:58 UTC (permalink / raw)
  To: Brice Waegeneire; +Cc: 41192

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

On Mon, May 11, 2020 at 08:53:10PM +0200, Brice Waegeneire wrote:
> +         (add-after 'install 'install-contrib

How about calling this phase "install-docs" or "install-contrib-docs"?.

> +               (wrap-program (string-append out "/bin/wg-quick")
> +                 `("PATH" ":" = ,(append inputs-sbin
> +                                         (list coreutils
> +                                               "/run/setuid-programs"))))
> +               #t))))))

Setuid Guix only exists on Guix System, so we should drop this wrapper.
It's okay to make users do `sudo wg-quick` or similar.

> +    (native-inputs
> +     `(("bash" ,bash)))  ; for contrib scripts using /dev/tcp
> +    (inputs
> +     `(("resolvconf" ,openresolv)
> +       ("coreutils" ,coreutils)

Is coreutils not already available in the build environment?

> +       ("bash" ,bash)                   ; for contrib scripts using /dev/tcp

IIUC, we don't need to include Bash in both 'native-inputs' and
'inputs'. If this Bash will be used at run-time (e.g. as a script
shebang), we should just use 'inputs'.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 1/2] gnu: Add openresolv.
  2020-05-11 19:52   ` Leo Famulari
@ 2020-05-12 20:34     ` Brice Waegeneire
  0 siblings, 0 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-12 20:34 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 41192

On 2020-05-11 19:52, Leo Famulari wrote:
> On Mon, May 11, 2020 at 08:53:09PM +0200, Brice Waegeneire wrote:
>> +(define-public openresolv
> 
> Thanks, it will be great to fix wg-quick.
> 
>> +                    (url "git://roy.marples.name/openresolv.git")
> 
> We should avoid the Git protocol if possible, preferring, first,
> tarballs and, second, HTTPS or HTTP Git URLS. Is that possible for this
> package? The Git protocol depends on access to an unusual port, and 
> it's
> not private or authenticated.

Switched to tarball.

>> diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch 
>> b/gnu/packages/patches/openresolv-restartcmd-guix.patch
> 
> Is this just for sysvinit? If so, can you add a comment saying so? Or
> explain the context of the patch a little more?

Explained in the patch: it needs to know how to restart nscd so this
patch add support for doing so with shepherd when on a Guix System.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-11 19:58   ` Leo Famulari
@ 2020-05-12 20:57     ` Brice Waegeneire
  0 siblings, 0 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-12 20:57 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 41192

On 2020-05-11 19:58, Leo Famulari wrote:
> On Mon, May 11, 2020 at 08:53:10PM +0200, Brice Waegeneire wrote:
>> +         (add-after 'install 'install-contrib
> 
> How about calling this phase "install-docs" or "install-contrib-docs"?.

This is a more informative name, renamed.

>> +               (wrap-program (string-append out "/bin/wg-quick")
>> +                 `("PATH" ":" = ,(append inputs-sbin
>> +                                         (list coreutils
>> +                                               
>> "/run/setuid-programs"))))
>> +               #t))))))
> 
> Setuid Guix only exists on Guix System, so we should drop this wrapper.
> It's okay to make users do `sudo wg-quick` or similar.

Replaced '=' with 'prefix' and dropped "/run/setuid-programs" from the 
wrapper.

>> +    (native-inputs
>> +     `(("bash" ,bash)))  ; for contrib scripts using /dev/tcp
>> +    (inputs
>> +     `(("resolvconf" ,openresolv)
>> +       ("coreutils" ,coreutils)
> 
> Is coreutils not already available in the build environment?
> 
>> +       ("bash" ,bash)                   ; for contrib scripts using 
>> /dev/tcp
> 
> IIUC, we don't need to include Bash in both 'native-inputs' and
> 'inputs'. If this Bash will be used at run-time (e.g. as a script
> shebang), we should just use 'inputs'.

Only kept in inputs.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-11 18:43 [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick Brice Waegeneire
  2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
  2020-05-11 18:53 ` [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
@ 2020-05-12 21:01 ` Brice Waegeneire
  2020-05-12 21:01   ` [bug#41192] [PATCH v2 1/2] gnu: Add openresolv Brice Waegeneire
                     ` (2 more replies)
  2 siblings, 3 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-12 21:01 UTC (permalink / raw)
  To: 41192; +Cc: leo

Brice Waegeneire (2):
  gnu: Add openresolv.
  gnu: wireguard-tools: Fix wg-quick.

 gnu/local.mk                                  |  2 ++
 gnu/packages/dns.scm                          | 32 +++++++++++++++++
 .../patches/openresolv-restartcmd-guix.patch  | 34 +++++++++++++++++++
 gnu/packages/vpn.scm                          | 30 +++++++++++++++-
 4 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/openresolv-restartcmd-guix.patch

-- 
2.26.2





^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH v2 1/2] gnu: Add openresolv.
  2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
@ 2020-05-12 21:01   ` Brice Waegeneire
  2020-05-12 21:01   ` [bug#41192] [PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
  2020-05-12 21:28   ` [bug#41192] [PATCH v2 0/2] " Leo Famulari
  2 siblings, 0 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-12 21:01 UTC (permalink / raw)
  To: 41192; +Cc: leo

* gnu/packages/dns.scm (openresolv): New variable.
---
 gnu/local.mk                                  |  2 ++
 gnu/packages/dns.scm                          | 32 +++++++++++++++++
 .../patches/openresolv-restartcmd-guix.patch  | 34 +++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 gnu/packages/patches/openresolv-restartcmd-guix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 90c1c64888..48169fcdb6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -34,6 +34,7 @@
 # Copyright © 2020 Felix Gruber <felgru@posteo.net>
 # Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
+# Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 #
 # This file is part of GNU Guix.
 #
@@ -1323,6 +1324,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/openmpi-mtl-priorities.patch		\
   %D%/packages/patches/openocd-nrf52.patch			\
   %D%/packages/patches/openssh-hurd.patch			\
+  %D%/packages/patches/openresolv-restartcmd-guix.patch	\
   %D%/packages/patches/openssl-runpath.patch			\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-c-rehash-in.patch		\
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 7ac1611cbf..2ab512f8ac 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1001,3 +1002,34 @@ known public suffixes.")
 consists of a UDP-only authoritative DNS server for hosting domains, and a UDP
 and TCP-capable recursive DNS server for finding domains on the internet.")
     (license license:bsd-2)))
+
+(define-public openresolv
+  (package
+    (name "openresolv")
+    (version "3.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://roy.marples.name/downloads/openresolv/"
+                                  "openresolv-" version ".tar.xz"))
+              (sha256
+               (base32
+                "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20"))
+              (patches
+               (search-patches "openresolv-restartcmd-guix.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No test suite
+       #:configure-flags
+       (list (string-append "--sysconfdir=/etc"))
+       #:make-flags
+       (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
+    (home-page "https://roy.marples.name/projects/openresolv/")
+    (synopsis "A POSIX resolvconf implementation, a middleman for resolv.conf")
+    (description "openresolv is an implementation of @command{resolvconf}, the
+the middleman between the network configuration services and
+@file{/etc/resolv.conf}.  @command{resolvconf} itself is just a script that
+stores, removes and lists a full @file{resolv.conf} generated for the
+interface.  It then calls all the helper scripts it knows about so it can
+configure the real @file{/etc/resolv.conf} and optionally any local
+nameservers other than libc.")
+    (license license:bsd-2)))
diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch
new file mode 100644
index 0000000000..ad70ebd6f2
--- /dev/null
+++ b/gnu/packages/patches/openresolv-restartcmd-guix.patch
@@ -0,0 +1,34 @@
+From 7f0ce36828ec1e130bee857b8236ca091e4d8a2c Mon Sep 17 00:00:00 2001
+From: Brice Waegeneire <brice@waegenei.re>
+Date: Sat, 9 May 2020 15:52:06 +0200
+Subject: [PATCH] Add RESTARTCMD for Guix System.
+
+---
+
+openresolv need to know how to restart the nscd service, this patch teach it
+to do it on Guix System by using shepherd.
+
+ resolvconf.in | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/resolvconf.in b/resolvconf.in
+index 3cad04d..5ef5294 100644
+--- a/resolvconf.in
++++ b/resolvconf.in
+@@ -369,6 +369,13 @@ detect_init()
+ 			then
+ 				/etc/rc.d/$1 restart
+ 			fi'
++	elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then
++		# Guix System
++		RESTARTCMD='
++			if /run/current-system/profile/bin/herd status $1 2>&1
++			then
++				/run/current-system/profile/bin/herd restart $1
++			fi'
+ 	else
+ 		for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
+ 			[ -d $x ] || continue
+-- 
+2.26.0
+
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
  2020-05-12 21:01   ` [bug#41192] [PATCH v2 1/2] gnu: Add openresolv Brice Waegeneire
@ 2020-05-12 21:01   ` Brice Waegeneire
  2020-05-12 21:28   ` [bug#41192] [PATCH v2 0/2] " Leo Famulari
  2 siblings, 0 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-12 21:01 UTC (permalink / raw)
  To: 41192; +Cc: leo

* gnu/packages/vpn.scm (wireguard-tools)[arguments]: Add phase
'wrap-wg-quick'.
[inputs]: Add 'openresolv', 'iproute' and 'iptables'.
---
 gnu/packages/vpn.scm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index ebae1c43f7..369d3200c1 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -40,7 +40,9 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages dns)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
@@ -541,7 +543,33 @@ WireGuard was added to Linux 5.6.")
        #:phases
        (modify-phases %standard-phases
          ;; No configure script
-         (delete 'configure))))
+         (delete 'configure)
+         (add-after 'install 'install-contrib-docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "contrib/"
+                                 (string-append out "/share/doc/wireguard-tools"))
+               #t)))
+         (add-after 'install 'wrap-wg-quick
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (inputs-sbin (map (lambda (input)
+                                        (string-append (assoc-ref inputs input) "/sbin"))
+                                      (list "resolvconf" "iproute" "procps"
+                                            "iptables")))
+                   (coreutils (string-append (assoc-ref inputs "coreutils")
+                                             "/bin")))
+               (wrap-program (string-append out "/bin/wg-quick")
+                 `("PATH" ":" prefix ,(append inputs-sbin
+                                              (list coreutils))))
+               #t))))))
+    (inputs
+     `(("resolvconf" ,openresolv)
+       ("coreutils" ,coreutils)
+       ("bash" ,bash)                   ; for scripts using /dev/tcp
+       ("procps" ,procps)
+       ("iproute" ,iproute)
+       ("iptables" ,iptables)))
     (home-page "https://www.wireguard.com/")
     (synopsis "Tools for configuring WireGuard tunnels")
     (description
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#41192] [PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
  2020-05-12 21:01   ` [bug#41192] [PATCH v2 1/2] gnu: Add openresolv Brice Waegeneire
  2020-05-12 21:01   ` [bug#41192] [PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
@ 2020-05-12 21:28   ` Leo Famulari
  2020-05-13  9:28     ` bug#41192: " Brice Waegeneire
  2 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2020-05-12 21:28 UTC (permalink / raw)
  To: Brice Waegeneire; +Cc: 41192

On Tue, May 12, 2020 at 11:01:50PM +0200, Brice Waegeneire wrote:
> Brice Waegeneire (2):
>   gnu: Add openresolv.
>   gnu: wireguard-tools: Fix wg-quick.

Assuming you addressed my previous comments, these patches will LGTM.
Please push :)




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#41192: [PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick.
  2020-05-12 21:28   ` [bug#41192] [PATCH v2 0/2] " Leo Famulari
@ 2020-05-13  9:28     ` Brice Waegeneire
  0 siblings, 0 replies; 12+ messages in thread
From: Brice Waegeneire @ 2020-05-13  9:28 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 41192-done

On 2020-05-12 21:28, Leo Famulari wrote:
> On Tue, May 12, 2020 at 11:01:50PM +0200, Brice Waegeneire wrote:
>> Brice Waegeneire (2):
>>   gnu: Add openresolv.
>>   gnu: wireguard-tools: Fix wg-quick.
> 
> Assuming you addressed my previous comments, these patches will LGTM.
> Please push :)

Pushed as d084e71c0d and 6b6647f815. With fixed typo in openresolv
synopsis and description.




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-13  9:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 18:43 [bug#41192] [PATCH 0/2] wireguard-tools: Fix wg-quick Brice Waegeneire
2020-05-11 18:53 ` [bug#41192] [PATCH 1/2] gnu: Add openresolv Brice Waegeneire
2020-05-11 19:52   ` Leo Famulari
2020-05-12 20:34     ` Brice Waegeneire
2020-05-11 18:53 ` [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
2020-05-11 19:58   ` Leo Famulari
2020-05-12 20:57     ` Brice Waegeneire
2020-05-12 21:01 ` [bug#41192] [PATCH v2 0/2] " Brice Waegeneire
2020-05-12 21:01   ` [bug#41192] [PATCH v2 1/2] gnu: Add openresolv Brice Waegeneire
2020-05-12 21:01   ` [bug#41192] [PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick Brice Waegeneire
2020-05-12 21:28   ` [bug#41192] [PATCH v2 0/2] " Leo Famulari
2020-05-13  9:28     ` bug#41192: " Brice Waegeneire

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).