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/conntrack-tools | |
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/conntrack-tools')
-rw-r--r-- | net-firewall/conntrack-tools/Manifest | 1 | ||||
-rw-r--r-- | net-firewall/conntrack-tools/conntrack-tools-1.4.2.ebuild | 83 | ||||
-rw-r--r-- | net-firewall/conntrack-tools/files/conntrackd.confd-r2 | 14 | ||||
-rw-r--r-- | net-firewall/conntrack-tools/files/conntrackd.initd-r3 | 77 | ||||
-rw-r--r-- | net-firewall/conntrack-tools/metadata.xml | 10 |
5 files changed, 185 insertions, 0 deletions
diff --git a/net-firewall/conntrack-tools/Manifest b/net-firewall/conntrack-tools/Manifest new file mode 100644 index 000000000000..b523438b4dde --- /dev/null +++ b/net-firewall/conntrack-tools/Manifest @@ -0,0 +1 @@ +DIST conntrack-tools-1.4.2.tar.bz2 472074 SHA256 e5c423dc077f9ca8767eaa6cf40446943905711c6a8fe27f9cc1977d4d6aa11e SHA512 1fed742593caf8bbac96a58df8f7e806d1c0f1dfea8fc601d65aa89b4243b1022949a2bf03ab0ca25994a13e50b3b1ee43a31827e0dc4da1399801ddac623d56 WHIRLPOOL 7405e8b812c98c06bdcdbfea983178f5830001cf247b9a63aac6e19e2497b1bf2bdf8c7c6445dad60f5463eff6cc0ea58d14eca2990b2b3b3f54032daca85572 diff --git a/net-firewall/conntrack-tools/conntrack-tools-1.4.2.ebuild b/net-firewall/conntrack-tools/conntrack-tools-1.4.2.ebuild new file mode 100644 index 000000000000..eab048983e3d --- /dev/null +++ b/net-firewall/conntrack-tools/conntrack-tools-1.4.2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils linux-info + +DESCRIPTION="Connection tracking userspace tools" +HOMEPAGE="http://conntrack-tools.netfilter.org" +SRC_URI="http://www.netfilter.org/projects/conntrack-tools/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa x86" +IUSE="doc" + +RDEPEND=" + >=net-libs/libmnl-1.0.3 + >=net-libs/libnetfilter_conntrack-1.0.4 + >=net-libs/libnetfilter_cthelper-1.0.0 + >=net-libs/libnetfilter_cttimeout-1.0.0 + >=net-libs/libnetfilter_queue-1.0.2 + >=net-libs/libnfnetlink-1.0.1 +" +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xml-dtd:4.1.2 + app-text/xmlto + ) + virtual/pkgconfig + sys-devel/bison + sys-devel/flex" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is lt 2 6 18 ; then + die "${PN} requires at least 2.6.18 kernel version" + fi + + #netfilter core team has changed some option names with kernel 2.6.20 + if kernel_is lt 2 6 20 ; then + CONFIG_CHECK="~IP_NF_CONNTRACK_NETLINK" + else + CONFIG_CHECK="~NF_CT_NETLINK" + fi + CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK + ~NETFILTER_NETLINK ~NF_CONNTRACK_EVENTS" + + check_extra_config + + linux_config_exists || \ + linux_chkconfig_present "NF_CONNTRACK_IPV4" || \ + linux_chkconfig_present "NF_CONNTRACK_IPV6" || \ + ewarn "CONFIG_NF_CONNTRACK_IPV4 or CONFIG_NF_CONNTRACK_IPV6 " \ + "are not set when one at least should be." +} + +src_prepare() { + # bug #474858 + sed -i -e 's:/var/lock:/run/lock:' doc/stats/conntrackd.conf || die 'sed on doc/stat/conntrackd.conf failed' + + epatch_user + eautoreconf +} + +src_compile() { + default + use doc && emake -C doc/manual +} + +src_install() { + default + + newinitd "${FILESDIR}/conntrackd.initd-r3" conntrackd + newconfd "${FILESDIR}/conntrackd.confd-r2" conntrackd + + insinto /etc/conntrackd + doins doc/stats/conntrackd.conf + + dodoc -r doc/sync doc/stats AUTHORS TODO + use doc && dohtml doc/manual/${PN}.html +} diff --git a/net-firewall/conntrack-tools/files/conntrackd.confd-r2 b/net-firewall/conntrack-tools/files/conntrackd.confd-r2 new file mode 100644 index 000000000000..01c0633809d5 --- /dev/null +++ b/net-firewall/conntrack-tools/files/conntrackd.confd-r2 @@ -0,0 +1,14 @@ +# conntrackd config file +# default: /etc/conntrackd/conntrackd.conf +#CONNTRACKD_CFG=/etc/conntrackd/conntrackd.conf + +# conntrackd lockfile (must match the "LockFile" entry +# from the "General" section in the config file) +# default: /run/lock/conntrack.lock +#CONNTRACKD_LOCK=/run/lock/conntrack.lock + +# extra options for conntrackd +#CONNTRACKD_OPTS="" # you must NOT use -C here! + +# depend on a specific network interface +#rc_need="net.eth1" diff --git a/net-firewall/conntrack-tools/files/conntrackd.initd-r3 b/net-firewall/conntrack-tools/files/conntrackd.initd-r3 new file mode 100644 index 000000000000..5309321ff8ab --- /dev/null +++ b/net-firewall/conntrack-tools/files/conntrackd.initd-r3 @@ -0,0 +1,77 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +CONNTRACKD_BIN="/usr/sbin/conntrackd" +CONNTRACKD_CFG=${CONNTRACKD_CFG:-/etc/conntrackd/conntrackd.conf} +CONNTRACKD_LOCK=${CONNTRACKD_LOCK:-/run/lock/conntrack.lock} + +depend() { + use logger + need net +} + +checkconfig() { + # check for netfilter conntrack kernel support + local nf_ct_available=0 + for k in net.netfilter.nf_conntrack_max \ + net.ipv4.netfilter.ip_conntrack_max \ + net.nf_conntrack_max; do + if sysctl -e -n ${k} &>/dev/null; then + nf_ct_available=1 # sysctl key found + break + fi + done + if [ ${nf_ct_available} -eq 0 ]; then + eerror + eerror "Your kernel is missing netfilter conntrack support!" + eerror "Make sure your kernel was compiled with netfilter conntrack support." + eerror + eerror "If it was compiled as a module you need to ensure the module is being" + eerror "loaded before starting conntrackd." + eerror "Either add an entry to /etc/modules.autoload/[...] (for baselayout-1)" + eerror "or /etc/conf.d/modules (for baselayout-2/OpenRC) or load the module" + eerror "by hand like this, depending on your kernel version:" + eerror + eerror " modprobe nf_conntrack # (for newer kernels)" + eerror " modprobe ip_conntrack # (for older kernels)" + eerror + return 1 + fi + # check for config file + if [ ! -e "${CONNTRACKD_CFG}" ]; then + eerror + eerror "The conntrackd config file (${CONNTRACKD_CFG})" + eerror "is missing!" + eerror + return 1 + fi + # check for leftover lockfile + if [ -f "${CONNTRACKD_LOCK}" ]; then + ewarn + ewarn "The conntrackd lockfile (${CONNTRACKD_LOCK})" + ewarn "exists although the service is not marked as started." + ewarn "Will remove the lockfile and start the service in 10s" + ewarn "if not interrupted..." + ewarn + sleep 10 + if ! rm -f "${CONNTRACKD_LOCK}"; then + eerror "Failed to remove the conntrackd lockfile (${CONNTRACKD_LOCK})" + return 1 + fi + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting conntrackd" + start-stop-daemon --start --exec "${CONNTRACKD_BIN}" \ + -- -d -C "${CONNTRACKD_CFG}" ${CONNTRACKD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping conntrackd" + start-stop-daemon --stop --exec "${CONNTRACKD_BIN}" + eend $? +} diff --git a/net-firewall/conntrack-tools/metadata.xml b/net-firewall/conntrack-tools/metadata.xml new file mode 100644 index 000000000000..5c490dd32d99 --- /dev/null +++ b/net-firewall/conntrack-tools/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <longdescription lang="en"> + A set of tools targeted at system administrators. They are conntrack, + the userspace command line interface, and conntrackd, the userspace + daemon. + </longdescription> +</pkgmetadata> |