summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Smee <strerror@gentoo.org>2005-10-08 13:52:29 +0000
committerBenjamin Smee <strerror@gentoo.org>2005-10-08 13:52:29 +0000
commit27ee41ac13cec6b6ebc2789ca12ed678e38ebac0 (patch)
tree7cff8edf822d16331927d0229f4b6a6b8b5789de
parentNew version for sguil integration. Includes init.d and conf.d files (diff)
downloadgentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.tar.gz
gentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.tar.bz2
gentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.zip
Initial import. Thanks to soulse for base ebuild
(Portage version: 2.0.51.22-r3)
-rw-r--r--net-analyzer/sancp/ChangeLog10
-rw-r--r--net-analyzer/sancp/Manifest2
-rw-r--r--net-analyzer/sancp/files/digest-sancp-1.6.11
-rw-r--r--net-analyzer/sancp/files/sancp.confd13
-rw-r--r--net-analyzer/sancp/files/sancp.rc143
-rw-r--r--net-analyzer/sancp/metadata.xml6
-rw-r--r--net-analyzer/sancp/sancp-1.6.1.ebuild58
7 files changed, 133 insertions, 0 deletions
diff --git a/net-analyzer/sancp/ChangeLog b/net-analyzer/sancp/ChangeLog
new file mode 100644
index 000000000000..74d2feb4378d
--- /dev/null
+++ b/net-analyzer/sancp/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-analyzer/sancp
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/ChangeLog,v 1.1 2005/10/08 13:52:29 strerror Exp $
+
+*sancp-1.6.1 (08 Oct 2005)
+
+ 08 Oct 2005; Benjamin Smee <strerror@gentoo.org> +files/sancp.confd,
+ +files/sancp.rc1, +metadata.xml, +sancp-1.6.1.ebuild:
+ Initial import. Thanks to soulse for base ebuild
+
diff --git a/net-analyzer/sancp/Manifest b/net-analyzer/sancp/Manifest
new file mode 100644
index 000000000000..2771c4d8ebe5
--- /dev/null
+++ b/net-analyzer/sancp/Manifest
@@ -0,0 +1,2 @@
+MD5 2414dcbaf41c7240aa50660e3f75d441 sancp-1.6.1.ebuild 1306
+MD5 5a29e0856415b398e93b6aa72172fa50 files/digest-sancp-1.6.1 62
diff --git a/net-analyzer/sancp/files/digest-sancp-1.6.1 b/net-analyzer/sancp/files/digest-sancp-1.6.1
new file mode 100644
index 000000000000..a55fe08d5eab
--- /dev/null
+++ b/net-analyzer/sancp/files/digest-sancp-1.6.1
@@ -0,0 +1 @@
+MD5 b83e2f4abb2bf7b10fd874aa58f6324c sancp-1.6.1.tar.gz 69986
diff --git a/net-analyzer/sancp/files/sancp.confd b/net-analyzer/sancp/files/sancp.confd
new file mode 100644
index 000000000000..49208434909b
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.confd
@@ -0,0 +1,13 @@
+# Config file for /etc/init.d/sancp
+
+# Interface to listen on
+IFACE="eth0"
+
+# Directory to log in
+LOGDIR="/var/log/sancp"
+
+# Default config file
+CONF="/etc/sancp/sancp.conf"
+
+# You could add more options :)
+SANCP_OPTS="-d $LOGDIR/today -i $IFACE -c $CONF -u sancp -g sancp"
diff --git a/net-analyzer/sancp/files/sancp.rc1 b/net-analyzer/sancp/files/sancp.rc1
new file mode 100644
index 000000000000..d5f8ea17c89f
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.rc1
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/files/sancp.rc1,v 1.1 2005/10/08 13:52:29 strerror Exp $
+
+today=$(date '+%Y-%m-%d')
+
+depend() {
+ need net
+}
+checkconfig() {
+ if [ ! -e /etc/sancp/sancp.conf ] ; then
+ eerror "You need an /etc/sancp/sancp.conf to run sancp"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ # Today's log directory
+ if [ ! -d $LOGDIR/$today ]; then
+ /bin/mkdir $LOGDIR/$today
+ /bin/rm -f $LOGDIR/today
+ fi
+
+ # today/ directory :)
+ if [ ! -d $LOGDIR/today ]; then
+ /bin/ln -s $LOGDIR/$today $LOGDIR/today
+ fi
+
+ ebegin "Starting sancp"
+ start-stop-daemon --start --quiet --pidfiles /var/run/sancp.pid \
+ --exec /usr/bin/sancp \
+ -- ${SANCP_OPTS} > /var/log/sancp.log 2>&1 &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sancp"
+ start-stop-daemon --stop --quiet --pidfile /var/run/sancp.pid
+ eend $?
+}
diff --git a/net-analyzer/sancp/metadata.xml b/net-analyzer/sancp/metadata.xml
new file mode 100644
index 000000000000..9c257358a0e0
--- /dev/null
+++ b/net-analyzer/sancp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Network security tool information collector</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/sancp/sancp-1.6.1.ebuild b/net-analyzer/sancp/sancp-1.6.1.ebuild
new file mode 100644
index 000000000000..18d337f76534
--- /dev/null
+++ b/net-analyzer/sancp/sancp-1.6.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/sancp-1.6.1.ebuild,v 1.1 2005/10/08 13:52:29 strerror Exp $
+
+inherit eutils
+
+DESCRIPTION="SANCP is a network security tool designed to collect statistical \
+ information regarding network traffic and collect the traffic itself in pcap format."
+HOMEPAGE="http://www.metre.net/sancp.html"
+SRC_URI="http://www.metre.net/files/${P}.tar.gz"
+
+LICENSE="QPL"
+
+SLOT="0"
+KEYWORDS="~x86"
+
+IUSE="sguil"
+
+RDEPEND="virtual/libpcap"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup sancp
+ enewuser sancp -1 -1 /dev/null sancp
+}
+
+src_install() {
+ keepdir /var/log/sancp/
+ dodoc docs/CHANGES docs/fields.LIST docs/README docs/SETUP \
+ ${FILESDIR}/sguil_sancp.conf etc/sancp/sancp.conf
+
+ insinto /etc/sancp
+ if use sguil ; then
+ newins ${FILESDIR}/sguil_sancp.conf sancp.conf
+ else
+ doins etc/sancp/sancp.conf
+ fi
+
+ exeinto /usr/bin
+ doexe sancp
+
+ newinitd ${FILESDIR}/sancp.rc1 sancp
+ newconfd ${FILESDIR}/sancp.confd sancp
+ if use sguil ; then
+ sed -i -e /^SANCP_OPTS/s:'sancp':"sguil":g \
+ -e s:'-d $LOGDIR/today':"-d /var/lib/sguil/$(hostname)/sancp": \
+ "${D}/etc/conf.d/sancp"
+ fi
+
+ fowners sancp:sancp /var/log/sancp
+ fperms 0770 /var/log/sancp
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please modify /etc/sancp/sancp.conf to suit your environment"
+ einfo
+}