diff options
author | Patrick Lauer <patrick@gentoo.org> | 2011-02-24 17:31:48 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2011-02-24 17:31:48 +0000 |
commit | 5b0d57152059bdb4fc5e77bb9355b4c42953ee8c (patch) | |
tree | 8e2bd5803b664429b1c31c7df036201551104ece /net-analyzer/snort | |
parent | 24 Feb 2011; Zac Medico <zmedico@gentoo.org> podofo-0.8.4.ebuild: (diff) | |
download | historical-5b0d57152059bdb4fc5e77bb9355b4c42953ee8c.tar.gz historical-5b0d57152059bdb4fc5e77bb9355b4c42953ee8c.tar.bz2 historical-5b0d57152059bdb4fc5e77bb9355b4c42953ee8c.zip |
Bump for #355865, thanks to Jason Wallace
Package-Manager: portage-2.2.0_alpha25/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/snort')
-rw-r--r-- | net-analyzer/snort/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/snort/Manifest | 17 | ||||
-rw-r--r-- | net-analyzer/snort/files/disabledynamic.patch | 110 | ||||
-rw-r--r-- | net-analyzer/snort/metadata.xml | 18 | ||||
-rw-r--r-- | net-analyzer/snort/snort-2.9.0.4.ebuild | 278 |
5 files changed, 417 insertions, 14 deletions
diff --git a/net-analyzer/snort/ChangeLog b/net-analyzer/snort/ChangeLog index 5a19a80f09f0..03665ba4f8c0 100644 --- a/net-analyzer/snort/ChangeLog +++ b/net-analyzer/snort/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/snort # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.171 2011/01/14 22:40:28 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.172 2011/02/24 17:31:46 patrick Exp $ + +*snort-2.9.0.4 (24 Feb 2011) + + 24 Feb 2011; Patrick Lauer <patrick@gentoo.org> +snort-2.9.0.4.ebuild, + +files/disabledynamic.patch, metadata.xml: + Bump for #355865, thanks to Jason Wallace 14 Jan 2011; Markos Chandras <hwoarang@gentoo.org> snort-2.9.0.3.ebuild: Stable on amd64 wrt bug #351549 diff --git a/net-analyzer/snort/Manifest b/net-analyzer/snort/Manifest index 9fd3f849c052..1f38f8239f57 100644 --- a/net-analyzer/snort/Manifest +++ b/net-analyzer/snort/Manifest @@ -1,6 +1,4 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +AUX disabledynamic.patch 4299 RMD160 bd67bc2bb007e8f4385b3726841eb9baf5af703c SHA1 d680a49bcc94f142adeca06e5844201b33b52ca8 SHA256 a348c27d0d55ab77995618bc7f6551717a801a3326ced2c5288bea355f37a74f AUX pcap_memory.patch 563 RMD160 3d4ed78ee4588e09401753026e6766ebcf290743 SHA1 962cb1379af8a382cb31ac07fe21614bbe6e3f8b SHA256 fc73d20c8b414decaba2cccdb50168489e84ddf906cf3c1e9490235a15f3e065 AUX snort-2.8.4-libnet.patch 9037 RMD160 76854b43712d9d5375263ee4aeba7161658bba6b SHA1 24ff2aa83a680c158be7876acc88cb4f47ffd85f SHA256 4659a2e141e476b7dfcb627de3c8dc884014e601a9fd9fe57e4d0c0912193650 AUX snort.confd 442 RMD160 439e885d43aacc474c41eeed5217a498b2917aac SHA1 87a3de61e218367b2239540b94c564b2c6729300 SHA256 40adf5e7b918d1feae6728c1445e879d4cc478f81d13e9f32a2de1be1345413a @@ -14,6 +12,7 @@ DIST snort-2.8.6.tar.gz 4960740 RMD160 5b549eab39a6e0a0f182f6d2ee46fd60995c822e DIST snort-2.9.0.1.tar.gz 5806264 RMD160 2116d6e65d3d8dc08b3ce9d0eb66aca515b697aa SHA1 fc923c71bc268857ce72fad412076deab3b90d0f SHA256 c77d70680e1b2e320fdf213f5ecfa019e253f16d0b1fae06e7e428e9d1d2638a DIST snort-2.9.0.2.tar.gz 5808739 RMD160 9f0291268b24c9cf67f5e6bd40d7a70acac456f1 SHA1 619c4e53923e96a3e4e36bef977643e317543214 SHA256 7649596ab98ebee32518cbac861bd5f156331bbf06ca89d9696c0ccf4c6d913b DIST snort-2.9.0.3.tar.gz 5791144 RMD160 6f9c133c4069728ef5175448341b8bf8a52a7790 SHA1 c6bc422d71ab6b5527029c0d3e5422504d961ad4 SHA256 382768dc7a47bbf4e1a85cd765d8bf4f245643be2acfc740fda1cd3d24e32a48 +DIST snort-2.9.0.4.tar.gz 5818104 RMD160 299de5367386af2ac13d1d5fc6e55a38378a882a SHA1 88dc943733295468153e0f0ff8b7f782d7ff259a SHA256 be7e31c5a828d1c43a70e97fd4493323898215211260c145288fdb582c7625c3 EBUILD snort-2.8.5.1.ebuild 10251 RMD160 a6247330c442f1d17b707963157627c1d3147b05 SHA1 84365e66cb4eda0b3c9cfae02a9b4a8ac4736cb5 SHA256 fc3a8dde6c3dd0bc3641a8849d14c700b615ac1e6d4763f84befb3bbc84d76ab EBUILD snort-2.8.5.3.ebuild 10252 RMD160 2e2441d222c10a27d273ca38961529035acb48a3 SHA1 27b27bf104c9d42813be1df397653b2e109cedda SHA256 67ff9ad9aa392748361d0ab6da671a5a48e09538024cf1ef01f5d1fcb21de6a7 EBUILD snort-2.8.6.1.ebuild 10450 RMD160 ba7f868b94cbd20b3c04baf71d5234734474b836 SHA1 b73c0b2aa0544a7d9563b8da2bfc5ba0aa5a1fdf SHA256 54648baae9882f7128ffae83c69d372af1c058773458ae005476218c11f59110 @@ -21,12 +20,6 @@ EBUILD snort-2.8.6.ebuild 10126 RMD160 45bf6958f0b51098bebc54b90cf6660467b044b1 EBUILD snort-2.9.0.1.ebuild 8854 RMD160 50ed08b0a83ce9f7382265bf050def431b866f98 SHA1 ec0918439929828e6a08c22b6fee1212cc5a6e63 SHA256 91e0bf9bab8d4be45b7718b9f3469b71f032923efc9c0079c8e55f205fcde30f EBUILD snort-2.9.0.2.ebuild 8854 RMD160 a44d12f10d923ae8e7c0450e042103907095e630 SHA1 f409b4781d46e0ad46488ef4350785ffed32454d SHA256 4c58910b1764ab7ee568b3729143a5d00cf4604c84a7c767903e06189858e7a0 EBUILD snort-2.9.0.3.ebuild 8858 RMD160 c8809f720892546e2024435d1527dfb9a05976a4 SHA1 1eadfe437b261a010735590ab64b9c42371fcfaf SHA256 682048f16695c1fd467f20cc6770ca80c949505b9795e7c33c850dc99f4fbc22 -MISC ChangeLog 29878 RMD160 a8dd9a007cc04aa644a85d1fbb7615625e102458 SHA1 0ea4eae560ca8e9e9a7cc83991b80e4d1410a1da SHA256 5ea405a649199757692227fb37ff132b8b301551874f561a8236c929a42d4224 -MISC metadata.xml 4437 RMD160 9b8f2d820e4b9e5645a3866d5f74af2084e4145a SHA1 90ef24f07a5ba0ea5dac270aced6bc091a8172b2 SHA256 cefff2ebe5bf789e0335d74dd81ba0b19d135b5fbe33f1830869143010f6fd69 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.16 (GNU/Linux) - -iEYEARECAAYFAk0w0GsACgkQ9/cejkQaxBAukACcC/9ccFrDnFeVyi/Z/X1Ff8Wl -WxEAn3fui34QaijiJbJQPasceVxu6iQT -=TW78 ------END PGP SIGNATURE----- +EBUILD snort-2.9.0.4.ebuild 9987 RMD160 257bc8391268d4c5b496a851265539c0648b2f94 SHA1 bb1b5b43323419300bced1d3b5584648c1411ea1 SHA256 93079ec47934df1424ee7839f61ef16459d29496c89fef0c04d1d6fcfcaaa833 +MISC ChangeLog 30070 RMD160 bd6189b1227f6306e497009f6b653afd59d14658 SHA1 7294133f8a532c13f7157cc3c6567431304c42b1 SHA256 87dba11d0267d49d2d6d0f94a0618036d43f69a94a1c185cab9b13bb15ffacb4 +MISC metadata.xml 5174 RMD160 3de62ad1395938c61f8ea10bf91b816687fd2fc2 SHA1 83c1ced9279fcd14b378bcafc316b255b7932667 SHA256 5e2577560aaf444e1699aa796a8126276222ddd413289d72aea3c35dfdfbb2cb diff --git a/net-analyzer/snort/files/disabledynamic.patch b/net-analyzer/snort/files/disabledynamic.patch new file mode 100644 index 000000000000..3b9e2f5e4482 --- /dev/null +++ b/net-analyzer/snort/files/disabledynamic.patch @@ -0,0 +1,110 @@ +? cflags.out
+? cppflags.out
+? cscope.out
+? disabledynamic.patch
+? http.patch
+? log
+? make.out
+? rules.work
+? snort-build.sh
+? snort.pc
+? ylwrap
+? etc/snort.conf.work
+? src/dynamic-preprocessors/rzb_saac/Makefile
+? tools/u2boat/u2boat
+? tools/u2spewfoo/u2spewfoo
+Index: src/fpcreate.c
+===================================================================
+RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/fpcreate.c,v
+retrieving revision 1.107.2.2
+diff -u -p -r1.107.2.2 fpcreate.c
+--- src/fpcreate.c 11 Jan 2011 22:54:40 -0000 1.107.2.2
++++ src/fpcreate.c 17 Feb 2011 20:06:49 -0000
+@@ -70,6 +70,8 @@
+ #include "dynamic-plugins/sp_preprocopt.h"
+ #endif
+
++#include "dynamic-plugins/sf_dynamic_define.h"
++
+
+ /*
+ * Content flag values
+@@ -1810,9 +1812,11 @@ static int fpAddPortGroupRule(PORT_GROUP
+ fpAddAllContents(pg->pgPms[PM_TYPE__CONTENT], otn, id, pmd, fp);
+ #endif
+
++#ifdef DYNAMIC_PLUGIN
+ /* No content added */
+ if (pmd == preproc_opt_pmds)
+ FreePmdList(pmd);
++#endif
+
+ if (fpFinishPortGroupRule(pg, PM_TYPE__MAX, otn, NULL, fp) != 0)
+ return -1;
+Index: src/dynamic-plugins/sf_dynamic_define.h
+===================================================================
+RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/dynamic-plugins/sf_dynamic_define.h,v
+retrieving revision 1.15.4.1
+diff -u -p -r1.15.4.1 sf_dynamic_define.h
+--- src/dynamic-plugins/sf_dynamic_define.h 3 Jan 2011 19:58:05 -0000 1.15.4.1
++++ src/dynamic-plugins/sf_dynamic_define.h 17 Feb 2011 20:06:49 -0000
+@@ -96,5 +96,15 @@ typedef enum {
+ #endif
+ #endif
+
++/* Parameters are rule info pointer, int to indicate URI or NORM,
++ * and list pointer */
++#define CONTENT_NORMAL 0x01
++#define CONTENT_HTTP_URI 0x02
++#define CONTENT_HTTP_HEADER 0x04
++#define CONTENT_HTTP_CLIENT_BODY 0x08
++#define CONTENT_HTTP_METHOD 0x10
++#define CONTENT_HTTP (CONTENT_HTTP_URI|CONTENT_HTTP_HEADER|\
++ CONTENT_HTTP_CLIENT_BODY|CONTENT_HTTP_METHOD)
++
+ #endif /* _SF_DYNAMIC_DEFINE_H_ */
+
+Index: src/dynamic-plugins/sf_dynamic_engine.h
+===================================================================
+RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/dynamic-plugins/sf_dynamic_engine.h,v
+retrieving revision 1.54.2.1
+diff -u -p -r1.54.2.1 sf_dynamic_engine.h
+--- src/dynamic-plugins/sf_dynamic_engine.h 3 Jan 2011 19:58:06 -0000 1.54.2.1
++++ src/dynamic-plugins/sf_dynamic_engine.h 17 Feb 2011 20:06:49 -0000
+@@ -77,15 +77,6 @@ typedef struct _FPContentInfo
+
+ } FPContentInfo;
+
+-/* Parameters are rule info pointer, int to indicate URI or NORM,
+- * and list pointer */
+-#define CONTENT_NORMAL 0x01
+-#define CONTENT_HTTP_URI 0x02
+-#define CONTENT_HTTP_HEADER 0x04
+-#define CONTENT_HTTP_CLIENT_BODY 0x08
+-#define CONTENT_HTTP_METHOD 0x10
+-#define CONTENT_HTTP (CONTENT_HTTP_URI|CONTENT_HTTP_HEADER|\
+- CONTENT_HTTP_CLIENT_BODY|CONTENT_HTTP_METHOD)
+ typedef int (*GetDynamicContentsFunction)(void *, int, FPContentInfo **);
+ typedef int (*GetDynamicPreprocOptFpContentsFunc)(void *, FPContentInfo **);
+ typedef void (*RuleFreeFunc)(void *);
+Index: src/preprocessors/Stream5/snort_stream5_tcp.c
+===================================================================
+RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/preprocessors/Stream5/snort_stream5_tcp.c,v
+retrieving revision 1.296.2.5
+diff -u -p -r1.296.2.5 snort_stream5_tcp.c
+--- src/preprocessors/Stream5/snort_stream5_tcp.c 7 Jan 2011 20:06:05 -0000 1.296.2.5
++++ src/preprocessors/Stream5/snort_stream5_tcp.c 17 Feb 2011 20:06:49 -0000
+@@ -816,12 +816,12 @@ void Stream5TcpRegisterRuleOptions(void)
+ RegisterPreprocessorRuleOption("stream_reassemble", &s5TcpStreamReassembleRuleOptionInit,
+ &s5TcpStreamReassembleRuleOptionEval, &s5TcpStreamReassembleRuleOptionCleanup,
+ NULL, NULL, NULL, NULL);
+-#endif
+
+ #ifdef PERF_PROFILING
+ RegisterPreprocessorProfile("stream_size", &streamSizePerfStats, 4, &preprocRuleOptionPerfStats);
+ RegisterPreprocessorProfile("reassemble", &streamReassembleRuleOptionPerfStats, 4, &preprocRuleOptionPerfStats);
+ #endif
++#endif
+
+ }
+
diff --git a/net-analyzer/snort/metadata.xml b/net-analyzer/snort/metadata.xml index 06ff17c4ca8b..c4b73b613d32 100644 --- a/net-analyzer/snort/metadata.xml +++ b/net-analyzer/snort/metadata.xml @@ -5,14 +5,30 @@ <maintainer>
<email>patrick@gentoo.org</email>
<name>Patrick Lauer</name>
+ <description>Maintainer</description>
</maintainer>
<maintainer>
<email>jason.r.wallace@gmail.com</email>
<name>Jason Wallace</name>
+ <description>Proxy maintainer. CC him on bugs</description>
</maintainer>
<longdescription>
- The de facto standard for intrusion detection and prevention
+ Snort is an open source network intrusion prevention and detection
+ system (IDS/IPS) developed by Sourcefire. Combining the benefits of
+ signature, protocol, and anomaly-based inspection, Snort is the most
+ widely deployed IDS/IPS technology worldwide. With millions of downloads
+ and approximately 300,000 registered users, Snort has become the de facto
+ standard for IPS.
</longdescription>
+ <upstream>
+ <maintainer>
+ <email>snort-team@sourcefire.com</email>
+ <name>Snort Team</name>
+ </maintainer>
+ <changelog>http://www.snort.org/snort-downloads</changelog>
+ <doc>http://www.snort.org/docs</doc>
+ <bugs-to>http://www.snort.org/snort-downloads/submit-a-bug/</bugs-to>
+ </upstream>
<use>
<flag name='aruba'>
Adds support for monitoring wireless traffic using a Aruba Mobility
diff --git a/net-analyzer/snort/snort-2.9.0.4.ebuild b/net-analyzer/snort/snort-2.9.0.4.ebuild new file mode 100644 index 000000000000..bcaeecfffafc --- /dev/null +++ b/net-analyzer/snort/snort-2.9.0.4.ebuild @@ -0,0 +1,278 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.9.0.4.ebuild,v 1.1 2011/02/24 17:31:46 patrick Exp $ + +EAPI="2" +inherit eutils autotools multilib + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="http://www.snort.org/" +SRC_URI="http://www.snort.org/downloads/752 -> ${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static +dynamicplugin +ipv6 +zlib gre mpls targetbased +decoder-preprocessor-rules +ppm perfprofiling linux-smp-stats inline-init-failopen prelude +threads debug +active-response normalizer reload-error-restart react flexresp3 +aruba mysql odbc postgres selinux" + +DEPEND=">=net-libs/libpcap-1.0.0 + >=net-libs/daq-0.5 + >=dev-libs/libpcre-6.0 + dev-libs/libdnet + postgres? ( dev-db/postgresql-base ) + mysql? ( virtual/mysql ) + odbc? ( dev-db/unixODBC ) + prelude? ( >=dev-libs/libprelude-0.9.0 ) + zlib? ( sys-libs/zlib )" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +pkg_setup() { + + if use zlib && ! use dynamicplugin; then + eerror "You have enabled the 'zlib' USE flag but not the 'dynamicplugin' USE flag." + eerror "'zlib' requires 'dynamicplugin' 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_prepare() { + + # Fix to ensure that the package builds if USE flag -dynamicplugin is used. + epatch "${FILESDIR}/disabledynamic.patch" + + #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 dns ssl dcerpc2 sdf; 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 + + if use prelude; then + einfo "Applying prelude fix." + sed -i -e "s:AC_PROG_RANLIB:AC_PROG_LIBTOOL:" configure.in \ + || die "sed for perlude failed" + fi + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable dynamicplugin) \ + $(use_enable ipv6) \ + $(use_enable zlib) \ + $(use_enable gre) \ + $(use_enable mpls) \ + $(use_enable targetbased) \ + $(use_enable decoder-preprocessor-rules) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable prelude) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable normalizer) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable aruba) \ + $(use_with mysql) \ + $(use_with odbc) \ + $(use_with postgres postgresql) \ + --enable-reload \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq \ + --disable-rzb-saac \ + --without-oracle + +} + +src_install() { + + emake DESTDIR="${D}" install || die "emake failed" + + dodir /var/log/snort \ + /var/run/snort \ + /etc/snort/rules \ + /usr/$(get_libdir)/snort_dynamicrules \ + || die "Failed to create core directories" + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat \ + schemas/* || die "Failed to install snort docs" + docinto support + dodoc "${WORKDIR}/${PF}/config.log" \ + "${T}/build.log" || die "Failed to install support files" + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map || die "Failed to install docs in etc" + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib \ + || die "Failed to add snort.conf.distrib" + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules || die "Failed to install preproc rule files" + + chown -R snort:snort \ + "${D}"/var/log/snort \ + "${D}"/var/run/snort \ + "${D}"/etc/snort \ + "${D}"/etc/snort/preproc_rules || die "Failed to set ownership of dirs" + + newinitd "${FILESDIR}/snort.rc10" snort || die "Failed to install snort init script" + newconfd "${FILESDIR}/snort.confd" snort || die "Failed to install snort confd file" + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # 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" \ + || die "Failed to update snort.conf.distrib lib paths" + + # 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" \ + || die "Failed to update snort.conf.distrib rule path" + + # 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" \ + || die "Failed to update snort.conf.distrib preproc rule path" + + # Enable the preprocessor/decoder rules + sed -i -e 's:^# include $PREPROC_RULE_PATH:include $PREPROC_RULE_PATH:g' \ + "${D}etc/snort/snort.conf.distrib" \ + || die "Failed to uncomment snort.conf.distrib preproc rule path" + + sed -i -e 's:^# dynamicdetection directory:dynamicdetection directory:g' \ + "${D}etc/snort/snort.conf.distrib" \ + || die "Failed to uncomment snort.conf.distrib dynamicdetection directory" + + # 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" \ + || die "Failed to clean up snort.conf.distrib trailing slashes" + + # 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" \ + || die "Failed to update snort.conf.distrib classification.config path" + + sed -i -e 's:^include reference.config:include /etc/snort/reference.config:g' \ + "${D}etc/snort/snort.conf.distrib" \ + || die "Failed to update snort.conf.distrib /etc/snort/reference.config path" + + # 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" \ + || die "Failed to disable rules in snort.conf.distrib" + + # Disable preproc rule files by default. + sed -i -e 's:^include $PREPROC_RULE_PATH:# include $PREPROC_RULE_PATH:g' \ + "${D}etc/snort/snort.conf.distrib" \ + || die "Failed to disable rules in snort.conf.distrib" + + # Disable normalizer preprocessor config if normalizer USE flag not set. + if ! use normalizer; then + sed -i -e 's:^preprocessor normalize:#preprocessor normalize:g' \ + "${D}etc/snort/snort.conf.distrib" \ + || die "Failed to disable normalizer config in snort.conf.distrib" + fi + +} + +pkg_postinst() { + elog + elog "Snort-2.9 introduces the DAQ, or Data Acquisition library, for" + elog "packet I/O. The DAQ replaces direct calls to PCAP functions with" + elog "an abstraction layer that facilitates operation on a variety of" + elog "hardware and software interfaces without requiring changes to Snort." + elog + elog "The only DAQ modules supported with this ebuild are AFpacket, PCAP," + elog "and Dump. IPQ nad NFQ will be supported in future versions of this" + elog "package." + elog + elog "For passive (non-inline) Snort deployments you will want to use" + elog "either PCAP or AFpacket. For inline deployments you will need" + elog "to use AFpacket. The Dump DAQ is used for testing the various inline" + elog "features available in ${P}." + elog + elog "The core DQA libraries are installed in /usr/$(get_libdir)/. The libraries" + elog "for the individual DAQ modules (afpacket,pcap,dump) are installed in" + elog "/usr/$(get_libdir)/daq. To use these you will need to add the following" + elog "lines to your snort.conf:" + elog + elog "config daq: <DAQ module>" + elog "config daq_mode: <mode>" + elog "config daq_dir: /usr/$(get_libdir)/daq" + elog + elog "Please see the README file for DAQ for information about specific" + elog "DAQ modules and README.daq from the Snort 2.9 documentation" + elog "reguarding Snort and DAQ configuration information." + elog + elog "See /usr/share/doc/${PF} and /etc/snort/snort.conf.distrib for" + elog "information on configuring snort." + elog + + if [[ $(date +%Y%m%d) < 20110312 ]]; then + + ewarn + ewarn "Please note, you can not use ${P} with the SO rules from" + ewarn "previous versions of Snort!" + ewarn + ewarn "If you do not have a subscription to the VRT rule set and you" + ewarn "wish to continue using the shared object (SO) rules, you will" + ewarn "need to downgrade Snort. The SO rules will be made available" + ewarn "to registered (non-subscription) users on March 12, 2011" + ewarn "(30 days after being released to subscription users)." + ewarn + ewarn "Please see http://www.snort.org/snort-rules/#rules for more" + ewarn "details." + ewarn + + fi + +} |