diff options
-rw-r--r-- | net-firewall/ipset/ChangeLog | 10 | ||||
-rw-r--r-- | net-firewall/ipset/files/ipset-2.4.8-use-new-hash.patch | 102 | ||||
-rw-r--r-- | net-firewall/ipset/ipset-2.4.7.ebuild | 8 | ||||
-rw-r--r-- | net-firewall/ipset/ipset-2.4.8.ebuild | 94 |
4 files changed, 210 insertions, 4 deletions
diff --git a/net-firewall/ipset/ChangeLog b/net-firewall/ipset/ChangeLog index 1bc47fae1781..6b0afdf25ceb 100644 --- a/net-firewall/ipset/ChangeLog +++ b/net-firewall/ipset/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-firewall/ipset # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.21 2009/02/04 21:42:48 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.22 2009/02/26 17:01:59 pva Exp $ + +*ipset-2.4.8 (26 Feb 2009) + + 26 Feb 2009; Peter Volkov <pva@gentoo.org> + +files/ipset-2.4.8-use-new-hash.patch, ipset-2.4.7.ebuild, + +ipset-2.4.8.ebuild: + Version bump, bug #260338, thank BoneKracker for report. Disable warnings, + fixes bug #259999, thank Aleksey Kunitskiy for report. 04 Feb 2009; Markus Meier <maekke@gentoo.org> ipset-2.4.7.ebuild: amd64/x86 stable, bug #257483 diff --git a/net-firewall/ipset/files/ipset-2.4.8-use-new-hash.patch b/net-firewall/ipset/files/ipset-2.4.8-use-new-hash.patch new file mode 100644 index 000000000000..a90515331ce4 --- /dev/null +++ b/net-firewall/ipset/files/ipset-2.4.8-use-new-hash.patch @@ -0,0 +1,102 @@ +From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> +Date: Wed, 11 Feb 2009 13:00:35 +0000 (+0100) +Subject: Use the new hash really. +X-Git-Tag: v2.4.9~1 +X-Git-Url: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ipset.git;a=commitdiff_plain;h=31c93a74639077ee39b448ff47f446b4864cfaea + +Use the new hash really. + +References to the old include file replaced with new one in order to +really use the new Jenkins' hash function. +--- + +diff --git a/kernel/ChangeLog b/kernel/ChangeLog +index 1ed0fbb..1c6e650 100644 +--- a/kernel/ChangeLog ++++ b/kernel/ChangeLog +@@ -1,3 +1,7 @@ ++2.4.9 ++ - References to the old include file replaced with new one in order to ++ really use the new Jenkins' hash function. ++ + 2.4.8 + - The Jenkins' hash lookup2() replaced with Jenkins' faster/better lookup3() + hash function. +diff --git a/kernel/ip_set.c b/kernel/ip_set.c +index f60a63e..f52647f 100644 +--- a/kernel/ip_set.c ++++ b/kernel/ip_set.c +@@ -19,7 +19,7 @@ + #include <linux/ip.h> + #include <linux/skbuff.h> + #include <linux/random.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <linux/capability.h> + #include <asm/uaccess.h> +diff --git a/kernel/ip_set_iphash.c b/kernel/ip_set_iphash.c +index b1bccc1..aac3eec 100644 +--- a/kernel/ip_set_iphash.c ++++ b/kernel/ip_set_iphash.c +@@ -11,7 +11,7 @@ + #include <linux/moduleparam.h> + #include <linux/ip.h> + #include <linux/skbuff.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <asm/uaccess.h> + #include <asm/bitops.h> +diff --git a/kernel/ip_set_ipporthash.c b/kernel/ip_set_ipporthash.c +index 2352858..c41c0a8 100644 +--- a/kernel/ip_set_ipporthash.c ++++ b/kernel/ip_set_ipporthash.c +@@ -13,7 +13,7 @@ + #include <linux/tcp.h> + #include <linux/udp.h> + #include <linux/skbuff.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <asm/uaccess.h> + #include <asm/bitops.h> +diff --git a/kernel/ip_set_ipportiphash.c b/kernel/ip_set_ipportiphash.c +index e0725d9..166bec4 100644 +--- a/kernel/ip_set_ipportiphash.c ++++ b/kernel/ip_set_ipportiphash.c +@@ -13,7 +13,7 @@ + #include <linux/tcp.h> + #include <linux/udp.h> + #include <linux/skbuff.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <asm/uaccess.h> + #include <asm/bitops.h> +diff --git a/kernel/ip_set_ipportnethash.c b/kernel/ip_set_ipportnethash.c +index 267370a..fe36c58 100644 +--- a/kernel/ip_set_ipportnethash.c ++++ b/kernel/ip_set_ipportnethash.c +@@ -13,7 +13,7 @@ + #include <linux/tcp.h> + #include <linux/udp.h> + #include <linux/skbuff.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <asm/uaccess.h> + #include <asm/bitops.h> +diff --git a/kernel/ip_set_nethash.c b/kernel/ip_set_nethash.c +index 268fe6a..27267d9 100644 +--- a/kernel/ip_set_nethash.c ++++ b/kernel/ip_set_nethash.c +@@ -11,7 +11,7 @@ + #include <linux/moduleparam.h> + #include <linux/ip.h> + #include <linux/skbuff.h> +-#include <linux/jhash.h> ++#include <linux/netfilter_ipv4/ip_set_jhash.h> + #include <linux/errno.h> + #include <asm/uaccess.h> + #include <asm/bitops.h> diff --git a/net-firewall/ipset/ipset-2.4.7.ebuild b/net-firewall/ipset/ipset-2.4.7.ebuild index 44a2d62af4a2..2d9b9e3b7eed 100644 --- a/net-firewall/ipset/ipset-2.4.7.ebuild +++ b/net-firewall/ipset/ipset-2.4.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.4.7.ebuild,v 1.2 2009/02/04 21:42:48 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.4.7.ebuild,v 1.3 2009/02/26 17:01:59 pva Exp $ inherit eutils versionator toolchain-funcs linux-mod linux-info @@ -32,15 +32,17 @@ ERROR_CFG="ipset needs netfilter support in your kernel." src_unpack() { unpack ${A} + cd "${S}" + sed -i \ -e 's/KERNELDIR/(KERNELDIR)/g' \ -e 's/^(\?KERNEL_\?DIR.*/KERNELDIR ?= /' \ -e '/^all::/iV ?= 0' \ -e '/^all::/iKBUILD_OUTPUT ?=' \ -e '/$(MAKE)/{s/$@/ V=$(V) KBUILD_OUTPUT=$(KBUILD_OUTPUT) modules/}' \ - "${S}"/kernel/Makefile + kernel/Makefile - cd "${S}" + sed -i -e 's/^WARN_FLAGS/DONT_WARN_FLAGS/' Makefile epatch "${FILESDIR}/${P}-LDFLAGS.patch" } diff --git a/net-firewall/ipset/ipset-2.4.8.ebuild b/net-firewall/ipset/ipset-2.4.8.ebuild new file mode 100644 index 000000000000..c519712dd4f2 --- /dev/null +++ b/net-firewall/ipset/ipset-2.4.8.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.4.8.ebuild,v 1.1 2009/02/26 17:01:59 pva Exp $ + +inherit eutils versionator toolchain-funcs linux-mod linux-info + +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 ~ppc ~x86" +IUSE="" +RDEPEND=">=net-firewall/iptables-1.4.1" +DEPEND="${RDEPEND}" + +# configurable from outside +[ -z "${IP_NF_SET_MAX}" ] && IP_NF_SET_MAX=256 +[ -z "${IP_NF_SET_HASHSIZE}" ] && IP_NF_SET_HASHSIZE=1024 +BUILD_PARAMS="IP_NF_SET_MAX=$IP_NF_SET_MAX IP_NF_SET_HASHSIZE=${IP_NF_SET_HASHSIZE}" +# module fun +BUILD_TARGETS="all" +MODULE_NAMES_ARG="kernel/net/ipv4/netfilter:${S}/kernel" +MODULE_NAMES="" +for i in ip_set{,_{{ip,port,macip}map,{ip,net,ipport}hash,iptree{,map}}} \ + ipt_{SET,set}; do + MODULE_NAMES="${MODULE_NAMES} ${i}(${MODULE_NAMES_ARG})" +done +# sanity +CONFIG_CHECK="NETFILTER" +ERROR_CFG="ipset needs netfilter support in your kernel." + +src_unpack() { + unpack ${A} + sed -i \ + -e 's/KERNELDIR/(KERNELDIR)/g' \ + -e 's/^(\?KERNEL_\?DIR.*/KERNELDIR ?= /' \ + -e '/^all::/iV ?= 0' \ + -e '/^all::/iKBUILD_OUTPUT ?=' \ + -e '/$(MAKE)/{s/$@/ V=$(V) KBUILD_OUTPUT=$(KBUILD_OUTPUT) modules/}' \ + "${S}"/kernel/Makefile + + cd "${S}" + epatch "${FILESDIR}/${PN}-2.4.7-LDFLAGS.patch" + epatch "${FILESDIR}/${PN}-2.4.8-use-new-hash.patch" +} + +pkg_setup() { + get_version + + modules=0 + msg='' + if linux_chkconfig_builtin "MODULES" ; then + modules=1 + msg="Modular kernel detected, will build kernel modules" + else + msg="Nonmodular kernel detected, will not build kernel modules" + fi + einfo "${msg}" + + [[ $modules -eq 1 ]] && \ + linux-mod_pkg_setup + myconf="${myconf} PREFIX=" + myconf="${myconf} LIBDIR=/$(get_libdir)" + myconf="${myconf} BINDIR=/sbin" + myconf="${myconf} MANDIR=/usr/share/man" + myconf="${myconf} INCDIR=/usr/include" + myconf="${myconf} NO_EXTRA_WARN_FLAGS=yes" + export myconf +} + +src_compile() { + einfo "Building userspace" + emake CC="$(tc-getCC)" COPT_FLAGS="${CFLAGS}" ${myconf} binaries || die "failed to build" + + if [[ $modules -eq 1 ]]; then + einfo "Building kernel modules" + cd "${S}/kernel" + export KERNELDIR="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + fi +} + +src_install() { + einfo "Installing userspace" + emake DESTDIR="${D}" ${myconf} binaries_install || die "failed to package" + + if [[ $modules -eq 1 ]]; then + einfo "Installing kernel modules" + cd "${S}/kernel" + export KERNELDIR="${KERNEL_DIR}" + linux-mod_src_install + fi +} |