Bump for #307351, thanks to Jason Wallace
authorPatrick Lauer <patrick@gentoo.org>
Tue, 2 Mar 2010 02:22:28 +0000 (02:22 +0000)
committerPatrick Lauer <patrick@gentoo.org>
Tue, 2 Mar 2010 02:22:28 +0000 (02:22 +0000)
Package-Manager: portage-2.2_rc63/cvs/Linux x86_64

net-analyzer/snort/ChangeLog
net-analyzer/snort/Manifest
net-analyzer/snort/snort-2.8.5.3.ebuild [new file with mode: 0644]

index c2154f5f127e21640477f7f0c6184f7a00b1d5f6..5e9f96ac0dd9b786037cec8c26575a7a5934acfe 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-analyzer/snort
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.160 2010/01/04 17:59:01 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.161 2010/03/02 02:22:28 patrick Exp $
+
+*snort-2.8.5.3 (02 Mar 2010)
+
+  02 Mar 2010; Patrick Lauer <patrick@gentoo.org> +snort-2.8.5.3.ebuild:
+  Bump for #307351, thanks to Jason Wallace
 
 *snort-2.8.5.2 (04 Jan 2010)
 
index 38eedc99a5bc04b7f5b4f4ab7f240ec92fa493d1..47d998d57d88bb5f79993ddd4f4fd935099b6dac 100644 (file)
@@ -6,8 +6,10 @@ AUX snort.reload.rc1 1190 RMD160 cbe18ddc93f3091f0faef317d96211b8d7d3798d SHA1 f
 DIST snort-2.8.4.1.tar.gz 4567713 RMD160 8f38a37c9f169bab952946ccaba24c92d267b880 SHA1 3ffabb5366c088952fefab19a8dc19ce84d62645 SHA256 ee7f790eb3df4e6156a7c865f1ba22855394c9e3c13fdc57d60a8647267fc209
 DIST snort-2.8.5.1.tar.gz 4715078 RMD160 fbfab45f1d7d815516043592eab8cf1cc6ec93d0 SHA1 b971052cdd4b3527a0603854953103fe9ad8a45b SHA256 ade1b0f4ae74fd623c633d28b6f1429187751b35b36a3f8a0c197d2104b5e5ae
 DIST snort-2.8.5.2.tar.gz 4738118 RMD160 f4abaf525dd6c13cab63b9a2bccc33b7f336de04 SHA1 1862ece7eac63b90d3e868ccfbd0e7989b5078a6 SHA256 a04199929c75ae92f7874c35078c48ddbfa1dac748046d2e87cdacf067427cd1
+DIST snort-2.8.5.3.tar.gz 4730637 RMD160 57e897b90cb177c2ef2c0cb2ad3b7494c92c6d99 SHA1 e376f546977c695b21b9a5253e5d7c69cd53c63c SHA256 a7d9eb16427514d00926e9892c4a92b6ff1fd0f79555d8f8dce91dfa14112e6a
 EBUILD snort-2.8.4.1.ebuild 12225 RMD160 6c06023c0ffa67d70ddb0e7303a38739cb3a62af SHA1 a8d78d7519182efa79cb49413b2b009b0b292648 SHA256 a4d6357a6ce30361a01f4972699327a7a9ea2f3665c90ca47f66e555c9aaf999
 EBUILD snort-2.8.5.1.ebuild 10251 RMD160 f8081d2b7300fddc9c5415772810869eeb4bcf08 SHA1 062f40c7c4a7e9cb521740cb0567b03671c9645d SHA256 ea5695cec9c4b096c64f7adb75df0672b57f41491e302c7e92df77ea32f6f42d
 EBUILD snort-2.8.5.2.ebuild 10312 RMD160 51abb1759bc56c38ff3e9a2212b15a50ce79b924 SHA1 05c021b5a413e16090b792eeaf0158288e524db6 SHA256 254bc063ae15033761a05cdaa3c1f797f357f41246bf00fc3d6d1e913da95a3d
