[PATCH 0/2] wireguard-tools: Fix wg-quick

  • Done
  • quality assurance status badge
Details
2 participants
  • Brice Waegeneire
  • Leo Famulari
Owner
unassigned
Submitted by
Brice Waegeneire
Severity
normal
B
B
Brice Waegeneire wrote on 11 May 2020 20:43
(address . guix-patches@gnu.org)
20200511184312.21587-1-brice@waegenei.re
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
B
B
Brice Waegeneire wrote on 11 May 2020 20:53
[PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
(address . guix-patches@gnu.org)
20200511185310.24537-2-brice@waegenei.re
* 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(-)

Toggle diff (54 lines)
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
B
B
Brice Waegeneire wrote on 11 May 2020 20:53
[PATCH 1/2] gnu: Add openresolv.
(address . guix-patches@gnu.org)
20200511185310.24537-1-brice@waegenei.re
* 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

Toggle diff (107 lines)
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
B
B
Brice Waegeneire wrote on 11 May 2020 21:15
Blocked by #41192
(address . control@debbugs.gnu.org)
35a2f74084f3e711a8537b0f1c08a040@waegenei.re
block 41193 with 41192
block 41080 with 41192
quit
L
L
Leo Famulari wrote on 11 May 2020 21:52
Re: [bug#41192] [PATCH 1/2] gnu: Add openresolv.
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 41192@debbugs.gnu.org)
20200511195233.GA15862@jasmine.lan
On Mon, May 11, 2020 at 08:53:09PM +0200, Brice Waegeneire wrote:
Toggle quote (2 lines)
> +(define-public openresolv

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

Toggle quote (2 lines)
> + (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.

Toggle quote (2 lines)
> 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?
L
L
Leo Famulari wrote on 11 May 2020 21:58
Re: [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 41192@debbugs.gnu.org)
20200511195834.GB15862@jasmine.lan
On Mon, May 11, 2020 at 08:53:10PM +0200, Brice Waegeneire wrote:
Toggle quote (2 lines)
> + (add-after 'install 'install-contrib

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

Toggle quote (6 lines)
> + (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.

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

Is coreutils not already available in the build environment?

Toggle quote (2 lines)
> + ("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'.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl65rmoACgkQJkb6MLrK
fwhDJg/9Hlhv3b/FPCc2n7GXxN7iWnlSmRW/onWcDQIdr5wryB0MC5OpjjiC/IeT
XFRAc8e9fHyBZ3S21JNumT4JwL9u3xCNS+9cFRFWpOSDp/LsE17V8TCdpJlVAyj0
zQHAqNdfUCL5y1MGms8jhKzqD8RNHUz/KjAZeKglE7jg8rNCozgFQddO2RFNDuqv
gt8g1eyoLuu0BdzjaPFSNOLvkVBTx/uyT/Eli36gLocVRL/kc24FnuIV17tHdfa0
6NiX7hspqXudPJ+RNwo847nRodTamRrnUQPLIyMvcFnTw51YxslMojYD1OISfvej
ZzpTGwBbVoe2yLsgrQoNXEoGXw78nB/SXqnNYqwW7pQ/yCzp9fuMhIOONv7HxEY9
D0lN/7QHOMJvYa3pGCJavNuc0G1X3ASKWcdP0NKpu5ovGo7a997KcdJFC/P1X6JV
EiqQ4KIGTyFlI9GzrkYsgN8wkOEQxpkeu8vl5+jWGktWvvUxpnaJlVB5O6AR/XxX
x6z2gfu9Z4TaK2oN0SKAtNQ+0Rt8K9M25bn5e0taR8bZvlfVVloJbsZlNxcqqjPI
AZ5kCvwZbUJXvImMyk8G5UZuU7TXCYLiFsMS7Fw+y3sVD78TAXdfuHiLNe2I2bfe
rWvvRrbRxHe3EvjZzmp5nsVpFQcVAGmxm8QSPdVOAQvIdcHP8CI=
=MDaL
-----END PGP SIGNATURE-----


B
B
Brice Waegeneire wrote on 12 May 2020 22:34
Re: [bug#41192] [PATCH 1/2] gnu: Add openresolv.
(name . Leo Famulari)(address . leo@famulari.name)(address . 41192@debbugs.gnu.org)
07fb96d664a09538385613825c5140fa@waegenei.re
On 2020-05-11 19:52, Leo Famulari wrote:
Toggle quote (13 lines)
> 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.

Toggle quote (6 lines)
>> 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.
B
B
Brice Waegeneire wrote on 12 May 2020 22:57
Re: [bug#41192] [PATCH 2/2] gnu: wireguard-tools: Fix wg-quick.
(name . Leo Famulari)(address . leo@famulari.name)(address . 41192@debbugs.gnu.org)
4a36f3e98940666676235563088a18ff@waegenei.re
On 2020-05-11 19:58, Leo Famulari wrote:
Toggle quote (5 lines)
> 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.

Toggle quote (10 lines)
>> + (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.

Toggle quote (15 lines)
>> + (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.
B
B
Brice Waegeneire wrote on 12 May 2020 23:01
[PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick.
(address . 41192@debbugs.gnu.org)(address . leo@famulari.name)
20200512210152.11991-1-brice@waegenei.re
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
B
B
Brice Waegeneire wrote on 12 May 2020 23:01
[PATCH v2 1/2] gnu: Add openresolv.
(address . 41192@debbugs.gnu.org)(address . leo@famulari.name)
20200512210152.11991-2-brice@waegenei.re
* 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

Toggle diff (109 lines)
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
B
B
Brice Waegeneire wrote on 12 May 2020 23:01
[PATCH v2 2/2] gnu: wireguard-tools: Fix wg-quick.
(address . 41192@debbugs.gnu.org)(address . leo@famulari.name)
20200512210152.11991-3-brice@waegenei.re
* 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(-)

Toggle diff (51 lines)
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
L
L
Leo Famulari wrote on 12 May 2020 23:28
Re: [PATCH v2 0/2] gnu: wireguard-tools: Fix wg-quick.
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 41192@debbugs.gnu.org)
20200512212817.GB12212@jasmine.lan
On Tue, May 12, 2020 at 11:01:50PM +0200, Brice Waegeneire wrote:
Toggle quote (4 lines)
> Brice Waegeneire (2):
> gnu: Add openresolv.
> gnu: wireguard-tools: Fix wg-quick.

Assuming you addressed my previous comments, these patches will LGTM.
Please push :)
B
B
Brice Waegeneire wrote on 13 May 2020 11:28
(name . Leo Famulari)(address . leo@famulari.name)(address . 41192-done@debbugs.gnu.org)
addc842e0cb86cfe19e63052b9e97757@waegenei.re
On 2020-05-12 21:28, Leo Famulari wrote:
Toggle quote (8 lines)
> 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.
Closed
?