unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68683] [PATCH] gnu: vpn-slice: Include required inputs "iproute" and "iptables".
@ 2024-01-24  9:18 Allan Adair
  2024-02-12  8:10 ` bug#68683: " Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: Allan Adair @ 2024-01-24  9:18 UTC (permalink / raw)
  To: 68683; +Cc: Allan Adair

vpn-slice expects commands "ip" and "iptables" to be found according to FHS
paths.

* gnu/packages/vpn.scm (vpn-slice)[arguments]: Include inputs "iproute" and
"iptables" and patch "vpn_slice/linux.py" to use correct locations in the
store.

Change-Id: Ia06e2bb99f060108cc0758e89174294bcbb2848d
---
 gnu/packages/vpn.scm | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 02c1ee1043..a6a83c9145 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
 ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2024 Allan Adair <allan@adair.no>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1245,17 +1246,28 @@ (define-public vpn-slice
   (package
     (name "vpn-slice")
     (version "0.16.1")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "vpn-slice" version))
-              (sha256
-               (base32
-                "1anfx4hn2ggm6sbwqmqx68s3l2rjcy4z4l038xqb440jnk8jvl18"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "vpn-slice" version))
+       (sha256
+        (base32 "1anfx4hn2ggm6sbwqmqx68s3l2rjcy4z4l038xqb440jnk8jvl18"))))
     (build-system python-build-system)
-    (inputs (list python-dnspython python-setproctitle))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-FHS-file-names
+                    (lambda _
+                      (substitute* "vpn_slice/linux.py"
+                        (("/sbin/iptables")
+                         (which "iptables")))
+                      (substitute* "vpn_slice/linux.py"
+                        (("/sbin/ip")
+                         (which "ip"))))))))
+    (inputs (list python-dnspython python-setproctitle iproute iptables))
     (home-page "https://github.com/dlenski/vpn-slice")
     (synopsis "Split tunneling replacement for vpnc-script")
-    (description "vpn-slice is a replacement for @command{vpnc-script} used by
+    (description
+     "vpn-slice is a replacement for @command{vpnc-script} used by
 @code{openconnect} and @code{vpnc}.  Instead of trying to copy the behavior of
 standard corporate VPN clients, which normally reroute all your network
 traffic through the VPN, vpn-slice tries to minimize your contact with an

base-commit: 3419c216b485532dd3c3ed7959553d7900eb1fea
-- 
2.41.0





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

* bug#68683: [PATCH] gnu: vpn-slice: Include required inputs "iproute" and "iptables".
  2024-01-24  9:18 [bug#68683] [PATCH] gnu: vpn-slice: Include required inputs "iproute" and "iptables" Allan Adair
@ 2024-02-12  8:10 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2024-02-12  8:10 UTC (permalink / raw)
  To: 68683-done

Thanks for the patch!  I simplified it just a bit and pushed it with
commit bd9da702123ab746bd43de5b0fc0c129874b15aa.

-- 
Ricardo




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

end of thread, other threads:[~2024-02-12  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24  9:18 [bug#68683] [PATCH] gnu: vpn-slice: Include required inputs "iproute" and "iptables" Allan Adair
2024-02-12  8:10 ` bug#68683: " Ricardo Wurmus

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).