summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/openconnect')
-rw-r--r--net-misc/openconnect/ChangeLog165
-rw-r--r--net-misc/openconnect/Manifest11
-rw-r--r--net-misc/openconnect/files/openconnect.conf.in26
-rw-r--r--net-misc/openconnect/files/openconnect.init.in123
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r1137
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r2144
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r3145
-rw-r--r--net-misc/openconnect/files/openconnect.logrotate8
-rw-r--r--net-misc/openconnect/metadata.xml20
-rw-r--r--net-misc/openconnect/openconnect-7.04.ebuild150
10 files changed, 929 insertions, 0 deletions
diff --git a/net-misc/openconnect/ChangeLog b/net-misc/openconnect/ChangeLog
new file mode 100644
index 0000000..ecd232c
--- /dev/null
+++ b/net-misc/openconnect/ChangeLog
@@ -0,0 +1,165 @@
+# ChangeLog for net-misc/openconnect
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/ChangeLog,v 1.36 2015/01/06 02:35:10 floppym Exp $
+
+ 06 Jan 2015; Mike Gilbert <floppym@gentoo.org> openconnect-7.02.ebuild:
+ Use tarball for vpnc-scripts.
+
+*openconnect-7.02 (20 Dec 2014)
+
+ 20 Dec 2014; Mike Gilbert <floppym@gentoo.org> +openconnect-7.02.ebuild,
+ openconnect-4.08.ebuild, openconnect-5.01.ebuild, openconnect-5.02.ebuild,
+ openconnect-5.03.ebuild, openconnect-5.99-r1.ebuild, openconnect-5.99.ebuild,
+ openconnect-6.00.ebuild, openconnect-7.01.ebuild:
+ Version bump. Define subslot based on libopenconnect soname.
+
+ 09 Dec 2014; Mike Gilbert <floppym@gentoo.org> metadata.xml:
+ Add myself as a maintainer.
+
+*openconnect-7.01 (09 Dec 2014)
+
+ 09 Dec 2014; Mike Gilbert <floppym@gentoo.org> +files/openconnect.init.in-r3,
+ +openconnect-7.01.ebuild:
+ Version bump. init script adjustments, bug 519928.
+
+ 25 Nov 2014; Julian Ospald <hasufell@gentoo.org> metadata.xml:
+ drop maintainership
+
+*openconnect-6.00 (26 Jul 2014)
+
+ 26 Jul 2014; Julian Ospald <hasufell@gentoo.org> +openconnect-6.00.ebuild,
+ metadata.xml:
+ version bump
+
+*openconnect-5.99-r1 (17 Mar 2014)
+
+ 17 Mar 2014; Julian Ospald <hasufell@gentoo.org> openconnect-5.99.ebuild,
+ +openconnect-5.99-r1.ebuild, +files/openconnect.init.in-r2:
+ fix bug #481978 and bug #503644, patches by Matthew Schultz
+
+ 06 Mar 2014; Julian Ospald <hasufell@gentoo.org> openconnect-5.99.ebuild:
+ update linguas
+
+*openconnect-5.99 (06 Mar 2014)
+
+ 06 Mar 2014; Julian Ospald <hasufell@gentoo.org> +openconnect-5.99.ebuild,
+ metadata.xml:
+ version bump
+
+ 01 Mar 2014; Michał Górny <mgorny@gentoo.org> openconnect-4.08.ebuild,
+ openconnect-5.01.ebuild, openconnect-5.02.ebuild, openconnect-5.03.ebuild:
+ Update libgcrypt dep to use slot :0.
+
+*openconnect-5.03 (03 Feb 2014)
+
+ 03 Feb 2014; Julian Ospald <hasufell@gentoo.org> +openconnect-5.03.ebuild:
+ version bump
+
+ 04 Jan 2014; Julian Ospald <hasufell@gentoo.org> openconnect-4.08.ebuild,
+ openconnect-5.01.ebuild:
+ fix license
+
+*openconnect-5.02 (04 Jan 2014)
+
+ 04 Jan 2014; Julian Ospald <hasufell@gentoo.org> +openconnect-5.02.ebuild:
+ version bump
+
+ 29 Jun 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+ openconnect-5.01.ebuild:
+ Do not depend on incompatible openssl versions, and enable gnutls USE flag by
+ default (bug #474504, acked by hasufell).
+
+*openconnect-5.01 (23 Jun 2013)
+
+ 23 Jun 2013; Julian Ospald <hasufell@gentoo.org> +openconnect-5.01.ebuild,
+ +files/openconnect.init.in-r1, metadata.xml:
+ version bump, remove bashisms from initscript
+
+ 11 Jun 2013; Tom Wijsman <TomWij@gentoo.org> metadata.xml:
+ Changed metadata.xml order per bug-wranglers guidelines, benefits our
+ assignment scripts.
+
+ 11 Jun 2013; Julian Ospald <hasufell@gentoo.org> metadata.xml:
+ update metadata.xml, make me proxy-maintainer
+
+ 15 May 2013; Patrick Lauer <patrick@gentoo.org> metadata.xml:
+ Fix metadata.xml
+
+ 02 Apr 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.08.ebuild:
+ Stable for ppc64, wrt bug #462890
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> -openconnect-3.11.ebuild,
+ -openconnect-4.07-r2.ebuild, -openconnect-4.07-r3.ebuild,
+ -openconnect-4.99.ebuild:
+ Remove old
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.08.ebuild:
+ Stable for amd64, wrt bug #457068
+
+ 26 Mar 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.08.ebuild:
+ Stable for x86, wrt bug #457068
+
+*openconnect-4.08 (04 Mar 2013)
+
+ 04 Mar 2013; Markos Chandras <hwoarang@gentoo.org> +openconnect-4.08.ebuild:
+ Upstream lacks math skills and for them 4.08 is greater than 4.99. Fixes bug
+ #460098. Mask 4.99 until all the mess is sorted
+
+ 26 Feb 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.99.ebuild:
+ Stable for x86, wrt bug #457068
+
+ 26 Feb 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.99.ebuild:
+ Stable for amd64, wrt bug #457068
+
+*openconnect-4.99 (25 Feb 2013)
+
+ 25 Feb 2013; Agostino Sarubbo <ago@gentoo.org> +openconnect-4.99.ebuild:
+ Version bump, wrt to bug #457068
+
+ 30 Jan 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.07-r3.ebuild:
+ Stable for x86, wrt bug #453936
+
+ 30 Jan 2013; Agostino Sarubbo <ago@gentoo.org> openconnect-4.07-r3.ebuild:
+ Stable for amd64, wrt bug #453936
+
+*openconnect-4.07-r3 (04 Jan 2013)
+
+ 04 Jan 2013; Markos Chandras <hwoarang@gentoo.org>
+ +openconnect-4.07-r3.ebuild:
+ rework gnutls, ssl use flags logic. Bug #448436. Thanks to Matthew Schultz
+ <mattsch@gmail.com>
+
+ 22 Dec 2012; Markos Chandras <hwoarang@gentoo.org>
+ -openconnect-4.07-r1.ebuild, -openconnect-4.07.ebuild:
+ Remove old
+
+*openconnect-4.07-r2 (22 Dec 2012)
+
+ 22 Dec 2012; Markos Chandras <hwoarang@gentoo.org>
+ +openconnect-4.07-r2.ebuild, files/openconnect.init.in:
+ Revbump to fix #447114 and #447106. Thanks to Matthew Schultz
+ <mattsch@gmail.com>
+
+*openconnect-4.07-r1 (11 Dec 2012)
+
+ 11 Dec 2012; Markos Chandras <hwoarang@gentoo.org>
+ +openconnect-4.07-r1.ebuild, files/openconnect.init.in:
+ Revbump with improved init script for missing pid directory. Bug #446255.
+ Thanks to Matthew Schultz <mattsch@gmail.com>
+
+*openconnect-4.07 (05 Dec 2012)
+
+ 05 Dec 2012; Markos Chandras <hwoarang@gentoo.org>
+ +files/openconnect.logrotate, +openconnect-4.07.ebuild,
+ files/openconnect.conf.in, files/openconnect.init.in, metadata.xml:
+ Version bump. Thanks to Matthew Schultz <mattsch@gmail.com> who will maintain
+ it. Bug #384099
+
+ 18 Nov 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml:
+ Drop maintainer as talked with him via mail.
+
+*openconnect-3.11 (16 Aug 2011)
+
+ 16 Aug 2011; Robert Piasek <dagger@gentoo.org> +openconnect-3.11.ebuild,
+ +files/openconnect.conf.in, +files/openconnect.init.in:
+ Add OpenConnect 3.11
diff --git a/net-misc/openconnect/Manifest b/net-misc/openconnect/Manifest
new file mode 100644
index 0000000..a1b7205
--- /dev/null
+++ b/net-misc/openconnect/Manifest
@@ -0,0 +1,11 @@
+AUX openconnect.conf.in 941 SHA256 d0fbfb0c93591415d93096310caff8550de06faf94c72dd52d9a8654a3c451aa SHA512 a689df7141621c80bca77fdd1e01397b98882c7fd8db79b2fe1495916656522234e3af739538002533c003e4243e9af4bf80cd73bae961e15568997ce89ef6d5 WHIRLPOOL 36caee584cad889a9f746046c9d41de755a27260e46b8886149343224452b07240bad770b0040ad7998043eefed847873cd580645bda83280901d069692384bd
+AUX openconnect.init.in 2869 SHA256 a7674216e6140559db9306efe7d9e0cb8fe4f094c04c0c5b33dc50ac4d99ac9a SHA512 233d70713380229483445b91ede0a66ef74bcf1c0177fbb36782aaec2fd3d90029743cee7230b5ec856a42da3d33303a3057578766600fda463d3d0d63f7f370 WHIRLPOOL ede17b6c1caa1c4c2094d8b124066ca6088336ac64fc0b6eeb45da61bd7a5a55bd3eb52b268bb4b285fedda8f759afdfb904ce4a7976c13f2c9d8eed52b27984
+AUX openconnect.init.in-r1 3066 SHA256 2a4b783fcb30e2a413aad0ae1d3f6de8764c940b6039628b8608625823615e18 SHA512 0b78b8c01a2c1a165d4d308175d19d3cc7cd45612bd329c0e98f9d5d328689c36bdc20108bbd9f65fdc520396ca63503ff120266d8278600df10bcb48b36577f WHIRLPOOL 310bdbff90ca9f392728faf6731ddd440689b41481567d0a92ce55dc26de04f52b894cdabc5f9c5f2a99749fb33919daa6edb77fd91b5af4e68b5e01b7f80e0e
+AUX openconnect.init.in-r2 3270 SHA256 c5db95fe3197f0f9f27edef7f51515c54d996c6c984a9938ce7bbeb3f7b54c64 SHA512 99462b8954c1e6a78f0993922210cab6d41a7211321484c36c14eb24ad8b1e509602ccdebcdbbfb85fb953017883c0a86e597182b53a61e0be8836261d30bf01 WHIRLPOOL 942c06776fd9b22acb88d9a7de6e96e55a666eab4f784b2c3cd922480de91d175664267cb0f5e78e750e412bffa0d07e560409bf993dc755008f5078c0f13142
+AUX openconnect.init.in-r3 3295 SHA256 3e667d5459dc4399421e4c2ac16a59276595c65426266e8175da3061352a199e SHA512 a3f8e4d817254bcf43788d17e07905dee5ca36b9a19064e53ebbffd01cf364bd481932ab40e3e7f089dc1c598934543c57a0c968fc23565acc2902f38a06f6c4 WHIRLPOOL 4b30d820b6b9447235de449dccfc7ae8fd96f394312b0ccfe8c3869993c7339ff4113542a38052cbb73758d4661f4f4e91ac63f96ee046dbc465362336866d48
+AUX openconnect.logrotate 116 SHA256 19cca62003efb050832c05cbca5a5e9057b18cf28d1c3a445c2c6fe1cf7022a2 SHA512 ea1b6caf6278fea515c299072ee799ab3676014784703d7fa8e4f4d7bfc4599650c386d9706a3e6d92c195c9e5e1628fa6efc1124e1ae72875cc9eaab73cb077 WHIRLPOOL 7116069442a23d369913d455d7131b2d1b3884d378da6d6aa1da357bd2fb7057f9d84fd253da608be35252573052fb02c9cddab1a88516611c5e010324194064
+DIST openconnect-7.04.tar.gz 1205264 SHA256 baac1fdf8f5f9debe1f91a2f3ca6895cf24ef0f8b2d8c2c67f5ce6789f28663b SHA512 72b00e66690d3a21f79145f12a970ad14c84e7aabb91d64d72484849a6de949b29d96cffa830e22c967fe74c76847e7982d1ce0cda16538c5b50097c16f7b69e WHIRLPOOL 09993ff2e5d67220f13f6cfa9b19512539bc14e611b5d5fe4bde192a0657760485152aefd624e7f95af1084a94753fd9bdd4866ad4e913989b7e67b5021774ce
+DIST vpnc-scripts-20140806.tar.gz 20070 SHA256 1f61a6c5ec8a2dab7d5f12c9b438d931e41c6c1c258801ee978d5ed460f4d35f SHA512 bfa230d6eb2db0696a23228cef6e742dcf5e609c25de725c23e2c7bee96d00045ea656d6c7025cdf7785f70baeb8a8d79af6aec93d7285bcb3c029dc744e5380 WHIRLPOOL 78d0c5e23f408167904639a7804859a1d6b89668feab6834a589a3d9f7abf4f9d1da984553a8871b6a16af39a03e5a6f3f6506dd77f7f960c7fcdd56f0683e27
+EBUILD openconnect-7.04.ebuild 4366 SHA256 36d8218a96d93d656ac97147b2d403948bf1aa2fbf8d114fd980f0a132ea3e6d SHA512 2a0e292b77e8c5ee86be9097cbe63883eca85b72acc708c2f6956822f061443a17afee696969f60f956c0ff5ede95262febbb219ef393cbb5c82fb0cba640165 WHIRLPOOL 89ce0a123753c89879ed6865326a54fd85190c032e8b016a3fe8130bc30dd5a1132903fcd0d2f522524064ca4f1f42fb8a84f269110b3890f3e7c0f166a25829
+MISC ChangeLog 5829 SHA256 14635be1e497e11e1edb1414dd9fa3e68f97114703b6d966cccab2cde1a84f06 SHA512 6bedd90a0ffff74a51f482dace1cc4bc0d4996132cd1beaa8b6c5ebbe3345678c6d0ea3c477458e27761614aa273fd64e895baacabf929f85854e5b5c0c483bd WHIRLPOOL 0c72e97432bbf9af3649610af1d5267416863f117d788ca6cc4b6667d695d8d606d3806a4ac7b1abefb978d6edb23689bcb3ad716c51e3791b5fc1071acd2b54
+MISC metadata.xml 606 SHA256 c62dfd9f1996b2318f603d0d66b31cbe034773873d844dd344c86fecbf1f22f4 SHA512 2ebe6f9936c7dd7762874f9f8a5c5b9c206bb9af806990af5c9a85fdc1911a6078a7d6be73afbe6e018f777c61caeace9c0aa6710f1ab90446ae8609cdb6285a WHIRLPOOL fe571cb438ebe0e881b791e66acffccac15aba941d90694c751df6550b53bb986a17adfafbf6129123cf5ecde7a50ad4ea8f9f87622b12cd40c8462b79a32cdc
diff --git a/net-misc/openconnect/files/openconnect.conf.in b/net-misc/openconnect/files/openconnect.conf.in
new file mode 100644
index 0000000..53b14e6
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.conf.in
@@ -0,0 +1,26 @@
+# Variables to configure vpn tunnels where "vpnname" is the name of your vpn tunnel:
+#
+# server_vpnname
+# password_vpnname
+# vpnopts_vpnname
+#
+# The tunnel will need to be started with a symbolic link to openconnect:
+#
+# ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpnname
+#
+# If you'd like to execute a script on preup, postup, predown and postdown of the vpn tunnel, you
+# need to create executable scripts in a directory with the same name as
+# the vpn tunnel (vpn0 can be replaced with the vpn name):
+#
+# mkdir /etc/openconnect/vpn0
+# cd /etc/openconnect/vpn0"
+# echo '#!/bin/sh' > preup.sh"
+# cp preup.sh predown.sh"
+# cp preup.sh postup.sh"
+# cp preup.sh postdown.sh"
+# chmod 755 /etc/openconnect/vpn0/*"
+
+server_vpn0="vpn.server.tld"
+password_vpn0="YOUR_PASSWORD"
+# Any OPENCONNECT options my go here (see openconnect --help)
+vpnopts_vpn0="-l --passwd-on-stdin --user=YOUR_USERNAME --script=/etc/openconnect/openconnect.sh"
diff --git a/net-misc/openconnect/files/openconnect.init.in b/net-misc/openconnect/files/openconnect.init.in
new file mode 100644
index 0000000..5eee4ec
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in
@@ -0,0 +1,123 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/files/openconnect.init.in,v 1.4 2012/12/22 11:21:37 hwoarang Exp $
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${!SERVER}" == "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start --make-pidfile --pidfile "${VPNPID}" --stderr "${VPNERRFILE}" --stdout "${VPNLOGFILE}" --background \
+ --exec /usr/sbin/openconnect \
+ -- --pid-file="${VPNPID}" ${!VPNOPTS} ${!SERVER} <<< ${!PASSWORD}
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}"
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r1 b/net-misc/openconnect/files/openconnect.init.in-r1
new file mode 100644
index 0000000..72e3ab7
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r1
@@ -0,0 +1,137 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/files/openconnect.init.in-r1,v 1.1 2013/06/23 12:43:56 hasufell Exp $
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD
+ eval tmp_SERVER="\${${SERVER}}"
+ eval tmp_VPNOPTS="\${${VPNOPTS}}"
+ eval tmp_PASSWORD="\${${PASSWORD}}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start \
+ --make-pidfile \
+ --pidfile "${VPNPID}" \
+ --stderr "${VPNERRFILE}" \
+ --stdout "${VPNLOGFILE}" \
+ --background \
+ --exec /usr/sbin/openconnect -- \
+ --pid-file="${VPNPID}" \
+ ${tmp_VPNOPTS} \
+ ${tmp_SERVER} <<-E
+ ${tmp_PASSWORD}
+ E
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}"
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r2 b/net-misc/openconnect/files/openconnect.init.in-r2
new file mode 100644
index 0000000..fd4d44a
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r2
@@ -0,0 +1,144 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/files/openconnect.init.in-r2,v 1.1 2014/03/17 17:05:14 hasufell Exp $
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD
+ eval tmp_SERVER="\${${SERVER}}"
+ eval tmp_VPNOPTS="\${${VPNOPTS}}"
+ eval tmp_PASSWORD="\${${PASSWORD}}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start \
+ --make-pidfile \
+ --pidfile "${VPNPID}" \
+ --stderr "${VPNERRFILE}" \
+ --stdout "${VPNLOGFILE}" \
+ --background \
+ --exec /usr/sbin/openconnect -- \
+ --interface="${VPN}" \
+ --pid-file="${VPNPID}" \
+ ${tmp_VPNOPTS} \
+ ${tmp_SERVER} <<-E
+ ${tmp_PASSWORD}
+ E
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ # wait until the interface is up and an ip address is set before running postup
+ while true; do
+ if [ -n "$(ip addr show $VPN | grep inet)" ]; then
+ "${POSTUPSCRIPT}"
+ break
+ fi
+ done
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r3 b/net-misc/openconnect/files/openconnect.init.in-r3
new file mode 100644
index 0000000..423c7e0
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r3
@@ -0,0 +1,145 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/files/openconnect.init.in-r3,v 1.1 2014/12/09 00:14:37 floppym Exp $
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD
+ eval tmp_SERVER="\${${SERVER}}"
+ eval tmp_VPNOPTS="\${${VPNOPTS}}"
+ eval tmp_PASSWORD="\${${PASSWORD}}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start \
+ --make-pidfile \
+ --pidfile "${VPNPID}" \
+ --stderr "${VPNERRFILE}" \
+ --stdout "${VPNLOGFILE}" \
+ --background \
+ --exec /usr/sbin/openconnect -- \
+ --interface="${VPN}" \
+ --pid-file="${VPNPID}" \
+ ${tmp_VPNOPTS} \
+ ${tmp_SERVER} <<-E
+ ${tmp_PASSWORD}
+ E
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ # wait until the interface is up and an ip address is set before running postup
+ while true; do
+ sleep 0.5
+ if [ -n "$(ip addr show $VPN 2> /dev/null | grep inet)" ]; then
+ "${POSTUPSCRIPT}"
+ break
+ fi
+ done
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.logrotate b/net-misc/openconnect/files/openconnect.logrotate
new file mode 100644
index 0000000..0455e68
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.logrotate
@@ -0,0 +1,8 @@
+# openconnect logrotate snipet for Gentoo Linux
+#
+/var/log/openconnect/*/* {
+ missingok
+ size 5M
+ notifempty
+}
+
diff --git a/net-misc/openconnect/metadata.xml b/net-misc/openconnect/metadata.xml
new file mode 100644
index 0000000..00d9c55
--- /dev/null
+++ b/net-misc/openconnect/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mattsch@gmail.com</email>
+ <name>Matthew Schultz</name>
+ <description>Proxied maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <use>
+ <flag name='gssapi'>Build GSSAPI support.</flag>
+ <flag name='java'>Build JNI bindings using jni.h</flag>
+ <flag name='libproxy'>Enable proxy support.</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/openconnect/openconnect-7.04.ebuild b/net-misc/openconnect/openconnect-7.04.ebuild
new file mode 100644
index 0000000..7a1e017
--- /dev/null
+++ b/net-misc/openconnect/openconnect-7.04.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/openconnect-7.02.ebuild,v 1.2 2015/01/06 02:35:10 floppym Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_{6,7} )
+PYTHON_REQ_USE="xml"
+
+inherit eutils linux-info python-any-r1
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+VPNC_VER=20140806
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="doc +gnutls gssapi java libproxy nls static-libs"
+ILINGUAS="ar cs de el en_GB en_US es eu fi fr gl id lt nl pa pl pt pt_BR sk sl tg ug uk zh_CN zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ sys-libs/zlib
+ !gnutls? (
+ >=dev-libs/openssl-1.0.1h:0[static-libs?]
+ )
+ gnutls? (
+ >=net-libs/gnutls-3[static-libs?] dev-libs/nettle
+ app-misc/ca-certificates
+ )
+ gssapi? ( app-crypt/mit-krb5 )
+ libproxy? ( net-libs/libproxy )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ java? ( virtual/jre )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( ${PYTHON_DEPS} sys-apps/groff )
+ java? ( virtual/jdk )
+ nls? ( sys-devel/gettext )"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+
+ # stoken and liboath not in portage
+ econf \
+ --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls ) \
+ $(use_with libproxy) \
+ --without-stoken \
+ --without-liboath \
+ $(use_with gssapi) \
+ $(use_with java)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in-r3 openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The init script for openconnect has changed and now supports multiple vpn tunnels."
+ elog
+ elog "You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d"
+ elog "instead of calling it directly:"
+ elog
+ elog "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ elog
+ elog "You can then start the vpn tunnel like this:"
+ elog
+ elog "/etc/init.d/openconnect.vpn0 start"
+ elog
+ elog "If you would like to run preup, postup, predown, and/or postdown scripts,"
+ elog "You need to create a directory in /etc/openconnect with the name of the vpn:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog
+ elog "Then add executable shell files:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog "cd /etc/openconnect/vpn0"
+ elog "echo '#!/bin/sh' > preup.sh"
+ elog "cp preup.sh predown.sh"
+ elog "cp preup.sh postup.sh"
+ elog "cp preup.sh postdown.sh"
+ elog "chmod 755 /etc/openconnect/vpn0/*"
+ fi
+}