summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2010-07-18 02:47:57 +0000
committerDaniel Black <dragonheart@gentoo.org>2010-07-18 02:47:57 +0000
commit96f08e002bba134a3557d871a5ed007c54175f85 (patch)
tree1af3a8e452387540219a8d18cc49164503b711ae /net-misc/l7-filter-userspace
parentVersion bump. Remove old ebuilds (diff)
downloadgentoo-2-96f08e002bba134a3557d871a5ed007c54175f85.tar.gz
gentoo-2-96f08e002bba134a3557d871a5ed007c54175f85.tar.bz2
gentoo-2-96f08e002bba134a3557d871a5ed007c54175f85.zip
build fix as per bug #280747 thanks to niv. Patch thanks to Debian
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/l7-filter-userspace')
-rw-r--r--net-misc/l7-filter-userspace/ChangeLog13
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch104
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-in-fix.patch22
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-order-in-fix.patch30
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.10.ebuild30
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild14
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.7.ebuild24
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.8.ebuild30
8 files changed, 126 insertions, 141 deletions
diff --git a/net-misc/l7-filter-userspace/ChangeLog b/net-misc/l7-filter-userspace/ChangeLog
index aec3b5c88bbc..877fed77d8e7 100644
--- a/net-misc/l7-filter-userspace/ChangeLog
+++ b/net-misc/l7-filter-userspace/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/l7-filter-userspace
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/ChangeLog,v 1.10 2009/03/01 09:40:59 pva Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/ChangeLog,v 1.11 2010/07/18 02:47:57 dragonheart Exp $
+
+ 18 Jul 2010; Daniel Black <dragonheart@gentoo.org>
+ -l7-filter-userspace-0.7.ebuild, -l7-filter-userspace-0.8.ebuild,
+ l7-filter-userspace-0.11.ebuild,
+ +files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch,
+ -files/l7-filter-userspace-in-fix.patch,
+ -files/l7-filter-userspace-order-in-fix.patch,
+ -l7-filter-userspace-0.10.ebuild:
+ build fix as per bug #280747 thanks to niv. Patch thanks to Debian
*l7-filter-userspace-0.11 (01 Mar 2009)
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
new file mode 100644
index 000000000000..6cc941ddd1a6
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
@@ -0,0 +1,104 @@
+diff -Naur l7-filter-userspace-0.11-orig/l7-conntrack.cpp l7-filter-userspace-0.11-ptch/l7-conntrack.cpp
+--- l7-filter-userspace-0.11-orig/l7-conntrack.cpp 2009-02-26 21:40:28.000000000 +0000
++++ l7-filter-userspace-0.11-ptch/l7-conntrack.cpp 2009-10-19 17:40:42.000000000 +0000
+@@ -121,25 +121,10 @@
+ return (char *)buffer;
+ }
+
+-static int sprintf_conntrack_key(char *buf, struct nfct_conntrack *ct,
+- unsigned int flags)
+-{
+- int size = 0;
+-
+- size += nfct_sprintf_protocol(buf, ct);
+- size += nfct_sprintf_address(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+- size += nfct_sprintf_proto(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+-
+- /* Delete the last blank space */
+- buf[size-1] = '\0';
+-
+- return size;
+-}
+-
+-static string make_key(nfct_conntrack* ct, int flags)
++static string make_key(nfct_conntrack* ct, int flags, int type)
+ {
+ char key[512];
+- int keysize = sprintf_conntrack_key(key, ct, flags);
++ int keysize = nfct_snprintf(key, sizeof(key), (const nf_conntrack *)ct, type, NFCT_O_DEFAULT, flags);
+ if(keysize >= 512){
+ cerr << "Yike! Overflowed key!\n";
+ exit(1);
+@@ -148,28 +133,28 @@
+ return key;
+ }
+
+-static int l7_handle_conntrack_event(void *arg, unsigned int flags, int type,
++static int l7_handle_conntrack_event(enum nf_conntrack_msg_type type, struct nf_conntrack* arg,
+ void *data)
+ {
+ l7_conntrack * l7_conntrack_handler = (l7_conntrack *) data;
+
+ nfct_conntrack* ct = (nfct_conntrack*)arg;
++ u_int8_t protonum = *(u_int8_t *)nfct_get_attr((const nf_conntrack *)ct, ATTR_ORIG_L4PROTO);
+
+ // I don't think there is any demand for ICMP. These are enough work for now.
+- if(ct->tuple[0].protonum != IPPROTO_TCP &&
+- ct->tuple[0].protonum != IPPROTO_UDP) return 0;
++ if(protonum != IPPROTO_TCP && protonum != IPPROTO_UDP) return 0;
+
+- if(type == NFCT_MSG_DESTROY) l7printf(3, "Got event: NFCT_MSG_DESTROY\n");
+- if(type == NFCT_MSG_NEW) l7printf(3, "Got event: NFCT_MSG_NEW\n");
+- if(type == NFCT_MSG_UPDATE) l7printf(3, "Got event: NFCT_MSG_UPDATE\n");
+- if(type == NFCT_MSG_UNKNOWN) l7printf(3, "Got event: NFCT_MSG_UNKNOWN\n");
++ if(type == NFCT_T_DESTROY) l7printf(3, "Got event: NFCT_T_DESTROY\n");
++ if(type == NFCT_T_NEW) l7printf(3, "Got event: NFCT_T_NEW\n");
++ if(type == NFCT_T_UPDATE) l7printf(3, "Got event: NFCT_T_UPDATE\n");
++ if(type == NFCT_T_UNKNOWN) l7printf(3, "Got event: NFCT_T_UNKNOWN\n");
+
+ // On the first packet, create the connection buffer, etc.
+- if(type == NFCT_MSG_NEW){
+- string key = make_key(ct, flags);
++ if(type == NFCT_T_NEW){
++ string key = make_key(ct, 0, NFCT_T_NEW);
+ if (l7_conntrack_handler->get_l7_connection(key)){
+ // this happens sometimes
+- cerr << "Received NFCT_MSG_NEW but already have a connection. Packets = "
++ cerr << "Received NFCT_T_NEW but already have a connection. Packets = "
+ << l7_conntrack_handler->get_l7_connection(key)->get_num_packets()
+ << endl;
+ l7_conntrack_handler->remove_l7_connection(key);
+@@ -179,9 +164,9 @@
+ l7_conntrack_handler->add_l7_connection(thisconnection, key);
+ thisconnection->key = key;
+ }
+- else if(type == NFCT_MSG_DESTROY){
++ else if(type == NFCT_T_DESTROY){
+ // clean up the connection buffer, etc.
+- string key = make_key(ct, flags);
++ string key = make_key(ct, 0, NFCT_T_DESTROY);
+ if(l7_conntrack_handler->get_l7_connection(key)){
+ l7_conntrack_handler->remove_l7_connection(key);
+ }
+@@ -193,7 +178,7 @@
+
+ l7_conntrack::~l7_conntrack()
+ {
+- nfct_conntrack_free(ct);
++ free(ct);
+ nfct_close(cth);
+ }
+
+@@ -230,9 +215,9 @@
+ {
+ int ret;
+
+- nfct_register_callback(cth, l7_handle_conntrack_event, (void *)this);
+- ret = nfct_event_conntrack(cth); // this is the main loop
++ nfct_callback_register(cth, NFCT_T_NEW, l7_handle_conntrack_event, (void *)this);
++ ret = nfct_catch(cth); // this is the main loop
+
+ nfct_close(cth);
+- nfct_conntrack_free(ct);
++ free(ct);
+ }
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-in-fix.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-in-fix.patch
deleted file mode 100644
index 856d303d64c8..000000000000
--- a/net-misc/l7-filter-userspace/files/l7-filter-userspace-in-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -rN -U3 l7-filter-userspace-0.8.old/l7-conntrack.cpp l7-filter-userspace-0.8/l7-conntrack.cpp
---- l7-filter-userspace-0.8.old/l7-conntrack.cpp 2008-10-26 13:47:53.000000000 +0100
-+++ l7-filter-userspace-0.8/l7-conntrack.cpp 2008-10-26 13:48:43.000000000 +0100
-@@ -24,6 +24,7 @@
- #include <cstring>
-
- extern "C" {
-+#include <netinet/in.h>
- #include <linux/netfilter.h>
- #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
- }
-diff -rN -U3 l7-filter-userspace-0.8.old/l7-filter.cpp l7-filter-userspace-0.8/l7-filter.cpp
---- l7-filter-userspace-0.8.old/l7-filter.cpp 2008-10-26 13:47:53.000000000 +0100
-+++ l7-filter-userspace-0.8/l7-filter.cpp 2008-10-26 13:48:49.000000000 +0100
-@@ -39,6 +39,7 @@
- #include "config.h"
-
- extern "C" {
-+#include <netinet/in.h>
- #include <linux/netfilter.h>
- #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
- #include <libnetfilter_queue/libnetfilter_queue.h>
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-order-in-fix.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-order-in-fix.patch
deleted file mode 100644
index 5d55c0bded6e..000000000000
--- a/net-misc/l7-filter-userspace/files/l7-filter-userspace-order-in-fix.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-=== modified file 'l7-conntrack.cpp'
---- l7-conntrack.cpp 2009-02-17 12:44:01 +0000
-+++ l7-conntrack.cpp 2009-02-17 12:44:20 +0000
-@@ -24,9 +24,9 @@
- #include <cstring>
-
- extern "C" {
-+#include <netinet/in.h>
- #include <linux/netfilter.h>
- #include <linux/types.h>
--#include <netinet/in.h>
- #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
- }
-
-
-=== modified file 'l7-filter.cpp'
---- l7-filter.cpp 2009-02-17 12:44:01 +0000
-+++ l7-filter.cpp 2009-02-17 12:44:12 +0000
-@@ -39,9 +39,9 @@
- #include "config.h"
-
- extern "C" {
-+#include <netinet/in.h>
- #include <linux/netfilter.h>
- #include <linux/types.h>
--#include <netinet/in.h>
- #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
- #include <libnetfilter_queue/libnetfilter_queue.h>
- }
-
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.10.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.10.ebuild
deleted file mode 100644
index afd6e9b936ca..000000000000
--- a/net-misc/l7-filter-userspace/l7-filter-userspace-0.10.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.10.ebuild,v 1.2 2009/02/17 16:08:56 pva Exp $
-
-inherit eutils
-
-DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
-HOMEPAGE="http://l7-filter.sourceforge.net"
-SRC_URI="mirror://sourceforge/l7-filter/${P}.tar.gz"
-
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-SLOT="0"
-DEPEND="
- net-libs/libnetfilter_conntrack
- net-libs/libnetfilter_queue"
-RDEPEND="net-misc/l7-protocols
- ${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${PN}-order-in-fix.patch"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc README TODO BUGS THANKS AUTHORS
-}
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
index bb75f43a1309..1d94f6e2f6aa 100644
--- a/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
@@ -1,6 +1,10 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild,v 1.1 2009/03/01 09:40:59 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild,v 1.2 2010/07/18 02:47:57 dragonheart Exp $
+
+EAPI="2"
+
+inherit eutils
DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
HOMEPAGE="http://l7-filter.sourceforge.net"
@@ -11,11 +15,15 @@ KEYWORDS="~amd64 ~x86"
IUSE=""
SLOT="0"
DEPEND="
- net-libs/libnetfilter_conntrack
+ >=net-libs/libnetfilter_conntrack-0.0.100
net-libs/libnetfilter_queue"
RDEPEND="net-misc/l7-protocols
${DEPEND}"
+src_prepare() {
+ epatch "${FILESDIR}"/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
+}
+
src_install() {
emake DESTDIR="${D}" install || die
dodoc README TODO BUGS THANKS AUTHORS
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.7.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.7.ebuild
deleted file mode 100644
index 533b6458623a..000000000000
--- a/net-misc/l7-filter-userspace/l7-filter-userspace-0.7.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.7.ebuild,v 1.1 2008/08/02 14:13:06 dragonheart Exp $
-
-inherit eutils
-
-DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
-HOMEPAGE="http://l7-filter.sourceforge.net"
-SRC_URI="mirror://sourceforge/l7-filter/${P}.tar.gz"
-
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-SLOT="0"
-DEPEND="
- net-libs/libnetfilter_conntrack
- net-libs/libnetfilter_queue"
-RDEPEND="net-misc/l7-protocols
- ${DEPEND}"
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc README TODO BUGS THANKS AUTHORS
-}
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.8.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.8.ebuild
deleted file mode 100644
index f655cb7283db..000000000000
--- a/net-misc/l7-filter-userspace/l7-filter-userspace-0.8.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter-userspace/l7-filter-userspace-0.8.ebuild,v 1.2 2008/11/15 21:11:15 pva Exp $
-
-inherit eutils
-
-DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
-HOMEPAGE="http://l7-filter.sourceforge.net"
-SRC_URI="mirror://sourceforge/l7-filter/${P}.tar.gz"
-
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-SLOT="0"
-DEPEND="
- net-libs/libnetfilter_conntrack
- net-libs/libnetfilter_queue"
-RDEPEND="net-misc/l7-protocols
- ${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd"${S}"
- epatch "${FILESDIR}/l7-filter-userspace-in-fix.patch"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc README TODO BUGS THANKS AUTHORS
-}