New package: bro-2.5.4

This commit is contained in:
Andrew Benson 2018-06-13 11:37:11 -05:00 committed by maxice8
parent b0e32a27cd
commit fed79332fc
5 changed files with 134 additions and 0 deletions

1
srcpkgs/binpac Symbolic link
View File

@ -0,0 +1 @@
bro

1
srcpkgs/binpac-devel Symbolic link
View File

@ -0,0 +1 @@
bro

10
srcpkgs/bro/files/bro/run Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
BROLOGDIR="/var/log/bro"
[ -r conf ] && . ./conf
[ -d ${BROLOGDIR} ] || mkdir -p ${BROLOGDIR}
cd /var/log/bro
exec bro -i ${INTF:=eth0} ${BROPOLICY}

View File

@ -0,0 +1,74 @@
https://github.com/danielguerra69/docker-bro-1
--- aux/binpac/lib/binpac.h.in.orig
+++ aux/binpac/lib/binpac.h.in
@@ -4,6 +4,7 @@
#define binpac_h
#include <sys/param.h>
+#include <sys/types.h>
#cmakedefine HOST_BIGENDIAN
#ifdef HOST_BIGENDIAN
--- src/OSFinger.h.orig
+++ src/OSFinger.h
@@ -166,3 +166,57 @@
#define MATCHFUZZY 0x2
#endif
+
+// For musl-libc
+#ifndef TCPOPT_EOL
+# define TCPOPT_EOL 0
+#endif
+
+#ifndef TCPOPT_NOP
+# define TCPOPT_NOP 1
+#endif
+
+#ifndef TCPOPT_MAXSEG
+# define TCPOPT_MAXSEG 2
+#endif
+
+#ifndef TCPOLEN_MAXSEG
+# define TCPOLEN_MAXSEG 4
+#endif
+
+#ifndef TCPOPT_WINDOW
+# define TCPOPT_WINDOW 3
+#endif
+
+#ifndef TCPOLEN_WINDOW
+# define TCPOLEN_WINDOW 3
+#endif
+
+#ifndef TCPOPT_SACK_PERMITTED
+# define TCPOPT_SACK_PERMITTED 4 /* Experimental */
+#endif
+
+#ifndef TCPOLEN_SACK_PERMITTED
+# define TCPOLEN_SACK_PERMITTED 2
+#endif
+
+#ifndef TCPOPT_SACK
+# define TCPOPT_SACK 5 /* Experimental */
+#endif
+
+#ifndef TCPOPT_TIMESTAMP
+# define TCPOPT_TIMESTAMP 8
+#endif
+
+#ifndef TCPOLEN_TIMESTAMP
+# define TCPOLEN_TIMESTAMP 10
+#endif
+
+#ifndef TCPOLEN_TSTAMP_APPA
+# define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
+#endif
+
+#ifndef TCPOPT_TSTAMP_HDR
+# define TCPOPT_TSTAMP_HDR \
+ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+#endif

48
srcpkgs/bro/template Normal file
View File

@ -0,0 +1,48 @@
# Template file for 'bro'
pkgname=bro
version=2.5.4
revision=1
build_style=cmake
nocross="Needs to build part of itself to run, can't be built separately yet."
hostmakedepends="flex pkg-config python3"
makedepends="bind-devel geoip-devel libpcap-devel libressl-devel jemalloc-devel"
short_desc="Advanced framework for network traffic analysis"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="BSD-3-Clause"
homepage="https://www.bro.org"
distfiles="https://www.bro.org/downloads/bro-${version}.tar.gz"
checksum=80daea433fa654f2602cf67b19b9121ff6ad57761bad73cc29020c4f490c5f1f
case "$XBPS_TARGET_MACHINE" in
*-musl)
makedepends+=" musl-fts-devel"
;;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
sed -i '/set(broxygen/i link_libraries("-lfts")' src/broxygen/CMakeLists.txt
;;
esac
}
post_install() {
vsv bro
vlicense COPYING
}
binpac_package() {
short_desc+=" - protocol parser compiler"
pkg_install() {
vmove /usr/bin/binpac
}
}
binpac-devel_package() {
short_desc+=" - protocol parser compiler library"
pkg_install() {
vmove /usr/include
vmove "/usr/lib/*.a"
}
}