From 5fd66099e85b74c9c8580651b7f6f44ddcb4bd488f3b94334227739b31ce41d2 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 8 Aug 2011 13:18:01 +0000 Subject: [PATCH 1/5] Updating link to change in openSUSE:Factory/vpnc revision 12.0 OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=624b993b42e4b1e4bb9582b782d43264 --- vpnc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpnc.spec b/vpnc.spec index 565c1af..c826c85 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -1,7 +1,7 @@ # -# spec file for package vpnc (Version 0.5.3r449) +# spec file for package vpnc # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 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 @@ -23,7 +23,7 @@ Group: Productivity/Networking/Security BuildRequires: libgcrypt-devel BuildRequires: gnutls libgnutls-devel pkg-config Version: 0.5.3r449 -Release: 8 +Release: 12 License: BSD3c(or similar) ; GPLv2+ AutoReqProv: on Summary: A Client for Cisco VPN concentrator From 2b0803662e106494e9d95a25085bae7ef917d9ee7e57c3907c56ae5ddbc89f55 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Fri, 26 Aug 2011 14:18:11 +0000 Subject: [PATCH 2/5] Resolving bug 712435. Using netconfig to change /etc/resolv.conf OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=56 --- vpnc.changes | 6 ++++++ vpnc.spec | 2 ++ work-with-netconfig.patch | 41 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 work-with-netconfig.patch diff --git a/vpnc.changes b/vpnc.changes index 482c458..6425ed5 100644 --- a/vpnc.changes +++ b/vpnc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 26 14:16:47 UTC 2011 - tittiatcoke@gmail.com + +- Added patch to change /etc/resolv.conf with the help of netconfig + (bnc#712435) + ------------------------------------------------------------------- Thu Aug 4 10:25:45 UTC 2011 - tittiatcoke@gmail.com diff --git a/vpnc.spec b/vpnc.spec index c826c85..4ea29cc 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -31,6 +31,7 @@ Requires: /usr/bin/sed /sbin/ip Source: %{name}-%{version}.tar.bz2 Patch0: bugfix.diff Patch1: vpnc-no-build-dates.patch +Patch2: work-with-netconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -57,6 +58,7 @@ Authors: %setup -n %{name} %patch0 -p0 %patch1 +%patch2 -p0 %build export CFLAGS="%optflags -fno-strict-aliasing" diff --git a/work-with-netconfig.patch b/work-with-netconfig.patch new file mode 100644 index 0000000..db7afe2 --- /dev/null +++ b/work-with-netconfig.patch @@ -0,0 +1,41 @@ +--- vpnc-script.in 2009-09-05 19:10:59.000000000 +0200 ++++ vpnc-script.in 2011-08-26 16:11:57.217160278 +0200 +@@ -76,9 +76,9 @@ + if [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo + MODIFYRESOLVCONF=modify_resolvconf_manager + RESTORERESOLVCONF=restore_resolvconf_manager +-elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1 +- MODIFYRESOLVCONF=modify_resolvconf_suse +- RESTORERESOLVCONF=restore_resolvconf_suse ++elif [ -x /sbin/netconfig ]; then # Mandatory tool on Suse later than 11.2 ++ MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig ++ RESTORERESOLVCONF=restore_resolvconf_suse_netconfig + else # Generic for any OS + MODIFYRESOLVCONF=modify_resolvconf_generic + RESTORERESOLVCONF=restore_resolvconf_generic +@@ -344,6 +344,25 @@ + esac + fi + } ++# === resolv.conf handling via /sbin/netconfig (Suse 11.1) ===================== ++ ++# Suse provides a script that modifies resolv.conf. Use it because it will ++# restart/reload all other services that care about it (e.g. lwresd). [unclear if this is still true, but probably --mlk] ++ ++modify_resolvconf_suse_netconfig() ++{ ++ /sbin/netconfig modify -s vpnc -i "$TUNDEV" <<-EOF ++ INTERFACE='$TUNDEV' ++ DNSSERVERS='$INTERNAL_IP4_DNS' ++ DNSDOMAIN='$CISCO_DEF_DOMAIN' ++ EOF ++} ++# Restore resolv.conf to old contents on Suse ++restore_resolvconf_suse_netconfig() ++{ ++ /sbin/netconfig remove -s vpnc -i "$TUNDEV" ++} ++ + # === resolv.conf handling via /sbin/modify_resolvconf (Suse) ===================== + + # Suse provides a script that modifies resolv.conf. Use it because it will From 13d468f9f363691ef85821104fac828bf635f278543af3eaffa8bad5821bae8c Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Fri, 26 Aug 2011 16:07:12 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=57 --- vpnc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vpnc.spec b/vpnc.spec index 4ea29cc..ad556bd 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -1,4 +1,5 @@ # +# # spec file for package vpnc # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. From ef102e7f574cc7b6c566bc3f5acf23deafdd6b0dc9638dcba8201e7badc11999 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Fri, 26 Aug 2011 16:22:14 +0000 Subject: [PATCH 4/5] OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=58 --- vpnc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vpnc.spec b/vpnc.spec index ad556bd..b526a14 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -59,7 +59,8 @@ Authors: %setup -n %{name} %patch0 -p0 %patch1 -%patch2 -p0 +#Patch is not yet working :-( +#patch2 -p0 %build export CFLAGS="%optflags -fno-strict-aliasing" From e3b6e64b75667886abbcf4f0f5b113c49a5226d8705aaea46e0789fbbeb5cead Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Mon, 24 Oct 2011 22:30:44 +0000 Subject: [PATCH 5/5] Accepting request 89212 from home:jengelh:bl-new bnc#726231 OBS-URL: https://build.opensuse.org/request/show/89212 OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=59 --- vpnc-ipid.diff | 26 ++++++++++++++++++++++++++ vpnc.changes | 7 +++++++ vpnc.spec | 4 ++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 vpnc-ipid.diff diff --git a/vpnc-ipid.diff b/vpnc-ipid.diff new file mode 100644 index 0000000..fa5054f --- /dev/null +++ b/vpnc-ipid.diff @@ -0,0 +1,26 @@ +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.changes b/vpnc.changes index 6425ed5..265e64b 100644 --- a/vpnc.changes +++ b/vpnc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 24 21:41:51 UTC 2011 - jengelh@medozas.de + +- Resolve 'Error: either "to" is duplicate, or "ipid" is a + garbage.' message when connecting and inability to not be able + to send packets due to the gateway route being absent. + ------------------------------------------------------------------- Fri Aug 26 14:16:47 UTC 2011 - tittiatcoke@gmail.com diff --git a/vpnc.spec b/vpnc.spec index b526a14..d06cdcd 100644 --- a/vpnc.spec +++ b/vpnc.spec @@ -1,5 +1,4 @@ # -# # spec file for package vpnc # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. @@ -16,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: vpnc @@ -33,6 +31,7 @@ Source: %{name}-%{version}.tar.bz2 Patch0: bugfix.diff Patch1: vpnc-no-build-dates.patch Patch2: work-with-netconfig.patch +Patch3: vpnc-ipid.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -61,6 +60,7 @@ Authors: %patch1 #Patch is not yet working :-( #patch2 -p0 +%patch -P 3 -p1 %build export CFLAGS="%optflags -fno-strict-aliasing"