-MISC ChangeLog 28181 RMD160 614add3ff724c2867614b1d8987fdfc5bf1ac08a SHA1 7cbfe1638cf213d3414fea4771b795d6dc6f9f59 SHA256 e943f5e7e91dd197b6ab71ee0e6471875ac046a9a5592d77e82fd6967c18c4af
+EBUILD snort-2.8.5.3.ebuild 10170 RMD160 95709e3fffabaae3b70c7200931b63c0b57378ce SHA1 527ecc5b728a40559606e70daedf7d7ce4db9373 SHA256 0f0b5d7d588b7875678b60e20f3fe7e6ac685273b72defeefda801e98279c204
+MISC ChangeLog 28329 RMD160 369c476614c0bd17842594956f698b6546b200c7 SHA1 92aba07963c01ff4469eecdcff3837a2803addf7 SHA256 933e2fc7d936e792b9a139b73cab36efea582d671f2472a1ec34cc49d75f37e9
 MISC metadata.xml 1844 RMD160 8ea09608698354e7ab42d7d4b5521f345d88457b SHA1 463dcccf3c82d592ff5b3d0b13814776c9e99db5 SHA256 6d01638bec188d914343f6f3cace5135f85224b6c3919e2353d955148a6063ba
diff --git a/net-analyzer/snort/snort-2.8.5.3.ebuild b/net-analyzer/snort/snort-2.8.5.3.ebuild
new file mode 100644 (file)
index 0000000..0e9e162
--- /dev/null
@@ -0,0 +1,315 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.8.5.3.ebuild,v 1.1 2010/03/02 02:22:28 patrick Exp $
+
+inherit eutils autotools multilib
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://dl.snort.org/snort-current/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static dynamicplugin ipv6 gre mpls targetbased decoder-preprocessor-rules ppm timestats perfprofiling linux-smp-stats inline inline-init-failopen prelude threads debug reload reload-error-restart flexresp flexresp2 react aruba mysql odbc postgres selinux"
+
+#flexresp, react, and inline _ONLY_ work with net-libs/libnet-1.0.2a
+DEPEND="virtual/libpcap
+       >=dev-libs/libpcre-6.0
+       flexresp2? ( dev-libs/libdnet )
+       flexresp? ( ~net-libs/libnet-1.0.2a )
+       react? ( ~net-libs/libnet-1.0.2a )
+       postgres? ( virtual/postgresql-base )
+       mysql? ( virtual/mysql )
+       odbc? ( dev-db/unixODBC )
+       prelude? ( >=dev-libs/libprelude-0.9.0 )
+       inline? ( ~net-libs/libnet-1.0.2a net-firewall/iptables )"
+
+RDEPEND="${DEPEND}
+       dev-lang/perl
+       selinux? ( sec-policy/selinux-snort )"
+
+pkg_setup() {
+
+       if use flexresp && use flexresp2; then
+               eerror
+               eerror "You have both the 'flexresp' and 'flexresp2' USE flags set."
+               eerror "You can use 'flexresp' OR 'flexresp2' but not both."
+               eerror "flexresp2 is recommended."
+               die
+       elif use flexresp && use react; then
+               eerror
+               eerror "You have both the 'react' and 'flexresp' USE flags set."
+               eerror "'react' is enabled automaticly when the 'flexresp'"
+               eerror "USE flag is set, but ./configure will fail if both are enabled."
+               eerror
+               eerror "This is an upstream issue and not a problem with this ebuild."
+               eerror
+               eerror "To enable both 'flexresp' and 'react' set USE="flexresp -react""
+               die
+       elif use flexresp2 && use react; then
+               eerror
+               eerror "You have both the 'react' and 'flexresp2' USE flags set."
+               eerror "You can use 'react' OR 'flexresp2' but not both."
+               die
+       elif use inline-init-failopen && ! use inline; then
+               eerror
+               eerror "You have enabled the 'inline-init-failopen' USE flag"
+               eerror "but not the 'inline' USE flag."
+               eerror "'inline-init-failopen' requires 'inline' be enabled."
+               die
+       elif use reload-error-restart && ! use reload; then
+               eerror
+               eerror "You have enabled the 'reload-error-restart' USE flag"
+               eerror "but not the 'reload' USE flag."
+               eerror "'reload-error-restart' requires 'reload' be enabled."
+               die
+       fi
+
+       # pre_inst() is a better place to put this
+       # but we need it here for the 'fowners' statements in src_install()
+       enewgroup snort
+       enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_unpack() {
+
+       unpack ${A}
+       cd "${S}"
+
+       # Fix to prevent the docs Makefile from being used.
+       # Fixes #297190.
+       einfo "Applying documentation fix."
+       sed -i -e 's:src doc etc:src etc:g' \
+               "${WORKDIR}/${P}/Makefile.am" || die "Doc fix Failed"
+
+       # Fix to allow parallel building.
+       # Thanks to Natanael Copa #291558
+       einfo "Applying parallel building fix."
+       sed -i -e 's/^all-local:.*/all-local: $(LTLIBRARIES)/' \
+                       src/dynamic-preprocessors/*/Makefile.am \
+                                       || die "parallel builds fix Failed"
+
+       #Replaces the libnet-1.0 patch for inline, flexresp, and react
+       if use flexresp || use react || use inline; then
+
+               einfo "Applying libnet-1.0 fix."
+               sed -i -e 's:libnet.h:libnet-1.0.h:g' \
+                       "${WORKDIR}/${P}/configure.in" \
+                       "${WORKDIR}/${P}/src/detection-plugins/sp_react.c" \
+                       "${WORKDIR}/${P}/src/detection-plugins/sp_respond.c" \
+                       "${WORKDIR}/${P}/src/inline.c" || die "sed for libnet-1.0.h failed"
+
+               sed -i -e 's:libnet-config:libnet-1.0-config:g' \
+                       "${WORKDIR}/${P}/configure.in" || die "sed for libnet-1.0-config failed"
+
+               sed -i -e 's:-lnet:-lnet-1.0:g' \
+                       "${WORKDIR}/${P}/configure.in" || die "sed for -lnet-1.0 failed"
+
+               sed -i -e 's:AC_CHECK_LIB(net:AC_CHECK_LIB(net-1.0:g' \
+                       "${WORKDIR}/${P}/configure.in" || die "sed for net-1.0 failed"
+
+       fi
+
+       #Multilib fix for the sf_engine
+       einfo "Applying multilib fix."
+       sed -i -e 's:${exec_prefix}/lib:${exec_prefix}/'$(get_libdir)':g' \
+               "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+               || die "sed for sf_engine failed"
+
+       #Multilib fix for the curent set of dynamic-preprocessors
+       for i in ftptelnet smtp ssh dcerpc dns ssl dcerpc2; do
+               sed -i -e 's:${exec_prefix}/lib:${exec_prefix}/'$(get_libdir)':g' \
+                       "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+                       || die "sed for $i failed."
+       done
+
+       #This sed will prevent the example dynamic code from being compiled/installed
+       einfo "Disabling sample code."
+       sed -i -e 's:$(EXAMPLES_DIR)::g' "${WORKDIR}/${P}/src/Makefile.am"
+
+       if use prelude; then
+               einfo "Applying prelude fix."
+               sed -i -e "s:AC_PROG_RANLIB:AC_PROG_LIBTOOL:" configure.in
+       fi
+
+       AT_M4DIR=m4 eautoreconf
+}
+
+src_compile() {
+
+       local myconf
+
+       #targetbased and inline-init-failopen automaticly enable pthread
+       if use threads || use targetbased || use inline-init-failopen; then
+               myconf="${myconf} --enable-pthread"
+       fi
+
+       #Tell flexresp, react, and inline where libipq is
+       if use flexresp || use react || use inline; then
+               myconf="${myconf} --with-libipq-includes=/usr/include/libipq"
+       fi
+
+       econf \
+               $(use_enable !static shared) \
+               $(use_enable static) \
+               $(use_enable dynamicplugin) \
+               $(use_enable ipv6) \
+               $(use_enable gre) \
+               $(use_enable mpls) \
+               $(use_enable targetbased) \
+               $(use_enable decoder-preprocessor-rules) \
+               $(use_enable ppm) \
+               $(use_enable timestats) \
+               $(use_enable perfprofiling) \
+               $(use_enable linux-smp-stats) \
+               $(use_enable inline) \
+               $(use_enable inline-init-failopen) \
+               $(use_enable prelude) \
+               $(use_enable debug) \
+               $(use_enable reload) \
+               $(use_enable reload-error-restart) \
+               $(use_enable flexresp) \
+               $(use_enable flexresp2) \
+               $(use_enable react) \
+               $(use_enable aruba) \
+               $(use_with mysql) \
+               $(use_with odbc) \
+               $(use_with postgres postgresql) \
+               --disable-ipfw \
+               --disable-profile \
+               --disable-ppm-test \
+               --without-oracle \
+               ${myconf}
+
+       emake || die "make failed"
+
+}
+
+src_install() {
+
+       emake DESTDIR="${D}" install || die "make install failed"
+
+       keepdir /var/log/snort/
+       fowners snort:snort /var/log/snort
+
+       keepdir /var/run/snort/
+       fowners snort:snort /var/run/snort/
+
+       dodoc doc/*
+       dodoc ./RELEASE.NOTES
+       docinto schemas
+       dodoc schemas/*
+
+       insinto /etc/snort
+       doins etc/attribute_table.dtd \
+               etc/classification.config \
+               etc/gen-msg.map \
+               etc/reference.config \
+               etc/sid-msg.map \
+               etc/threshold.conf \
+               etc/unicode.map \
+               || die "Failed to add files in /etc/snort"
+
+       newins etc/snort.conf snort.conf.distrib
+
+       insinto /etc/snort/preproc_rules
+       doins preproc_rules/decoder.rules \
+               preproc_rules/preprocessor.rules \
+               || die "Failed to add files in /etc/snort/preproc_rules"
+
+       keepdir /etc/snort/rules/
+
+       keepdir /usr/$(get_libdir)/snort_dynamicrule
+
+       fowners -R snort:snort /etc/snort/
+
+       if use reload; then
+               newinitd "${FILESDIR}/snort.reload.rc1" snort \
+                       || die "Failed to add snort.reload.rc1"
+       else
+               newinitd "${FILESDIR}/snort.rc9" snort || die "Failed to add snort.rc9"
+       fi
+
+       newconfd "${FILESDIR}/snort.confd" snort || die "Failed to add snort.confd"
+
+       # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+       sed -i -e 's:/usr/local/lib:/usr/'$(get_libdir)':g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Set the correct rule location in the config
+       sed -i -e 's:RULE_PATH ../rules:RULE_PATH /etc/snort/rules:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Set the correct preprocessor/decoder rule location in the config
+       sed -i -e 's:PREPROC_RULE_PATH ../preproc_rules:PREPROC_RULE_PATH /etc/snort/preproc_rules:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Enable the preprocessor/decoder rules
+       sed -i -e 's:^# include $PREPROC_RULE_PATH:include $PREPROC_RULE_PATH:g' \
+               "${D}etc/snort/snort.conf.distrib"
+       sed -i -e 's:^# dynamicdetection directory:dynamicdetection directory:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Just some clean up of trailing /'s in the config
+       sed -i -e 's:snort_dynamicpreprocessor/$:snort_dynamicpreprocessor:g' \
+               "${D}etc/snort/snort.conf.distrib"
+       sed -i -e 's:snort_dynamicrule/$:snort_dynamicrule:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Make it clear in the config where these are...
+       sed -i -e 's:^include classification.config:include /etc/snort/classification.config:g' \
+               "${D}etc/snort/snort.conf.distrib"
+       sed -i -e 's:^include reference.config:include /etc/snort/reference.config:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+       #Disable all rule files by default.
+       #Users need to choose what they want enabled.
+       sed -i -e 's:^include $RULE_PATH:# include $RULE_PATH:g' \
+               "${D}etc/snort/snort.conf.distrib"
+
+}
+
+pkg_postinst() {
+       einfo
+       einfo "Snort is a libpcap based packet capture tool which can be used in"
+       einfo "three modes Sniffer Mode, Packet Logger Mode, or Network Intrusion"
+       einfo "Detection/Prevention System Mode."
+       einfo
+       einfo "To learn more about these modes review the Snort User Manual at..."
+       einfo
+       einfo "http://www.snort.org/docs/"
+       einfo
+       einfo "See /usr/share/doc/${PF} and /etc/snort/snort.conf.distrib for"
+       einfo "information on configuring snort."
+       einfo
+       einfo "Joining the Snort-Users and Snort-Sigs mailing list is highly"
+       einfo "recommended for all users..."
+       einfo
+       einfo "http://www.snort.org/community/mailing-lists/"
+       einfo
+       einfo "To download rules for use with Snort please, see the following"
+       einfo
+       einfo "Sourcefire's VRT Rules and older Community Rules:"
+       einfo "http://www.snort.org/pub-bin/downloads.cgi"
+       einfo
+       einfo "Emerging Threats Rules:"
+       einfo "http://www.emergingthreats.net/"
+       einfo
+       einfo "To manage updates to your rules please visit..."
+       einfo
+       einfo "http://oinkmaster.sourceforge.net/"
+       einfo
+       einfo "and then 'emerge oinkmaster'."
+       elog
+       elog "Snort-2.8.5.3 Notes:"
+       elog
+       elog "Ebuild Notes"
+       elog "The USE flags 'prelude' and 'ipv6' now work when used together."
+       elog
+       elog "Snort Release Notes:"
+       elog "http://dl.snort.org/snort-current/release_notes_2853.txt"
+       elog
+       elog "Make sure to check snort.conf.distrib for new features/options."
+       elog
+}