diff --git a/common/shlibs b/common/shlibs index 1a94f160cd..2b3b4f28e0 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3421,3 +3421,4 @@ libappmenu-gtk3-parser.so.0 appmenu-gtk3-module-0.7.1_1 libqhttpengine.so.1 qhttpengine-1.0.1_1 libqmdnsengine.so.0 qmdnsengine-0.1.0_1 libyang.so.0.16 libyang-0.16r3_1 +libhtp.so.2 suricata-4.1.2_2 diff --git a/srcpkgs/suricata/patches/configure.patch b/srcpkgs/suricata/patches/configure.patch new file mode 100644 index 0000000000..8bfea4da55 --- /dev/null +++ b/srcpkgs/suricata/patches/configure.patch @@ -0,0 +1,27 @@ +--- configure.orig 2019-02-22 22:09:50.521219706 +0100 ++++ configure 2019-02-22 22:23:32.663207196 +0100 +@@ -26682,24 +26681,0 @@ $as_echo "#define HAVE_RUST 1" >>confdef +- as_ac_File=`$as_echo "ac_cv_file_$srcdir/rust/vendor" | $as_tr_sh` +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/rust/vendor" >&5 +-$as_echo_n "checking for $srcdir/rust/vendor... " >&6; } +-if eval \${$as_ac_File+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- test "$cross_compiling" = yes && +- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +-if test -r "$srcdir/rust/vendor"; then +- eval "$as_ac_File=yes" +-else +- eval "$as_ac_File=no" +-fi +-fi +-eval ac_res=\$$as_ac_File +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-if eval test \"x\$"$as_ac_File"\" = x"yes"; then : +- +-cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$srcdir/rust/vendor" | $as_tr_cpp` 1 +-_ACEOF +-have_rust_vendor="yes" +-fi diff --git a/srcpkgs/suricata/template b/srcpkgs/suricata/template index 0d7fcaf030..effefde09a 100644 --- a/srcpkgs/suricata/template +++ b/srcpkgs/suricata/template @@ -1,27 +1,36 @@ # Template file for 'suricata' pkgname=suricata version=4.1.3 -revision=1 +revision=2 build_style=gnu-configure -configure_args="--disable-gccmarch-native" -hostmakedepends="pkg-config" -makedepends="libnet-devel libpcap-devel pcre-devel libyaml-devel libcap-ng-devel file-devel" -short_desc="Next Generation Intrusion Detection and Prevention Engine" +build_helper="$(vopt_if rust_support rust)" +configure_args="--disable-gccmarch-native $(vopt_enable rust) + $(vopt_enable lua) $(vopt_enable hiredis) --disable-suricata-update + --disable-static" +hostmakedepends="pkg-config $(vopt_if rust cargo)" +makedepends="libnet-devel libpcap-devel pcre-devel libyaml-devel libcap-ng-devel + liblz4-devel liblzma-devel file-devel jansson-devel nss-devel + $(vopt_if rust rust-std) $(vopt_if lua lua-devel) + $(vopt_if hiredis hiredis-devel)" +short_desc="Suricata is a network IDS, IPS and NSM engine" maintainer="Andrea Brancaleoni " -license="GPL-2" +license="GPL-2.0-only" homepage="https://suricata-ids.org/" -distfiles="https://www.openinfosecfoundation.org/download/$pkgname-$version.tar.gz" +distfiles="https://www.openinfosecfoundation.org/download/${pkgname}-${version}.tar.gz" checksum=6cda6c80b753ce36483c6be535358b971f3890b9aa27a58c2d2f7e89dd6c6aa0 -system_accounts="$pkgname" -conf_files="/etc/$pkgname/*.* /etc/$pkgname/rules/*" -nocross=y +build_options="lua rust hiredis" +build_options_default="hiredis" +desc_option_hiredis="Enable hiredis support" +desc_option_lua="Enable lua support" +desc_option_rust="Enable rust protocol parsers" -post_extract() { - $XBPS_FETCH_CMD https://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz - mkdir -p erules - tar xf emerging.rules.tar.gz -C erules -} +if [ -z "$CROSS_BUILD" ]; then + build_options_default+=" rust lua" +fi + +system_accounts="$pkgname" +conf_files="/etc/${pkgname}/*.* /etc/${pkgname}/rules/*" post_build() { sed -i 's|#run-as:|run-as:|g' $pkgname.yaml @@ -38,6 +47,4 @@ post_install() { vinstall threshold.config 644 etc/$pkgname vmkdir etc/$pkgname/rules vcopy rules/*.rules etc/$pkgname/rules - vcopy erules/rules/*.rules etc/$pkgname/rules - vlicense erules/rules/LICENSE emerging-rules.LICENSE }