diff options
author | 2002-06-28 11:54:12 +0000 | |
---|---|---|
committer | 2002-06-28 11:54:12 +0000 | |
commit | 51193a79fa88f5eab19efb25824fd86408698657 (patch) | |
tree | ff468f7f0381c9ae5eae540f69813dc4d8ba6429 /net-analyzer/snort | |
parent | small fix0rs (diff) | |
download | gentoo-2-51193a79fa88f5eab19efb25824fd86408698657.tar.gz gentoo-2-51193a79fa88f5eab19efb25824fd86408698657.tar.bz2 gentoo-2-51193a79fa88f5eab19efb25824fd86408698657.zip |
moving 13 packages from net-misc to net-analyzer - import
Diffstat (limited to 'net-analyzer/snort')
-rw-r--r-- | net-analyzer/snort/ChangeLog | 34 | ||||
-rw-r--r-- | net-analyzer/snort/files/digest-snort-1.8.6 | 1 | ||||
-rw-r--r-- | net-analyzer/snort/files/snort.confd | 27 | ||||
-rw-r--r-- | net-analyzer/snort/files/snort.rc6 | 22 | ||||
-rw-r--r-- | net-analyzer/snort/snort-1.8.6.ebuild | 89 |
5 files changed, 173 insertions, 0 deletions
diff --git a/net-analyzer/snort/ChangeLog b/net-analyzer/snort/ChangeLog new file mode 100644 index 000000000000..24ae75d699e8 --- /dev/null +++ b/net-analyzer/snort/ChangeLog @@ -0,0 +1,34 @@ +# ChangeLog for net-analyzer/snort +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.1 2002/06/28 11:54:12 bangert Exp $ + + 28 Jun 2002; Thilo Bangert <bangert@gentoo.org> : + moved to net-analyzer - added SLOT - added LICENSE + +*snort-1.8.5 (6 Apr 2002) + + 6 Apr 2002; Matthew Kennedy <mkennedy@gentoo.org> ChangeLog, + snort-1.8.5.ebuild, files/digest-snort-1.8.5: + + Added dependency for PostgreSQL. Moved netlib dep from RDEPEND to + DEPEND (it is statically linked). Version bump to latest. + +*snort-1.8.3-r1 (8 Feb 2002) + + 8 Feb 2002; Donny Davies <woodchip@gentoo.org> Changelog, + snort-1.8.3-r1.ebuild, files/digest-snort-1.8.3-r1, + files/snort.confd, files/snort.rc6 files/snort.conf : + + Fix for nonexistant /etc/conf.d/snort. Make user/group addition + a little smarter. + +*snort-1.8.3 (1 Feb 2002) + + 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : + + Added initial ChangeLog which should be updated whenever the package is + updated in any way. This changelog is targetted to users. This means that the + comments should well explained and written in clean English. The details about + writing correct changelogs are explained in the skel.ChangeLog file which you + can find in the root directory of the portage repository. + diff --git a/net-analyzer/snort/files/digest-snort-1.8.6 b/net-analyzer/snort/files/digest-snort-1.8.6 new file mode 100644 index 000000000000..af191dca1aff --- /dev/null +++ b/net-analyzer/snort/files/digest-snort-1.8.6 @@ -0,0 +1 @@ +MD5 6bba7e1cbc837a5c7404d7c0b496780b snort-1.8.6.tar.gz 1770604 diff --git a/net-analyzer/snort/files/snort.confd b/net-analyzer/snort/files/snort.confd new file mode 100644 index 000000000000..0d213b3eb842 --- /dev/null +++ b/net-analyzer/snort/files/snort.confd @@ -0,0 +1,27 @@ +# Config file for /etc/init.d/snort + +# Make sure this matches your IFACE +PIDFILE=/var/run/snort_eth0.pid + +# fast - fast alert mode, write the alert in a simple format with a +# timestamp, alert message, source and destination IPs/ports +# +# full - this is also the default alert mode, so if you specify nothing +# this will automatically be used +# +# unsock - send alerts to a UNIX socket that another program can listen on +# +# none - turn off alerting +MODE="full" + +# Set this to the appropriate network you box lives on +NETWORK="192.168.1.0/24" + +# You probably don't want to change this, but in case you do +LOGDIR="/var/log/snort" + +# Probably not this either +CONF=/etc/snort/snort.conf + +# This pulls in the options above +SNORT_OPTS="-D -s -u nobody -dev -l $LOGDIR -h $NETWORK -c $CONF" diff --git a/net-analyzer/snort/files/snort.rc6 b/net-analyzer/snort/files/snort.rc6 new file mode 100644 index 000000000000..4cd0f7c580eb --- /dev/null +++ b/net-analyzer/snort/files/snort.rc6 @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/files/snort.rc6,v 1.1 2002/06/28 11:54:12 bangert Exp $ + +depend() { + need net +} + +start() { + ebegin "Starting snort" + start-stop-daemon --start --quiet --exec /usr/bin/snort \ + -- ${SNORT_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping snort" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + #kill -9 `cat $PIDFILE` 2>&1 + eend $? +} diff --git a/net-analyzer/snort/snort-1.8.6.ebuild b/net-analyzer/snort/snort-1.8.6.ebuild new file mode 100644 index 000000000000..0a9431a5f151 --- /dev/null +++ b/net-analyzer/snort/snort-1.8.6.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-1.8.6.ebuild,v 1.1 2002/06/28 11:54:12 bangert Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Libpcap-based packet sniffer/logger/lightweight IDS" +SRC_URI="http://www.snort.org/releases/${P}.tar.gz" +HOMEPAGE="http://www.snort.org" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="virtual/glibc + >=net-libs/libpcap-0.6.2-r1 + >=net-libs/libnet-1.0.2a + postgres? ( >=dev-db/postgresql-7.2 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ssl? ( >=dev-libs/openssl-0.9.6b )" + +RDEPEND="virtual/glibc + sys-devel/perl + >=net-libs/libpcap-0.6.2-r1 + postgres? ( >=dev-db/postgresql-7.2 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ssl? ( >=dev-libs/openssl-0.9.6b )" + +src_compile() { + + local myconf + + use postgres && myconf="${myconf} --with-postgresql" \ + || myconf="${myconf} --without-postgresql" + use mysql && myconf="${myconf} --with-mysql" \ + || myconf="${myconf} --without-mysql" + use ssl && myconf="${myconf} --with-openssl" \ + || myconf="${myconf} --without-openssl" + + ./configure \ + --prefix=/usr \ + --without-odbc \ + --without-oracle \ + --enable-pthreads \ + --enable-flexresp \ + --enable-smbalerts \ + --mandir=/usr/share/man \ + --host=${CHOST} ${myconf} || die "bad ./configure" + + emake || die "compile problem" +} + +src_install () { + + make DESTDIR=${D} install || die + + dodir /var/log/snort + + insinto /usr/lib/snort/bin + doins contrib/{create_mysql,snortlog,*.pl} + + dodoc AUTHORS BUGS COPYING CREDITS ChangeLog FAQ INSTALL LICENSE + dodoc NEWS README* RULES.SAMPLE SnortUsersManual.pdf USAGE + docinto contrib ; dodoc contrib/* + + insinto /etc/snort + doins classification.config *.rules + newins snort.conf snort.conf.distrib + + exeinto /etc/init.d ; newexe ${FILESDIR}/snort.rc6 snort + insinto /etc/conf.d ; newins ${FILESDIR}/snort.confd snort +} + +pkg_postinst() { + + if ! grep -q ^snort: /etc/group ; then + groupadd snort || die "problem adding group snort" + fi + if ! grep -q ^snort: /etc/passwd ; then + useradd -g snort -s /dev/null -d /var/log/snort -c "snort" snort + assert "problem adding user snort" + fi + usermod -c "snort" snort || die "usermod problem" + usermod -d "/var/log/snort" snort || die "usermod problem" + usermod -g "snort" snort || die "usermod problem" + usermod -s "/dev/null" snort || die "usermod problem" + echo "ignore any message about CREATE_HOME above..." + + chown root.snort /var/log/snort + chmod 0770 /var/log/snort +} |