summaryrefslogtreecommitdiff
path: root/net-analyzer/suricata/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-analyzer/suricata/files
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-analyzer/suricata/files')
-rw-r--r--net-analyzer/suricata/files/suricata-4.0.4_configure-lua-flags.patch16
-rw-r--r--net-analyzer/suricata/files/suricata-4.0.4_sockios.patch13
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.1-conf (renamed from net-analyzer/suricata/files/suricata-4.0.4-conf)2
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.1-init (renamed from net-analyzer/suricata/files/suricata-4.0.4-init)8
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch23
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.1_default-config.patch27
-rw-r--r--net-analyzer/suricata/files/suricata.service19
-rw-r--r--net-analyzer/suricata/files/suricata.tmpfiles1
8 files changed, 75 insertions, 34 deletions
diff --git a/net-analyzer/suricata/files/suricata-4.0.4_configure-lua-flags.patch b/net-analyzer/suricata/files/suricata-4.0.4_configure-lua-flags.patch
deleted file mode 100644
index bad66359afa1..000000000000
--- a/net-analyzer/suricata/files/suricata-4.0.4_configure-lua-flags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1749,11 +1749,11 @@
- # liblua
- AC_ARG_ENABLE(lua,
- AS_HELP_STRING([--enable-lua],[Enable Lua support]),
-- [ enable_lua="yes"],
-+ [],
- [ enable_lua="no"])
- AC_ARG_ENABLE(luajit,
- AS_HELP_STRING([--enable-luajit],[Enable Luajit support]),
-- [ enable_luajit="yes"],
-+ [],
- [ enable_luajit="no"])
- if test "$enable_lua" = "yes"; then
- if test "$enable_luajit" = "yes"; then
diff --git a/net-analyzer/suricata/files/suricata-4.0.4_sockios.patch b/net-analyzer/suricata/files/suricata-4.0.4_sockios.patch
deleted file mode 100644
index a341d9c159f1..000000000000
--- a/net-analyzer/suricata/files/suricata-4.0.4_sockios.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/source-af-packet.c.orig 2019-09-08 20:50:06.416466432 +0200
-+++ src/source-af-packet.c 2019-09-08 20:53:26.144471385 +0200
-@@ -70,6 +70,10 @@
-
- #ifdef HAVE_AF_PACKET
-
-+#ifdef HAVE_LINUX_SOCKIOS_H
-+#include <linux/sockios.h>
-+#endif
-+
- #if HAVE_SYS_IOCTL_H
- #include <sys/ioctl.h>
- #endif
diff --git a/net-analyzer/suricata/files/suricata-4.0.4-conf b/net-analyzer/suricata/files/suricata-5.0.1-conf
index 655b947fdd9b..7f22113dbf0d 100644
--- a/net-analyzer/suricata/files/suricata-4.0.4-conf
+++ b/net-analyzer/suricata/files/suricata-5.0.1-conf
@@ -37,7 +37,7 @@
# If you want to use ${SURICATA_DIR}/suricata.yaml and start the service with /etc/init.d/suricata
# then you can set:
-SURICATA_OPTS="-i eth0"
+SURICATA_OPTS="--af-packet"
# Log paths listed here will be created by the init script and will override the log path
# set in the yaml file, if present.
diff --git a/net-analyzer/suricata/files/suricata-4.0.4-init b/net-analyzer/suricata/files/suricata-5.0.1-init
index 1db8137f31a4..89f92803cedf 100644
--- a/net-analyzer/suricata/files/suricata-4.0.4-init
+++ b/net-analyzer/suricata/files/suricata-5.0.1-init
@@ -9,7 +9,7 @@ SURICATAID=$(shell_var "${SURICATA}")
if [ -n "${SURICATA}" ] && [ ${SVCNAME} != "suricata" ]; then
eval SURICATACONF=\$SURICATA_CONF_${SURICATAID}
[ ${#SURICATACONF} -eq 0 ] && SURICATACONF="${SURICATA_DIR}/suricata-${SURICATA}.yaml" || SURICATACONF="${SURICATA_DIR}/${SURICATACONF}"
- SURICATAPID="/var/run/suricata/suricata.${SURICATA}.pid"
+ SURICATAPID="/run/suricata/suricata.${SURICATA}.pid"
eval SURICATAOPTS=\$SURICATA_OPTS_${SURICATAID}
eval SURICATALOGPATH=\$SURICATA_LOG_FILE_${SURICATAID}
eval SURICATAUSER=\$SURICATA_USER_${SURICATAID}
@@ -17,7 +17,7 @@ if [ -n "${SURICATA}" ] && [ ${SVCNAME} != "suricata" ]; then
else
SURICATACONF=${SURICATA_CONF}
[ ${#SURICATACONF} -eq 0 ] && SURICATACONF="${SURICATA_DIR}/suricata.yaml" || SURICATACONF="${SURICATA_DIR}/${SURICATACONF}"
- SURICATAPID="/var/run/suricata/suricata.pid"
+ SURICATAPID="/run/suricata/suricata.pid"
SURICATAOPTS=${SURICATA_OPTS}
SURICATALOGPATH=${SURICATA_LOG_FILE}
SURICATAUSER=${SURICATA_USER}
@@ -43,8 +43,8 @@ depend() {
}
checkconfig() {
- if [ ! -d "/var/run/suricata" ] ; then
- checkpath -d /var/run/suricata
+ if [ ! -d "/run/suricata" ] ; then
+ checkpath -d /run/suricata
fi
if [ ${#SURICATALOGPATH} -gt 0 ]; then
SURICATALOGFILE=$( basename ${SURICATALOGPATH} )
diff --git a/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch b/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch
new file mode 100644
index 000000000000..5efce46f6d9f
--- /dev/null
+++ b/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch
@@ -0,0 +1,23 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2292,7 +2292,11 @@
+ fi
+
+ # Check for lz4
+-enable_liblz4="yes"
++AC_ARG_ENABLE(lz4,
++ AS_HELP_STRING([--enable-lz4], [Enable compressed pcap logging using liblz4]),
++ [enable_liblz4=$enableval],
++ [enable_liblz4=yes])
++if test "x$enable_liblz4" != "xno"; then
+ AC_CHECK_LIB(lz4, LZ4F_createCompressionContext, , enable_liblz4="no")
+
+ if test "$enable_liblz4" = "no"; then
+@@ -2306,6 +2310,7 @@
+ echo " yum install lz4-devel"
+ echo
+ fi
++fi
+
+ # get cache line size
+ AC_PATH_PROG(HAVE_GETCONF_CMD, getconf, "no")
diff --git a/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch b/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch
new file mode 100644
index 000000000000..ef1b1f63ad4f
--- /dev/null
+++ b/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch
@@ -0,0 +1,27 @@
+--- a/suricata.yaml.in
++++ b/suricata.yaml.in
+@@ -203,8 +203,9 @@
+ # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
+
+ # As of Suricata 5.0, version 2 of the eve dns output
+- # format is the default.
+- #version: 2
++ # format is the default - but the daemon produces a warning to that effect
++ # at start-up if this isn't explicitly set.
++ version: 2
+
+ # Enable/disable this logger. Default: enabled.
+ #enabled: yes
+@@ -978,9 +979,9 @@
+ ##
+
+ # Run suricata as user and group.
+-#run-as:
+-# user: suri
+-# group: suri
++run-as:
++ user: suricata
++ group: suricata
+
+ # Some logging module will use that name in event as identifier. The default
+ # value is the hostname
diff --git a/net-analyzer/suricata/files/suricata.service b/net-analyzer/suricata/files/suricata.service
new file mode 100644
index 000000000000..1fb056957ec5
--- /dev/null
+++ b/net-analyzer/suricata/files/suricata.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Suricata IDS/IDP daemon
+After=network.target
+Requires=network.target
+Documentation=man:suricata(8) man:suricatasc(8)
+Documentation=https://suricata.readthedocs.io/
+
+[Service]
+Environment=OPTIONS='-c /etc/suricata/suricata.yaml --af-packet'
+PIDFile=/run/suricata/suricata.pid
+ExecStart=/usr/bin/suricata --pidfile /run/suricata/suricata.pid $OPTIONS
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStop=/bin/kill $MAINPID
+PrivateTmp=yes
+ProtectHome=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-analyzer/suricata/files/suricata.tmpfiles b/net-analyzer/suricata/files/suricata.tmpfiles
new file mode 100644
index 000000000000..a6e784cc37c7
--- /dev/null
+++ b/net-analyzer/suricata/files/suricata.tmpfiles
@@ -0,0 +1 @@
+d /run/suricata - - - -