diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-firewall/ipt_netflow | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-firewall/ipt_netflow')
-rw-r--r-- | net-firewall/ipt_netflow/Manifest | 1 | ||||
-rw-r--r-- | net-firewall/ipt_netflow/files/ipt_netflow-2.0-configure.patch | 10 | ||||
-rw-r--r-- | net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch | 45 | ||||
-rw-r--r-- | net-firewall/ipt_netflow/ipt_netflow-2.1.ebuild | 93 | ||||
-rw-r--r-- | net-firewall/ipt_netflow/metadata.xml | 12 |
5 files changed, 161 insertions, 0 deletions
diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest new file mode 100644 index 000000000000..c0b5d1d89a4f --- /dev/null +++ b/net-firewall/ipt_netflow/Manifest @@ -0,0 +1 @@ +DIST ipt-netflow-2.1.tgz 87872 SHA256 1cc1ee518ecd6c7d8d792ea79c0f69d03ce450c10fefd37f053c43aac92e9931 SHA512 0055ebb1846077f94c1fbf701af8a07a432058c8e86e31c6f420d5c00c96b45012abdcdeef3c5b1ead7d20c7efd51ac65d000b6cb931d878f528f52de0ab9c21 WHIRLPOOL e46ffe69f58293cca0fc26c2ff13ee30e68e2a60a4b198c89fdb24ebc45a4376877285358d4e72019c811d70d0a77194dbc0d46f44c8076923fc626cfe2e7488 diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.0-configure.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.0-configure.patch new file mode 100644 index 000000000000..f6b3a005ba21 --- /dev/null +++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.0-configure.patch @@ -0,0 +1,10 @@ +--- a/configure ++++ b/configure +@@ -421,7 +421,6 @@ + iptables_find_version #IPTVER + iptables_try_pkgconfig #try to configure from pkg-config + iptables_find_src #IPTSRC +-iptables_src_version #check that IPTSRC match to IPTVER + iptables_inc #IPTINC + iptables_modules #IPTLIB + diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch new file mode 100644 index 000000000000..47fec4f73da8 --- /dev/null +++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch @@ -0,0 +1,45 @@ +commit 582fd497a5f0f5ae5dce24cba042d856d63bfbe1 +Author: ABC <abc@telekom.ru> +Date: Mon Feb 16 21:53:54 2015 +0400 + + Compatibility of __get_cpu_var with linux 3.19. + + Fixes #28, thanks boyarsh@github. + +diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h +index bc2734f..5548e57 100644 +--- a/ipt_NETFLOW.h ++++ b/ipt_NETFLOW.h +@@ -396,6 +396,9 @@ struct netflow_aggr_p { + __u16 aggr_port; + }; + ++#ifndef __get_cpu_var ++#define __get_cpu_var(var) (*this_cpu_ptr(&(var))) ++#endif + #define NETFLOW_STAT_INC(count) (__get_cpu_var(ipt_netflow_stat).count++) + #define NETFLOW_STAT_ADD(count, val) (__get_cpu_var(ipt_netflow_stat).count += (unsigned long long)val) + #define NETFLOW_STAT_SET(count, val) (__get_cpu_var(ipt_netflow_stat).count = (unsigned long long)val) +diff --git a/testing.sh b/testing.sh +index b465c8d..caa4f03 100755 +--- a/testing.sh ++++ b/testing.sh +@@ -6,7 +6,7 @@ if [ "$1" = "" ]; then + echo Maintainer only tool. + exit 1 + elif [ "$1" = all ]; then +- exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 ++ exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 linux-3.19 + exit 1 + fi + +@@ -33,6 +33,9 @@ readarray -t opts <<EOF + --enable-sampler=hash + --enable-promisc + EOF ++if [ "$SHORT" ]; then ++ opts=("") ++fi + + colorecho() { + echo -e "\033[1;32m$@\033[m" diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.1.ebuild new file mode 100644 index 000000000000..af6bc1fbee93 --- /dev/null +++ b/net-firewall/ipt_netflow/ipt_netflow-2.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +MY_PN="${PN/_/-}" +MY_P="${MY_PN}-${PV}" +inherit eutils linux-info linux-mod multilib toolchain-funcs + +DESCRIPTION="Netflow iptables module" +HOMEPAGE="http://sourceforge.net/projects/ipt-netflow" +SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="debug snmp" + +RDEPEND=" + net-firewall/iptables + snmp? ( net-analyzer/net-snmp ) +" +DEPEND="${RDEPEND} + virtual/linux-sources + virtual/pkgconfig +" + +# set S before MODULE_NAMES +S="${WORKDIR}/${MY_P}" + +BUILD_TARGETS="all" +MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})" + +IPT_LIB="/usr/$(get_libdir)/xtables" + +pkg_setup() { + local CONFIG_CHECK="~IP_NF_IPTABLES" + use debug && CONFIG_CHECK+=" ~DEBUG_FS" + linux-mod_pkg_setup +} + +src_prepare() { + sed -i \ + -e 's:make -C:$(MAKE) -C:g' \ + -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \ + -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \ + Makefile.in || die + + # Checking for directory is enough + sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die + + # bug #455984 + epatch "${FILESDIR}/${PN}-2.0-configure.patch" + + # bug #552476 + epatch "${FILESDIR}/${PN}-2.1-linux-3.19.patch" + + epatch_user +} + +do_conf() { + echo ./configure $* + ./configure $* ${EXTRA_ECONF} || die 'configure failed' +} + +src_configure() { + local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)" + # this configure script is not based on autotools + # ipt-src need to be defined, see bug #455984 + do_conf \ + --disable-dkms \ + --ipt-lib="${IPT_LIB}" \ + --ipt-src="/usr/" \ + --ipt-ver="${IPT_VERSION}" \ + --kdir="${KV_DIR}" \ + --kver="${KV_FULL}" \ + $(use debug && echo '--enable-debugfs') \ + $(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent') +} + +src_compile() { + emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" all +} + +src_install() { + linux-mod_src_install + exeinto "${IPT_LIB}" + doexe libipt_NETFLOW.so + use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall + doheader ipt_NETFLOW.h + dodoc README* +} diff --git a/net-firewall/ipt_netflow/metadata.xml b/net-firewall/ipt_netflow/metadata.xml new file mode 100644 index 000000000000..e2cd4f38e85b --- /dev/null +++ b/net-firewall/ipt_netflow/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ipt-netflow</remote-id> + </upstream> +</pkgmetadata> |