gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / vpn.scm
index 6155c00..becc505 100644 (file)
@@ -1,15 +1,16 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
-;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2019, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages gnuzilla)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages nss)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -116,7 +118,7 @@ shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
 1DES, MD5, SHA1, DH1/2/5 and IP tunneling.  It runs entirely in userspace.
 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
    (license license:gpl2+) ; some file are bsd-2, see COPYING
-   (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
+   (home-page "https://www.unix-ag.uni-kl.de/~massar/vpnc/")))
 
 (define-public vpnc-scripts
   (let ((commit "1000e0f6dd7d6bff163169a46359211c1fc3a6d2"))
@@ -134,7 +136,8 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
                  (base32
                   "1g41yarz2bl0f73kbjqnywr485ghanbp7nmspklfb0n07yp0z6ak"))))
       (build-system gnu-build-system)
-      (inputs `(("coreutils" ,coreutils)
+      (inputs `(("guile" ,guile-2.2) ; for the wrapper scripts
+                ("coreutils" ,coreutils)
                 ("grep" ,grep)
                 ("iproute2" ,iproute)    ; for ‘ip’
                 ("net-tools" ,net-tools) ; for ‘ifconfig’, ‘route’
@@ -177,7 +180,7 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
                (let ((out (assoc-ref outputs "out")))
                  (for-each
                   (lambda (script)
-                    (wrap-program script
+                    (wrap-script (string-append out "/etc/vpnc/" script)
                       `("PATH" ":" prefix
                         ,(map (lambda (name)
                                 (let ((input (assoc-ref inputs name)))
@@ -189,8 +192,9 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
                                     "net-tools"
                                     "sed"
                                     "which")))))
-                  (find-files (string-append out "/etc/vpnc/vpnc-script")
-                              "^vpnc-script"))
+                  (list "vpnc-script-ptrtd"
+                        "vpnc-script-sshd"
+                        "vpnc-script"))
                  #t))))
          #:tests? #f))                  ; no tests
       (home-page "http://git.infradead.org/users/dwmw2/vpnc-scripts.git")
@@ -213,25 +217,20 @@ the entire VPN in a network namespace accessible only through SSH.")
     (name "ocproxy")
     (version "1.60")
     (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/cernekee/ocproxy/archive/v"
-                    version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/cernekee/ocproxy.git")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1b4rg3xq5jnrp2l14sw0msan8kqhdxmsd7gpw9lkiwvxy13pcdm7"))))
+                "03323nnhb4y9nzwva04mq7xg03dvdrgp689g89f69jqc261skcqx"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)))
     (inputs
      `(("libevent" ,libevent)))
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'autogen
-           (lambda _ (invoke "sh" "autogen.sh"))))))
     (home-page "https://github.com/cernekee/ocproxy")
     (synopsis "OpenConnect proxy")
     (description
@@ -244,19 +243,20 @@ the user specifically asks to proxy, so the @dfn{VPN} interface no longer
 (define-public openconnect
   (package
    (name "openconnect")
-   (version "8.02")
+   (version "8.05")
    (source (origin
             (method url-fetch)
             (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
                                 "openconnect-" version ".tar.gz"))
-            (sha256 (base32
-                     "04p0vzc1791h68hd9803wsyb64zrwm8qpdqx0szhj9pig71g5a0w"))))
+            (sha256
+             (base32 "14i9q727c2zc9xhzp1a9hz3gzb5lwgsslbhircm84dnbs192jp1k"))))
    (build-system gnu-build-system)
-   (inputs
+   (propagated-inputs
     `(("libxml2" ,libxml2)
       ("gnutls" ,gnutls)
-      ("vpnc-scripts" ,vpnc-scripts)
       ("zlib" ,zlib)))
+   (inputs
+    `(("vpnc-scripts" ,vpnc-scripts)))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("pkg-config" ,pkg-config)))
@@ -277,7 +277,7 @@ and probably others.")
 (define-public openvpn
   (package
     (name "openvpn")
-    (version "2.4.7")
+    (version "2.4.8")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -285,7 +285,7 @@ and probably others.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "0j7na936isk9j8nsdrrbw7wmy09inmjqvsb8mw8az7k61xbm6bx4"))))
+                "149z3agjy03i66mcj5bplim2mh45s2ps1wmxbxczyzw0nxmsd37v"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--enable-iproute2=yes")))
@@ -309,14 +309,14 @@ traversing network address translators (@dfn{NAT}s) and firewalls.")
 (define-public tinc
   (package
     (name "tinc")
-    (version "1.0.35")
+    (version "1.0.36")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://tinc-vpn.org/packages/"
-                                  name "-" version ".tar.gz"))
+                                  "tinc-" version ".tar.gz"))
               (sha256
                (base32
-                "0pl92sdwrkiwgll78x0ww06hfljd07mkwm62g8x17qn3gha3pj0q"))))
+                "021i2sl2mjscbm8g59d7vs74iw3gf0m48wg7w3zhwj6czarkpxs0"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -456,14 +456,14 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
 (define-public wireguard
   (package
     (name "wireguard")
-    (version "0.0.20190227")
+    (version "0.0.20191219")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://git.zx2c4.com/WireGuard/snapshot/"
                                   "WireGuard-" version ".tar.xz"))
               (sha256
                (base32
-                "0ybzycpjjidyiz88kkh67abvp3y30f34252dwpgf3ncj4vyjdnzw"))))
+                "1rxhhf18vnlbxpaxib6y55gbvr5h9dcvl8sn2l5slzz97066zfjs"))))
     (build-system gnu-build-system)
     (outputs '("out" ; The WireGuard userspace tools
                "kernel-patch")) ; A patch to build Linux with WireGuard support
