summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/barnyard2/Manifest1
-rw-r--r--net-analyzer/barnyard2/barnyard2-1.13.ebuild79
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-free.patch11
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch38
4 files changed, 129 insertions, 0 deletions
diff --git a/net-analyzer/barnyard2/Manifest b/net-analyzer/barnyard2/Manifest
index 90318b00cc39..32132ade52b6 100644
--- a/net-analyzer/barnyard2/Manifest
+++ b/net-analyzer/barnyard2/Manifest
@@ -1 +1,2 @@
+DIST barnyard2-1.13-github.tar.gz 435017 BLAKE2B 2bfd6b038f4691cd9b40128c48db89cdb0cdefd9c779cbae4f6a86246507849f8faf73e10c986d9a48d45d608b02cbb8486bd731ebe1c78be115fe65c5a97704 SHA512 b9cf42ff3cb066493a3a6e8d095f6af1c59815ebb19725374a75977294620fe825cdbc6650d3600d3f8525860c39d3580aa1d6ef773cd31fbc28d500d6c75246
DIST barnyard2-1.9-github.tar.gz 344672 BLAKE2B 720d55170eaf66d2fac7a73990f00dab6faf27c5fcfbcd2f3fa5bad8fa028880fc257a78b60660eaaa5cea3cd8ab04aea2ad173d2135757d7a1f93a80e049d06 SHA512 eb10e4333e862ba6d708e7956b86f9da5da8c52b2756724e821ac5f5ba064791cf84125942bf76e7c563f62c83558aff90219ccc694884e213f6571428849666
diff --git a/net-analyzer/barnyard2/barnyard2-1.13.ebuild b/net-analyzer/barnyard2/barnyard2-1.13.ebuild
new file mode 100644
index 000000000000..07f801df35f1
--- /dev/null
+++ b/net-analyzer/barnyard2/barnyard2-1.13.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Parser for Snort unified/unified2 files"
+HOMEPAGE="https://github.com/firnsy/barnyard2 https://firnsy.com/projects"
+SRC_URI="https://github.com/firnsy/barnyard2/archive/v2-${PV}.tar.gz -> ${P}-github.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug gre mpls mysql odbc postgres static"
+
+DEPEND="
+ net-libs/libpcap
+ mysql? ( dev-db/mysql-connector-c:0= )
+ odbc? ( dev-db/unixODBC )
+ postgres? ( dev-db/postgresql:* )
+"
+RDEPEND="
+ ${DEPEND}
+"
+DOCS="RELEASE.NOTES etc/barnyard2.conf doc/README* schemas/create_*"
+S="${WORKDIR}/${PN}-2-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.13-free.patch
+ "${FILESDIR}"/${PN}-1.13-pcap-1.9.0.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e "s:^#config interface:config interface:" \
+ "etc/barnyard2.conf" || die
+ sed -i -e "s:^output alert_fast:#output alert_fast:" \
+ "etc/barnyard2.conf" || die
+
+ AT_M4DIR="m4" eautoreconf
+}
+
+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
+}
+
+src_install () {
+ default
+
+ newconfd "${FILESDIR}/barnyard2.confd" barnyard2
+ newinitd "${FILESDIR}/barnyard2.initd" barnyard2
+
+ dodir /etc/barnyard2
+ keepdir /var/log/barnyard2
+ keepdir /var/log/snort/archive
+
+ 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-1.13-free.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-free.patch
new file mode 100644
index 000000000000..216fe480de7a
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2-1.13-free.patch
@@ -0,0 +1,11 @@
+--- a/src/output-plugins/spo_alert_unixsock.c
++++ b/src/output-plugins/spo_alert_unixsock.c
+@@ -56,6 +56,8 @@
+ #include "spo_alert_unixsock.h"
+ #include "barnyard2.h"
+
++#include <stdlib.h>
++
+ #define UNSOCK_FILE "barnyard2_alert"
+
+
diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch
new file mode 100644
index 000000000000..87aec539cae1
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch
@@ -0,0 +1,38 @@
+--- a/src/output-plugins/spo_alert_fwsam.c
++++ b/src/output-plugins/spo_alert_fwsam.c
+@@ -115,7 +115,7 @@
+ #include <sys/filio.h>
+ #endif
+
+-typedef int SOCKET;
++typedef int BY2_SOCKET;
+
+ #ifndef INVALID_SOCKET
+ #define INVALID_SOCKET -1
+@@ -961,7 +961,7 @@
+ FWsamPacket sampacket;
+ FWsamStation *station=NULL;
+ FWsamList *fwsamlist;
+- SOCKET stationsocket;
++ BY2_SOCKET stationsocket;
+ int i,len,deletestation,stationtry=0;
+ char *encbuf,*decbuf;
+ static unsigned long lastbsip[FWSAM_REPET_BLOCKS];
+@@ -1387,7 +1387,7 @@
+ void FWsamCheckOut(FWsamStation *station)
+ {
+ FWsamPacket sampacket;
+- SOCKET stationsocket;
++ BY2_SOCKET stationsocket;
+ int i,len;
+ char *encbuf,*decbuf;
+
+@@ -1538,7 +1538,7 @@
+ int i,len,stationok=TRUE;
+ FWsamPacket sampacket;
+ char *encbuf,*decbuf;
+- SOCKET stationsocket;
++ BY2_SOCKET stationsocket;
+
+
+ /* create a socket for the station */