summaryrefslogtreecommitdiff
path: root/net-analyzer/barnyard2
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/barnyard2
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/barnyard2')
-rw-r--r--net-analyzer/barnyard2/Manifest7
-rw-r--r--net-analyzer/barnyard2/barnyard2-1.9.ebuild66
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.confd36
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.initd29
-rw-r--r--net-analyzer/barnyard2/metadata.xml42
5 files changed, 180 insertions, 0 deletions
diff --git a/net-analyzer/barnyard2/Manifest b/net-analyzer/barnyard2/Manifest
new file mode 100644
index 000000000000..3e28fed41afd
--- /dev/null
+++ b/net-analyzer/barnyard2/Manifest
@@ -0,0 +1,7 @@
+AUX barnyard2.confd 1485 SHA256 4ff02a3d3de3641eccc3deddba255ecd7ac95ae3ad1382442413d103c9712c04 SHA512 23bed3720bc832f110a3c6e8703f0e29c79491aa3bbfda112b49c6b822600d1e96bab0175dee6f133adcb44e1619d91f591fe5db10f458043c89f1948ecc25c2 WHIRLPOOL 68f2de6224d382c7eb4706397bac8b66971e6401484e69f37e6311f84dec400c04e4373cf1edf156d5c0251bd3adbe766eb6a7a4edf93ab9c308777d274fb7cf
+AUX barnyard2.initd 680 SHA256 54935130b6c89b83ce3607097505a948cf8c23e28d98b514dde7df3ac1da6771 SHA512 32370ac32444e44df517dcc86ae59c548311ab02e49d2cf81d391e111334335968ee1d639c8a36a937dfdaa6a83f5dc33fb9f44ab3d7b822ace28985eabe3423 WHIRLPOOL feb13d3a6d9aec57313b4b5400d547741580045537b86ba6cdca0223649ca712a728d349fc7c5ce984cf1278959c811faa81e215972f4506884d54cdd78b1fa0
+DIST barnyard2-1.9.tar.gz 652879 SHA256 6bce0d5bd4a6fa2be2e5b1daaed1d6d0ec8e7f50b33bc1125125c8a9e78a5b0c SHA512 441a5751b28fd5c0aca73a78a58219a6ce58393e15bf735ae012719d1180e8e58a91d4170fe5c623bfe83de8ca0c04fb6975c8c7d5b6421ceedbf2023b44e72a WHIRLPOOL fc801392a88897abbee74d62b064b48dead038fdb21fb66db8a54c1c295fcc10edb873b601b5f4f0794dd6e19546260e8f5e46465384292e354f4277e8e5323e
+EBUILD barnyard2-1.9.ebuild 1698 SHA256 31a937c3f53d7e9e161f51096ed7376abf9c8beaa69a3802e8f031ed760cd4f5 SHA512 0470caca3b6f1e2ee1013fcff6412907d854de6855c6f06df411cfea1fe8a864a50149274d4f47c826b5ef081e9d14440c01109be1acbf2e2bf8f4e317aa236a WHIRLPOOL 1341f226d3999b21f88085f670bb5fb18a22a3cd4bd151ebfb956e18153dfcf5cf0ba3bc3a34705a9c7594eb974a98ea8a4df72259dda4a252502543d3723e99
+MISC ChangeLog 3006 SHA256 aa4391e6b1a6aa44aa8e4c19ec70f55b9b85c4175bcacb9a53d7cf0b1c4f5aad SHA512 a4b8ea6ce60d50a69910df5f23d800c6cf76afef549197717ca753f9ffeb096d7b4d6f34317f3b67ccdfe93d707a16d6a878ce01352bcb0be81ad7ae09423d58 WHIRLPOOL 7edafd9b50a261a3fafe96a4373432eb0387361bfafaa40723055574c03616864ef30e39e76794f0a0da7fcfc4bd2ab6d59e52e66c1c5b75f5a5ae4fb5d6a71a
+MISC ChangeLog-2015 1721 SHA256 32ed17a9fde806b820c86354764abe907702402d46d3cd9f054e5157ccee080c SHA512 93c51bc99f9dcd8cb86108e93e86d85f1893899c27eb8eeff8a8f27ede12517456db4001152bf68ac1c41cf994b2645f5a1124bb7e6b9c531adad3ddb14d0dff WHIRLPOOL 18b74a382af265aa07085bb7f5d667b0962b1d4a4882f3b7ec7e4c45bafcbabffa49ef4ccb72cfb04e355af243eb9b68a64a34a928c84ad85a405011d1a348ce
+MISC metadata.xml 1738 SHA256 6383d379d028b444e84b6b6c6aa4e3bcfaba3af75bfc28f5e11abb192d3ed931 SHA512 830bdfa0acaa1a0d112e9b70b0a645a4e43256000bf83f9b851f5bcf7124eb27ca1322ee65e52ba2b60c69a17d0074047d1258c3fe4ccb504e95eb1df4036255 WHIRLPOOL efe25a53a3bc05e33298f95476bc95eac083ebe3053fbddcdf83c5f279ae4f32baf74887cdcb4b86d9943a689d85d33db16b24498ff5b48a12da3ad4b8127f1f
diff --git a/net-analyzer/barnyard2/barnyard2-1.9.ebuild b/net-analyzer/barnyard2/barnyard2-1.9.ebuild
new file mode 100644
index 000000000000..e09f129def05
--- /dev/null
+++ b/net-analyzer/barnyard2/barnyard2-1.9.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+DESCRIPTION="Parser for Snort unified/unified2 files"
+HOMEPAGE="http://www.securixlive.com/barnyard2/"
+SRC_URI="http://www.securixlive.com/download/barnyard2/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="static debug gre mpls mysql odbc postgres"
+
+DEPEND="net-libs/libpcap
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql[server] )
+ odbc? ( dev-db/unixODBC )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e "s:^#config interface:config interface:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+ sed -i -e "s:^output alert_fast:#output alert_fast:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable debug) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_with mysql) \
+ $(use_with odbc) \
+ $(use_with postgres postgresql) \
+ --disable-ipv6 \
+ --disable-prelude \
+ --disable-mysql-ssl-support \
+ --disable-aruba \
+ --without-tcl \
+ --without-oracle || die
+
+ emake || die
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+ newconfd "${FILESDIR}/barnyard2.confd" barnyard2 || die
+ newinitd "${FILESDIR}/barnyard2.initd" barnyard2 || die
+ dodir /etc/barnyard2 \
+ /var/log/snort \
+ /var/log/snort/archive \
+ /var/log/barnyard2 || die
+ dodoc RELEASE.NOTES \
+ etc/barnyard2.conf \
+ doc/README* \
+ schemas/create_* || die
+ rm "${D}"/etc/barnyard2.conf || die
+}
+
+pkg_postinst() {
+ elog "Configuration options can be set in /etc/conf.d/barnyard2."
+ elog
+ elog "An example configuration file can be found in /usr/share/doc/${PF}."
+}
diff --git a/net-analyzer/barnyard2/files/barnyard2.confd b/net-analyzer/barnyard2/files/barnyard2.confd
new file mode 100644
index 000000000000..d114f826c707
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.confd
@@ -0,0 +1,36 @@
+# Config file for /etc/init.d/barnyard2
+
+# This file only contains variables needed by the init.d script.
+# All other configuration options are located in the barnyard2.conf file
+
+# This should be the first part of the unified/unified2 log file name (without the time stamp)
+# Ex. If you log files look like this 'snort.unified2.1239801645' then you would use 'snort.unified2'
+SPOOL_FILE="snort.unified2"
+
+# Location of your unified/unified2 log files
+SPOOL_DIR="/var/log/snort"
+
+# Directory to log to
+LOG_DIR="/var/log/barnyard2"
+
+# This MUST match what you set for "config interface:" in your barnyard2.conf
+# If you do not set this correctly then Barnyard2 will not stop when you do a
+# "/etc/init.d/barnyard2 stop"
+INTERFACE="eth0"
+
+# You probably don't want to change this, but in case you do
+PID_FILE="barnyard2_${INTERFACE}.pid"
+PID_PATH="/var/run"
+
+# The waldo file is located in the SPOOL_DIR to support multipule instances of barnyard2
+WALDO_FILE="${SPOOL_DIR}/barnyard2.waldo"
+CONF="/etc/barnyard2/barnyard2.conf"
+
+# Location of the archive directory if you choose to use it.
+# The ARCHIVE_DIR is located in the SPOOL_DIR to support multipule instances of barnyard2
+#ARCHIVE_DIR="${SPOOL_DIR}/archive"
+
+# This pulls in the options above
+BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${SPOOL_FILE} -l ${LOG_DIR}"
+# Or with an archive directory
+#BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${LOG_FILE} -l ${LOG_DIR} -a ${ARCHIVE_DIR}"
diff --git a/net-analyzer/barnyard2/files/barnyard2.initd b/net-analyzer/barnyard2/files/barnyard2.initd
new file mode 100644
index 000000000000..d15308846f12
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e ${CONF} ] ; then
+ eerror "You need a configuration file to run barnyard2"
+ eerror "There is an example config in /etc/snort/barnyard2.conf.distrib"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting barnyard2"
+ start-stop-daemon --start --quiet --exec /usr/bin/barnyard2 \
+ -- --pid-path ${PID_PATH} --nolock-pidfile ${BARNYARD_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping barnyard2"
+ start-stop-daemon --stop --quiet --pidfile ${PID_PATH}/${PID_FILE}
+ eend $?
+}
diff --git a/net-analyzer/barnyard2/metadata.xml b/net-analyzer/barnyard2/metadata.xml
new file mode 100644
index 000000000000..7bd3352141b2
--- /dev/null
+++ b/net-analyzer/barnyard2/metadata.xml
@@ -0,0 +1,42 @@
+<?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>
+ Barnyard2 is a fork of the original barnyard project (which is no longer under development).
+ Barnyard2 is an open source interpreter for Snort unified2 binary output files. Its primary
+ use is allowing Snort to write to disk in an efficient manner and leaving the task of
+ parsing binary data into various formats to a separate process that will not cause Snort to
+ miss network traffic. Barnyard2 is under active development and continues to adapt based on
+ user feedback.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>dev@securixlive.com</email>
+ <name>Securixlive</name>
+ </maintainer>
+ <doc>http://www.securixlive.com/barnyard2/docs/index.php</doc>
+ <bugs-to>mailto:dev@securixlive.com</bugs-to>
+ </upstream>
+ <use>
+ <flag name="gre">Enable GRE support</flag>
+ <flag name="mpls">Enable support for mpls networks</flag>
+ </use>
+</pkgmetadata>