diff options
author | Lars Weiler <pylon@gentoo.org> | 2007-12-16 14:32:50 +0000 |
---|---|---|
committer | Lars Weiler <pylon@gentoo.org> | 2007-12-16 14:32:50 +0000 |
commit | ae4f4a6d567e0b326fc9517d4a10e85efc842938 (patch) | |
tree | 7884873d6177931cc5399b5badfc3d5ca3b609c2 /net-misc/strongswan | |
parent | amd64 stable wrt #202095 (diff) | |
download | gentoo-2-ae4f4a6d567e0b326fc9517d4a10e85efc842938.tar.gz gentoo-2-ae4f4a6d567e0b326fc9517d4a10e85efc842938.tar.bz2 gentoo-2-ae4f4a6d567e0b326fc9517d4a10e85efc842938.zip |
Version bump; new init-script; cleanup; quotes.
(Portage version: 2.1.4_rc10)
Diffstat (limited to 'net-misc/strongswan')
-rw-r--r-- | net-misc/strongswan/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/strongswan/files/digest-strongswan-2.8.3 | 3 | ||||
-rw-r--r-- | net-misc/strongswan/files/digest-strongswan-4.1.9 | 3 | ||||
-rw-r--r-- | net-misc/strongswan/files/ipsec | 63 | ||||
-rw-r--r-- | net-misc/strongswan/files/ipsec-install-4.1.9.patch | 9 | ||||
-rw-r--r-- | net-misc/strongswan/strongswan-2.8.0.ebuild | 10 | ||||
-rw-r--r-- | net-misc/strongswan/strongswan-2.8.3.ebuild | 141 | ||||
-rw-r--r-- | net-misc/strongswan/strongswan-2.8.4.ebuild | 10 | ||||
-rw-r--r-- | net-misc/strongswan/strongswan-4.1.9.ebuild | 97 |
9 files changed, 148 insertions, 198 deletions
diff --git a/net-misc/strongswan/ChangeLog b/net-misc/strongswan/ChangeLog index 7de4188c77a0..f863883ee50c 100644 --- a/net-misc/strongswan/ChangeLog +++ b/net-misc/strongswan/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/strongswan # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/ChangeLog,v 1.57 2007/10/08 17:50:51 pylon Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/ChangeLog,v 1.58 2007/12/16 14:32:49 pylon Exp $ + +*strongswan-4.1.9 (16 Dec 2007) + + 16 Dec 2007; Lars Weiler <pylon@gentoo.org> + +files/ipsec-install-4.1.9.patch, files/ipsec, strongswan-2.8.0.ebuild, + -strongswan-2.8.3.ebuild, strongswan-2.8.4.ebuild, + +strongswan-4.1.9.ebuild: + Version bump; new init-script; cleanup; quotes. 08 Oct 2007; Lars Weiler <pylon@gentoo.org> strongswan-4.1.6.ebuild: Removed experimental dbus/networkmanager-support. diff --git a/net-misc/strongswan/files/digest-strongswan-2.8.3 b/net-misc/strongswan/files/digest-strongswan-2.8.3 deleted file mode 100644 index fe88f92163e4..000000000000 --- a/net-misc/strongswan/files/digest-strongswan-2.8.3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 720bfbbb3a0deb6964119228ed4226b4 strongswan-2.8.3.tar.bz2 1710171 -RMD160 6bf267e500bb60d39fff5cef7872c3ad31750d9d strongswan-2.8.3.tar.bz2 1710171 -SHA256 01441bdf2e172074179d3c70a73a2a86754895e7fd60ff8b5f215fce70351bdf strongswan-2.8.3.tar.bz2 1710171 diff --git a/net-misc/strongswan/files/digest-strongswan-4.1.9 b/net-misc/strongswan/files/digest-strongswan-4.1.9 new file mode 100644 index 000000000000..706633725222 --- /dev/null +++ b/net-misc/strongswan/files/digest-strongswan-4.1.9 @@ -0,0 +1,3 @@ +MD5 5b78f00cba3c0d6edd97ee25108c4b6b strongswan-4.1.9.tar.bz2 2176339 +RMD160 a140bd2295284910dc8e54bba1227f0bd384813f strongswan-4.1.9.tar.bz2 2176339 +SHA256 37ea5119dc54cb150d444302f82f84854a15d35e45a817e3a29be86b7d750587 strongswan-4.1.9.tar.bz2 2176339 diff --git a/net-misc/strongswan/files/ipsec b/net-misc/strongswan/files/ipsec index 62d24a594b45..42cde4f38d8b 100644 --- a/net-misc/strongswan/files/ipsec +++ b/net-misc/strongswan/files/ipsec @@ -1,56 +1,33 @@ #!/sbin/runscript - -# IPsec startup and shutdown script -# Copyright (C) 1998, 1999, 2001 Henry Spencer. -# Gentoo mods (C) 2003 Anthony de Boer -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 depend() { - need net logger -} - -ipsecdoit() { -# Pick up IPsec configuration (until we have done this, successfully, we -# do not know where errors should go, hence the explicit "daemon.error"s.) -# Note the "--export", which exports the variables created. - eval `ipsec _confread --varprefix IPSEC --export --type config setup` - if test " $IPSEC_confreadstatus" != " " - then - echo "$IPSEC_confreadstatus -- \`$1' aborted" | - logger -s -p daemon.error -t ipsec_setup - exit 1 - fi - IPSECsyslog=${IPSECsyslog-daemon.error} - export IPSECsyslog - umask 022 - tmp=/var/run/ipsec_setup.st - ( - ipsec _realsetup $1 - echo "$?" >$tmp - ) 2>&1 | logger -s -p $IPSECsyslog -t ipsec_setup 2>&1 - st=`cat $tmp` - rm -f $tmp - return $st + need logger net } start() { - ebegin "Starting IPSEC ..." - ipsecdoit start + ebegin "Starting ${IPSECD}" + ipsec start eend $? } stop() { - ebegin "Stopping IPSEC ..." - ipsecdoit stop + ebegin "Stopping ${IPSECD}" + ipsec stop + eend $? +} + +restart() { + ebegin "Restarting ${IPSECD}" + svc_stop + sleep 2 + svc_start eend $? } +status() { + ebegin "${IPSECD} Status (verbose):" + ipsec statusall + eend $? +} diff --git a/net-misc/strongswan/files/ipsec-install-4.1.9.patch b/net-misc/strongswan/files/ipsec-install-4.1.9.patch new file mode 100644 index 000000000000..52f0d6c67ecb --- /dev/null +++ b/net-misc/strongswan/files/ipsec-install-4.1.9.patch @@ -0,0 +1,9 @@ +diff -uprN strongswan-4.1.9.orig/src/starter/Makefile.am strongswan-4.1.9/src/starter/Makefile.am +--- strongswan-4.1.9.orig/src/starter/Makefile.am 2007-11-06 12:37:59.000000000 +0100 ++++ strongswan-4.1.9/src/starter/Makefile.am 2007-12-14 21:29:01.000000000 +0100 +@@ -31,4 +31,4 @@ defs.o: $(PLUTODIR)/defs.c $(PLUTODIR)/ + $(COMPILE) -c -o $@ $< + + install-exec-local : +- test -e "$(DESTDIR)$(sysconfdir)/ipsec.conf" || $(INSTALL) ipsec.conf $(DESTDIR)$(sysconfdir)/ipsec.conf ++ test -e "$(DESTDIR)$(sysconfdir)/ipsec.conf" || $(INSTALL) -D ipsec.conf $(DESTDIR)$(sysconfdir)/ipsec.conf diff --git a/net-misc/strongswan/strongswan-2.8.0.ebuild b/net-misc/strongswan/strongswan-2.8.0.ebuild index c1afd4f71b04..79a93a9a4cd6 100644 --- a/net-misc/strongswan/strongswan-2.8.0.ebuild +++ b/net-misc/strongswan/strongswan-2.8.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.0.ebuild,v 1.11 2007/02/28 16:47:04 pylon Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.0.ebuild,v 1.12 2007/12/16 14:32:49 pylon Exp $ inherit eutils linux-info @@ -52,9 +52,9 @@ pkg_setup() { src_unpack() { unpack ${A} - cd ${S} + cd "${S}" - epatch ${FILESDIR}/ipsec-path.patch.bz2 + epatch "${FILESDIR}"/ipsec-path.patch.bz2 if use curl ; then ebegin "Curl support requested. Enabling curl support" @@ -112,8 +112,8 @@ src_install() { install || die "make install failed" dohtml doc/*html - rm -f ${S}/doc/*.html - dodoc CHANGES COPYING CREDITS INSTALL LICENSE README doc/* + rm -f "${S}"/doc/*.html + dodoc CHANGES COPYING CREDITS INSTALL README doc/* doinitd "${FILESDIR}"/ipsec diff --git a/net-misc/strongswan/strongswan-2.8.3.ebuild b/net-misc/strongswan/strongswan-2.8.3.ebuild deleted file mode 100644 index 81caafa17457..000000000000 --- a/net-misc/strongswan/strongswan-2.8.3.ebuild +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.3.ebuild,v 1.1 2007/02/28 16:47:04 pylon Exp $ - -inherit eutils linux-info - -DESCRIPTION="IPsec-based VPN Solution for Linux" -HOMEPAGE="http://www.strongswan.org/" -SRC_URI="http://download.strongswan.org/${P}.tar.bz2" - -LICENSE="GPL-2 RSA-MD2 RSA-MD5 RSA-PKCS11 DES" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" -IUSE="curl ldap nat smartcard" - -COMMON_DEPEND="!net-misc/openswan - dev-libs/gmp" -DEPEND="${COMMON_DEPEND} - virtual/linux-sources - <sys-kernel/linux-headers-2.6.18 - curl? ( net-misc/curl ) - ldap? ( net-nds/openldap ) - smartcard? ( dev-libs/opensc )" -RDEPEND="${COMMON_DEPEND} - virtual/logger - sys-apps/iproute2" - -pkg_setup() { - linux-info_pkg_setup - - if kernel_is 2 6; then - einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)." - einfo "KLIPS will not be compiled/installed." - MYMAKE="programs" - - elif kernel_is 2 4; then - if ! [ -d /usr/src/linux/net/ipsec ]; then - eerror "You need to have an IPsec enabled 2.4.x kernel." - eerror "Ensure you have one running and make a symlink to it in /usr/src/linux" - die - fi - - einfo "Using patched-in IPsec code for kernel 2.4." - einfo "Your kernel only supports KLIPS for kernel level IPsec." - MYMAKE="confcheck programs" - - else - eerror "Sorry, no support for your kernel version ${KV_FULL}." - die "Install an IPsec enabled 2.4 or 2.6 kernel." - fi -} - -src_unpack() { - unpack ${A} - cd ${S} - - epatch ${FILESDIR}/ipsec-path-${PV}.patch.bz2 - - if use curl ; then - ebegin "Curl support requested. Enabling curl support" - sed -i -e 's:\(USE_LIBCURL?=\)false:\1true:g' Makefile.inc || die - eend $? - fi - - if use ldap ; then - ebegin "LDAP support requested. Enabling LDAPv3 support" - sed -i -e 's:\(USE_LDAP?=\)false:\1true:g' Makefile.inc || die - eend $? - fi - - if use nat ; then - ebegin "Enabling NAT-Traversal on Transport mode (insecure)" - sed -i -e 's:\(USE_NAT_TRAVERSAL_TRANSPORT_MODE?=\)false:\1true:g' \ - Makefile.inc || die - eend $? - fi - - if use smartcard ; then - ebegin "Smartcard support requested. Enabling opensc support" - sed -i -e 's:\(USE_SMARTCARD?=\)false:\1true:g' Makefile.inc || die - sed -i -e 's:\(PKCS11_DEFAULT_LIB=\\\"/usr/lib/pkcs11/opensc-pkcs11.so\\\"\):#\1:g' \ - Makefile.inc || die - sed -i -e 's:#\(PKCS11_DEFAULT_LIB=\\\"/usr/lib/opensc-pkcs11.so\\\"\):\1:g' \ - Makefile.inc || die - eend $? - fi - - # patch broken check-rule - sed -i -e 's#check: uml#check: programs checkprograms#' Makefile - -} - -src_compile() { - emake \ - DESTDIR="${D}" \ - USERCOMPILE="${CFLAGS}" \ - FINALCONFDIR=/etc/ipsec \ - INC_RCDEFAULT=/etc/init.d \ - INC_USRLOCAL=/usr \ - INC_MANDIR=share/man \ - FINALEXAMPLECONFDIR=/usr/share/doc/${P} \ - FINALDOCDIR=/usr/share/doc/${P} \ - ${MYMAKE} || die "make failed" -} - -src_install() { - # make install wants this directory - dodir /etc/init.d - - emake \ - DESTDIR="${D}" \ - USERCOMPILE="${CFLAGS}" \ - FINALCONFDIR=/etc/ipsec \ - INC_RCDEFAULT=/etc/init.d \ - INC_USRLOCAL=/usr \ - INC_MANDIR=share/man \ - FINALEXAMPLECONFDIR=/usr/share/doc/${P} \ - FINALDOCDIR=/usr/share/doc/${P} \ - install || die "make install failed" - - dohtml doc/*html - rm -f ${S}/doc/*.html - dodoc CHANGES COPYING CREDITS INSTALL LICENSE README doc/* - - doinitd "${FILESDIR}"/ipsec - - fperms -R a-X /etc/ipsec /usr/share - keepdir /var/run/pluto - - einfo "Configuration files are installed into /etc/ipsec/" -} - -pkg_postinst() { - if kernel_is 2 6; then - CONFIG_CHECK="~NET_KEY ~INET_XFRM_MODE_TRANSPORT ~INET_XFRM_MODE_TUNNEL ~INET_AH ~INET_ESP ~INET_IPCOMP" - WARNING_INET_AH="CONFIG_INET_AH:\tmissing IPsec AH support (needed if you want only authentication)" - WARNING_INET_ESP="CONFIG_INET_ESP:\tmissing IPsec ESP support (needed if you want authentication and encryption)" - WARNING_INET_IPCOMP="CONFIG_INET_IPCOMP:\tmissing IPsec Payload Compression (required for compress=yes)" - check_extra_config - fi -} diff --git a/net-misc/strongswan/strongswan-2.8.4.ebuild b/net-misc/strongswan/strongswan-2.8.4.ebuild index 49ca0fbac07b..e87b145fe989 100644 --- a/net-misc/strongswan/strongswan-2.8.4.ebuild +++ b/net-misc/strongswan/strongswan-2.8.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.4.ebuild,v 1.1 2007/05/31 11:56:03 pylon Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.4.ebuild,v 1.2 2007/12/16 14:32:49 pylon Exp $ inherit eutils linux-info @@ -52,9 +52,9 @@ pkg_setup() { src_unpack() { unpack ${A} - cd ${S} + cd "${S}" - epatch ${FILESDIR}/ipsec-path-${PV}.patch.bz2 + epatch "${FILESDIR}"/ipsec-path-${PV}.patch.bz2 if use curl ; then ebegin "Curl support requested. Enabling curl support" @@ -119,8 +119,8 @@ src_install() { install || die "make install failed" dohtml doc/*html - rm -f ${S}/doc/*.html - dodoc CHANGES COPYING CREDITS INSTALL LICENSE README doc/* + rm -f "${S}"/doc/*.html + dodoc CHANGES COPYING CREDITS INSTALL README doc/* doinitd "${FILESDIR}"/ipsec diff --git a/net-misc/strongswan/strongswan-4.1.9.ebuild b/net-misc/strongswan/strongswan-4.1.9.ebuild new file mode 100644 index 000000000000..1c9f362e3bbc --- /dev/null +++ b/net-misc/strongswan/strongswan-4.1.9.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-4.1.9.ebuild,v 1.1 2007/12/16 14:32:49 pylon Exp $ + +inherit eutils linux-info + +UGID="ipsec" + +DESCRIPTION="Open Source implementation of IPsec for the Linux operating system." +HOMEPAGE="http://www.strongswan.org/" +SRC_URI="http://download.strongswan.org/${P}.tar.bz2" + +LICENSE="GPL-2 RSA-MD2 RSA-MD5 RSA-PKCS11 DES" +SLOT="0" +KEYWORDS="~ppc ~x86" +IUSE="cisco curl debug ldap nat smartcard static xml" + +COMMON_DEPEND="!net-misc/openswan + dev-libs/gmp" +DEPEND="${COMMON_DEPEND} + virtual/linux-sources + sys-kernel/linux-headers + curl? ( net-misc/curl ) + ldap? ( net-nds/openldap ) + smartcard? ( dev-libs/opensc ) + xml? ( dev-libs/libxml2 )" +RDEPEND="${COMMON_DEPEND} + virtual/logger + sys-apps/iproute2" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/ipsec-install-${PV}.patch +} + +pkg_setup() { + linux-info_pkg_setup + + einfo "Linux kernel is version ${KV_FULL}" + + if kernel_is 2 6; then + einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)." + else + eerror "Sorry, no support for your kernel version ${KV_FULL}." + die "Install an IPsec enabled 2.6 kernel." + fi + + # change to an unprivileged user by default + enewgroup ${UGID} + enewuser ${UGID} -1 -1 -1 ${UGID} +} + +src_compile() { + local myconf="" + + # change to an unprivileged user by default + myconf="${myconf} --with-uid=$(id -u ${UGID}) --with-gid=$(id -g ${UGID})" + # strongswan enables both by default; switch to the user's wish + if use static; then + myconf="${myconf} --enable-static --disable-shared" + else + myconf="${myconf} --disable-static --enable-shared" + fi + + econf \ + $(use_enable curl http) \ + $(use_enable ldap) \ + $(use_enable xml) \ + $(use_enable smartcard) \ + $(use_enable cisco cisco-quirks) \ + $(use_enable debug leak-detective) \ + $(use_enable nat nat-transport) \ + ${myconf} \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + einstall || die "einstall failed." + + doinitd "${FILESDIR}"/ipsec +} + +pkg_postinst() { + echo + ewarn "Starting with the strongswan-4 branch, the configuration files" + ewarn "will be installed into the default directory \"/etc/\"" + ewarn "instead of the Gentoo-specific directory \"/etc/ipsec/\"." + ewarn "Please adjust your configuration!" + echo + einfo "The up-to-date configuration manual is available online at" + einfo "http://www.strongswan.org/docs/readme.htm" + echo +} |