summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-10-24 21:28:26 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-10-24 21:28:26 +0000
commitd12cc47afe83c9af6e6aefe2180b9b003eb9c784 (patch)
tree5c20b8ace02dd3a9db86f549886f806869c20d94 /net-firewall
parentamd64/x86 stable, bug #243488 (diff)
downloadgentoo-2-d12cc47afe83c9af6e6aefe2180b9b003eb9c784.tar.gz
gentoo-2-d12cc47afe83c9af6e6aefe2180b9b003eb9c784.tar.bz2
gentoo-2-d12cc47afe83c9af6e6aefe2180b9b003eb9c784.zip
Bug #243092, version bump.
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-07512-g969907a x86_64)
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ipset/ChangeLog8
-rw-r--r--net-firewall/ipset/files/ipset-2.4.2-glibc28-fix.patch77
-rw-r--r--net-firewall/ipset/ipset-2.4.2.ebuild94
3 files changed, 178 insertions, 1 deletions
diff --git a/net-firewall/ipset/ChangeLog b/net-firewall/ipset/ChangeLog
index 985516c25a03..251213ad5a59 100644
--- a/net-firewall/ipset/ChangeLog
+++ b/net-firewall/ipset/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-firewall/ipset
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.18 2008/10/14 07:21:01 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ChangeLog,v 1.19 2008/10/24 21:28:25 robbat2 Exp $
+
+*ipset-2.4.2 (24 Oct 2008)
+
+ 24 Oct 2008; Robin H. Johnson <robbat2@gentoo.org>
+ +files/ipset-2.4.2-glibc28-fix.patch, +ipset-2.4.2.ebuild:
+ Bug #243092, version bump.
14 Oct 2008; Robin H. Johnson <robbat2@gentoo.org> ipset-2.3.3a.ebuild:
Bug #236138, allow building with non-modular kernels.
diff --git a/net-firewall/ipset/files/ipset-2.4.2-glibc28-fix.patch b/net-firewall/ipset/files/ipset-2.4.2-glibc28-fix.patch
new file mode 100644
index 000000000000..c69865f6e9ad
--- /dev/null
+++ b/net-firewall/ipset/files/ipset-2.4.2-glibc28-fix.patch
@@ -0,0 +1,77 @@
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_iphash.c ipset-2.4.2/ipset_iphash.c
+--- ipset-2.4.2.orig/ipset_iphash.c 2008-10-23 09:03:47.000000000 -0700
++++ ipset-2.4.2/ipset_iphash.c 2008-10-24 14:24:53.665544125 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_iphash.h>
+
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_ipporthash.c ipset-2.4.2/ipset_ipporthash.c
+--- ipset-2.4.2.orig/ipset_ipporthash.c 2008-10-23 09:05:01.000000000 -0700
++++ ipset-2.4.2/ipset_ipporthash.c 2008-10-24 14:24:48.755124578 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_ipporthash.h>
+
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_ipportiphash.c ipset-2.4.2/ipset_ipportiphash.c
+--- ipset-2.4.2.orig/ipset_ipportiphash.c 2008-10-23 09:06:22.000000000 -0700
++++ ipset-2.4.2/ipset_ipportiphash.c 2008-10-24 14:24:36.931696323 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_ipportiphash.h>
+
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_ipportnethash.c ipset-2.4.2/ipset_ipportnethash.c
+--- ipset-2.4.2.orig/ipset_ipportnethash.c 2008-10-23 09:06:31.000000000 -0700
++++ ipset-2.4.2/ipset_ipportnethash.c 2008-10-24 14:24:34.225051888 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_ipportnethash.h>
+
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_iptree.c ipset-2.4.2/ipset_iptree.c
+--- ipset-2.4.2.orig/ipset_iptree.c 2008-10-21 14:57:53.000000000 -0700
++++ ipset-2.4.2/ipset_iptree.c 2008-10-24 14:24:46.035116608 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_iptree.h>
+ #include "ipset.h"
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_iptreemap.c ipset-2.4.2/ipset_iptreemap.c
+--- ipset-2.4.2.orig/ipset_iptreemap.c 2008-10-21 14:58:23.000000000 -0700
++++ ipset-2.4.2/ipset_iptreemap.c 2008-10-24 14:24:40.226279494 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_iptreemap.h>
+
+diff -Nuar --exclude '*~' ipset-2.4.2.orig/ipset_nethash.c ipset-2.4.2/ipset_nethash.c
+--- ipset-2.4.2.orig/ipset_nethash.c 2008-10-23 09:04:32.000000000 -0700
++++ ipset-2.4.2/ipset_nethash.c 2008-10-24 14:24:42.722945849 -0700
+@@ -19,6 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+
+ #include <linux/netfilter_ipv4/ip_set_nethash.h>
+
diff --git a/net-firewall/ipset/ipset-2.4.2.ebuild b/net-firewall/ipset/ipset-2.4.2.ebuild
new file mode 100644
index 000000000000..8a39f360ac4b
--- /dev/null
+++ b/net-firewall/ipset/ipset-2.4.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipset/ipset-2.4.2.ebuild,v 1.1 2008/10/24 21:28:25 robbat2 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="~x86 ~amd64 ~ppc"
+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 's/$@/ V=$(V) KBUILD_OUTPUT=$(KBUILD_OUTPUT) modules/' \
+ "${S}"/kernel/Makefile
+ sed -i \
+ -e '/asm.semaphore.h/d' \
+ "${S}"/kernel/ip_set.c
+
+ epatch "${FILESDIR}"/ipset-2.4.2-glibc28-fix.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"
+ 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
+}