diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-01-30 22:53:57 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-01-30 22:53:57 +0000 |
commit | cdc3cb14e5824d620a66725829aa805b93a2275e (patch) | |
tree | e3aefe56a97cdc9d78c411a33dca7e264b01e050 /net-firewall | |
parent | drop mask of multilib gettext (diff) | |
download | historical-cdc3cb14e5824d620a66725829aa805b93a2275e.tar.gz historical-cdc3cb14e5824d620a66725829aa805b93a2275e.tar.bz2 historical-cdc3cb14e5824d620a66725829aa805b93a2275e.zip |
Add SETKEY_OPTS when init racoon, bug #497440
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/ipsec-tools/ChangeLog | 8 | ||||
-rw-r--r-- | net-firewall/ipsec-tools/Manifest | 21 | ||||
-rw-r--r-- | net-firewall/ipsec-tools/files/racoon.conf.d-r2 | 30 | ||||
-rw-r--r-- | net-firewall/ipsec-tools/files/racoon.init.d-r3 | 57 | ||||
-rw-r--r-- | net-firewall/ipsec-tools/ipsec-tools-0.8.1-r1.ebuild | 277 |
5 files changed, 388 insertions, 5 deletions
diff --git a/net-firewall/ipsec-tools/ChangeLog b/net-firewall/ipsec-tools/ChangeLog index 71f6e8ecc819..000d188bcbab 100644 --- a/net-firewall/ipsec-tools/ChangeLog +++ b/net-firewall/ipsec-tools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-firewall/ipsec-tools # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ChangeLog,v 1.114 2014/01/05 00:58:20 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ChangeLog,v 1.115 2014/01/30 22:53:45 blueness Exp $ + +*ipsec-tools-0.8.1-r1 (30 Jan 2014) + + 30 Jan 2014; Anthony G. Basile <blueness@gentoo.org> +files/racoon.conf.d-r2, + +files/racoon.init.d-r3, +ipsec-tools-0.8.1-r1.ebuild: + Add SETKEY_OPTS when init racoon, bug #497440 05 Jan 2014; Mike Gilbert <floppym@gentoo.org> ipsec-tools-0.8.0-r5.ebuild, ipsec-tools-0.8.1.ebuild: diff --git a/net-firewall/ipsec-tools/Manifest b/net-firewall/ipsec-tools/Manifest index 2c885d36040a..ebda69209d2d 100644 --- a/net-firewall/ipsec-tools/Manifest +++ b/net-firewall/ipsec-tools/Manifest @@ -8,18 +8,31 @@ AUX ipsec-tools.conf 1209 SHA256 a9a6cbf1bd42aaefdb637814bc6198079bab84e37888e1b AUX psk.txt 293 SHA256 d34b142b4566712f87382caf0a64bcc070bbde17f16e2ee49d5dde26cb1bbe08 SHA512 ed09588bcbf9b16e4e18315c7b9a7667788b4ab26cd962376430c316cfb0ee5a30ff26910190731b287c1a1b5927951a79f71a096071e73d67dc867a455b14cf WHIRLPOOL fe1aadd94612e742029d6e0be7401f2994c9fed4fec899f3fc09c90cb134aca710c41a083164d6cece46b331652ddb3b76720c60bc40b837243b329db7eb60db AUX racoon.conf 772 SHA256 e00cea25741fa16aa985d80ce49f2a59af0c98a44707a047193e936644b497a3 SHA512 8876920331b4003fd096f1997e1266a12783120e390cea55ca283a8fd6485552b54e87f60e75f33409a4cdb99171d2358953287edd47ddeac8bda6da0cc8becc WHIRLPOOL 12c55b1f5e67592483c2602040454f7c0e511c4867b0ed1e7acb593d3ffd0b2b2bfe7a5defb900eb8759006b4382d8c3d891ace2472d772e223e68eb99bd72cc AUX racoon.conf.d-r1 909 SHA256 85a34cb0b392a7da09ecf07aedeb02a4b514a8a1b682ac6c077b972c1dfbf196 SHA512 75203e1e69dc2488cbf40b24fa5e21c62745cea25038cd89f003fb3b519cccf5c01661b1e235882e836964d8cb77b3b4085cb7683de7406dbde02af97675da04 WHIRLPOOL 2612332431cecfd108c1563901c832df46ad4e6a5cba43d085ca38a46bbfb9179a2e5cc96d9a9a66788e4386897bb874fe572c624c6f946ec208d45e41b73b85 +AUX racoon.conf.d-r2 1102 SHA256 30bb760b727df73401d6e67c409ffae22574f1bf92456a3e0bdf396e714057bf SHA512 aed0ffb2e3d82bd967504d5a109b2a13730db18271341b61c484b6248eca06ead83fea61ca88d1c084900c82a58283a4380477469101f2d0f30d71e4ede8732e WHIRLPOOL c71aa96090b49dddea969ad64a6e40270fd41b27e6d21f9459295dd18f92316d42260ef3132b07fde030e54d504956fa43bbb4e33fd16cbc42803fe88e9cfd71 AUX racoon.init.d-r2 1279 SHA256 d9038da4f5c969a7da450d6d7a566fd77c4471ff0a1ceb2f176f0c9015d1eda8 SHA512 1a5337c74285b54c21b4d3d216f0a3756a3e2d6ea31028b56782c7a635ffac8142d61074fa0927df6dd1034e15234d3a4eda192c94e8cd5f510520e36bcf81a6 WHIRLPOOL f7219e0306b2d9e6311cd12ea06d560e1bf937ce409e44d7bf5a6e77325e4e6357b138fd709ca7972696a4669f1c6e6d72273250c84462ebf6b9e8c979aea330 +AUX racoon.init.d-r3 1294 SHA256 ab30e75a596919d2ba876bb7d37ebdfb9075e261bc4de7552ebc5aead97c3e9e SHA512 418a3c59cacae53243742e33b1eb457d4dd8832800af7cc743a0e834eb968a53d5693f345406ab2cff0127e92581a9db20796dd576233cbff622a5802b794bc0 WHIRLPOOL 4c7834d0b9e0d176130925396ca5bb1225eab236eeec43e7100db94e1d82fa6b8539d65bb92b58cf0466ff251f6d1bea36aa74950f5b4b358646ffa4f037132c AUX racoon.pam.d 156 SHA256 166136e27d653e0bf481a6ca79fecb7d9fa2fc3d597d041f97df595f65a8193c SHA512 d3f7e6ca8c9f2b5060ebccb259316bb59c9a7e158e8ef9466765a20db263a4043a590811f1a3ab072b718dbd70898bc69b77e0b19603d7f394b5ac1bd0a4a56c WHIRLPOOL ba7a0a8c3bb39c5fda69de34b822a19696398e0a8789211ac1faae787ee34f9639eb35efe29c67f874b5f9fe674742503e570f441c005974f4a0c93468b8970b DIST ipsec-tools-0.8.0.tar.bz2 809297 SHA256 2359a24aa8eda9ca7043fc47950c8e6b7f58a07c5d5ad316aa7de2bc5e3a8717 SHA512 3bec6bab4fe555612f1d48966e797202830f5254a8d2146a14d268ff0c68445af790285214db41ab08ee4888625e8e680c3b848c30789d836169d1612a25fe2c WHIRLPOOL 862d2bbf78aca8c9e01e00c995aeb3b662e1ea4a769081b9880a3fee7821ef5968e10fe75d9671268979188c7ca3b91d507a1fc9a097729d0648bc4c965e675d DIST ipsec-tools-0.8.1.tar.bz2 860717 SHA256 fa4a95bb36842f001b84c4e7a1bb727e3ee06147edbc830a881d63abe8153dd4 SHA512 c8308aba9764a8e0a0507dbc62e8e93dc4b51f7215f2c3bb50f2e7e1f46dde0c773cfe2992660ccd319523775a9bab668371ee53cd4af153d2fcf13a0ef4e1eb WHIRLPOOL b3e8743174f7a05ca028f47f5faa66286e397a50c68e7724568b89e5fd2eea76a903c3e77a144e772f913fd51a253466b93e10690125a87d643f186a9689476c EBUILD ipsec-tools-0.8.0-r5.ebuild 7747 SHA256 81361ddd1ebf285c863f03a6a98dc1d8e42a631a399965ef795ee603b29d8d54 SHA512 22f4430e10370cac954e11e375f0bef4f99b18c21f4d413b72bae53ec3ec99a6acca06362199deeb7796acedfd0fc85a733f441a6a95c74899c2ca7509793b17 WHIRLPOOL 78dc35255243c08d6e48411e2b864dd34d121d54a265575f28c345a7f948684534e80a023d23304b66dd7b73eba4af24d12be7341b18584b723af899ad71426c +EBUILD ipsec-tools-0.8.1-r1.ebuild 7763 SHA256 f734c533ef762dac3b874f627a351e9313e555e7ed31efd98f8f2b5774b4b5ec SHA512 c50b4e258bfb27aef559d7859d4ace0bb81d02fa8b8a310dafa722e36f0294f5c92c9e2e051ba6179128a27773fb4f5a1802b464917312deaecc839c117cc4b2 WHIRLPOOL b5995c9a657df4e140b1562c39d8d77de1748f714103cacd80d5005caf069da36e828098c274fcd1de6ad4f1a758aedaa62c08547f55be992d9f1188d33e5a7f EBUILD ipsec-tools-0.8.1.ebuild 7759 SHA256 5cf17707c68083fac4679cf2ccf94228e9e3b925ca66f33d1fdf0cb877c709f9 SHA512 099f181c07018b6f81f292f82b3ed9569aec3fd317645bfc7180341e744b91a38913e6193aaeb94d4b00a6b5d0bd09e8643757034c2dd4b4135ccfdd45ed0475 WHIRLPOOL cab9df28a7bce6937a079332ed279991b7973bf0fde0c0d0bb8fbc837b4b23f0dbaf185ee8a00f2c7847fd74931f07b431489d32331012579501d6d1066693a9 -MISC ChangeLog 18343 SHA256 a538bbf3f847992d59afe631dcde81a1cc92db3b9e232fdcd8cf1b0de189cd88 SHA512 0a42e5815caea170b2e036135f773d05b86c63dc9e1a550bba2e9544a95fbc45ced6d19a766034ede80d50552003ad3798f7f4d0b4144c70cce493d73fc06daa WHIRLPOOL 034941828101def2ddd78c22de52401b85b0880b27a9f6f9c81f8dd94af8536fed33862c0fd37c920309cf55e28b23f275e4a469fb6d51191742ab6496079db1 +MISC ChangeLog 18567 SHA256 98f5be72230a361af099f1620bf5ebb4f2b976e33b99a85c5d215c166152f585 SHA512 31dd49604ceb53b1cc8ad1de85625522f0cef63ffff39976d22008a7871d83a487b7a3330f926756a97c045839804bd14ad3c78fd96905ba69295d0e720044e2 WHIRLPOOL 6748c12e40720561be33d8024179e434b6d38bce425aae75e5c26b42a92bb9d0a693ba380bea1512944a7aef8af25dd35ec26c096a01c273be2f8fabbf1f148b MISC metadata.xml 537 SHA256 12de55d6d62b8e91c8996422e33462b5637f9720a5096025752b93906bcbdc40 SHA512 9b26b2cd54e00527201339c3936ac717c57fe596e470d84e0dc0715f778b5797488b6cac61dea83bab61714a23a88e44dbd537bfeeb2b37d285653dcb838fab5 WHIRLPOOL a0dd0b61f957875ca3c50db5aa66470ed493be9c4f002bd165d75b41a8ca51cbcfd2567b4702bf1845b8e0a1ca54239e6ed163098d8b613d1f9f459192acc14e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iF4EAREIAAYFAlLIri0ACgkQC77qH+pIQ6QCeAD+K2QWGogp79hs4tMUkJbQqVld -xc4jmIdCP2P3zhum0n8A/R/XztDBBj8gRoNZ835nxHnZbaVPqq8PLhhxzKDSD8OT -=f9QY +iQIcBAEBCAAGBQJS6tgcAAoJEJOE+m71LUu60P4QAJN2RGh0eKS/Y/g7/P/tQXaJ +aphoGtYrpZRVqVetEpVESdDSfeG734qQBy4VqYML0n3AXi+poFfBaMInDz6WVrh1 +htgqvV/zOw72n36B/TARB3o6GwLXhhcMzH//F3ay9ebU4awNYLTHl04NE0zm8S8q ++cBXg5z2dZGCV5H+PKaHBqukEsvsbs8uweY7F7c4x/Khwm3GpPLMfIeqtvDJvJTt +h9qdy2BbVxlF7GedKierh6qHE94nupdbfIJqR41mbOE6jgXX70ZMWB3/7uR33P9r +N5Tb8Jh3Smwbxri7IKlyA0LCc0/I5UOmwQjov1Td5wDCcehdqL10MAdnlXLjYObU +skDEX932P84EUc21nxLijM7luaLGhwNAbV04EWpJSsu3Y3Xj6Mfh4ZtyAihoxvxh +QphqJgy2Gt6aNgzKLqTWiBbfCJJTv6iHNl5HhV4uh5+/uVqwDQj5xjrm2b8E5ndu +l4+EmqufSYceY32h2ijn1Qw8mO16GyPyu5UjGmBu2qEcn/YZ92AcxWACQbREm4dn +98x8uXjpDU7vwQmAvdbmcfvoyBOcMu5m/zSxy2CwJstEWEN69u5pA2Dmbwg91aZo +XdneJ4zYYmpvICeUrL8rVPfcmKFNicKmLOdXUkd2IPgg1gSCXU4dEZesZgy9A62y +OlWQKueVfcgM2Q0NqULA +=uJuj -----END PGP SIGNATURE----- diff --git a/net-firewall/ipsec-tools/files/racoon.conf.d-r2 b/net-firewall/ipsec-tools/files/racoon.conf.d-r2 new file mode 100644 index 000000000000..4d97accfdfcb --- /dev/null +++ b/net-firewall/ipsec-tools/files/racoon.conf.d-r2 @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/files/racoon.conf.d-r2,v 1.1 2014/01/30 22:53:45 blueness Exp $ + +# Config file for /etc/init.d/racoon + +# See the man page or run `racoon --help` for valid command-line options +# RACOON_OPTS="-d" + +RACOON_CONF="/etc/racoon/racoon.conf" +RACOON_PSK_FILE="/etc/racoon/psk.txt" + +# The amount of time in ms for start-stop-daemon to wait before a timeout +# Racoon can sometimes be slow. We'll wait 1 sec. Bug #435398. + +RACOON_WAIT="1000" + +# The setkey config file. Don't name it ipsec.conf as this clashes +# with strongswan. We'll follow debian's naming. Bug #436144. + +SETKEY_CONF="/etc/ipsec-tools.conf" + +# Comment or remove the following if you don't want the policy tables +# to be flushed when racoon is stopped. + +RACOON_RESET_TABLES="true" + +# If you need to set custom options to the setkey command when loading rules, use this +# more info in the setkey mangage (example below sets kernel mode instead of RFC mode): +#SETKEY_OPTS="-k" diff --git a/net-firewall/ipsec-tools/files/racoon.init.d-r3 b/net-firewall/ipsec-tools/files/racoon.init.d-r3 new file mode 100644 index 000000000000..5bfc654ed904 --- /dev/null +++ b/net-firewall/ipsec-tools/files/racoon.init.d-r3 @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + before netmount + use net +} + +checkconfig() { + if [ ! -e ${SETKEY_CONF} ] ; then + eerror "You need to configure setkey before starting racoon." + return 1 + fi + if [ ! -e ${RACOON_CONF} ] ; then + eerror "You need a configuration file to start racoon." + return 1 + fi + if [ ! -z ${RACOON_PSK_FILE} ] ; then + if [ ! -f ${RACOON_PSK_FILE} ] ; then + eerror "PSK file not found as specified." + eerror "Set RACOON_PSK_FILE in /etc/conf.d/racoon." + return 1 + fi + case "`ls -Lldn ${RACOON_PSK_FILE}`" in + -r--------*) + ;; + *) + eerror "Your defined PSK file should be mode 400 for security!" + return 1 + ;; + esac + fi +} + +command=/usr/sbin/racoon +command_args="-f ${RACOON_CONF} ${RACOON_OPTS}" +pidfile=/var/run/racoon.pid +start_stop_daemon_args="--wait ${RACOON_WAIT}" + +start_pre() { + checkconfig || return 1 + einfo "Loading ipsec policies from ${SETKEY_CONF}." + /usr/sbin/setkey ${SETKEY_OPTS} -f ${SETKEY_CONF} + if [ $? -eq 1 ] ; then + eerror "Error while loading ipsec policies" + fi +} + +stop_post() { + if [ -n "${RACOON_RESET_TABLES}" ]; then + ebegin "Flushing policy entries" + /usr/sbin/setkey -F + /usr/sbin/setkey -FP + eend $? + fi +} diff --git a/net-firewall/ipsec-tools/ipsec-tools-0.8.1-r1.ebuild b/net-firewall/ipsec-tools/ipsec-tools-0.8.1-r1.ebuild new file mode 100644 index 000000000000..dbef1e2cce84 --- /dev/null +++ b/net-firewall/ipsec-tools/ipsec-tools-0.8.1-r1.ebuild @@ -0,0 +1,277 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.8.1-r1.ebuild,v 1.1 2014/01/30 22:53:45 blueness Exp $ + +EAPI="5" + +inherit eutils flag-o-matic autotools linux-info pam + +DESCRIPTION="A port of KAME's IPsec utilities to the Linux-2.6 IPsec implementation" +HOMEPAGE="http://ipsec-tools.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="hybrid idea ipv6 kerberos ldap nat pam rc5 readline selinux stats" + +RDEPEND=" + dev-libs/openssl + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + pam? ( sys-libs/pam ) + readline? ( sys-libs/readline ) + selinux? ( + sys-libs/libselinux + sec-policy/selinux-ipsec + )" + +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.30" + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-0.8.0-r5" ; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + if ! has_version "net-misc/strongswan" && + ! has_version "net-misc/openswan" && + ! has_version "net-misc/libreswan"; then + ewarn "We found an earlier version of ${PN} installed." + ewarn "As of ${PN}-0.8.0-r5, the old configuration file," + ewarn "ipsec.conf, has been changed to ipsec-tools.conf to avoid" + ewarn "a conflict with net-misc/strongswan; bug #436144. We will" + ewarn "rename this file for you with this upgrade. However, if" + ewarn "you later downgrade, you'll have to rename the file to" + ewarn "its orignal manually or change /etc/conf.d/racoon to point" + ewarn "to the new file." + + if [[ -f /etc/ipsec.conf && ! -f /etc/ipsec-tools.conf ]] ; then + mv /etc/ipsec.conf /etc/ipsec-tools.conf + else + ewarn + ewarn "Oops! I can't move ipsec.conf to ipsec-tools.conf!" + ewarn "Either the former doesn't exist or the later does and" + ewarn "I won't clobber it. Please fix this situation manually." + fi + else + ewarn "You had both an earlier version of ${PN} and" + ewarn "net-misc/strongswan installed. I can't tell whether" + ewarn "the configuration file, ipsec.conf, belongs to one" + ewarn "package or the other due to a file conflict; bug #436144." + ewarn "The current version of ${PN} uses ipsec-tools.conf" + ewarn "as its configuration file, as will future versions." + ewarn "Please fix this situation manually." + fi + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + fi +} + +pkg_setup() { + linux-info_pkg_setup + + get_version + + if linux_config_exists && kernel_is -ge 2 6 19; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + ewarn "Checking kernel configuration in /usr/src/linux or" + ewarn "or /proc/config.gz for compatibility with ${PN}." + ewarn "Here are the potential problems:" + ewarn + + local nothing="1" + + # Check options for all flavors of IPSec + local msg="" + for i in XFRM_USER NET_KEY; do + if ! linux_chkconfig_present ${i}; then + msg="${msg} ${i}" + fi + done + if [[ ! -z "$msg" ]]; then + nothing="0" + ewarn + ewarn "ALL IPSec may fail. CHECK:" + ewarn "${msg}" + fi + + # Check unencrypted IPSec + if ! linux_chkconfig_present CRYPTO_NULL; then + nothing="0" + ewarn + ewarn "Unencrypted IPSec may fail. CHECK:" + ewarn " CRYPTO_NULL" + fi + + # Check IPv4 IPSec + msg="" + for i in \ + INET_IPCOMP INET_AH INET_ESP \ + INET_XFRM_MODE_TRANSPORT \ + INET_XFRM_MODE_TUNNEL \ + INET_XFRM_MODE_BEET + do + if ! linux_chkconfig_present ${i}; then + msg="${msg} ${i}" + fi + done + if [[ ! -z "$msg" ]]; then + nothing="0" + ewarn + ewarn "IPv4 IPSec may fail. CHECK:" + ewarn "${msg}" + fi + + # Check IPv6 IPSec + if use ipv6; then + msg="" + for i in INET6_IPCOMP INET6_AH INET6_ESP \ + INET6_XFRM_MODE_TRANSPORT \ + INET6_XFRM_MODE_TUNNEL \ + INET6_XFRM_MODE_BEET + do + if ! linux_chkconfig_present ${i}; then + msg="${msg} ${i}" + fi + done + if [[ ! -z "$msg" ]]; then + nothing="0" + ewarn + ewarn "IPv6 IPSec may fail. CHECK:" + ewarn "${msg}" + fi + fi + + # Check IPSec behind NAT + if use nat; then + if ! linux_chkconfig_present NETFILTER_XT_MATCH_POLICY; then + nothing="0" + ewarn + ewarn "IPSec behind NAT may fail. CHECK:" + ewarn " NETFILTER_XT_MATCH_POLICY" + fi + fi + + if [[ $nothing == "1" ]]; then + ewarn "NO PROBLEMS FOUND" + fi + + ewarn + ewarn "WARNING: If your *configured* and *running* kernel" + ewarn "differ either now or in the future, then these checks" + ewarn "may lead to misleading results." + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + else + eerror + eerror "\033[1;31m**************************************************\033[00m" + eerror "Make sure that your *running* kernel is/will be >=2.6.19." + eerror "Building ${PN} now, assuming that you know what you're doing." + eerror "\033[1;31m**************************************************\033[00m" + eerror + fi +} + +src_prepare() { + # fix for bug #124813 + sed -i 's:-Werror::g' "${S}"/configure.ac || die + # fix for building with gcc-4.6 + sed -i 's: -R: -Wl,-R:' "${S}"/configure.ac || die + + epatch "${FILESDIR}/${PN}-def-psk.patch" + epatch "${FILESDIR}/${PN}-include-vendoridh.patch" + epatch "${FILESDIR}"/${PN}-0.8.0-sysctl.patch #425770 + + AT_M4DIR="${S}" eautoreconf +} + +src_configure() { + #--with-{libiconv,libradius} lead to "Broken getaddrinfo()" + #--enable-samode-unspec is not supported in linux + local myconf + myconf="--with-kernel-headers=/usr/include \ + --enable-adminport \ + --enable-dependency-tracking \ + --enable-dpd \ + --enable-frag \ + --without-libiconv \ + --without-libradius \ + --disable-samode-unspec \ + $(use_enable idea) \ + $(use_enable ipv6) \ + $(use_enable kerberos gssapi) \ + $(use_with ldap libldap) \ + $(use_enable nat natt) \ + $(use_with pam libpam) \ + $(use_enable rc5) \ + $(use_with readline) \ + $(use_enable selinux security-context) \ + $(use_enable stats)" + + use nat && myconf="${myconf} --enable-natt-versions=yes" + + # enable mode-cfg and xauth support + if use pam; then + myconf="${myconf} --enable-hybrid" + else + myconf="${myconf} $(use_enable hybrid)" + fi + + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + keepdir /var/lib/racoon + newconfd "${FILESDIR}"/racoon.conf.d-r2 racoon + newinitd "${FILESDIR}"/racoon.init.d-r3 racoon + use pam && newpamd "${FILESDIR}"/racoon.pam.d racoon + + insinto /etc + doins "${FILESDIR}"/ipsec-tools.conf + insinto /etc/racoon + doins "${FILESDIR}"/racoon.conf + doins "${FILESDIR}"/psk.txt + chmod 400 "${D}"/etc/racoon/psk.txt + + dodoc ChangeLog README NEWS + dodoc -r src/racoon/samples + dodoc -r src/racoon/doc + docinto samples + mv ipsec.conf ipsec-tools.conf + newdoc src/setkey/sample.cf ipsec-tools.conf +} + +pkg_postinst() { + if use nat; then + elog + elog "You have enabled the nat traversal functionnality." + elog "Nat versions wich are enabled by default are 00,02,rfc" + elog "you can find those drafts in the CVS repository:" + elog "cvs -d anoncvs@anoncvs.netbsd.org:/cvsroot co ipsec-tools" + elog + elog "If you feel brave enough and you know what you are" + elog "doing, you can consider emerging this ebuild with" + elog "EXTRA_ECONF=\"--enable-natt-versions=08,07,06\"" + elog + fi + + if use ldap; then + elog + elog "You have enabled ldap support with {$PN}." + elog "The man page does NOT contain any information on it yet." + elog "Consider using a more recent version or CVS." + elog + fi + + elog + elog "Please have a look in /usr/share/doc/${P} and visit" + elog "http://www.netbsd.org/Documentation/network/ipsec/" + elog "to find more information on how to configure this tool." + elog +} |