summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-10-02 13:07:53 +0000
committerPeter Volkov <pva@gentoo.org>2011-10-02 13:07:53 +0000
commit8fbd45d965049e2d8f7922f204cf1d50a12330e3 (patch)
treee9ae77228b65a5bce8928c0d026db211de3f6a4b /net-firewall
parentAdd Gentoo bug reference too to be complete. (diff)
downloadhistorical-8fbd45d965049e2d8f7922f204cf1d50a12330e3.tar.gz
historical-8fbd45d965049e2d8f7922f204cf1d50a12330e3.tar.bz2
historical-8fbd45d965049e2d8f7922f204cf1d50a12330e3.zip
Drop confusing message about netlink.patch, bug #382221 by John Brendler. Add init script by Andrew Savchenko, bug #181045 by Caleb Cushing.
Package-Manager: portage-2.1.10.20/cvs/Linux x86_64
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ipset/ChangeLog9
-rw-r--r--net-firewall/ipset/Manifest16
-rw-r--r--net-firewall/ipset/files/ipset.initd51
-rw-r--r--net-firewall/ipset/ipset-6.9.1-r1.ebuild109
4 files changed, 171 insertions, 14 deletions
diff --git a/net-firewall/ipset/ChangeLog b/net-firewall/ipset/ChangeLog
index 7078d2a478c1..77f674530372 100644
--- a/net-firewall/ipset/ChangeLog
+++ b/net-firewall/ipset/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-firewall/ipset
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.53 2011/09/19 05:49:29 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.54 2011/10/02 13:07:53 pva Exp $
+
+*ipset-6.9.1-r1 (02 Oct 2011)
+
+ 02 Oct 2011; Peter Volkov <pva@gentoo.org> +ipset-6.9.1-r1.ebuild,
+ +files/ipset.initd:
+ Drop confusing message about netlink.patch, bug #382221 by John Brendler. Add
+ init script by Andrew Savchenko, bug #181045 by Caleb Cushing.
17 Sep 2011; Peter Volkov <pva@gentoo.org> -files/ipset-2.4.7-LDFLAGS.patch,
-ipset-4.4.ebuild, -ipset-6.7-r1.ebuild:
diff --git a/net-firewall/ipset/Manifest b/net-firewall/ipset/Manifest
index 403a691c9763..283fa40265c3 100644
--- a/net-firewall/ipset/Manifest
+++ b/net-firewall/ipset/Manifest
@@ -1,20 +1,10 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
+AUX ipset.initd 1153 RMD160 09cbccf02a36021f761b3aecb3b09df4f4ef6d3b SHA1 49ddedd8cc678e8740af9259a4f3c7844b5b5ab3 SHA256 d43fb0120f376cb5bb221bab3b40d8949af25253dc304d8938960cbd296bdac8
DIST ipset-4.5.tar.bz2 72428 RMD160 eb986eee5daa5f49be5df0eeb7f09c595b415ee1 SHA1 696a5cd96459c8fb028f0dfb9927a5c4f183d28b SHA256 f94200f39398f90b60633b5fa45f0c327d5915e2c5a68e6c90fcb8ea13be6994
DIST ipset-6.8.tar.bz2 122954 RMD160 94ee3177540743153013b04e560839596dde1aad SHA1 0f4abb79fe8a65088f687e8a274aaddb542bc86a SHA256 d7b499ee961cd92ba5f0f698e5de49909d8b2c6697ff5aea3a1535e183f9b809
DIST ipset-6.9.1.tar.bz2 123268 RMD160 068e5e37e761374089e53815b0ddca9ffd1894bb SHA1 781d5ad6a9e4d5bf6f8ccad3dfee8a578ed06c2a SHA256 db099044022f767046ec89c77de01ad6f0faf7f50f8f42b886c3c71ac5994abe
EBUILD ipset-4.5.ebuild 2840 RMD160 bae015ed7f806cee6c6c8cb411815afff8bdfae4 SHA1 94cd6b8724e0f403f5d9969cd2de4a5ac2ab1abf SHA256 96e2d91d9a1f27abe2e44f380705536e4894fd27e4c9a684ebd4540d24da0ca0
EBUILD ipset-6.8.ebuild 3250 RMD160 6e9ffa7ff745b7a0ae2053222f449d1553cb5f32 SHA1 e8efe33efc46bec20d20cf33b34e9aa124ae0660 SHA256 adc276a151d484a522464376d127cd4437acdef5bd7a871fcea79c65fa7a1c9c
+EBUILD ipset-6.9.1-r1.ebuild 3391 RMD160 be1e553f741c5760279ecd7ab4b6d0f581c8c798 SHA1 1a82ea52d786103142f3e88b73ee55e09ffea9d0 SHA256 1ccf3ae26d73600ebc5e7fe316eb6d3b049887cc64bac078226c0b1e3fe22eac
EBUILD ipset-6.9.1.ebuild 3249 RMD160 4a32a1a7ceb39a8a986d4e1f0217799522185ee0 SHA1 e63a469a55f3b60191822e09d21b4def1e16b7c9 SHA256 990e629564a4849fb8aafb3344d11132298d3bb20b0653ff28b2b145dec750c5
-MISC ChangeLog 9349 RMD160 70ec8349cc8cedeea0afa642cf314ab2b4b400e8 SHA1 63bc8178321643ed5775b4ca6ef7645acc6cd3b0 SHA256 2f6f5858db880b3fafc27cfa3c332a6cb67c466779792c0908a49224e897c4b8
+MISC ChangeLog 9617 RMD160 f0f11790723bf4af2d2f7305f246ef909407434e SHA1 6a360617d64ef0932540bf85e14bd91bc9e3be30 SHA256 9f4dfbb1625eda560c1529ded1d01c4160ae7deae4aa818c13f236024afeaa32
MISC metadata.xml 261 RMD160 011c351b20b4b062f3d8018435a1b0b8eb1693ce SHA1 4d43ddf52da446a21a2565ebd52272d19dfaa767 SHA256 66f8679fb88591451a2fb75caa068efe24aa933bdf312ed6337eb74f933ac9a6
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
-
-iJwEAQEIAAYFAk59qT4ACgkQfXuS5UK5QB3XAAQAmP48rUon521AduNCaCtGHANo
-Qoyb2AHukVPNrb01WtWKcwZ1yghR9HaziDHQeS1LcIzXCfaGRautAH7NaKvuN7m4
-/1W+EMItV0LX7NNV9irEECvSpL2u97hLdL/q7LvthJTzrmIR5romvv2IMyHiJ7yx
-VlQvZHx7gTxVgV8P/Po=
-=u3gZ
------END PGP SIGNATURE-----
diff --git a/net-firewall/ipset/files/ipset.initd b/net-firewall/ipset/files/ipset.initd
new file mode 100644
index 000000000000..6aa1a8532d50
--- /dev/null
+++ b/net-firewall/ipset/files/ipset.initd
@@ -0,0 +1,51 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/files/ipset.initd,v 1.1 2011/10/02 13:07:53 pva Exp $
+
+opts="save"
+
+depend() {
+ before iptables ip6tables
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "${IPSET_SAVE}" ] ; then
+ eerror "Not starting ${SVCNAME}. First create some rules then run:"
+ eerror "/etc/init.d/${SVCNAME} save"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Loading ipset session"
+ ipset restore < "${IPSET_SAVE}"
+ eend $?
+}
+
+stop() {
+ # check if there are any references to current sets
+ if ! ipset list | gawk '($1 == "References:" && $2 > 0) { exit 1 }'; then
+ eerror "ipset is in use, can't stop"
+ return 1
+ fi
+
+ if [ "${SAVE_ON_STOP}" = "yes" ] ; then
+ save || return 1
+ fi
+
+ ebegin "Removing kernel IP sets"
+ ipset destroy
+ eend $?
+}
+
+save() {
+ ebegin "Saving ipset session"
+ touch "${IPSET_SAVE}"
+ chmod 0600 "${IPSET_SAVE}"
+ ipset save > "${IPSET_SAVE}"
+ eend $?
+}
diff --git a/net-firewall/ipset/ipset-6.9.1-r1.ebuild b/net-firewall/ipset/ipset-6.9.1-r1.ebuild
new file mode 100644
index 000000000000..9d276cf3c834
--- /dev/null
+++ b/net-firewall/ipset/ipset-6.9.1-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-6.9.1-r1.ebuild,v 1.1 2011/10/02 13:07:53 pva Exp $
+
+EAPI="4"
+inherit autotools linux-info linux-mod
+
+# Maintainer: with version bump take a look on:
+# http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ipset.git;a=commit;h=70fdf030545f00888bcebb5fca8243a6dccca95b
+
+DESCRIPTION="IPset tool for iptables, successor to ippool."
+HOMEPAGE="http://ipset.netfilter.org/"
+SRC_URI="http://ipset.netfilter.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="modules"
+
+RDEPEND=">=net-firewall/iptables-1.4.4
+ net-libs/libmnl"
+DEPEND="${RDEPEND}"
+
+# configurable from outside, e.g. /etc/make.conf
+IP_NF_SET_MAX=${IP_NF_SET_MAX:-256}
+
+BUILD_TARGETS="modules"
+MODULE_NAMES_ARG="kernel/net/netfilter/ipset/:${S}/kernel/net/netfilter/ipset"
+MODULE_NAMES="xt_set(kernel/net/netfilter/ipset/:${S}/kernel/net/netfilter/)"
+for i in ip_set{,_bitmap_{ip{,mac},port},_hash_{ip{,port{,ip,net}},net,net{port,iface}},_list_set}; do
+ MODULE_NAMES+=" ${i}(${MODULE_NAMES_ARG})"
+done
+CONFIG_CHECK="NETFILTER IP6_NF_IPTABLES"
+ERROR_NETFILTER="ipset requires NETFILTER support in your kernel."
+ERROR_IP6_NF_IPTABLES="ipset requires IP6_NF_IPTABLES support in your kernel."
+
+check_header_patch() {
+ if ! $(grep -q NFNL_SUBSYS_IPSET "${KV_DIR}/include/linux/netfilter/nfnetlink.h"); then
+ eerror "Sorry, but you have to patch kernel sources with the following patch:"
+ eerror " # cd ${KV_DIR}"
+ eerror " # patch -i ${S}/netlink.patch -p1"
+ eerror "You do not need to recompile your kernel."
+ die "Unpatched kernel"
+ fi
+}
+
+pkg_setup() {
+ get_version
+
+ build_modules=0
+ if use modules; then
+ kernel_is -lt 2 6 35 && die "${PN} requires kernel greater then 2.6.35."
+ if linux_config_src_exists && linux_chkconfig_builtin "MODULES" ; then
+ if linux_chkconfig_present "IP_NF_SET" || \
+ linux_chkconfig_present "IP_SET"; then #274577
+ eerror "There is IP{,_NF}_SET or NETFILTER_XT_SET support in your kernel."
+ eerror "Please either build ipset with modules USE flag disabled"
+ eerror "or rebuild kernel without IP_SET support and make sure"
+ eerror "there is NO kernel ip_set* modules in /lib/modules/<you_kernel>/... ."
+ die "USE=modules and in-kernel ipset support detected."
+ else
+ einfo "Modular kernel detected. Gonna build kernel modules..."
+ build_modules=1
+ fi
+ else
+ eerror "Nonmodular kernel detected, but USE=modules. Either build"
+ eerror "modular kernel or disable USE=modules"
+ die "Nonmodular kernel detected, will not build kernel modules"
+ fi
+ fi
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ [[ ${build_modules} -eq 1 ]] && check_header_patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-maxsets=${IP_NF_SET_MAX} \
+ --libdir="${EPREFIX}"/$(get_libdir) \
+ --with-ksource="${KV_DIR}" \
+ --with-kbuild="${KV_OUT_DIR}"
+}
+
+src_compile() {
+ einfo "Building userspace"
+ emake
+
+ if [[ ${build_modules} -eq 1 ]]; then
+ einfo "Building kernel modules"
+ set_arch_to_kernel
+ emake modules
+ fi
+}
+
+src_install() {
+ einfo "Installing userspace"
+ emake DESTDIR="${D}" install
+
+ if [[ ${build_modules} -eq 1 ]]; then
+ einfo "Installing kernel modules"
+ linux-mod_src_install
+ fi
+
+ newinitd ${FILESDIR}/ipset.initd ${PN}
+ find "${ED}" \( -name '*.la' -o -name '*.a' \) -exec rm -f '{}' +
+}