summaryrefslogtreecommitdiff
path: root/net-analyzer/snort
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/snort
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/snort')
-rw-r--r--net-analyzer/snort/Manifest25
-rw-r--r--net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch8
-rw-r--r--net-analyzer/snort/files/snort-2.9.8.3-rpc.patch26
-rw-r--r--net-analyzer/snort/files/snort.confd.216
-rw-r--r--net-analyzer/snort/files/snort.rc1260
-rw-r--r--net-analyzer/snort/metadata.xml145
-rw-r--r--net-analyzer/snort/snort-2.9.4.6-r1.ebuild251
-rw-r--r--net-analyzer/snort/snort-2.9.7.0.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.7.2.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.7.3.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.7.5.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.8.0.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.8.2.ebuild249
-rw-r--r--net-analyzer/snort/snort-2.9.8.3-r1.ebuild248
-rw-r--r--net-analyzer/snort/snort-2.9.8.3-r2.ebuild254
-rw-r--r--net-analyzer/snort/snort-2.9.8.3.ebuild249
16 files changed, 2776 insertions, 0 deletions
diff --git a/net-analyzer/snort/Manifest b/net-analyzer/snort/Manifest
new file mode 100644
index 000000000000..3d875fcc81ae
--- /dev/null
+++ b/net-analyzer/snort/Manifest
@@ -0,0 +1,25 @@
+AUX snort-2.9.8.3-no-implicit.patch 299 SHA256 55f6e95a76d1480ccf8200bf7f1611fbb97b51ca0f78453712817f385bd050b3 SHA512 e3cc85c8a8608126880f46220cf889fcd8a7f6819c17bc14cdec2366a0673ec26734637c0185fa4a6be831efdc112678c6f3df08445922d362c79861d0aca832 WHIRLPOOL af31504fc91feda984e1e6ca6d48e76e084968aae4c2f7ca06907dde221a39bbbc5fc31a2f4aaf8779bc932bf679406c983406dad8b6128d35835b1a435a6ae5
+AUX snort-2.9.8.3-rpc.patch 1010 SHA256 0accd8f2c0ca4545c4c40e8986751b57147219e283cc647c8be17625b6e8d692 SHA512 1336fb39ad8f0a5f07c09a5310e4830058b4171fe70b549ad00cba4809f9e18ed0be559abd5c516c5c85b0be90340af3096d5963d9cf098ab26952b1cf93f5a9 WHIRLPOOL a33cddb6df3f328a49865b8e990cd7a9ab3a3dbe77d1a99f56a54304d0cc6f3a04efb0d94ccd0fd269983ceb0a44f062c38313c6ebb63d4076a7921e39a6356e
+AUX snort.confd.2 420 SHA256 337378f098e0cd59fb5c28a26b5b74b32168cf48596064469e6a5ba04fe3a36f SHA512 f8b0dd74a601a8bfadc96f75caeb037059ba4330dc2b52cc113ce9be38b020f098cbc747bfe977ca4dfa6e2ce634a64949ca5cf41a40c16fa90227e49ac9052f WHIRLPOOL 39b26c5e79c0fa3e8ce5394e27448b77a0c443c5a10720cfe19c2c7fe554c7d2451adbbf2f80078346ab212b85f25bcd395640823b8b82333593dd3c8b3f5300
+AUX snort.rc12 1469 SHA256 ec06f884dd3ed3b8d20fd848769ab1dece4de1605d8fbde11c27665ce9952291 SHA512 ec398f06db147bc8ddf98b0d6a200af40c082053062b56a3fe78b1de6629cd7bf0b188e9baf44c1634f5f9f8ce8494a8a71be63c1e3f71838b77de58dbb45c71 WHIRLPOOL 3b6494b91994c8b1142438b9cbcd74fa6c6e098a130c1b53426492337d09d940e44063a131f8ca3c61abdf45069d77960a319224ce5be44c4e8c44ad92e55a76
+DIST snort-2.9.4.6.tar.gz 5338762 SHA256 cfaa5390b1840aaaa68a6c05a7077dd92cb916e6186a014baa451d43cdb0b3bc SHA512 e35e22cab3b98bbd42ffb4b88c4c4cc9b1c11e35952a9f3f4f684c02c81ca8604b45d16f42b3d0a6c792eeab86a8e319d8ebdd7b1a5215f93ec0e70b6ef53f98 WHIRLPOOL d029b7519e4ea2d9039fba289bf3785f60edaa22da643196b44772a99c1c9833431840845c51c627d7fce3c77758ea68f205df1a2e32a779440c3a651d2f06a3
+DIST snort-2.9.7.0.tar.gz 6340553 SHA256 9738afea45d20b7f77997cc00055e7dd70f6aea0101209d87efec4bc4eace49b SHA512 f2cbdd2cf2ad15bd4cf3f8658c2a4880ee2069589db89c11aaea637984dde270ef6242c6dd43d5e12f829ed2464388950ee791dbbfa8df796843942c415fbc2f WHIRLPOOL d018f7f4cc9820057642bc691c0812866083a54f9399421f1b6eedfdb55e8cdfd42b0088c12e15facbfbeccd76a6df6351b0103eac35b5d5ca43900521ee274a
+DIST snort-2.9.7.2.tar.gz 6352738 SHA256 db57c532919d9ababac127f29dbdc05ed832394880e46cad81a5dde713ccb4be SHA512 4732014d0049671b1a81857e25a5ffbc3cbccb698be2b3406f69a45603a6b9f34343469ee14fa513199cf9b890a278cc777b42493850cff6fcb3493bb9b73dce WHIRLPOOL 2eec2345e0b945ff504025b2e552729bb5542d351bf1d92e2806be0f1e8d251283d4f984d89058731f5a0150bb1c2a7dd012e9bfbfbd0a3596bfc50321a93cb9
+DIST snort-2.9.7.3.tar.gz 6300073 SHA256 8cc3613b888fc54947a2beec773c76d9a20368f2659b31d45a9f0b11e66cc229 SHA512 949213d44d08c7f70bd45bc4947c9c35bfcd2ca3a54ec8a28d0c03e3868a485d2c208ec7850398f69d706c74fbad1389af445eb1107e678ff95714b5696f27b7 WHIRLPOOL 6d6e2da52f7f141bf6702c8604855ef351c055dbce2805341af16deafa5a0e288266e9632f770e29d209a59cce0d9c17f017bfb612f870dbf5b88c8c0d75e46d
+DIST snort-2.9.7.5.tar.gz 6312847 SHA256 ad03f11b5301b16642199a86aa90388eaa53f5003f83b0c5595745a490047be1 SHA512 fa1b299c72a44a8cb64361e8dab9fad5bfec36bbb05ebed2407002b2c5d97256d7d67599cb1f29406b5ee0916f2f85a173610d403cd34c57f74f7049c10eb038 WHIRLPOOL 6c7270d7edfc552f074fa2fb8ed067a12a48e4e159ceaa4be1f3c877996df5630aa42721aa637a846701072834e167445a67bbfa2deb93933048b1e4f70a8e1b
+DIST snort-2.9.8.0.tar.gz 6323095 SHA256 bddd5d01d10d20c182836fa0199cd3549239b7a9d0fd5bbb10226feb8b42d231 SHA512 46e5f19be5eccad2d5b4d3d55ce42fe616cd5f605b7178ed98e86cc8f2f4cf0f796fad80033d81b71bea7da2abfb6d0b340815ee158190f9b974f671045bf002 WHIRLPOOL 1e15ec4e2e54bd878f654484d7617249f5e34bc5c87bd0022ee923e0bab15e1733841ad234817d5209c0063c76d3e4e3db2343130eb77450260945324862ba12
+DIST snort-2.9.8.2.tar.gz 6311793 SHA256 4075012d350dfa47a0200b7a920323f15cb7c370790f2a47367c03aba4009333 SHA512 60f660b2093ae88211dcef9256edf35441c0ffc61ec8240b6d25e947b55b0fdb23482913246e2288a8a533dbaff4e5ea2d8f51298ab9aa67baa1ab74d1c4f7a4 WHIRLPOOL 1b12bb4c65d98d5dc0bb37f1bc329d23238b95afcbf911ed7040da4de5116f3b0dd907539f6a6a418820d399cbe7830ea05dd894cfa83a71656ae7b0325d1f92
+DIST snort-2.9.8.3.tar.gz 6244304 SHA256 856d02ccec49fa30c920a1e416c47c0d62dd224340a614959ba5c03239100e6a SHA512 2f3dfe46e14a5106a02ca60b2d334549f4924ff916de0804b2b7792cdd31e104fbb454b4b932855b5f25a861698db0f8988844782b12b0e5fa132d88d4a7a687 WHIRLPOOL 3b3ab085b57522e72b7a32264107e791feec007280a76fe0c171f86c70b8d56d295ec59d150729bf08da57bf15058b2bf6e59e94f013c7a2af05cc8f79d4a38a
+EBUILD snort-2.9.4.6-r1.ebuild 8568 SHA256 74cd0ddc66434d69f8865d96547f2c27887fe12a777fc849f5b7c63092308e2e SHA512 6650634db3bcc734627b1103649b1c83b4e6fa34c1d9b183bd54c876bef12e776a64ff75823d38b73ece9d67709c3f9b94bb185d8d2111e6c203b7d88ba10378 WHIRLPOOL 1cea7b1dd0a75246465eae8c5cefe20ef940cd53f1ae3838dd342597d4c0915c8a0000f0d9ed812e85f926c8aa5ace935925f69fee4e0b3dc9669d247b47a25b
+EBUILD snort-2.9.7.0.ebuild 8546 SHA256 14a3d40f123e02a46b7b3132e4beb577dd2a6396d85f3b899939534e41ca07bc SHA512 4293b24a732229df7c1d37b62ad3dfd96e9a5f8fccdde1d78f9694147dbabbfde6b53ce1a7de6e3fb5b2ca1f5c631d4d5b46ff32c333cbac5ffca79bd9f9e130 WHIRLPOOL 17639bca528063ca50a28b93539e1021307c4e4e0c3dacdac3c9172890264cf7beab63d67c4f9725731c334cbde19f1b6f215235d731baf587927d9bce667ab9
+EBUILD snort-2.9.7.2.ebuild 8546 SHA256 02d0c8eaa75186133291d83f5be812adb02f12cbf8dd7aba5dce4572d5094610 SHA512 d1c8a854ed5c4b43d58e1c8188ce6660db879610b09059791aab948c982990d47c3a39ec992c9e349490df5f9eb933ca21f1f135755a7ad7e4d10c5c04db256b WHIRLPOOL 73524c21d57c567a9c21bb903631ac2b89bb36e1b305cddcf47584c0e57830458e8bb82387947dc25c2e1ae31950414bd86be8272bb9fe246527216fa9e5f653
+EBUILD snort-2.9.7.3.ebuild 8546 SHA256 02d0c8eaa75186133291d83f5be812adb02f12cbf8dd7aba5dce4572d5094610 SHA512 d1c8a854ed5c4b43d58e1c8188ce6660db879610b09059791aab948c982990d47c3a39ec992c9e349490df5f9eb933ca21f1f135755a7ad7e4d10c5c04db256b WHIRLPOOL 73524c21d57c567a9c21bb903631ac2b89bb36e1b305cddcf47584c0e57830458e8bb82387947dc25c2e1ae31950414bd86be8272bb9fe246527216fa9e5f653
+EBUILD snort-2.9.7.5.ebuild 8546 SHA256 02d0c8eaa75186133291d83f5be812adb02f12cbf8dd7aba5dce4572d5094610 SHA512 d1c8a854ed5c4b43d58e1c8188ce6660db879610b09059791aab948c982990d47c3a39ec992c9e349490df5f9eb933ca21f1f135755a7ad7e4d10c5c04db256b WHIRLPOOL 73524c21d57c567a9c21bb903631ac2b89bb36e1b305cddcf47584c0e57830458e8bb82387947dc25c2e1ae31950414bd86be8272bb9fe246527216fa9e5f653
+EBUILD snort-2.9.8.0.ebuild 8546 SHA256 02d0c8eaa75186133291d83f5be812adb02f12cbf8dd7aba5dce4572d5094610 SHA512 d1c8a854ed5c4b43d58e1c8188ce6660db879610b09059791aab948c982990d47c3a39ec992c9e349490df5f9eb933ca21f1f135755a7ad7e4d10c5c04db256b WHIRLPOOL 73524c21d57c567a9c21bb903631ac2b89bb36e1b305cddcf47584c0e57830458e8bb82387947dc25c2e1ae31950414bd86be8272bb9fe246527216fa9e5f653
+EBUILD snort-2.9.8.2.ebuild 8546 SHA256 02d0c8eaa75186133291d83f5be812adb02f12cbf8dd7aba5dce4572d5094610 SHA512 d1c8a854ed5c4b43d58e1c8188ce6660db879610b09059791aab948c982990d47c3a39ec992c9e349490df5f9eb933ca21f1f135755a7ad7e4d10c5c04db256b WHIRLPOOL 73524c21d57c567a9c21bb903631ac2b89bb36e1b305cddcf47584c0e57830458e8bb82387947dc25c2e1ae31950414bd86be8272bb9fe246527216fa9e5f653
+EBUILD snort-2.9.8.3-r1.ebuild 8339 SHA256 c118e0af4d76ceb4d1150e00d47cbe4fc75e6b59a614fa20eb951901c564bcc7 SHA512 8c0ee1620090ce311512e199f3a3f117b563912871dd0d128f2a852f851c030027b774f8f61c6461902a38f1f47a6df96679a28fc9c30c12c578d9a5c19112de WHIRLPOOL e2acce337a3b66c1c9a5ff8651fd897bbdd3d089303f849e987ad923d236f999cd8283ae478524957b770ce4ffad158401ecc1edbaef54bf75bac993507e3c8f
+EBUILD snort-2.9.8.3-r2.ebuild 8522 SHA256 e1d083c77a8238d1a8e5d66b9f13690ea58f5b47c8913023bba2ee16c88c9d4f SHA512 fa50d23e9c72c35beec382841ed51dbaaee4c82b2ad633be5e3a90e7e332117325d05b6da86d5d0feacafcbe3c041c4e16f202b409fc7a9605688ccd54dff2d2 WHIRLPOOL 37fe73f1412be053c2c02e43ab83c38b092819b0ee81e42c211f227572c4ff72eac3370bcd08a20ab20c05b5ab2d254e09531fd10bddd3ff493c7be269899fcf
+EBUILD snort-2.9.8.3.ebuild 8546 SHA256 3f31b2696ed17f3984c1e39c729a2167aa73261ccdc332376715331a642ade3b SHA512 e2b0a6e303ef3cb0d906a6c809d3d12ff9c3540fe9cdafdea24579ca88c3adf53e1895b60035db42e2a7058e39e16b83798cd2818f42d7b64d89eb25471816f3 WHIRLPOOL 4a7f15a8fc0c734c545bd145fb460e2c62f5a0deef306569f3cac987b41e3f2d27cb3eba0a4ae952a37b141b492ead404fd00b9ed441e7e8518c9447bdf280c3
+MISC ChangeLog 4623 SHA256 c7311eeb028b9f8b2ad38bd55b74a04289a5a165cb71c9521e1bae8d9528a33d SHA512 db43e349b79046b727cd6f5ec4b7ea972353fe9f05b76495a2b3fc4719c16a12750f382aa2c7bc731a03a7586021da52e1e1cdfacfcb3868ffc1426603b2f851 WHIRLPOOL 13512ea19848d1024c4a671c6ec204c040166b57bd601e042223fd08cc011ff561b4686b81626fc0510fb1c0777d0cd4060f8ce1c4c6fc256a7309142ff06eb8
+MISC ChangeLog-2015 36554 SHA256 2ec7c84ae8da30cc4c2e1b6dea4a05910ce8dcc4b7a3b43bc10420b2396aa82f SHA512 cc24cde8374d0ad8ab31f403928e8cf313f9a0b4173b3de94bc4620b591821f0166531d932fdc64d2a71c64bf18d903472a7330714a4a6e96ac2231a2f0150d0 WHIRLPOOL ad5d457d0a2cb6a01ca18cd769106358ba1035af4cce893b6b67c26355481cc234b1c460b560dd04d6ea112243e9d8b0ed7941fde83b20b2d65c009249ad43bd
+MISC metadata.xml 5357 SHA256 2682c328b03647effb7501b3eaa5be5574e3cda39693de121d114cc9c6b86c6b SHA512 56374a2fca28e4a0593c2fbeca7b2b1bcd643e72cb80318fad0a2cc1f682b6c38178d606b2a95d8677a14460db32d4b7e39c06f456d190e1fd008679480c379a WHIRLPOOL 59d14da50ed0d7fab65652e319063ac3196bedc11f07e6c06f4fc079fe2f5260a4f04e1af143129b0a83871dc3eec941fc5d7cbc46eb5a0292c4bc8e4ab8c927
diff --git a/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch b/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch
new file mode 100644
index 000000000000..7faf9a4aaa25
--- /dev/null
+++ b/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch
@@ -0,0 +1,8 @@
+diff --git a/src/preprocessors/perf_indicators.c b/src/preprocessors/perf_indicators.c
+index d859fe7..c183552 100755
+--- a/src/preprocessors/perf_indicators.c
++++ b/src/preprocessors/perf_indicators.c
+@@ -25,2 +25,3 @@
+ #include "perf_indicators.h"
++#include "cpuclock.h" /* get_ticks_per_usec */
+
diff --git a/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch b/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch
new file mode 100644
index 000000000000..51ee56d8410e
--- /dev/null
+++ b/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch
@@ -0,0 +1,26 @@
+diff -ruN snort-2.9.8.3.orig/configure.in snort-2.9.8.3/configure.in
+--- snort-2.9.8.3.orig/configure.in 2016-04-26 10:08:28.000000000 -0000
++++ snort-2.9.8.3/configure.in 2017-09-25 20:21:17.632003858 -0000
+@@ -187,6 +187,22 @@
+ AC_CHECK_LIB(nsl, inet_ntoa)
+ fi
+
++AC_ARG_WITH([libtirpc],
++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]),
++ [], [ with_libtirpc=no ])
++
++AS_IF([test "x$with_libtirpc" != xno],
++ [PKG_CHECK_MODULES([TIRPC],
++ [libtirpc],
++ [extra_incl="$extra_incl $TIRPC_CFLAGS"; LIBS="$LIBS $TIRPC_LIBS";],
++ [AC_MSG_ERROR([libtirpc requested, but library not found.])]
++ )],
++ [AC_CHECK_HEADER(rpc/rpc.h,
++ [],
++ [AC_MSG_ERROR([sunrpc requested, but headers are not present.])]
++ )]
++)
++
+ if test -z "$no_libsocket"; then
+ AC_CHECK_LIB(socket, socket)
+ fi
diff --git a/net-analyzer/snort/files/snort.confd.2 b/net-analyzer/snort/files/snort.confd.2
new file mode 100644
index 000000000000..780c91052d1d
--- /dev/null
+++ b/net-analyzer/snort/files/snort.confd.2
@@ -0,0 +1,16 @@
+# Config file for /etc/init.d/snort
+
+# The following options are now set in your snort.conf file:
+# config set_gid:
+# config set_uid:
+# config snaplen:
+# config bpf_file:
+# config logdir:
+
+# The only options that should be set here are SNORT_IFACE and SNORT_CONF.
+
+# This tell snort which interface to listen on (any for every interface)
+SNORT_IFACE="eth1"
+
+# Probably not this either
+SNORT_CONF="/etc/snort/snort.conf"
diff --git a/net-analyzer/snort/files/snort.rc12 b/net-analyzer/snort/files/snort.rc12
new file mode 100644
index 000000000000..ad453c821fd2
--- /dev/null
+++ b/net-analyzer/snort/files/snort.rc12
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ after mysql
+ after postgresql
+}
+
+checkconfig() {
+ if [ ! -e ${SNORT_CONF} ] ; then
+ eerror "You need a configuration file to run snort"
+ eerror "There is an example config in /etc/snort/snort.conf.distrib"
+ return 1
+ fi
+ if [ ! -d "/var/run/snort" ] ; then
+ checkpath -d /var/run/snort
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting snort"
+ start-stop-daemon --start --quiet --exec /usr/bin/snort \
+ -- --nolock-pidfile --pid-path /var/run/snort -D -i ${SNORT_IFACE} \
+ -c ${SNORT_CONF} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping snort"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid
+ # Snort needs a few seconds to fully shutdown
+ sleep 15
+ eend $?
+}
+
+reload() {
+
+ local SNORT_PID="`cat /var/run/snort/snort_${SNORT_IFACE}.pid`"
+ local SNORT_USER="`ps -p ${SNORT_PID} --no-headers -o user`"
+
+ if [ ! -f /var/run/snort/snort_${SNORT_IFACE}.pid ]; then
+ eerror "Snort isn't running"
+ return 1
+ elif [ ${SNORT_USER} != root ]; then
+ eerror "Snort must be running as root for reload to work!"
+ return 1
+ else
+ checkconfig || return 1
+ ebegin "Reloading Snort"
+ start-stop-daemon --signal HUP --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid
+ fi
+}
+
+
diff --git a/net-analyzer/snort/metadata.xml b/net-analyzer/snort/metadata.xml
new file mode 100644
index 000000000000..bfe81882b559
--- /dev/null
+++ b/net-analyzer/snort/metadata.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>jason.r.wallace@gmail.com</email>
+ <name>Jason Wallace</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ 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="control-socket">
+ Enables Snort's control socket.
+ </flag>
+ <flag name="dynamicplugin">
+ Enable ability to dynamically load preprocessors, detection engine,
+ and rules library. This is required if you want to use shared
+ object (SO) snort rules.
+ </flag>
+ <flag name="file-inspect">
+ Enables extended file inspection capabilities.
+ </flag>
+ <flag name="gre">
+ Enable support for inspecting and processing Generic Routing
+ Encapsulation (GRE) packet headders. Only needed if you are
+ monitoring GRE tunnels.
+ </flag>
+ <flag name="high-availability">
+ Enables high-availability state sharing.
+ </flag>
+ <flag name="inline-init-failopen">
+ Enables support to allow traffic to pass (fail-open) through
+ inline deployments while snort is starting and not ready to begin
+ inspecting traffic. If this option is not enabled, network
+ traffic will not pass (fail-closed) until snort has fully started
+ and is ready to perform packet inspection.
+ </flag>
+ <flag name="linux-smp-stats">
+ Enable accurate statistics reporting through /proc on systems with
+ multipule processors.
+ </flag>
+ <flag name="mpls">
+ Enables support for processing and inspecting Multiprotocol Label
+ Switching MPLS network network traffic. Only needed if you are
+ monitoring an MPLS network.
+ </flag>
+ <flag name="non-ether-decoders">
+ Enable decoding of non-ethernet protocols such as TokenRing, FDDI,
+ IPX, etc.
+ </flag>
+ <flag name="perfprofiling">
+ Enables support for preprocessor and rule performance profiling
+ using the perfmonitor preprocessor.
+ </flag>
+ <flag name="ppm">
+ Enables support for setting per rule or per packet latency limits.
+ Helps protect against introducing network latency with inline
+ deployments.
+ </flag>
+ <flag name="react">
+ Enables support for the react rule keyword. Supports interception,
+ termination, and redirection of HTTP connections.
+ </flag>
+ <flag name="shared-rep">
+ Enables the use of shared memory for the Reputation Preprocessor
+ (Only available on Linux systems)
+ </flag>
+ <flag name="side-channel">
+ Enables Snort's the side channel.
+ </flag>
+ <flag name="sourcefire">
+ Enables Sourcefire specific build options, which include
+ --enable-perfprofiling and --enable-ppm.
+ </flag>
+ <flag name="targetbased">
+ Enables support in snort for using a host attibute XML file
+ (attribute_table.dtd). This file needs to be created by the user
+ and should define the IP address, operating system, and services
+ for all hosts on the monitored network. This is cumbersome, but
+ can improve intrusion detection accuracy.
+ </flag>
+ <flag name="reload-error-restart">
+ Enables support for completely restarting snort if an error is
+ detected durring a reload.
+ </flag>
+ <flag name="zlib">
+ Enables HTTP inspection of compressed web traffic. Requires
+ dynamicplugin be enabled.
+ </flag>
+ <flag name="active-response">
+ Enables support for automatically sending TCP resets and ICMP
+ unreachable messages to terminate connections. Used with inline
+ deployments.
+ </flag>
+ <flag name="normalizer">
+ Enables support for normalizing packets in inline deployments to
+ help minimize the chances of detection evasion.
+ </flag>
+ <flag name="flexresp3">
+ Enables support for new flexable response preprocessor for enabling
+ connection tearing for inline deployments. Replaces flexresp and
+ flexresp2.
+ </flag>
+ <flag name="paf">
+ Enables support for Protocol Aware Flushing. This allows Snort to
+ statefully scan a stream and reassemble a complete protocol data
+ unit regardless of segmentation.
+ </flag>
+ <flag name="large-pcap-64bit">
+ Allows Snort to read pcap files that are larger than 2 GB. ONLY
+ VALID FOR 64bit SYSTEMS!
+ </flag>
+ <flag name="libtirpc">
+ Build against <pkg>net-libs/libtirpc</pkg> for RPC support
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/snort/snort-2.9.4.6-r1.ebuild b/net-analyzer/snort/snort-2.9.4.6-r1.ebuild
new file mode 100644
index 000000000000..22f8af97cb65
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.4.6-r1.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://snort.org/downloads/2320 -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +dynamicplugin +zlib +gre +mpls +targetbased
++ppm +perfprofiling +non-ether-decoders control-socket
+shared-rep sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 +paf large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.0
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="zlib? ( dynamicplugin )
+ !kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 imap pop rzb_saac sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable dynamicplugin) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 paf) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ #Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.0.ebuild b/net-analyzer/snort/snort-2.9.7.0.ebuild
new file mode 100644
index 000000000000..dc97c8f72577
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.0.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.2.ebuild b/net-analyzer/snort/snort-2.9.7.2.ebuild
new file mode 100644
index 000000000000..dc9b17549630
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.2.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.3.ebuild b/net-analyzer/snort/snort-2.9.7.3.ebuild
new file mode 100644
index 000000000000..dc9b17549630
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.3.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.5.ebuild b/net-analyzer/snort/snort-2.9.7.5.ebuild
new file mode 100644
index 000000000000..dc9b17549630
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.5.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.8.0.ebuild b/net-analyzer/snort/snort-2.9.8.0.ebuild
new file mode 100644
index 000000000000..dc9b17549630
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.8.0.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.8.2.ebuild b/net-analyzer/snort/snort-2.9.8.2.ebuild
new file mode 100644
index 000000000000..dc9b17549630
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.8.2.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.8.3-r1.ebuild b/net-analyzer/snort/snort-2.9.8.3-r1.ebuild
new file mode 100644
index 000000000000..c937182cf824
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.8.3-r1.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-implicit.patch
+)
+
+pkg_setup() {
+
+ # 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() {
+ default
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-mpls \
+ --enable-normalizer \
+ --enable-reload \
+ --enable-targetbased \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.8.3-r2.ebuild b/net-analyzer/snort/snort-2.9.8.3-r2.ebuild
new file mode 100644
index 000000000000..161524dd7965
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.8.3-r2.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response reload-error-restart
++react +flexresp3 large-pcap-64bit selinux +libtirpc"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib
+ !libtirpc? ( sys-libs/glibc[rpc(-)] )
+ libtirpc? ( net-libs/libtirpc )
+ || ( net-libs/libnsl <sys-libs/glibc-2.26 )
+"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-implicit.patch
+ "${FILESDIR}"/${P}-rpc.patch
+)
+
+pkg_setup() {
+
+ # 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() {
+ default
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ $(use_with libtirpc) \
+ --enable-mpls \
+ --enable-normalizer \
+ --enable-reload \
+ --enable-targetbased \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.8.3.ebuild b/net-analyzer/snort/snort-2.9.8.3.ebuild
new file mode 100644
index 000000000000..8d043e735f26
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.8.3.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # 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() {
+
+ # Multilib fix for the sf_engine
+ ebegin "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 file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; 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
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(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 large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # 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
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # 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
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # 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"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # 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
+
+ # 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
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+
+ # 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
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # 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
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}