summaryrefslogtreecommitdiff
path: root/community-testing/conntrack-tools
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-28 00:02:35 +0000
committerroot <root@rshg054.dnsready.net>2012-05-28 00:02:35 +0000
commit89dd7b5f30d48c708092a71b1c8285090fe91505 (patch)
treefb3a22f789121b955ff0fce7ec8d2f8c8886579b /community-testing/conntrack-tools
parent1f45ad8e3f17397e2f44e68ef9a0d860091eea9e (diff)
Mon May 28 00:02:35 UTC 2012
Diffstat (limited to 'community-testing/conntrack-tools')
-rw-r--r--community-testing/conntrack-tools/01-config-file-path.patch11
-rw-r--r--community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch33
-rw-r--r--community-testing/conntrack-tools/PKGBUILD53
-rw-r--r--community-testing/conntrack-tools/conntrack-tools.install9
-rw-r--r--community-testing/conntrack-tools/conntrackd.conf3
-rw-r--r--community-testing/conntrack-tools/conntrackd.rc34
-rw-r--r--community-testing/conntrack-tools/conntrackd.service8
7 files changed, 151 insertions, 0 deletions
diff --git a/community-testing/conntrack-tools/01-config-file-path.patch b/community-testing/conntrack-tools/01-config-file-path.patch
new file mode 100644
index 000000000..8512cc9ab
--- /dev/null
+++ b/community-testing/conntrack-tools/01-config-file-path.patch
@@ -0,0 +1,11 @@
+--- a/include/conntrackd.h 2012-05-26 15:29:15.630027223 +0200
++++ b/include/conntrackd.h 2012-05-27 02:26:59.426811589 +0200
+@@ -50,7 +50,7 @@
+ #define EXP_DUMP_INT_XML 47 /* dump internal cache in XML */
+ #define EXP_DUMP_EXT_XML 48 /* dump external cache in XML */
+
+-#define DEFAULT_CONFIGFILE "/etc/conntrackd/conntrackd.conf"
++#define DEFAULT_CONFIGFILE "/etc/conntrackd.conf"
+ #define DEFAULT_LOCKFILE "/var/lock/conntrackd.lock"
+ #define DEFAULT_LOGFILE "/var/log/conntrackd.log"
+ #define DEFAULT_STATS_LOGFILE "/var/log/conntrackd-stats.log"
diff --git a/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch b/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch
new file mode 100644
index 000000000..746934994
--- /dev/null
+++ b/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch
@@ -0,0 +1,33 @@
+From 18efbc802479ce042378dc0cccc7577e1c6afa41 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Sat, 26 May 2012 20:58:16 +0200
+Subject: [PATCH] nfct: fix compilation of timeout extension
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+nfct-extensions/timeout.c: In function ‘nfct_timeout_cb’:
+nfct-extensions/timeout.c:99:2: warning: passing argument 4 of ‘nfct_timeout_snprintf’ makes integer from pointer without a cast [enabled by default]
+/usr/include/libnetfilter_cttimeout/libnetfilter_cttimeout.h:114:5: note: expected ‘unsigned int’ but argument is of type ‘struct nfct_timeout *’
+
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ src/nfct-extensions/timeout.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/nfct-extensions/timeout.c b/src/nfct-extensions/timeout.c
+index a1a5c52..5b32023 100644
+--- a/src/nfct-extensions/timeout.c
++++ b/src/nfct-extensions/timeout.c
+@@ -96,7 +96,7 @@ static int nfct_timeout_cb(const struct nlmsghdr *nlh, void *data)
+ goto err_free;
+ }
+
+- nfct_timeout_snprintf(buf, sizeof(buf), t, 0);
++ nfct_timeout_snprintf(buf, sizeof(buf), t, NFCT_TIMEOUT_O_DEFAULT, 0);
+ printf("%s\n", buf);
+
+ err_free:
+--
+1.7.2.5
+
diff --git a/community-testing/conntrack-tools/PKGBUILD b/community-testing/conntrack-tools/PKGBUILD
new file mode 100644
index 000000000..f8c8ba7ef
--- /dev/null
+++ b/community-testing/conntrack-tools/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 71335 2012-05-27 00:50:12Z seblu $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: Valere Monseur <valere_monseur@hotmail.com>
+# Contributor: Alessandro Sagratini <ale_sagra@hotmail.com>
+# Contributor: Kevin Edmonds <edmondskevin@hotmail.com>
+
+pkgname=conntrack-tools
+pkgver=1.2.0
+pkgrel=1
+pkgdesc='Userspace tools to interact with the Netfilter connection tracking system'
+arch=('i686' 'x86_64')
+url='http://www.netfilter.org/projects/conntrack-tools'
+license=('GPL2')
+depends=('libnetfilter_conntrack' 'libnetfilter_cttimeout')
+backup=('etc/conntrackd.conf' 'etc/conf.d/conntrackd')
+install=$pkgname.install
+source=("http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2"
+ 'conntrackd.rc'
+ 'conntrackd.conf'
+ 'conntrackd.service'
+ '01-config-file-path.patch'
+ '02-fix-compilation-of-timeout-extension.patch')
+md5sums=('8e20330d6ca3a3f23552aa900b1d467c'
+ '478fe76da0202fcb5249bf65968d1c26'
+ 'd3e73e81b54e3e8166d357d434680684'
+ 'bd135eaefb47923bb8e8d26f084d3e9d'
+ '411fc0eb97c02595aab69b14c26c1d00'
+ '0144021bbec4d5b496ddd86a7ff7a257')
+
+build() {
+ cd $pkgname-$pkgver
+ for i in "$srcdir"/*.patch; do
+ patch -p1 -i "$i"
+ done
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+}
+
+package() {
+ # install binaries
+ pushd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ popd
+ # initscripts & systemd
+ install -D -m 755 conntrackd.rc "$pkgdir/etc/rc.d/conntrackd"
+ install -D -m 644 conntrackd.conf "$pkgdir/etc/conf.d/conntrackd"
+ install -D -m 644 conntrackd.service \
+ "$pkgdir/usr/lib/systemd/system/conntrackd.service"
+ # install empty configuration files
+ install -D -m 644 /dev/null "$pkgdir/etc/conntrackd.conf"
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community-testing/conntrack-tools/conntrack-tools.install b/community-testing/conntrack-tools/conntrack-tools.install
new file mode 100644
index 000000000..d21a5f92c
--- /dev/null
+++ b/community-testing/conntrack-tools/conntrack-tools.install
@@ -0,0 +1,9 @@
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ [ $(vercmp "$2" '1.0.1-2') -gt 0 ] || cat <<EOF
+Config file have been moved from /etc/conntrackd/conntrackd.conf to /etc/conntrackd.conf.
+EOF
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community-testing/conntrack-tools/conntrackd.conf b/community-testing/conntrack-tools/conntrackd.conf
new file mode 100644
index 000000000..285f566d2
--- /dev/null
+++ b/community-testing/conntrack-tools/conntrackd.conf
@@ -0,0 +1,3 @@
+# vim:set ts=2 sw=2 ft=sh noet:
+
+#DAEMON_OPTIONS=''
diff --git a/community-testing/conntrack-tools/conntrackd.rc b/community-testing/conntrack-tools/conntrackd.rc
new file mode 100644
index 000000000..4300a7041
--- /dev/null
+++ b/community-testing/conntrack-tools/conntrackd.rc
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+DAEMON=/usr/sbin/conntrackd
+PID=$(pidof -o %PPID $DAEMON)
+DAEMON_OPTIONS="-d $DAEMON_OPTIONS"
+
+case "$1" in
+ start)
+ stat_busy "Starting ${0##*/} daemon"
+ [[ ! $PID ]] && $DAEMON $DAEMON_OPTIONS && add_daemon ${0##*/} && stat_done && exit 0
+ stat_fail
+ ;;
+ stop)
+ stat_busy "Stopping ${0##*/} daemon"
+ [[ $PID ]] && kill $PID &> /dev/null && rm_daemon ${0##*/} && stat_done && exit 0
+ stat_fail
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ exit 0
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart}" >&2
+ ;;
+esac
+
+exit 1
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community-testing/conntrack-tools/conntrackd.service b/community-testing/conntrack-tools/conntrackd.service
new file mode 100644
index 000000000..25a113785
--- /dev/null
+++ b/community-testing/conntrack-tools/conntrackd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Conntrack Daemon
+
+[Service]
+ExecStart=/usr/sbin/conntrackd
+
+[Install]
+WantedBy=multi-user.target