gnu: vpnc: Use newer vpnc-scripts.

* gnu/packages/vpn.scm (vpnc)[source]: Remove patch.
[inputs]: Remove net-tools and iproute2.  Add vpnc-scripts.
[arguments]: Delete ‘configure’ and ‘wrap-vpnc-script’ #:phases.
Add ‘use-store-paths’ phase.
* gnu/packages/patches/vpnc-script.patch: Delete patch.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Tobias Geerinckx-Rice 2017-05-07 01:56:41 +02:00
parent 06d91fd944
commit 101e67ac20
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
3 changed files with 15 additions and 43 deletions

View file

@ -1126,7 +1126,6 @@ dist_patch_DATA = \
%D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ %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-2014-9640.patch \
%D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \ %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \
%D%/packages/patches/vpnc-script.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \

View file

@ -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() {

View file

@ -74,41 +74,29 @@ (define-public vpnc
(uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-" (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6")) "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))))
(patches (search-patches "vpnc-script.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs `(("libgcrypt" ,libgcrypt) (inputs `(("libgcrypt" ,libgcrypt)
("perl" ,perl) ("perl" ,perl)
("vpnc-scripts" ,vpnc-scripts)))
;; The following packages provide commands that 'vpnc-script'
;; expects.
("net-tools" ,net-tools) ;ifconfig, route
("iproute2" ,iproute))) ;ip
(arguments (arguments
`(#:tests? #f ; there is no check target `(#:tests? #f ; there is no check target
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'configure (add-after 'unpack 'use-store-paths
(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) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it (let ((out (assoc-ref outputs "out"))
;; needs. Assume coreutils/grep/sed are in $PATH. (vpnc-scripts (assoc-ref inputs "vpnc-scripts")))
(let ((out (assoc-ref outputs "out"))) (substitute* "config.c"
(wrap-program (string-append out "/etc/vpnc/vpnc-script") (("/etc/vpnc/vpnc-script")
`("PATH" ":" prefix (string-append vpnc-scripts "/etc/vpnc/vpnc-script")))
(,(string-append (assoc-ref inputs "net-tools") (substitute* "Makefile"
"/sbin") (("ETCDIR=.*")
,(string-append (assoc-ref inputs "net-tools") (string-append "ETCDIR=" out "/etc/vpnc\n"))
"/bin") (("PREFIX=.*")
,(string-append (assoc-ref inputs "iproute2") (string-append "PREFIX=" out "\n")))
"/sbin")))))))))) #t)))
(delete 'configure)))) ; no configure script
(synopsis "Client for Cisco VPN concentrators") (synopsis "Client for Cisco VPN concentrators")
(description (description
"vpnc is a VPN client compatible with Cisco's EasyVPN equipment. "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.