diff options
author | Aaron Walker <ka0ttic@gentoo.org> | 2005-01-27 15:49:27 +0000 |
---|---|---|
committer | Aaron Walker <ka0ttic@gentoo.org> | 2005-01-27 15:49:27 +0000 |
commit | 463e929737882319a93dcaebbf67d41ecb822a7d (patch) | |
tree | dd49a7348e70935c57da2e349aed14a7b5fc279f /net-analyzer | |
parent | dependency tuning (Manifest recommit) (diff) | |
download | gentoo-2-463e929737882319a93dcaebbf67d41ecb822a7d.tar.gz gentoo-2-463e929737882319a93dcaebbf67d41ecb822a7d.tar.bz2 gentoo-2-463e929737882319a93dcaebbf67d41ecb822a7d.zip |
2.3.0 final; added support for snort-inline via USE=inline. Updated libnet-1.0 patch to also patch inline.c. Closes bugs 79708 and 79664.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/snort/ChangeLog | 10 | ||||
-rw-r--r-- | net-analyzer/snort/Manifest | 36 | ||||
-rw-r--r-- | net-analyzer/snort/files/2.3.0-libnet-1.0.patch (renamed from net-analyzer/snort/files/2.3.0_rc2-libnet-1.0.patch) | 27 | ||||
-rw-r--r-- | net-analyzer/snort/files/digest-snort-2.3.0 | 3 | ||||
-rw-r--r-- | net-analyzer/snort/snort-2.3.0.ebuild | 145 | ||||
-rw-r--r-- | net-analyzer/snort/snort-2.3.0_rc2.ebuild | 4 |
6 files changed, 194 insertions, 31 deletions
diff --git a/net-analyzer/snort/ChangeLog b/net-analyzer/snort/ChangeLog index 67082c7fa82f..b93f1da2b611 100644 --- a/net-analyzer/snort/ChangeLog +++ b/net-analyzer/snort/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/snort # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.57 2005/01/25 12:11:24 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.58 2005/01/27 15:49:27 ka0ttic Exp $ + +*snort-2.3.0 (27 Jan 2005) + + 27 Jan 2005; Aaron Walker <ka0ttic@gentoo.org> + +files/2.3.0-libnet-1.0.patch, -files/2.3.0_rc2-libnet-1.0.patch, + +snort-2.3.0.ebuild, snort-2.3.0_rc2.ebuild: + 2.3.0 final; added support for snort-inline via USE=inline. Updated + libnet-1.0 patch to also patch inline.c. Closes bugs 79708 and 79664. 25 Jan 2005; Daniel Black <dragonheart@gentoo.org> snort-2.0.6.ebuild, snort-2.1.3.ebuild, snort-2.2.0.ebuild, snort-2.3.0_rc2.ebuild: diff --git a/net-analyzer/snort/Manifest b/net-analyzer/snort/Manifest index afc1e9cee13a..f04347022d94 100644 --- a/net-analyzer/snort/Manifest +++ b/net-analyzer/snort/Manifest @@ -1,29 +1,21 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 17485489fa968680e6e8d52594a8f748 ChangeLog 10981 -MD5 53edc4328d9adeaf087c65ea94b1594b metadata.xml 246 -MD5 7d11c2631358601c81871518f2e16f97 snort-2.1.3.ebuild 4396 MD5 0cef1a631840fa9b7f2caa31ae39d9ab snort-2.2.0.ebuild 4402 -MD5 5608fd23e40ab235c35534ef1f7d1fa3 snort-2.3.0_rc2.ebuild 3984 MD5 c6676186e015632c2c6205540b9b9c12 snort-2.0.6.ebuild 3144 -MD5 ca486c6119dbf106f900a3b51e4f3985 files/digest-snort-2.1.3 129 -MD5 513637a4fadce14177bf85e97e5931f8 files/snort-2.1.3-gcc3.patch 350 -MD5 a654db9256f89b77a9ce482c976dc896 files/digest-snort-2.2.0 129 +MD5 d54ed7a1c9405df080460b043fb5ad1d snort-2.3.0.ebuild 4184 +MD5 7d11c2631358601c81871518f2e16f97 snort-2.1.3.ebuild 4396 +MD5 ca4545abb11fe80bb6601f4eee1b7b0c snort-2.3.0_rc2.ebuild 3984 +MD5 81d77b40e23ad46ceaf7c7656cb38dc7 ChangeLog 11316 +MD5 53edc4328d9adeaf087c65ea94b1594b metadata.xml 246 MD5 08107e2e3ce78a19d7df4c78b9461303 files/digest-snort-2.3.0_rc2 221 -MD5 270fa0a1b924d18956af354e18036eb5 files/2.3.0_rc2-libnet-1.0.patch 4714 +MD5 919058894f4983c35900bc8bb98a96d4 files/snort.rc6 764 +MD5 ea783bd276257a20df5b6537d3ff5d49 files/snort-drop-calculation.diff 4957 +MD5 564bfdf90fe29f5924c68885ccfcddb8 files/2.3.0-libnet-1.0.patch 5424 +MD5 fe6a25fdd3c6d4b527d89c51d78b8f36 files/2.0.6-libnet-1.0.patch 2753 MD5 202dd3be05b16c852303a04284eba720 files/digest-snort-2.0.6 150 +MD5 ca486c6119dbf106f900a3b51e4f3985 files/digest-snort-2.1.3 129 +MD5 a654db9256f89b77a9ce482c976dc896 files/digest-snort-2.2.0 129 +MD5 20c2ec2c963cca8c0abe1b6ee2b5b9f7 files/digest-snort-2.3.0 218 MD5 513637a4fadce14177bf85e97e5931f8 files/snort-2.0.6-gcc3.patch 350 -MD5 ea783bd276257a20df5b6537d3ff5d49 files/snort-drop-calculation.diff 4957 MD5 446f8d2b3435b8a6be738da978670605 files/snort.confd 423 -MD5 919058894f4983c35900bc8bb98a96d4 files/snort.rc6 764 -MD5 fe6a25fdd3c6d4b527d89c51d78b8f36 files/2.0.6-libnet-1.0.patch 2753 -MD5 513637a4fadce14177bf85e97e5931f8 files/snort-2.1.2-gcc3.patch 350 MD5 fe6a25fdd3c6d4b527d89c51d78b8f36 files/2.1.2-libnet-1.0.patch 2753 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.0 (GNU/Linux) - -iD8DBQFB9jdymdTrptrqvGERAmUfAJ0Wr9KRwX+7jN8BfVSDi7OGniaD2QCfd8rY -QTgzRiD8JoF6uu1cbkCdqhM= -=i9Da ------END PGP SIGNATURE----- +MD5 513637a4fadce14177bf85e97e5931f8 files/snort-2.1.2-gcc3.patch 350 +MD5 513637a4fadce14177bf85e97e5931f8 files/snort-2.1.3-gcc3.patch 350 diff --git a/net-analyzer/snort/files/2.3.0_rc2-libnet-1.0.patch b/net-analyzer/snort/files/2.3.0-libnet-1.0.patch index 64c326ddad14..6247e16a01eb 100644 --- a/net-analyzer/snort/files/2.3.0_rc2-libnet-1.0.patch +++ b/net-analyzer/snort/files/2.3.0-libnet-1.0.patch @@ -1,5 +1,6 @@ ---- configure.in.orig 2005-01-10 23:05:06.867089352 +0930 -+++ configure.in 2005-01-10 23:07:32.461660456 +0930 +diff -urN snort-2.3.0.orig/configure.in snort-2.3.0/configure.in +--- snort-2.3.0.orig/configure.in 2005-01-27 10:11:34.000000000 -0500 ++++ snort-2.3.0/configure.in 2005-01-27 10:36:24.727932095 -0500 @@ -686,20 +686,20 @@ fi @@ -100,8 +101,9 @@ if test "$LNET" = "no"; then echo echo " ERROR! Libnet library not found, go get it from" ---- ./src/detection-plugins/sp_react.c.orig 2005-01-10 23:11:17.253602680 +0930 -+++ ./src/detection-plugins/sp_react.c 2005-01-10 23:12:01.073940976 +0930 +diff -urN snort-2.3.0.orig/src/detection-plugins/sp_react.c snort-2.3.0/src/detection-plugins/sp_react.c +--- snort-2.3.0.orig/src/detection-plugins/sp_react.c 2005-01-27 10:11:34.000000000 -0500 ++++ snort-2.3.0/src/detection-plugins/sp_react.c 2005-01-27 10:36:24.733931106 -0500 @@ -57,7 +57,7 @@ #include <stdlib.h> #include <string.h> @@ -111,8 +113,9 @@ #include "rules.h" #include "decode.h" ---- ./src/detection-plugins/sp_respond.c.orig 2005-01-10 23:11:29.457747368 +0930 -+++ ./src/detection-plugins/sp_respond.c 2005-01-10 23:12:01.074940824 +0930 +diff -urN snort-2.3.0.orig/src/detection-plugins/sp_respond.c snort-2.3.0/src/detection-plugins/sp_respond.c +--- snort-2.3.0.orig/src/detection-plugins/sp_respond.c 2005-01-27 10:11:34.000000000 -0500 ++++ snort-2.3.0/src/detection-plugins/sp_respond.c 2005-01-27 10:36:24.734930941 -0500 @@ -34,7 +34,7 @@ @@ -122,3 +125,15 @@ #include "decode.h" #include "rules.h" +diff -urN snort-2.3.0.orig/src/inline.c snort-2.3.0/src/inline.c +--- snort-2.3.0.orig/src/inline.c 2005-01-27 10:11:34.000000000 -0500 ++++ snort-2.3.0/src/inline.c 2005-01-27 10:37:00.735994060 -0500 +@@ -3,7 +3,7 @@ + #include <stdlib.h> + #include <string.h> + #include <pcap.h> +-#include <libnet.h> ++#include <libnet-1.0.h> + + #include "decode.h" + #include "inline.h" diff --git a/net-analyzer/snort/files/digest-snort-2.3.0 b/net-analyzer/snort/files/digest-snort-2.3.0 new file mode 100644 index 000000000000..bb07b37ca084 --- /dev/null +++ b/net-analyzer/snort/files/digest-snort-2.3.0 @@ -0,0 +1,3 @@ +MD5 89cdc22af9516cbafc359b452819947e snort-2.3.0.tar.gz 2633245 +MD5 2eeef1a7a040d67c3afaf9d749905e47 snortsam-20050110.tar.gz 29395 +MD5 323ab2956a59de113aa13099917f0d3a snort-prelude-reporting-patch-0.3.6.tar.gz 21964 diff --git a/net-analyzer/snort/snort-2.3.0.ebuild b/net-analyzer/snort/snort-2.3.0.ebuild new file mode 100644 index 000000000000..ebdbe57014bb --- /dev/null +++ b/net-analyzer/snort/snort-2.3.0.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.3.0.ebuild,v 1.1 2005/01/27 15:49:27 ka0ttic Exp $ + +inherit eutils gnuconfig flag-o-matic + +DESCRIPTION="Libpcap-based packet sniffer/logger/lightweight IDS" +HOMEPAGE="http://www.snort.org/" +SRC_URI="http://www.snort.org/dl/${P}.tar.gz + snortsam? ( mirror://gentoo/snortsam-20050110.tar.gz ) + prelude? ( http://www.prelude-ids.org/download/releases/snort-prelude-reporting-patch-0.3.6.tar.gz )" + +# snortsam? ( http://www.snortsam.net/files/snort-plugin/snortsam-patch.tar.gz ) +# Gentoo mirrored because of naming conflict with previous version + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 -sparc -alpha ~amd64 ~ppc" +IUSE="ssl postgres mysql flexresp selinux snortsam odbc prelude inline" + +# Local useflag snortsam: patch snort for use with snortsam package. + + +DEPEND="virtual/libc + >=dev-libs/libpcre-4.2-r1 + >=net-libs/libpcap-0.7 + flexresp? ( ~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 ) + prelude? ( >=dev-libs/libprelude-0.8 ) + odbc? ( dev-db/unixODBC ) + inline? ( + ~net-libs/libnet-1.0.2a + net-firewall/iptables + )" + +RDEPEND="${DEPEND} + dev-lang/perl + selinux? ( sec-policy/selinux-snort ) + snortsam? ( net-analyzer/snortsam )" + +src_unpack() { + unpack ${A} + cd ${S} + gnuconfig_update + + if use flexresp || use inline + then + epatch ${FILESDIR}/${PV}-libnet-1.0.patch || die "libnet patch failed" + fi + + einfo "Patching /etc/snort.conf" + sed -i "s:var RULE_PATH ../rules:var RULE_PATH /etc/snort:" \ + etc/snort.conf || die "sed snort.conf failed" + + if use prelude + then + epatch ../snort-2.2.0-prelude-0.3.6.diff || die "prelude patch failed" + sed -i -e "s:AC_PROG_RANLIB:AC_PROG_LIBTOOL:" configure.in \ + || die "sed configure.in failed" + fi + + # need to pick up prelude and or flexresp patches + einfo "Regenerating autoconf/automake files" + autoreconf -f -i || die "autoreconf failed" + + if use snortsam + then + cd .. + einfo "Applying snortsam patch" + ./patchsnort.sh ${S} || die "snortsam patch failed" + cd ${S} + fi +} + +src_compile() { + local myconf + + # There is no --diable-flexresp, cannot use use_enable + use flexresp && myconf="${myconf} --enable-flexresp" + + use inline && append-flags -I/usr/include/libipq + + econf \ + `use_with postgres postgresql` \ + `use_with mysql` \ + `use_with ssl openssl` \ + `use_with odbc` \ + --without-oracle \ + `use_with prelude` \ + `use_enable inline` \ + ${myconf} || die "bad ./configure" + + emake || die "compile problem" +} + +pkg_preinst() { + enewgroup snort + enewuser snort -1 /bin/false /var/log/snort snort + usermod -d "/var/log/snort" snort || die "usermod problem" + usermod -g "snort" snort || die "usermod problem" + usermod -s "/bin/false" snort || die "usermod problem" + echo "ignore any message about CREATE_HOME above..." +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + keepdir /var/log/snort/ + + dodoc COPYING LICENSE doc/* + docinto schemas ; dodoc schemas/* + + insinto /etc/snort + doins etc/reference.config etc/classification.config rules/*.rules \ + etc/*.map etc/threshold.conf + newins etc/snort.conf snort.conf.distrib + + use prelude && doins etc/prelude-classification.config + + newinitd ${FILESDIR}/snort.rc6 snort + newconfd ${FILESDIR}/snort.confd snort + + chown snort:snort ${D}/var/log/snort + chmod 0770 ${D}/var/log/snort +} + +pkg_postinst() { + if use mysql || use postgres || use odbc + then + einfo "To use a database as a backend for snort you will have to" + einfo "import the correct tables to the database." + einfo "You will have to setup a database called snort first." + einfo "" + use mysql && \ + einfo " MySQL: zcat /usr/share/doc/${PF}/schema/create_mysql.gz | mysql -p snort" + use postgres && \ + einfo " PostgreSQL: import /usr/share/doc/${PF}/schemas/create_postgresql.gz" + use odbc && einfo "SQL tables need to be created - look at /usr/share/doc/${PF}/schemas/" + einfo "" + einfo "Also, read the following Gentoo forums article:" + einfo ' http://forums.gentoo.org/viewtopic.php?t=78718' + fi +} diff --git a/net-analyzer/snort/snort-2.3.0_rc2.ebuild b/net-analyzer/snort/snort-2.3.0_rc2.ebuild index fb059df381df..2dd08ffc0d56 100644 --- a/net-analyzer/snort/snort-2.3.0_rc2.ebuild +++ b/net-analyzer/snort/snort-2.3.0_rc2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.3.0_rc2.ebuild,v 1.6 2005/01/25 12:11:24 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.3.0_rc2.ebuild,v 1.7 2005/01/27 15:49:27 ka0ttic Exp $ inherit eutils gnuconfig @@ -47,7 +47,7 @@ src_unpack() { if use flexresp then - epatch ${FILESDIR}/${PV}-libnet-1.0.patch || die "libnet patch failed" + epatch ${FILESDIR}/2.3.0-libnet-1.0.patch || die "libnet patch failed" fi einfo "Patching /etc/snort.conf" |