diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2012-12-11 19:45:52 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2012-12-11 19:45:52 +0000 |
commit | 580a70de9c0273892a6cb0f936e9c9610a2e6c2b (patch) | |
tree | 97f6928ef2b3431cd80042b638088d1c26191baa /net-misc/openconnect | |
parent | Linux 3.7 Support; Stability Fixes; Performance Regression Fix; Fix bug #411555 (diff) | |
download | historical-580a70de9c0273892a6cb0f936e9c9610a2e6c2b.tar.gz historical-580a70de9c0273892a6cb0f936e9c9610a2e6c2b.tar.bz2 historical-580a70de9c0273892a6cb0f936e9c9610a2e6c2b.zip |
Revbump with improved init script for missing pid directory. Bug #446255. Thanks to Matthew Schultz <mattsch@gmail.com>
Package-Manager: portage-2.1.11.34/cvs/Linux x86_64
Manifest-Sign-Key: 0xB4AFF2C2
Diffstat (limited to 'net-misc/openconnect')
-rw-r--r-- | net-misc/openconnect/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/openconnect/Manifest | 31 | ||||
-rw-r--r-- | net-misc/openconnect/files/openconnect.init.in | 20 | ||||
-rw-r--r-- | net-misc/openconnect/openconnect-4.07-r1.ebuild | 135 |
4 files changed, 175 insertions, 20 deletions
diff --git a/net-misc/openconnect/ChangeLog b/net-misc/openconnect/ChangeLog index f957a34ba800..1e201d059008 100644 --- a/net-misc/openconnect/ChangeLog +++ b/net-misc/openconnect/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/openconnect # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/ChangeLog,v 1.3 2012/12/05 18:53:47 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/ChangeLog,v 1.4 2012/12/11 19:45:50 hwoarang Exp $ + +*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) diff --git a/net-misc/openconnect/Manifest b/net-misc/openconnect/Manifest index c5c0363a7889..8225841cef15 100644 --- a/net-misc/openconnect/Manifest +++ b/net-misc/openconnect/Manifest @@ -2,30 +2,31 @@ Hash: SHA256 AUX openconnect.conf.in 941 SHA256 d0fbfb0c93591415d93096310caff8550de06faf94c72dd52d9a8654a3c451aa SHA512 a689df7141621c80bca77fdd1e01397b98882c7fd8db79b2fe1495916656522234e3af739538002533c003e4243e9af4bf80cd73bae961e15568997ce89ef6d5 WHIRLPOOL 36caee584cad889a9f746046c9d41de755a27260e46b8886149343224452b07240bad770b0040ad7998043eefed847873cd580645bda83280901d069692384bd -AUX openconnect.init.in 2460 SHA256 56826a66fc5e8833daf96c71416423b1d9394afb2ca42f6423af84645da78305 SHA512 54f6e65a14d4f6498f30da67b186e32fdd3649f6b1b684487fe08e89d88c45fdfb0b7183dff2e00a0ff5471ce6ebca2c692d6fb7628cf8df80628e9b5141a0ad WHIRLPOOL 6d2a459ac7b7201c5d579506df918ab38a690c97d876ba28e53cfdc1db4cd508e97b94917bdf7b70ac4b15a9c72fa5a553433c1745407bdbb5293beaf2b2d7a3 +AUX openconnect.init.in 2846 SHA256 8e054fef31e183f671fbc172da651546db181e3dec5dda7ee921ddc48a6aba60 SHA512 73cd6362255a89ef345a54fe21a30fddc1b2ade3f6c079f8fbd45d3cfa96a5eebb0114204fbfa2b8646e895bec3432cc97377473e5259196f46ababfb6f4003a WHIRLPOOL bd1c61ee15212b1c4ed4cd0279594f5d6755c726d26938f1367e8c991c4d0189431b08132283b7a677dce9e50d30b7a0c8d9276747a264f0af4a3d27b8d7333d AUX openconnect.logrotate 116 SHA256 19cca62003efb050832c05cbca5a5e9057b18cf28d1c3a445c2c6fe1cf7022a2 SHA512 ea1b6caf6278fea515c299072ee799ab3676014784703d7fa8e4f4d7bfc4599650c386d9706a3e6d92c195c9e5e1628fa6efc1124e1ae72875cc9eaab73cb077 WHIRLPOOL 7116069442a23d369913d455d7131b2d1b3884d378da6d6aa1da357bd2fb7057f9d84fd253da608be35252573052fb02c9cddab1a88516611c5e010324194064 DIST openconnect-3.11.tar.gz 354616 SHA256 936b3e4e83cec75e65d2d2a23184b0dba02c1e96c6caea4039a4870bc598275d DIST openconnect-4.07.tar.gz 1182237 SHA256 14cacb17813714ed16c58dbcb33cd77463c4e3c4e52e955e8b59a43833d3b6f3 SHA512 d30d7d379372811fa654afd3077cb7717037531cffed8c2b48cd422648bc02be706233e1b171ba6ac7cefec1f82c769973186a3bcefebb2eb83a33cc961746e6 WHIRLPOOL bab19c16bde866c0e2588ee2f56ee4208069555983174468169c649bd01353dc22728d9a713b1e0a71541899a87737f52bf53d4fa92feb1eae2c09376b1a910b DIST openconnect-script 18355 SHA256 d8bfd3632a2f5e57388a167fe735eee41c523baadad78b3bc1578def675f4bcd DIST openconnect-script-20121108205904.tar.gz 6380 SHA256 99fb6c72c13b5724766a952e392b75774771f220f59793e5d2576d7e3412555b SHA512 089650538f035875c205bed0190e44ed8176a138bbe2f635ac5335050c3b831fc85fbd61448ddaf7cb540c0a5d9b32f8f909e1fd5be188bfef07e721d4656545 WHIRLPOOL 3dc2b820afe49cc59c96d514f166d94fdbc3db9f3edbace69e41ae7e604263a834fff0a1fa7be806ff88c328a75de4306ec159e4022d43cd245addf34615efb2 EBUILD openconnect-3.11.ebuild 2096 SHA256 d9aa3e584e653d9ff57b98d67f34de7a7748c575a1f8444342dbe855c75ec58b SHA512 1ef8f7a0d70ce5230b4464c85e1fb6b035439e6bb3044eb9a2a198b558c1da9662deb3b8b7e188e621b2a56df1cc901960827564eed250d4ff72d32dd61a74dd WHIRLPOOL 9e3d5c0280d1945935598c7730978deddea53ceed5e4dafec02d462ff1a1234c972a0f2bdd191e5f2ab5fada8bd27671c5472fc482183c1c319abce38c39ca0d +EBUILD openconnect-4.07-r1.ebuild 4445 SHA256 1310e45c717506ba7f486816fe799277a9e70e485175855dffe6142a4f9a4b1f SHA512 83f9447e9d7a182f549fffd9d2fe295ee07fd56b25a124a5351a5554df03b7d6caca653cd98157b2de8f5c45f7f7ac2103820671a8b3e3d28915d0dc792866f5 WHIRLPOOL 6e1f3066f53c24dee69475b801abfe951a2a2a8287f95059c00b4746281dd91e47cb19e34f2ed890f6f27f88e1fd7d21aa384bfe30d3a76ed533f23281a6ca29 EBUILD openconnect-4.07.ebuild 4463 SHA256 1f912d6739533e7aef8fd85ea98c6b29604d28d849a282839352e924dab1c8a1 SHA512 e6b5a334b9923eb70213364201c8f21595fc3c7ae658720a82a78b212f1aafaf4be8625e1037dd8878f6f06254b86149480777dd1d6a54780bb07bb2dd4d64c5 WHIRLPOOL aadc3505d8304f77c0f94d6e9d3fb045e287aa69418759a51c64f99db56c1e7c98d8f251ab682a22662829458eb6ad154f3499c206a5238d5cc17dabe93b198b -MISC ChangeLog 825 SHA256 572bacd3e173e502c755a611d47d72b378867cb8063e964fc253fbfb151d3b30 SHA512 e0ae0669704322b97b175b63d9f0501e44865e7d55fade03cfdef5000980386b76e74fcf4ff6cf08a2a6bc8d93a117fa091dc8bd319777093477e3201e5f8762 WHIRLPOOL df7ab1480497d76a65c3a8442e014584ec694b8d0dfcf40687e9191d5a948b3b4913d622e8e3ca11ac233b3683ac18cc66de6f020612d41d365faa5b86f08669 +MISC ChangeLog 1097 SHA256 d108f5ecf87706163c9ca4f03b478b6d0df629f0c26bfa7f6902cdd4c698c388 SHA512 1d851a7624bc8b9fc0acb8bd5eee6ab3d425cda909f4c32af122d6a037a53d3ab1e8736eb5c57351282b770226a50c64d77d40b9a49229cb61aeeda4b8e5ad79 WHIRLPOOL 001d63cebf1534702340abdf95b653ba7037267635a15a9f23a12340b06d263bc30b9c781b2c6a37cb8b1f8bd30e6048ad27709c305e04e77b303da2a0d3ebc7 MISC metadata.xml 357 SHA256 a0c22435f280b39d9c196f0e0d871bef06bcea3d79f502a95670d88b81adc963 SHA512 15d5432486f294c7eda7b425bfac82d04ddb39785022eaed91cf66211fb10a444d6b0f7cbc74a5254bb3846e93486c85922b2018a877f241564a50165a15affe WHIRLPOOL cf9549698a075ea111f31560b9d5e0853790fcc50f4bea1ee5efe4d62eb2ce0a83d4fdd570bd3f3047d0cf1fff2da2a2fdac4414481521592cdbdbb4471b3380 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJQv5g8AAoJEPqDWhW0r/LCDZAQAJNuuKxPWJQWlVm+JeBbc8/4 -i3GxbGrB3Vh73Vq2jimZS2gaVw2EUIB9+TEhk0HDLB5/t0RSSWrVnRwUrDCwES+z -zoaEO8iMC5klppE2fLAxp2xyn+n3X7fki/Mikq/8gN5yjItpIddWmyXxlJ4Ru1Mi -NkOa9DJkOcfUgpgbi6FqTag4SEpFiWXTsqKal2a9w5XVMnFldst/rVfRBoizvrdH -4v3xuXbalVSa0qUoVLyYAoHRmj2ksNU+yRwnY4J+80fOoNcxlcC9z8E2AHIGRpb/ -zGWv0Xwoeo93zTVXXofbX1rMrlSbM4QcXMKGjmDjqhmuXqagEMsG/Y+RdXouc9+w -Vk+Qosymiy3EVgtBk512zKLjn9eD1Xh04AvytshZv/S4Tvh+DqYHqE9khuw61W3u -F+0M1GFKfgxH3EY8EZQaaHraCfLqEnemjP/x225cV1shFHnUqUupe/xEqcDAugGu -mtLQzRTMlKtZFSoAF2Ii1hCEUdHIoSjbUwcUqZVIsJWFM29MUZ60GQW6rvWkdujS -EaqYor+hRIOL7JEI1DB4LE1XrO3al2MS1r28EgG33zSU7ne1ygZBeMIcRLkc3OoP -VdUHooxr+dvwVKdu36H5iBsqoo9JiHVEhbxmf985uN1AcyzQYzmaSHbRmy5AtaEv -DKXqmTdeHvCbNMP3EwQQ -=owZ/ +iQIcBAEBCAAGBQJQx41tAAoJEPqDWhW0r/LCDoAP/0XWXPPGXJM4HB+gjWsACcMt +UBYtsooN/PrFsXuOe78DveyLwpiMac61ClKcaOqiR3CFWnOqkS5t2CFf1GA6Yyq8 +FuPe1iT56nI/2UPzNRpJ4OmSJNNogs+EXv1yWSuoIMiKr2eqOydYI2GbQMM1kWCH +8Ebxd/naVT2WYixZ4UAqJyJUDGPN+stMqUMn7XlAv8VREmjf23CHmZOGsstPz2mr +MeGsxXxyT84HfGUcDr4u7KdzEeg8c26huGA/HfZ99L60CTk8bXHA02+IGfzgxo8r +joJaBWaQMJjjoGoqFEnPSOITRgESnYfku3FclWkIx6T8TzitS2Hq8txK26nsmWPl +Z+vNvc+RYB8nCtiKa2QTmBPO85gVAG/MrDFJUYOk8LD1bLku3GwC4njHPvpZybyt +pYM+YpvhgKDcdPjY/iKsyyJ5ClX3cz4JQOmoNqMeppEzW7M0e4Ps4VR9LQPHp5iK +rFaOV2vdEMHHW5SYd0z8p16lv9UcaoKs7TQtZDgI5uahVCEBr5ef7PJ/cWo9LJdE +9dbjfWDrp+iz3jZl7InhvAHdjVwHNo51d5WtTg3BKvO64sGz28PmK3EnmnFdf3P5 +UEvWiuFLAOFylT82rqFW4e8iIi37RK7sKSdJpSosBhoSH6+fh6qm0wa1DBmtumc9 +dy2+2Barmxbrq/QtiiHd +=8U65 -----END PGP SIGNATURE----- diff --git a/net-misc/openconnect/files/openconnect.init.in b/net-misc/openconnect/files/openconnect.init.in index abe1d0788673..3f3f32651cde 100644 --- a/net-misc/openconnect/files/openconnect.init.in +++ b/net-misc/openconnect/files/openconnect.init.in @@ -1,13 +1,13 @@ #!/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.2 2012/12/05 18:53:47 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/files/openconnect.init.in,v 1.3 2012/12/11 19:45:50 hwoarang Exp $ VPN="${RC_SVCNAME#*.}" VPNLOG="/var/log/openconnect/${VPN}" VPNLOGFILE="${VPNLOG}/openconnect.log" VPNERRFILE="${VPNLOG}/openconnect.err" -VPNPID="/var/run/openconnect/${VPN}.pid" +VPNPID="/run/openconnect/${VPN}.pid" VPNDIR="/etc/openconnect/${VPN}" PREUPSCRIPT="${VPNDIR}/preup.sh" PREDOWNSCRIPT="${VPNDIR}/predown.sh" @@ -23,8 +23,13 @@ depend() { checkconfig() { if [ $VPN = "openconnect" ]; then - eerror "You cannot call openconnect directly. You must create a symbolic link to it instead with the vpn name:" + 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 } @@ -62,7 +67,14 @@ start() { mkdir -p "${VPNLOG}" fi - local args="" + 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}" diff --git a/net-misc/openconnect/openconnect-4.07-r1.ebuild b/net-misc/openconnect/openconnect-4.07-r1.ebuild new file mode 100644 index 000000000000..e8f58990c583 --- /dev/null +++ b/net-misc/openconnect/openconnect-4.07-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openconnect/openconnect-4.07-r1.ebuild,v 1.1 2012/12/11 19:45:50 hwoarang Exp $ + +EAPI="5" + +inherit eutils linux-info + +DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software" +HOMEPAGE="http://www.infradead.org/openconnect.html" +# New versions of openconnect-script can be found here: +# http://git.infradead.org/users/dwmw2/vpnc-scripts.git/history/HEAD:/vpnc-script +SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz + http://dev.gentoo.org/~hwoarang/distfiles/openconnect-script-20121108205904.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs nls -gnutls +openssl" +ILINGUAS="ar as ast bg bg_BG bn bn_IN bs ca ca@valencia cs da de el en_GB en_US eo es es_CR + es_MX et eu fa fi fr gd gl gu he hi hi_IN hu id it ja km kn ko ku lo lt lv ml mr + ms nb nl nn no or pa pl pt pt_BR pt_PT ro ru sk sl sq sr sr@latin sv ta te + tg th tl tr ug uk ur_PK vi vi_VN wa zh_CN zh_HK zh_TW" +for lang in $ILINGUAS; do + IUSE="${IUSE} linguas_${lang}" +done +# only one ssl provider can be enabled +REQUIRED_USE="^^ ( gnutls openssl )" + +DEPEND="dev-libs/libxml2 + net-libs/libproxy + sys-libs/zlib + gnutls? ( + || ( + ( >=net-libs/gnutls-3[static-libs?] dev-libs/nettle ) + ( =net-libs/gnutls-2.12*[nettle,static-libs?] dev-libs/nettle ) + ( =net-libs/gnutls-2.12*[-nettle,static-libs?] dev-libs/libgcrypt[static-libs?] ) + ) + app-misc/ca-certificates + ) + openssl? ( dev-libs/openssl[static-libs?] )" + +RDEPEND="${DEPEND} + sys-apps/iproute2" + +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 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 + # Override vpn-script test since the build system violates the sandbox and + # needs the path set to the real default path after it's installed + sed -e "s#-x \"\$with_vpnc_script\"#-n \"${WORKDIR}/openconnect-script\"#" \ + -i configure || die + econf \ + --with-vpnc-script=/etc/openconnect/openconnect.sh \ + $(use_enable static-libs static) \ + $(use_enable nls ) \ + $(use_with openssl ) \ + $(use_with gnutls ) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS TODO + newinitd "${FILESDIR}"/openconnect.init.in openconnect + dodir /etc/openconnect + insinto /etc/openconnect + newconfd "${FILESDIR}"/openconnect.conf.in openconnect + exeinto /etc/openconnect + newexe "${WORKDIR}"/openconnect-script openconnect.sh + insinto /etc/logrotate.d + newins "${FILESDIR}"/openconnect.logrotate openconnect + keepdir /var/log/openconnect + + # Remove useless .la files + find "${D}" -name '*.la' -delete || die "la file removal failed" +} + +pkg_postinst() { + 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/*" +} |