Subject: pkg/37046: update net/vpnc to 5.0.1 (diff provided)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2007.salmi.ch>
List: pkgsrc-bugs
Date: 10/01/2007 00:00:01
>Number: 37046
>Category: pkg
>Synopsis: update net/vpnc to 5.0.1 (diff provided)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Oct 01 00:00:00 +0000 2007
>Originator: Jukka Salmi
>Release: pkgsrc HEAD
>Organization:
>Environment:
System: NetBSD moray.salmi.ch 4.99.31 NetBSD 4.99.31 (MORAY.ACPI) #0: Wed Sep 19 02:55:48 CEST 2007 build@moray.salmi.ch:/b/build/nbsd/c/i386/sys/arch/i386/compile/MORAY.ACPI i386
Architecture: i386
Machine: i386
>Description:
The attached patch - which is also available from
http://salmi.ch/~jukka/patches/pkgsrc/net/vpnc/vpnc-5.0.1.diff - updates
the net/vpnc package to the latest released vpnc version. In addition,
it changes the location where vpnc.conf and vpnc-script get installed
to ${PKG_SYSCONFDIR}/vpnc/ as it's done with non-pkgsrc vpnc;
furthermore cisco-decrypt(1) and pcf2vpnc(1) also get installed.
>How-To-Repeat:
n/a
>Fix:
Index: net/vpnc/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- net/vpnc/Makefile 28 Apr 2007 20:17:11 -0000 1.18
+++ net/vpnc/Makefile 14 Sep 2007 14:16:11 -0000
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.18 2007/04/28 20:17:11 hubertf Exp $
#
-DISTNAME= vpnc-0.4.0
+DISTNAME= vpnc-0.5.1
CATEGORIES= net security
MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/
@@ -13,23 +13,36 @@ NOT_FOR_PLATFORM= Interix-*-*
USE_TOOLS+= gmake
USE_TOOLS+= perl
-BUILD_TARGET= vpnc
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man8
-
-EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-CONF_FILES+= ${EGDIR}/vpnc.conf ${PKG_SYSCONFDIR}/vpnc.conf
-CONF_FILES_PERMS+= ${EGDIR}/vpnc-script ${PKG_SYSCONFDIR}/vpnc-script ${ROOT_USER} ${ROOT_GROUP} 755
+INSTALLATION_DIRS= bin sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8 \
+ share/doc/vpnc share/examples/vpnc
+OWN_DIRS= ${PKG_SYSCONFDIR}/vpnc
+
+SUBST_CLASSES+= paths
+SUBST_MESSAGE.paths= fixing pathnames
+SUBST_STAGE.paths= post-patch
+SUBST_FILES.paths= config.c vpnc-script makeman.pl pcf2vpnc vpnc.8.template
+SUBST_SED.paths= -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_SED.paths+= -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_SED.paths+= -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
+SUBST_SED.paths+= -e 's|@VARBASE@|${VARBASE}|g'
+SUBST_SED.paths+= -e 's|@PERL5@|${PERL5}|g'
+SUBST_SED.paths+= -e 's|@PERL5@|${PERL5}|g'
+
+EGDIR= ${PREFIX}/share/examples/vpnc
+CONF_FILES+= ${EGDIR}/vpnc.conf ${PKG_SYSCONFDIR}/vpnc/vpnc.conf
+CONF_FILES_PERMS+= ${EGDIR}/vpnc-script ${PKG_SYSCONFDIR}/vpnc/vpnc-script ${ROOT_USER} ${ROOT_GROUP} 755
do-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/vpnc
- ${INSTALL_DATA_DIR} ${EGDIR}
- :
${INSTALL_PROGRAM} ${WRKSRC}/vpnc ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cisco-decrypt ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/vpnc-script ${EGDIR}
+ ${INSTALL_MAN} ${WRKSRC}/vpnc.conf ${EGDIR}
${INSTALL_SCRIPT} ${WRKSRC}/vpnc-disconnect ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/pcf2vpnc ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/vpnc.8 ${PREFIX}/${PKGMANDIR}/man8
+ ${INSTALL_MAN} ${WRKSRC}/pcf2vpnc.1 ${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_MAN} ${WRKSRC}/cisco-decrypt.1 ${PREFIX}/${PKGMANDIR}/man1
${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/vpnc
- ${INSTALL_MAN} ${WRKSRC}/vpnc.conf ${EGDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/vpnc-script ${EGDIR}
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: net/vpnc/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- net/vpnc/PLIST 28 Apr 2007 20:17:11 -0000 1.3
+++ net/vpnc/PLIST 14 Sep 2007 14:16:11 -0000
@@ -1,5 +1,9 @@
@comment $NetBSD: PLIST,v 1.3 2007/04/28 20:17:11 hubertf Exp $
+bin/cisco-decrypt
+bin/pcf2vpnc
bin/vpnc-disconnect
+man/man1/cisco-decrypt.1
+man/man1/pcf2vpnc.1
man/man8/vpnc.8
sbin/vpnc
share/doc/vpnc/README
Index: net/vpnc/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- net/vpnc/distinfo 28 Apr 2007 20:17:12 -0000 1.8
+++ net/vpnc/distinfo 14 Sep 2007 14:16:11 -0000
@@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.8 2007/04/28 20:17:12 hubertf Exp $
-SHA1 (vpnc-0.4.0.tar.gz) = e39b63bbebf37758e8fb7eb2ec44dfc9b7afdaab
-RMD160 (vpnc-0.4.0.tar.gz) = 1640481601074d4517746f6e3b147b12f24b06e3
-Size (vpnc-0.4.0.tar.gz) = 75491 bytes
-SHA1 (patch-aa) = 80c183434e635cb95a0a6f0a481b118e654e6699
-SHA1 (patch-ab) = 458f86249e20d1948b5f99f5d4f39c35b19a0e13
-SHA1 (patch-ac) = 3f680616b4d49b3f6b525fc75669166798819376
+SHA1 (vpnc-0.5.1.tar.gz) = efc71dba03aa40945af35e4b074d99f922ff7ffd
+RMD160 (vpnc-0.5.1.tar.gz) = 76dd5a3a38bd2109cf8e1fbad85e2762e8489832
+Size (vpnc-0.5.1.tar.gz) = 91496 bytes
+SHA1 (patch-aa) = 93beb83165aeb0abb9605f0d8ce9d203726d7d04
+SHA1 (patch-ab) = 9eb2db944f6428401990659984abd38a07c3454f
+SHA1 (patch-ac) = 7cde3e693a73e5848de596a49d23e4be45a7d8a9
+SHA1 (patch-ad) = 7e31f1804541eb4de9924edcc517304487aad0f2
+SHA1 (patch-ae) = d831819831a5861550c5924955cc270c58341d9d
Index: net/vpnc/patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/patches/patch-aa,v
retrieving revision 1.4
diff -u -p -r1.4 patch-aa
--- net/vpnc/patches/patch-aa 28 Apr 2007 20:17:13 -0000 1.4
+++ net/vpnc/patches/patch-aa 14 Sep 2007 14:16:11 -0000
@@ -1,33 +1,33 @@
$NetBSD: patch-aa,v 1.4 2007/04/28 20:17:13 hubertf Exp $
---- config.c.orig 2007-02-16 18:22:06.000000000 +0100
-+++ config.c 2007-04-28 11:30:56.000000000 +0200
-@@ -251,7 +251,7 @@ static const char *config_def_app_versio
+--- config.c.orig 2007-09-10 22:39:48.000000000 +0200
++++ config.c 2007-09-14 14:31:56.000000000 +0200
+@@ -267,7 +267,7 @@ static const char *config_def_app_versio
static const char *config_def_script(void)
{
- return "/etc/vpnc/vpnc-script";
-+ return PKG_SYSCONFDIR "/vpnc-script";
++ return "@PKG_SYSCONFDIR@/vpnc/vpnc-script";
}
static const char *config_def_pid_file(void)
-@@ -485,7 +485,7 @@ static char *get_config_filename(const c
+@@ -538,7 +538,7 @@ static char *get_config_filename(const c
{
char *realname;
- asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
-+ asprintf(&realname, "%s%s%s", index(name, '/') ? "" : PKG_SYSCONFDIR "/", name, add_dot_conf ? ".conf" : "");
++ asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "@PKG_SYSCONFDIR@/vpnc/", name, add_dot_conf ? ".conf" : "");
return realname;
}
-@@ -701,8 +701,8 @@ void do_config(int argc, char **argv)
+@@ -757,8 +757,8 @@ void do_config(int argc, char **argv)
}
if (!got_conffile) {
- read_config_file("/etc/vpnc/default.conf", config, 1);
- read_config_file("/etc/vpnc.conf", config, 1);
-+ read_config_file(PKG_SYSCONFDIR "/vpnc/default.conf", config, 1);
-+ read_config_file(PKG_SYSCONFDIR "/vpnc.conf", config, 1);
++ read_config_file("@PKG_SYSCONFDIR@/vpnc/default.conf", config, 1);
++ read_config_file("@PKG_SYSCONFDIR@/vpnc.conf", config, 1);
}
if (!print_config) {
Index: net/vpnc/patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/patches/patch-ab,v
retrieving revision 1.4
diff -u -p -r1.4 patch-ab
--- net/vpnc/patches/patch-ab 28 Apr 2007 20:17:13 -0000 1.4
+++ net/vpnc/patches/patch-ab 14 Sep 2007 14:16:11 -0000
@@ -1,13 +1,10 @@
$NetBSD: patch-ab,v 1.4 2007/04/28 20:17:13 hubertf Exp $
---- Makefile.orig 2007-02-19 21:51:12.000000000 +0100
-+++ Makefile 2007-04-28 11:32:25.000000000 +0200
-@@ -35,7 +35,7 @@ VERSION := $(shell sh mk-version)
- RELEASE_VERSION := $(shell cat VERSION)
+--- makeman.pl.orig 2007-09-10 22:39:48.000000000 +0200
++++ makeman.pl 2007-09-14 14:39:22.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl -w
++#! @PERL5@ -w
+
+ # $Id: makeman.pl 243 2007-09-09 07:58:44Z Joerg Mayer $
- CC=gcc
--CFLAGS += -W -Wall -O3 -Wmissing-declarations -Wwrite-strings -g
-+CFLAGS += -W -Wall -O3 -Wmissing-declarations -Wwrite-strings -g -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
- CPPFLAGS = -DVERSION=\"$(VERSION)\"
- LDFLAGS = -g $(shell libgcrypt-config --libs)
- CFLAGS += $(shell libgcrypt-config --cflags)
Index: net/vpnc/patches/patch-ac
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/patches/patch-ac,v
retrieving revision 1.4
diff -u -p -r1.4 patch-ac
--- net/vpnc/patches/patch-ac 28 Apr 2007 20:17:13 -0000 1.4
+++ net/vpnc/patches/patch-ac 14 Sep 2007 14:16:11 -0000
@@ -1,31 +1,34 @@
$NetBSD: patch-ac,v 1.4 2007/04/28 20:17:13 hubertf Exp $
---- vpnc-script.orig 2007-02-18 12:52:03.000000000 +0100
-+++ vpnc-script 2007-04-28 11:49:41.000000000 +0200
-@@ -31,12 +31,13 @@ case "$OS" in
+--- vpnc-script.orig 2007-09-06 22:05:15.000000000 +0200
++++ vpnc-script 2007-09-14 13:30:59.000000000 +0200
+@@ -56,14 +56,15 @@ case "$OS" in
;;
esac
-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
-RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
-+STATEDIR=/var/run/vpnc
+-FULL_SCRIPTNAME=/usr/local/sbin/vpnc
++STATEDIR=@VARBASE@/run/vpnc
+DEFAULT_ROUTE_FILE=$STATEDIR/defaultroute
+RESOLV_CONF_BACKUP=$STATEDIR/resolv.conf-backup
++FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
+ SCRIPTNAME=`basename $FULL_SCRIPTNAME`
# some systems, eg. Darwin & FreeBSD, prune /var/run on boot
-if ! [ -d "/var/run/vpnc" ]; then
-- mkdir -p /var/run/vpnc
+- mkdir -p /var/run/vpnc
+if ! [ -d $STATEDIR ]; then
-+ mkdir -p $STATEDIR
++ mkdir -p $STATEDIR
fi
# stupid SunOS: no blubber in /usr/local/bin ... (on stdout)
-@@ -167,7 +168,7 @@ else
- get_default_gw() {
+@@ -157,7 +158,7 @@ else # use route command
# isn't -n supposed to give --numeric output?
# apperently not...
-- netstat -r -n | sed 's/default/0.0.0.0/' | grep '^0.0.0.0' | awk '{print $2}'
-+ netstat -r -n | awk '$2 ~ /^link/ { next; } /^(default|0.0.0.0)/ { print $2; }'
+ # Get rid of lines containing IPv6 addresses (':')
+- netstat -r -n | sed 's/default/0.0.0.0/' | sed 's/^.*:.*$//' | grep '^0.0.0.0' | awk '{print $2}'
++ netstat -r -n | awk '/:/ { next; } $2 ~ /^link/ { next; } /^(default|0\.0\.0\.0)/ { print $2; }'
}
set_vpngateway_route() {
--- /dev/null 2007-09-14 16:15:30.000000000 +0200
+++ net/vpnc/patches/patch-ad 2007-09-14 15:35:07.000000000 +0200
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- pcf2vpnc.orig 2007-08-30 12:51:30.000000000 +0200
++++ pcf2vpnc 2007-09-14 15:34:30.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!@PERL5@
+ # Stefan Tomanek <stefan@pico.ruhr.de>
+ # updated by Wolfram Sang <ninja@the-dreams.de> on 21.10.06 and on 26.06.07
+ ##
--- /dev/null 2007-09-14 16:15:30.000000000 +0200
+++ net/vpnc/patches/patch-ae 2007-09-14 16:08:41.000000000 +0200
@@ -0,0 +1,83 @@
+$NetBSD$
+
+--- vpnc.8.template.orig 2007-09-10 22:39:48.000000000 +0200
++++ vpnc.8.template 2007-09-14 16:08:21.000000000 +0200
+@@ -48,9 +48,9 @@ command line options
+ .IP \(bu
+ config file(s) specified on the command line
+ .IP \(bu
+-/etc/vpnc/default.conf
++@PKG_SYSCONFDIR@/vpnc/default.conf
+ .IP \(bu
+-/etc/vpnc.conf
++@PKG_SYSCONFDIR@/vpnc.conf
+ .IP \(bu
+ prompting the user if not found above
+
+@@ -63,9 +63,9 @@ place to set an option wins.
+ configuration filenames
+ which do not contain a /
+ will be searched at
+-.B /etc/vpnc/<filename>
++.B @PKG_SYSCONFDIR@/vpnc/<filename>
+ and
+-.B /etc/vpnc/<filename>.conf.
++.B @PKG_SYSCONFDIR@/vpnc/<filename>.conf.
+ Otherwise
+ .B <filename>
+ and
+@@ -74,9 +74,9 @@ will be used.
+ If no configuration file
+ is specified on the command-line
+ at all, both
+-.B /etc/vpnc/default.conf
++.B @PKG_SYSCONFDIR@/vpnc/default.conf
+ and
+-.B /etc/vpnc.conf
++.B @PKG_SYSCONFDIR@/vpnc.conf
+ will be loaded.
+
+ .SH OPTIONS
+@@ -91,8 +91,8 @@ for security reasons) or be stored in a
+ Prints your configuration; output can be used as vpnc.conf
+
+ .SH FILES
+-.I /etc/vpnc.conf
+-.I /etc/vpnc/default.conf
++.I @PKG_SYSCONFDIR@/vpnc.conf
++.I @PKG_SYSCONFDIR@/vpnc/default.conf
+ .RS
+ The default configuration file. You can specify the same config
+ directives as with command line options and additionaly
+@@ -110,7 +110,7 @@ See
+ for further details.
+ .RE
+
+-.I /etc/vpnc/*.conf
++.I @PKG_SYSCONFDIR@/vpnc/*.conf
+ .RS
+ vpnc will read configuration files in this directory when
+ the config filename (with or without .conf) is specified on the command line.
+@@ -149,11 +149,11 @@ IKE Authmode hybrid
+ .P
+
+ .P
+-CA-Dir /etc/vpnc
++CA-Dir @PKG_SYSCONFDIR@/vpnc
+ .P
+ \fBor\fR
+ .P
+-CA-File /etc/vpnc/vpn-example-com.pem
++CA-File @PKG_SYSCONFDIR@/vpnc/vpn-example-com.pem
+ .P
+
+ .P
+@@ -176,7 +176,7 @@ named something like 722d15bd.X, where X
+ make sure that files with colliding hashes have different names. The number
+ can be derived from the certificate file itself:
+ .P
+-openssl x509 -subject_hash -noout -in /etc/vpnc/vpn-example-com.pem
++openssl x509 -subject_hash -noout -in @PKG_SYSCONFDIR@/vpnc/vpn-example-com.pem
+
+ See also the
+ .B \-\-print\-config