@@ -471,6 +471,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
      `(#:tests? #f ; No tests available.
        #:make-flags
        (list "CC=gcc"
+             "--directory=src/tools"
              "WITH_BASHCOMPLETION=yes"
              ;; Build and install the helper script wg-quick(8).
              "WITH_WGQUICK=yes"
@@ -498,17 +499,7 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers
                (call-with-output-file output
                  (lambda (port)
                    (format port "~a" str))))
-               #t))
-         (add-after 'make-patch 'chdir
-           (lambda _
-             (chdir "src/tools")
-             #t))
-         ;; Otherwise the 'install-license-file' phase installs nothing.
-         ;; <https://bugs.gnu.org/34703>
-         (add-after 'install 'reset-cwd
-           (lambda _
-             (chdir "../..")
-             #t)))))
+               #t)))))
     (inputs
      `(("libmnl" ,libmnl)))
     (home-page "https://www.wireguard.com/")
@@ -519,26 +510,72 @@ that can be applied to a Linux kernel source tree in order to build it with
 WireGuard support.")
     (license license:gpl2)))
 
+(define-public wireguard-tools
+  (package
+    (name "wireguard-tools")
+    (version "1.0.20200206")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.zx2c4.com/wireguard-tools.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ivc08lds5w39a6f2xdfih9wlk5g724hl3kpdvxvh5yff4l84qb7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list "CC=gcc"
+             "--directory=src"
+             "WITH_BASHCOMPLETION=yes"
+             ;; Install the ‘simple and dirty’ helper script wg-quick(8).
+             "WITH_WGQUICK=yes"
+             (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             ;; Currently used only to create an empty /etc/wireguard directory.
+             (string-append "SYSCONFDIR=no-thanks"))
+       ;; The test suite is meant to be run interactively.  It runs Clang's
+       ;; scan-build static analyzer and then starts a web server to display the
+       ;; results.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         ;; No configure script
+         (delete 'configure))))
+    (home-page "https://www.wireguard.com/")
+    (synopsis "Tools for configuring WireGuard tunnels")
+    (description
+     "This package provides the user-space command-line tools for using and
+configuring WireGuard tunnels.
+
+WireGuard is a simple and fast general-purpose @acronym{VPN, Virtual Private
+Network} that securely encapsulates IP packets over UDP.  It aims to be as easy
+to configure and deploy as SSH.  VPN connections are made simply by exchanging
+public keys and can roam across IP addresses.")
+    (license
+     (list license:lgpl2.1+    ; src/netlink.h & contrib/embeddable-wg-library
+           license:gpl2))))    ; everything else
+
 (define-public xl2tpd
   (package
     (name "xl2tpd")
-    (version "1.3.13")
+    (version "1.3.15")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/xelerance/xl2tpd")
                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1nzkmhi9arwd4smhr07l0sssx46w48z0cblv7xcz25wg4hw86mcd"))
-              (file-name (string-append "xl2tpd-" version "-checkout"))))
+                "0ppwza8nwm1av1vldw40gin9wrjrs4l9si50jad414js3k8ycaag"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list (string-append "DESTDIR=" %output)
+     `(#:make-flags (list (string-append "PREFIX=" %output)
                           "CC=gcc")
        #:phases (modify-phases %standard-phases
-                  (delete 'configure))
-       #:tests? #f)) ;; no tests provided
+                  (delete 'configure))  ; no configure script
+       #:tests? #f))                    ; no tests provided
     (inputs `(("libpcap" ,libpcap)))
     (home-page "https://www.xelerance.com/software/xl2tpd/")
     (synopsis "Layer 2 Tunnelling Protocol Daemon (RFC 2661)")