diff --git a/vpnc-0.5.3r472.tar.bz2 b/vpnc-0.5.3r472.tar.bz2 deleted file mode 100644 index f9f4606..0000000 --- a/vpnc-0.5.3r472.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60ff3888d6144c149c48c4292d4eca3c8c97e0c68ace7653da763024c2c842b5 -size 109881 diff --git a/vpnc-0.5.3r481.tar.bz2 b/vpnc-0.5.3r481.tar.bz2 new file mode 100644 index 0000000..8dd0ef1 --- /dev/null +++ b/vpnc-0.5.3r481.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:993af40b1f8ae2bb2b0dcf86da09dbe124db770074ad7c6ac363f3084ff0fce3 +size 109919 diff --git a/vpnc-add-name-to-stderr-log.diff b/vpnc-add-name-to-stderr-log.diff new file mode 100644 index 0000000..8b0ddbc --- /dev/null +++ b/vpnc-add-name-to-stderr-log.diff @@ -0,0 +1,25 @@ +Author: Stefan Seyfried + +When called from e.g. NetworkManager, vpnc's stderr log messages +are redirected to logfiles where they are sometimes hard to spot, +e.g. they appear to be coming from NetworkManager itself. + +Fix this by prepending "vpnc: " to them. + + +Index: b/config.c +=================================================================== +--- a/config.c ++++ b/config.c +@@ -50,10 +50,11 @@ uint16_t opt_nortel_client_id; + + static void log_to_stderr(int priority __attribute__((unused)), const char *format, ...) + { + va_list ap; + ++ fprintf(stderr, "vpnc: "); + va_start(ap, format); + vfprintf(stderr, format, ap); + fprintf(stderr, "\n"); + va_end(ap); + } diff --git a/vpnc-ipid.diff b/vpnc-ipid.diff deleted file mode 100644 index fa5054f..0000000 --- a/vpnc-ipid.diff +++ /dev/null @@ -1,26 +0,0 @@ -From: Jan Engelhardt -Date: 2011-10-24 23:40:21.603981415 +0200 -Upstream: tbd - -vpnc-script: filter out more iproute2 fields - -vpnc can throw an error message: -Error: either "to" is duplicate, or "ipid" is a garbage. - ---- - vpnc-script.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: vpnc/vpnc-script.in -=================================================================== ---- vpnc.orig/vpnc-script.in -+++ vpnc/vpnc-script.in -@@ -116,7 +116,7 @@ destroy_tun_device() { - - 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 \S\+//g;' - } - - set_vpngateway_route() { diff --git a/vpnc-pidfile-path.diff b/vpnc-pidfile-path.diff new file mode 100644 index 0000000..d9d48a0 --- /dev/null +++ b/vpnc-pidfile-path.diff @@ -0,0 +1,44 @@ +Author: Stefan Seyfried +Upstream: not yet +Subject: make pidfile writing work again + +/var/run is cleared on every boot (tmpfs) and thus /var/run/vpnc +does not exist. +Just use /var/run/vpnc.pid instead, vpnc needs to run as root anyway, +so this should be fine. + +vpnc-script is still using /var/run/vpnc for other stuff (resolv.conf +backup etc) but creates the directory on demand, so no harm is done +there. + +Index: b/config.c +=================================================================== +--- a/config.c ++++ b/config.c +@@ -182,11 +182,11 @@ static const char *config_def_script(voi + return "/etc/vpnc/vpnc-script"; + } + + static const char *config_def_pid_file(void) + { +- return "/var/run/vpnc/pid"; ++ return "/var/run/vpnc.pid"; + } + + static const char *config_def_vendor(void) + { + return "cisco"; +Index: b/vpnc-disconnect +=================================================================== +--- a/vpnc-disconnect ++++ b/vpnc-disconnect +@@ -1,8 +1,8 @@ + #!/bin/sh + +-pid=/var/run/vpnc/pid ++pid=/var/run/vpnc.pid + + if [ $# -ne 0 ]; then + echo "Usage: $0" 1>&2 + exit 1 + fi diff --git a/vpnc-restart-after-timeout.diff b/vpnc-restart-after-timeout.diff index 1dfe7f3..0490fc2 100644 --- a/vpnc-restart-after-timeout.diff +++ b/vpnc-restart-after-timeout.diff @@ -2,7 +2,7 @@ Index: b/tunip.c =================================================================== --- a/tunip.c +++ b/tunip.c -@@ -884,10 +884,13 @@ static void vpnc_main_loop(struct sa_blo +@@ -882,10 +882,13 @@ static void vpnc_main_loop(struct sa_blo time(NULL) - s->ipsec.life.start, s->ipsec.life.seconds, s->ipsec.life.rx/1024, @@ -13,28 +13,28 @@ Index: b/tunip.c + do_kill = -3; } while ((presult == 0 || (presult == -1 && errno == EINTR)) && !do_kill); if (presult == -1) { - syslog(LOG_ERR, "select: %m"); + logmsg(LOG_ERR, "select: %m"); continue; } -@@ -945,10 +948,13 @@ static void vpnc_main_loop(struct sa_blo +@@ -943,10 +946,13 @@ static void vpnc_main_loop(struct sa_blo } } switch (do_kill) { + case -3: -+ syslog(LOG_NOTICE, "connection terminated by timeout -> restart"); ++ logmsg(LOG_NOTICE, "connection terminated by timeout -> restart"); + break; case -2: - syslog(LOG_NOTICE, "connection terminated by dead peer detection"); + logmsg(LOG_NOTICE, "connection terminated by dead peer detection"); break; case -1: - syslog(LOG_NOTICE, "connection terminated by peer"); + logmsg(LOG_NOTICE, "connection terminated by peer"); Index: b/vpnc.c =================================================================== --- a/vpnc.c +++ b/vpnc.c -@@ -3779,24 +3779,25 @@ int main(int argc, char **argv) +@@ -3777,24 +3777,25 @@ int main(int argc, char **argv) #endif gcry_check_version("1.1.90"); gcry_control(GCRYCTL_INIT_SECMEM, 16384, 0); @@ -64,7 +64,7 @@ Index: b/vpnc.c init_sockaddr(&s->opt_src_ip, config[CONFIG_LOCAL_ADDR]); DEBUGTOP(2, printf("S2 make_socket\n")); s->ike.src_port = atoi(config[CONFIG_LOCAL_PORT]); -@@ -3847,10 +3848,11 @@ int main(int argc, char **argv) +@@ -3845,10 +3846,11 @@ int main(int argc, char **argv) close_tunnel(s); /* Free resources */ diff --git a/vpnc.changes b/vpnc.changes index 1686425..882508c 100644 --- a/vpnc.changes +++ b/vpnc.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Wed Jan 4 12:00:03 UTC 2012 - seife+obs@b1-systems.com + +- Add "vpnc: " prefix to stderr logmessages + +------------------------------------------------------------------- +Wed Jan 4 11:45:29 UTC 2012 - seife+obs@b1-systems.com + +- change License field to GPL-2.0+ (bnc#731966) + +------------------------------------------------------------------- +Mon Nov 28 15:41:32 UTC 2011 - seife+obs@b1-systems.com + +- update to rev 481 of nortel branch + - better version of vpnc-ipid.diff upstream + - various code cleanups + - log to stdout instead of syslog in debug mode + +------------------------------------------------------------------- +Fri Nov 18 09:32:17 UTC 2011 - seife+obs@b1-systems.com + +- fix pidfile writing (/var/run/vpnc does not necessarily exist) + ------------------------------------------------------------------- Wed Nov 9 06:25:30 UTC 2011 - seife+obs@b1-systems.com diff --git a/vpnc.spec b/vpnc.spec index a314e17..d898a13 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -1,7 +1,7 @@ # # spec file for package vpnc # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,17 +15,16 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: vpnc -Group: Productivity/Networking/Security +BuildRequires: gnutls BuildRequires: libgcrypt-devel -BuildRequires: gnutls libgnutls-devel pkg-config -Version: 0.5.3r472 -Release: 13 -License: BSD-3-Clause ; GPL-2.0+ -AutoReqProv: on +BuildRequires: libgnutls-devel +BuildRequires: pkg-config +Version: 0.5.3r481 +Release: 0 Summary: A Client for Cisco VPN concentrator +License: GPL-2.0+ +Group: Productivity/Networking/Security Url: http://svn.unix-ag.uni-kl.de/vpnc/branches/vpnc-nortel Requires: /usr/bin/sed /sbin/ip Source: %{name}-%{version}.tar.bz2 @@ -34,9 +33,10 @@ Source1: checkout_svn.sh Patch0: bugfix.diff Patch1: vpnc-no-build-dates.patch Patch2: work-with-netconfig.patch -Patch3: vpnc-ipid.diff # most ugly hack ever Patch4: vpnc-restart-after-timeout.diff +Patch5: vpnc-pidfile-path.diff +Patch6: vpnc-add-name-to-stderr-log.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -65,8 +65,9 @@ Authors: %patch1 #Patch is not yet working :-( #patch2 -p0 -%patch -P 3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build export CFLAGS="%optflags"