Subject: bug#27549: closed ()

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 29 Nov 2017 15:13:03 +0000

Your bug report

#27549: [PATCH] gnu: vpnc: Update to 0.5.3, revision-550.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
27549: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27549
GNU Bug Tracking System
Contact [email-masked] with problems

From: Tobias Geerinckx-Rice <[email-masked]>
To: [email-masked], [email-masked]
Date: Wed, 29 Nov 2017 16:15:18 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Ricardo Wurmus wrote:
> It looks like these patches were dropped.

Down 6 flights of very cracked stairs.

Finally pushed as 06d91fd944e58ce787048f5c1b7804b210ad1f82 et al.

Kind regards,

T G-R

Subject: [PATCH] gnu: vpnc: Update to 0.5.3, revision-550.
From: Jelle Licht <[email-masked]>
To: [email-masked]
Date: Sat, 01 Jul 2017 16:48:26 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Guix,

Having tried to get `vpnc' working with my university's vpn system, and
failing, I looked into other distributions and how they got it to work.
It seems that most people use an updated version of the bundled
`vpnc-script' to make it work.

This patch updates `vpnc' to make use of the latest revision of the public
Subversion repo. It also includes the updated `vpnc-script'. To note,
our old `vpnc' (and its included `vpnc-script') crashed when trying to
conn
ect to any vpn.

Regards,
Jelle

>From fed76ff5a53a5b32d333085deb9eeba3a807b7ef Mon Sep 17 00:00:00 2001
From: Jelle Licht <[email-masked]>
Date: Sat, 1 Jul 2017 16:14:34 +0200
Subject: [PATCH] gnu: vpnc: Update to 0.5.3, revision 550.

* gnu/packages/vpn.scm (vpnc): Update to 0.5.3, revision 550.
[source]: Use svn-fetch, download from Subersion mirror.
[arguments]: End phases on #t. Remove reference to /etc/vpnc.
---
 gnu/local.mk                           |   1 -
 gnu/packages/patches/vpnc-script.patch |  15 -----
 gnu/packages/vpn.scm                   | 109 ++++++++++++++++++---------------
 3 files changed, 61 insertions(+), 64 deletions(-)
 delete mode 100644 gnu/packages/patches/vpnc-script.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 83b019605..55b4071e9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1047,7 +1047,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch		\
   %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch		\
   %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch		\
-  %D%/packages/patches/vpnc-script.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch			\
   %D%/packages/patches/weechat-python.patch			\
diff --git a/gnu/packages/patches/vpnc-script.patch b/gnu/packages/patches/vpnc-script.patch
deleted file mode 100644
index a0d948195..000000000
--- a/gnu/packages/patches/vpnc-script.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-This patch adapts the vpnc script to newer kernel versions, see
-   https://lkml.org/lkml/2011/3/24/645
-
-diff -u a/vpnc-script.in b/vpnc-script.in
---- a/vpnc-script.in	2013-03-03 13:55:16.000000000 +0100
-+++ b/vpnc-script.in	2013-03-03 13:56:11.000000000 +0100
-@@ -116,7 +116,7 @@
- 
- if [ -n "$IPROUTE" ]; then
- 	fix_ip_get_output () {
--		sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
-+		sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g;s/ipid 0x....//g'
- 	}
- 
- 	set_vpngateway_route() {
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 87fea4a47..692891150 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -26,9 +26,11 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix svn-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnupg)
@@ -63,58 +65,69 @@ endpoints.")
     (license license:gpl3+)))
 
 (define-public vpnc
-  (package
-   (name "vpnc")
-   (version "0.5.3")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
-                                version ".tar.gz"))
-            (sha256 (base32
-                     "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
-            (patches (search-patches "vpnc-script.patch"))))
-   (build-system gnu-build-system)
-   (inputs `(("libgcrypt" ,libgcrypt)
-             ("perl" ,perl)
-
-             ;; The following packages provide commands that 'vpnc-script'
-             ;; expects.
-             ("net-tools" ,net-tools)             ;ifconfig, route
-             ("iproute2" ,iproute)))              ;ip
-   (arguments
-    `(#:tests? #f ; there is no check target
-      #:phases
-      (modify-phases %standard-phases
-        (replace 'configure
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              (substitute* "Makefile"
-                (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
-              (substitute* "Makefile"
-                (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
-                                                     "/etc/vpnc"))))))
-        (add-after 'install 'wrap-vpnc-script
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
-            ;; needs.  Assume coreutils/grep/sed are in $PATH.
-            (let ((out (assoc-ref outputs "out")))
-              (wrap-program (string-append out "/etc/vpnc/vpnc-script")
-                `("PATH" ":" prefix
-                  (,(string-append (assoc-ref inputs "net-tools")
-                                   "/sbin")
-                   ,(string-append (assoc-ref inputs "net-tools")
-                                   "/bin")
-                   ,(string-append (assoc-ref inputs "iproute2")
-                                   "/sbin"))))))))))
-   (synopsis "Client for Cisco VPN concentrators")
-   (description
-    "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
+  (let ((commit 550)    ; subversion revision identifier
+        (revision "1")) ; guix package revision
+    (package
+      (name "vpnc")
+      (version (string-append "0.5.3-" revision "." (number->string commit)))
+      (source
+       (origin
+         (method svn-fetch)
+         (uri (svn-reference
+               (url "http://svn.unix-ag.uni-kl.de/vpnc/trunk")
+               (revision commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256 (base32
+                  "1ng585qlwd22q8qrcly5f0vran5jy9n0dlc2h14vf5kl4dkqljw0"))))
+      (build-system gnu-build-system)
+      (inputs `(("libgcrypt" ,libgcrypt)
+                ("perl" ,perl)
+                ("gnutls" ,gnutls)
+                ;; The following packages provide commands that 'vpnc-script'
+                ;; expects.
+                ("net-tools" ,net-tools)             ;ifconfig, route
+                ("iproute2" ,iproute)))              ;ip
+      (native-inputs `(("which" ,which)
+                       ("pkg-config" ,pkg-config)))
+      (arguments
+       `(#:tests? #f ; there is no check target
+         #:make-flags '("CC=gcc")
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (substitute* "Makefile"
+                   (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
+                 (substitute* "Makefile"
+                   (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
+                                                        "/etc/vpnc")))
+                 (substitute* "config.c"
+                   (("/etc/vpnc/") (string-append out "/etc/vpnc/")))
+                 #t)))
+           (add-after 'install 'wrap-vpnc-script
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
+               ;; needs.  Assume coreutils/grep/sed are in $PATH.
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/etc/vpnc/vpnc-script")
+                   `("PATH" ":" prefix
+                     (,(string-append (assoc-ref inputs "net-tools")
+                                      "/sbin")
+                      ,(string-append (assoc-ref inputs "net-tools")
+                                      "/bin")
+                      ,(string-append (assoc-ref inputs "iproute2")
+                                      "/sbin"))))
+                 #t))))))
+      (synopsis "Client for Cisco VPN concentrators")
+      (description
+       "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
 It supports IPSec (ESP) with Mode Configuration and Xauth.  It supports only
 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/")))
+      (license license:gpl2+) ; some file are bsd-2, see COPYING
+      (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/"))))

 (define-public openconnect
-- 
2.13.2