summaryrefslogtreecommitdiff
path: root/net-analyzer/barnyard2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
commit51af5f0eb4cddbe6aa7953717873691d77aae9ff (patch)
tree1541525274162b033ebbc3ed38abaf335fbbd49a /net-analyzer/barnyard2
parent7014a5a3ea0feffab9701fdd6b64cc7667a985af (diff)
gentoo resync : 11.07.2019
Diffstat (limited to 'net-analyzer/barnyard2')
-rw-r--r--net-analyzer/barnyard2/Manifest8
-rw-r--r--net-analyzer/barnyard2/barnyard2-1.13.ebuild80
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-free.patch11
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch112
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch41
-rw-r--r--net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch38
-rw-r--r--net-analyzer/barnyard2/metadata.xml1
7 files changed, 290 insertions, 1 deletions
diff --git a/net-analyzer/barnyard2/Manifest b/net-analyzer/barnyard2/Manifest
index 98bc65c61791..c1cca42e98c5 100644
--- a/net-analyzer/barnyard2/Manifest
+++ b/net-analyzer/barnyard2/Manifest
@@ -1,5 +1,11 @@
+AUX barnyard2-1.13-free.patch 235 BLAKE2B 5c96aa8048a8445ce34c4bed29d60ae66b82cd7758e58fb34c2ec96d0b1d43404ee24a5cf7f5815bf1201adf621fa954096000c52aba56db919c20f335dd7749 SHA512 40aa34cb3b778e17a917ae1791ba640060e6cbd6fff1b3edb43f95d4b187a57e2c826abbb6709d71d6b30b73a07a117f2a27b19600a0129462d9d5106ab40285
+AUX barnyard2-1.13-libdir.patch 2976 BLAKE2B f940e9302aea3a55867c081de832dc4d2be6759c73152a9e204dad4987dd3975efe8dfe4e1d16ffd965d95205b5ef7eb178876e8bcc23dd3d6e5cb7c892bf84e SHA512 c87aec5043b7a589cc2c23464cadcb073d1a1da3c11491080b306f04191e7359942acf56fc42a85c7e52349ce5ae82bbc3dd26f886ae6f45191506b2cffdf8ce
+AUX barnyard2-1.13-odbc.patch 1453 BLAKE2B a238e0456227c82620a59b1b8b66d1e99a88baacf029a476851241cd5e795118d6b9cd3aada07013f67ee25b88568f63376c7a4eb64946321731daa1b1fb2f4f SHA512 34b2d744c933a007412536b95b7bd152425c37022c9d8c92b5e1f104baea60b831e2c0816a57e0a8f662975005a073b424408e6f5630432588add3a7c6ad28c9
+AUX barnyard2-1.13-pcap-1.9.0.patch 944 BLAKE2B 143d2cc61e447d5c493a3d503e7e2020432fea9c5292b5837f20ef4e9bd5ba306180280a2bc3e25bd98ceb3859328e94f4967e88fccc74f5d9ebdd3e01be0179 SHA512 23d39af20e6a062547f57c9c0a3614bd5b1d08622611a455e7faa6201d12a9ce26e6985d61cae44e3d85842a596b34c921fe07c5ab88caa2a1c48542bda1563c
AUX barnyard2.confd 1487 BLAKE2B 0eaae6d5c5bd249c5033e404712b14b10eacb2ea7f638872927bd4e2fe5d005225e257bd5971597ae62db5a1f10da2d092e086eb60fb6ea3b552801f992d8646 SHA512 25fb327829da9f23a100e69310dd57c1f99404dd9923f2ef73d90635013ca68678122ee5f45f2e267c7b2f6264fd8e57998b1730d4ee02d3c2f61f1fe72d1f5f
AUX barnyard2.initd 680 BLAKE2B 3cd613eb91029876a98900f38bde0cfaca15e47d66d9900a109797bf698ec61f4430cb4bed266c6875ec2a4bfa41a285e5c068b2f9b1f11b16394b9bba6d889b SHA512 32370ac32444e44df517dcc86ae59c548311ab02e49d2cf81d391e111334335968ee1d639c8a36a937dfdaa6a83f5dc33fb9f44ab3d7b822ace28985eabe3423
+DIST barnyard2-1.13-github.tar.gz 435017 BLAKE2B 2bfd6b038f4691cd9b40128c48db89cdb0cdefd9c779cbae4f6a86246507849f8faf73e10c986d9a48d45d608b02cbb8486bd731ebe1c78be115fe65c5a97704 SHA512 b9cf42ff3cb066493a3a6e8d095f6af1c59815ebb19725374a75977294620fe825cdbc6650d3600d3f8525860c39d3580aa1d6ef773cd31fbc28d500d6c75246
DIST barnyard2-1.9-github.tar.gz 344672 BLAKE2B 720d55170eaf66d2fac7a73990f00dab6faf27c5fcfbcd2f3fa5bad8fa028880fc257a78b60660eaaa5cea3cd8ab04aea2ad173d2135757d7a1f93a80e049d06 SHA512 eb10e4333e862ba6d708e7956b86f9da5da8c52b2756724e821ac5f5ba064791cf84125942bf76e7c563f62c83558aff90219ccc694884e213f6571428849666
+EBUILD barnyard2-1.13.ebuild 1881 BLAKE2B d0416ca8952ffbe4bba4cde68c7abb6ebf5207adbf356d154e21e665594c5bef305f96d1589a8913d999c4f1e422221163772bbf8aa24b8eeb9d02067f567c97 SHA512 ee78d77e42cdaa0899a5d85b837bb6279aa1e927faff82a110a18542e9d8af57489e71a0d408b06d89ddc35273e0988389d1d5c7aa30f4d35f114b9f7109c784
EBUILD barnyard2-1.9-r2.ebuild 1720 BLAKE2B b05ec48d30fc48ecd74d814790ec61df13c7e7d2b98e389859dfdf4a05642e7fd5bb9f47d3b9b8a587f9a6a154657cbbb925af2e493cb951e889239e3a4c28f0 SHA512 0d0967ce5498054f075d163e407d1d04741c2329cee2ab205e1d4990e5918ec63f4948e75456e8b9ae628e9206a95b0a3602473074d9ff2be3313788b6302fcd
-MISC metadata.xml 1266 BLAKE2B 00bb6b8c75617632fb4e89059005bcaf90e6f637a1227f6717a3d3d3f5957b17eee0936764ae5f74b37a76fd3681dfd87feed8858170ff8dc56a1683549bd028 SHA512 fcc818ef5d01ef3887994a1426e3ded3df4c8239e9b68edc6be943392252a072a42cd98dacb119fc568097e72d8dff0909bc3241e81314194290b40ae0f56b27
+MISC metadata.xml 1369 BLAKE2B 90fc4c66290d2b82184e109a0affc8550b38b4f1781215531496bef639150b5e610feca7182335c263db764f94c248fe16448025835b3f2bb6e92b1b5703b13a SHA512 3fcbf3709f433993d2fac432ff9175547afbcc646efa98dc49f1ffc8ea5b5f5bf3872a557994af885cd1d2106358bfbd2a8a08361218c7a87f07f46ce61746ce
diff --git a/net-analyzer/barnyard2/barnyard2-1.13.ebuild b/net-analyzer/barnyard2/barnyard2-1.13.ebuild
new file mode 100644
index 000000000000..7214129d7ec1
--- /dev/null
+++ b/net-analyzer/barnyard2/barnyard2-1.13.ebuild
@@ -0,0 +1,80 @@
+# 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 sguil"
+
+DEPEND="
+ net-libs/libpcap
+ mysql? ( dev-db/mysql-connector-c:0= )
+ odbc? ( dev-db/unixODBC )
+ postgres? ( dev-db/postgresql:* )
+ sguil? ( dev-lang/tcl:* )
+"
+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-libdir.patch
+ "${FILESDIR}"/${PN}-1.13-odbc.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 debug) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_with mysql) \
+ $(use_with odbc) \
+ $(use_with postgres postgresql) \
+ $(use_with sguil tcl) \
+ --disable-aruba \
+ --disable-ipv6 \
+ --disable-mysql-ssl-support \
+ --disable-prelude \
+ --disable-static \
+ --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-libdir.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch
new file mode 100644
index 000000000000..5d3c7e37aa38
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch
@@ -0,0 +1,112 @@
+--- a/configure.in
++++ b/configure.in
+@@ -570,53 +570,7 @@
+ fi
+ done
+
+- for i in $mysql_lib_directory; do
+- if test -z "$MYSQL_LIB_DIR"; then
+- str="$i/libmysqlclient.*"
+- for j in `echo $str`; do
+- if test -r $j; then
+- MYSQL_LIB_DIR=$i
+- break 2
+- fi
+- done
+- fi
+- if test -z "$MYSQL_LIB_DIR"; then
+- str="$i/lib/libmysqlclient.*"
+- for j in `echo $str`; do
+- if test -r "$j"; then
+- MYSQL_LIB_DIR="$i/lib"
+- break 2
+- fi
+- done
+- fi
+- if test -z "$MYSQL_LIB_DIR"; then
+- str="$i/mysql/libmysqlclient.*"
+- for j in `echo $str`; do
+- if test -r "$j"; then
+- MYSQL_LIB_DIR="$i/mysql"
+- break 2
+- fi
+- done
+- fi
+- if test -z "$MYSQL_LIB_DIR"; then
+- str="$i/mysql/lib/libmysqlclient.*"
+- for j in `echo $str`; do
+- if test -r "$j"; then
+- MYSQL_LIB_DIR="$i/mysql/lib"
+- break 2
+- fi
+- done
+- fi
+- if test -z "$MYSQL_LIB_DIR"; then
+- str="$i/lib/mysql/libmysqlclient.*"
+- for j in `echo $str`; do
+- if test -r "$j"; then
+- MYSQL_LIB_DIR="$i/lib/mysql"
+- break 2
+- fi
+- done
+- fi
+- done
++ AC_CHECK_LIB([mysqlclient],[mysql_query],[MYSQL_LIB_DIR="$libdir"])
+
+ if test -z "$MYSQL_INC_DIR"; then
+ if test "x$mysql_fail" != "xno"; then
+@@ -760,13 +714,7 @@
+ fi
+ else
+
+- str="$ODBC_DIR/lib/libodbc.*"
+- for j in `echo $str`; do
+- if test -r "$j"; then
+- ODBC_LIB_DIR="$ODBC_DIR/lib"
+- ODBC_LIB="odbc"
+- fi
+- done
++ AC_CHECK_LIB([odbc],[SQLAllocHandle],[ODBC_LIB_DIR="$libdir";ODBC_LIB="odbc"])
+
+ dnl if test -z "$ODBC_LIB_DIR"; then
+ dnl str="$ODBC_DIR/lib/libiodbc.*"
+@@ -786,7 +734,6 @@
+ fi
+ else
+ AC_MSG_RESULT(yes)
+- LDFLAGS="${LDFLAGS} -L${ODBC_LIB_DIR}"
+ CPPFLAGS="${CPPFLAGS} -I${ODBC_INC_DIR} -DENABLE_ODBC"
+ LIBS="${LIBS} -l$ODBC_LIB"
+ fi
+@@ -863,21 +810,7 @@
+ fi
+
+
+- if test -z "$POSTGRESQL_DIR"; then
+- for dir in $postgresql_directory; do
+- for i in "lib" "lib/pgsql"; do
+- str="$dir/$i/libpq.*"
+- for j in `echo $str`; do
+- if test -r $j; then
+- POSTGRESQL_LIB_DIR="$dir/$i"
+- break 2
+- fi
+- done
+- done
+- done
+- else
+- POSTGRESQL_LIB_DIR="$POSTGRESQL_DIR/lib"
+- fi
++ AC_CHECK_LIB([pq],[PQexec],[POSTGRESQL_LIB_DIR="$libdir"])
+
+ if test -z "$POSTGRESQL_LIB_DIR"; then
+ if test "$postgresql_fail" != "no"; then
+@@ -892,7 +825,7 @@
+ CPPFLAGS="${CPPFLAGS} -I${POSTGRESQL_INC_DIR} -DENABLE_POSTGRESQL"
+ AC_CHECK_LIB(pq, PQexec,, PQLIB="no")
+ if test "x$PQLIB" != "xno"; then
+- LIBS="${LIBS} -lpq"
++ :
+ else
+ echo
+ echo " ERROR! libpq (postgresql) not found!"
diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch
new file mode 100644
index 000000000000..a7d77ee914fa
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch
@@ -0,0 +1,41 @@
+--- a/src/output-plugins/spo_database_cache.c
++++ b/src/output-plugins/spo_database_cache.c
+@@ -1202,10 +1202,10 @@
+
+
+
+-#if (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL))
++#if (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC))
+ u_int32_t curr_row = 0;
+ u_int32_t queryColCount =0;
+-#endif /* (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL)) */
++#endif /* (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC)) */
+
+
+ #ifdef ENABLE_ODBC
+--- a/src/output-plugins/spo_database.c
++++ b/src/output-plugins/spo_database.c
+@@ -3443,9 +3443,9 @@
+ #endif
+
+
+-#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL)
++#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC)
+ int result = 0;
+-#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) */
++#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) */
+
+
+ if( (query == NULL) ||
+@@ -3668,9 +3668,9 @@
+ int Select(char * query, DatabaseData * data,u_int32_t *rval)
+ {
+
+-#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL)
++#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC)
+ int result = 0;
+-#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) */
++#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) */
+
+ if( (query == NULL) ||
+ (data == NULL) ||
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 */
diff --git a/net-analyzer/barnyard2/metadata.xml b/net-analyzer/barnyard2/metadata.xml
index c97636709d30..d6bf89e69a2c 100644
--- a/net-analyzer/barnyard2/metadata.xml
+++ b/net-analyzer/barnyard2/metadata.xml
@@ -28,5 +28,6 @@
<use>
<flag name="gre">Enable GRE support</flag>
<flag name="mpls">Enable support for mpls networks</flag>
+ <flag name="sguil">Enable sguil (The Analyst Console for Network Security Monitoring) support</flag>
</use>
</pkgmetadata>