summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2008-02-02 14:15:40 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2008-02-02 14:15:40 +0000
commit1baf329ad013016e1c29579a129ab4cd784fb59f (patch)
treeba2ce41d27e59c6df1081e8e52b34920d5bac085 /net-misc
parentMarking tiff-3.8.2-r3 ppc64 for bug 208547 (diff)
downloadhistorical-1baf329ad013016e1c29579a129ab4cd784fb59f.tar.gz
historical-1baf329ad013016e1c29579a129ab4cd784fb59f.tar.bz2
historical-1baf329ad013016e1c29579a129ab4cd784fb59f.zip
Added a patch for 2.6.24 support. Closing bug #207536.
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/cisco-vpnclient-3des/ChangeLog10
-rw-r--r--net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490-r1.ebuild89
-rw-r--r--net-misc/cisco-vpnclient-3des/files/2.6.24.patch144
3 files changed, 241 insertions, 2 deletions
diff --git a/net-misc/cisco-vpnclient-3des/ChangeLog b/net-misc/cisco-vpnclient-3des/ChangeLog
index f672216a5a56..664786fd1fff 100644
--- a/net-misc/cisco-vpnclient-3des/ChangeLog
+++ b/net-misc/cisco-vpnclient-3des/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/cisco-vpnclient-3des
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/ChangeLog,v 1.54 2007/09/07 17:58:44 wolf31o2 Exp $
+# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/ChangeLog,v 1.55 2008/02/02 14:15:39 wolf31o2 Exp $
+
+*cisco-vpnclient-3des-4.8.00.0490-r1 (02 Feb 2008)
+
+ 02 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> +files/2.6.24.patch,
+ +cisco-vpnclient-3des-4.8.00.0490-r1.ebuild:
+ Added a patch for 2.6.24 support. Closing bug #207536.
07 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org>
+files/4.7.00.0640-2.6.22.patch,
diff --git a/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490-r1.ebuild b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490-r1.ebuild
new file mode 100644
index 000000000000..2b427057a03c
--- /dev/null
+++ b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490-r1.ebuild,v 1.1 2008/02/02 14:15:39 wolf31o2 Exp $
+
+inherit eutils linux-mod
+
+MY_PV=${PV}-k9
+DESCRIPTION="Cisco VPN Client (3DES)"
+HOMEPAGE="http://cco.cisco.com/en/US/products/sw/secursw/ps2308/index.html"
+SRC_URI="vpnclient-linux-x86_64-${MY_PV}.tar.gz"
+
+LICENSE="cisco-vpn-client"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="fetch strip" # stricter"
+
+QA_TEXTRELS="opt/cisco-vpnclient/lib/libvpnapi.so"
+QA_EXECSTACK="opt/cisco-vpnclient/lib/libvpnapi.so
+ opt/cisco-vpnclient/bin/vpnclient
+ opt/cisco-vpnclient/bin/cvpnd
+ opt/cisco-vpnclient/bin/cisco_cert_mgr
+ opt/cisco-vpnclient/bin/ipseclog"
+
+S=${WORKDIR}/vpnclient
+
+VPNDIR="/etc/opt/cisco-vpnclient/"
+
+pkg_nofetch() {
+ einfo "Please visit:"
+ einfo " ${HOMEPAGE}"
+ einfo "and download ${A} to ${DISTDIR}"
+}
+
+src_unpack () {
+ unpack ${A}
+ cd "${S}"
+
+ epatch ${FILESDIR}/2.6.22.patch
+ epatch ${FILESDIR}/2.6.24.patch
+}
+
+src_compile () {
+ unset ARCH
+ sh ./driver_build.sh ${KV_DIR}
+ [ ! -f ./cisco_ipsec -a ! -f ./cisco_ipsec.ko ] \
+ && die "Failed to make module 'cisco_ipsec'"
+ sed -i "s#@VPNBINDIR@#/usr/bin#" vpnclient_init
+ sed -i "s#@VPNBINDIR@#/usr/bin#" vpnclient.ini
+}
+
+src_install() {
+ newinitd ${FILESDIR}/vpnclient.rc vpnclient
+
+ exeinto /opt/cisco-vpnclient/bin
+ exeopts -m0711
+ doexe vpnclient
+ exeopts -m4711
+ doexe cvpnd
+ into /opt/cisco-vpnclient/
+ dobin ipseclog cisco_cert_mgr
+ insinto /opt/cisco-vpnclient/lib
+ doins libvpnapi.so
+ insinto /opt/cisco-vpnclient/include
+ doins vpnapi.h
+ dodir /usr/bin
+ dosym /opt/cisco-vpnclient/bin/vpnclient /usr/bin/vpnclient
+
+ insinto /lib/modules/${KV}/CiscoVPN
+ if kernel_is 2 6; then
+ doins cisco_ipsec.ko
+ else
+ doins cisco_ipsec
+ fi
+
+ insinto ${VPNDIR}
+ doins vpnclient.ini
+ insinto ${VPNDIR}/Profiles
+ doins *.pcf
+ dodir ${VPNDIR}/Certificates
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ einfo "You must run \`/etc/init.d/vpnclient start\` before using the client."
+ echo
+ ewarn "Configuration directory has moved to ${VPNDIR}!"
+ echo
+}
diff --git a/net-misc/cisco-vpnclient-3des/files/2.6.24.patch b/net-misc/cisco-vpnclient-3des/files/2.6.24.patch
new file mode 100644
index 000000000000..14f7485c38bb
--- /dev/null
+++ b/net-misc/cisco-vpnclient-3des/files/2.6.24.patch
@@ -0,0 +1,144 @@
+diff -Nur vpnclient/GenDefs.h vpnclient.new/GenDefs.h
+--- vpnclient/GenDefs.h 2007-08-22 21:30:31.000000000 +0200
++++ vpnclient.new/GenDefs.h 2008-01-25 08:56:46.000000000 +0100
+@@ -105,6 +105,12 @@
+ #define _INTPTR_T_DEFINED
+ #endif
+
++/* uintptr_t has been defined in include/linux/types.h in 2.6.24.
++ * No need to define it here again (will only lead to compile errors)
++ *
++ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11
++ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ #ifndef _UINTPTR_T_DEFINED
+ #if defined(_LP64)
+ #warning 64 bit
+@@ -114,6 +120,7 @@
+ #endif
+ #define _UINTPTR_T_DEFINED
+ #endif
++#endif
+
+
+ typedef int BOOL;
+diff -Nur vpnclient/interceptor.c vpnclient.new/interceptor.c
+--- vpnclient/interceptor.c 2007-08-22 21:30:31.000000000 +0200
++++ vpnclient.new/interceptor.c 2008-01-25 09:50:52.000000000 +0100
+@@ -28,6 +28,10 @@
+ #include <linux/udp.h>
+ #include <net/protocol.h>
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++#include <net/net_namespace.h>
++#endif
++
+ #include "linux_os.h"
+
+ #include "vpn_ioctl_linux.h"
+@@ -48,7 +52,7 @@
+ unsigned long rx_bytes;
+
+ /*methods of the cipsec network device*/
+-static int interceptor_init(struct net_device *);
++static void interceptor_init(struct net_device *);
+ static struct net_device_stats *interceptor_stats(struct net_device *dev);
+ static int interceptor_ioctl(struct net_device *dev, struct ifreq *ifr,
+ int cmd);
+@@ -107,18 +111,27 @@
+
+ BINDING Bindings[MAX_INTERFACES];
+
++/* 2.6.24 handles net_devices a little bit different
++ *
++ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++static struct net_device* interceptor_dev;
++#else
+ static struct net_device interceptor_dev = {
+ .name = interceptor_name,
+ .init = interceptor_init
+ };
++#endif
++
+ static struct notifier_block interceptor_notifier = {
+ .notifier_call = handle_netdev_event,
+ };
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+-static int
++static void
+ #else
+-static int __init
++static void __init
+ #endif
+ interceptor_init(struct net_device *dev)
+ {
+@@ -133,8 +146,6 @@
+ dev->flags |= IFF_NOARP;
+ dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
+ kernel_memset(dev->broadcast, 0xFF, ETH_ALEN);
+-
+- return 0;
+ }
+
+ static struct net_device_stats *
+@@ -362,8 +373,13 @@
+
+ dp = NULL;
+ num_target_devices = 0;
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+- for_each_netdev(dp)
++ for_each_netdev(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++ &init_net,
++#endif
++ dp)
+ #else
+ for (dp = dev_base; dp != NULL; dp = dp->next)
+ #endif
+@@ -919,15 +935,29 @@
+
+ rc = CniPluginLoad(&pcDeviceName, &PCNICallbackTable);
+
++/* 2.6.24 needs to allocate each netdevice before registering it, otherwise
++ * the kernel BUG()s.
++ *
++ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++ if(! (interceptor_dev = alloc_netdev(sizeof(struct net_device), interceptor_name, interceptor_init)))
++ return 0;
++#endif
++
+ if (CNI_IS_SUCCESS(rc))
+ {
+
+ CNICallbackTable = *PCNICallbackTable;
+ CniPluginDeviceCreated();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++ if ((status = register_netdev(interceptor_dev)) != 0)
++#else
+ if ((status = register_netdev(&interceptor_dev)) != 0)
++#endif
+ {
+ printk(KERN_INFO "%s: error %d registering device \"%s\".\n",
+- LINUX_VPN_IFNAME, status, interceptor_dev.name);
++ LINUX_VPN_IFNAME, status, interceptor_name);
+ CniPluginUnload();
+
+ }
+@@ -947,7 +977,11 @@
+ cleanup_frag_queue();
+ CniPluginUnload();
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
++ unregister_netdev(interceptor_dev);
++#else
+ unregister_netdev(&interceptor_dev);
++#endif
+ unregister_netdevice_notifier(&interceptor_notifier);
+
+ return;