summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2019-12-18 14:20:18 +0000
committerMarek Szuba <marecki@gentoo.org>2019-12-18 14:21:52 +0000
commiteab781daa429d8d9cb5cd1a1d8baefcae4afbffc (patch)
treeb1b9407f6e20e710775179d251851b7f67bb37fe /net-analyzer
parentnet-analyzer/suricata: bump to 5.0.1 (diff)
downloadgentoo-eab781daa429d8d9cb5cd1a1d8baefcae4afbffc.tar.gz
gentoo-eab781daa429d8d9cb5cd1a1d8baefcae4afbffc.tar.bz2
gentoo-eab781daa429d8d9cb5cd1a1d8baefcae4afbffc.zip
net-analyzer/suricata: remove old
Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/suricata/Manifest1
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.0-conf62
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.0-init147
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.0_configure-lua-flags.patch16
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.0_configure-no-lz4-automagic.patch23
-rw-r--r--net-analyzer/suricata/files/suricata-5.0.0_default-config.patch61
-rw-r--r--net-analyzer/suricata/metadata.xml2
-rw-r--r--net-analyzer/suricata/suricata-5.0.0.ebuild185
8 files changed, 0 insertions, 497 deletions
diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest
index 9247b853f302..ac5ea56c85b3 100644
--- a/net-analyzer/suricata/Manifest
+++ b/net-analyzer/suricata/Manifest
@@ -1,2 +1 @@
-DIST suricata-5.0.0.tar.gz 23689051 BLAKE2B 701625d50dacbeb846d7ea1c3aad3980969c1c0124c007d843353fe25b7e579378d2cd125db4660e33fff1f8cf20eac4bbafe280ba6ff31f988fb6c42b29b6aa SHA512 0dc8941fdf29d615531eeda6f6076052cca79fda6dda3c96300c08b343a64a1700fd23dd83a03507009ab7c9b19c91b65ee65e704f55ddee17764b71e9e2911e
DIST suricata-5.0.1.tar.gz 23721536 BLAKE2B 529837e8e4d6c33d2093df8208bf03519e0d60deef92eadf9d0a44b7416eae2f900b2f72349815acb86d9bdd9d4253bbc5d7c4c1a34157f544982b0788291624 SHA512 db0797a7992abf0ddf170cb603fdac06b0ff92278bb91343860bccbbe029ea0e83131dfb9805ca44bcbbe3925502119259e350a17e94209b21d1f8b610d965a6
diff --git a/net-analyzer/suricata/files/suricata-5.0.0-conf b/net-analyzer/suricata/files/suricata-5.0.0-conf
deleted file mode 100644
index 655b947fdd9b..000000000000
--- a/net-analyzer/suricata/files/suricata-5.0.0-conf
+++ /dev/null
@@ -1,62 +0,0 @@
-# Config file for /etc/init.d/suricata*
-
-# Where config files are stored. Default:
-
-# SURICATA_DIR="/etc/suricata"
-
-# Pass options to each suricata service.
-#
-# You can launch more than one service at the same time with different options.
-# This can be useful in a multi-queue gateway, for example.
-# You can expand on the Suricata inline example found at:
-# http://suricata.readthedocs.io/en/latest/setting-up-ipsinline-for-linux.html
-# Instead of configuring iptables to send traffic to just one queue, you can configure it to "load balance"
-# on several queues. You can then have a Suricata instance processing traffic for each queue.
-# This should help improve performance on the gateway/firewall.
-#
-# Suppose you configured iptables to use queues 0 and 1 named q0 and q1. You can now do the following:
-# ln -s /etc/init.d/suricata /etc/init.d/suricata.q0
-# ln -s /etc/init.d/suricata /etc/init.d/suricata.q1
-# cp /etc/suricata/suricata.yaml /etc/suricata/suricata-q0.yaml
-# cp /etc/suricata/suricata.yaml /etc/suricata/suricata-q1.yaml
-#
-# Edit both suricata-q{0,1}.yaml files and set values accordingly.
-# You can override these yaml config file names with SURICATA_CONF* below (optional).
-# This allows you to use the same yaml config file for multiple instances as long as you override
-# sensible options such as the log file paths.
-# SURICATA_CONF_q0="suricata-queues.yaml"
-# SURICATA_CONF_q1="suricata-queues.yaml"
-# SURICATA_CONF="suricata.yaml"
-
-# You can define the options here:
-# NB: avoid using -l, -c, --user, --group and setting logging.outputs.1.file.filename as the init script will try to set them for you.
-
-# SURICATA_OPTS_q0="-q 0"
-# SURICATA_OPTS_q1="-q 1"
-
-# 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"
-
-# Log paths listed here will be created by the init script and will override the log path
-# set in the yaml file, if present.
-# SURICATA_LOG_FILE_q0="/var/log/suricata/q0/suricata.log"
-# SURICATA_LOG_FILE_q1="/var/log/suricata/q1/suricata.log"
-# SURICATA_LOG_FILE="/var/log/suricata/suricata.log"
-
-# Run as user/group.
-# Do not define if you want to run as root or as the user defined in the yaml config file (run-as).
-# The ebuild should have created the dedicated user/group suricata:suricata for you to specify here below.
-# SURICATA_USER_q0="suricata"
-# SURICATA_GROUP_q0="suricata"
-# SURICATA_USER_q1="suricata"
-# SURICATA_GROUP_q1="suricata"
-# SURICATA_USER="suricata"
-# SURICATA_GROUP="suricata"
-
-# Suricata processes can take a long time to shut down.
-# If necessary, adjust timeout in seconds to be used when calling stop from the init script.
-# Examples:
-# SURICATA_MAX_WAIT_ON_STOP="300"
-# SURICATA_MAX_WAIT_ON_STOP="SIGTERM/30"
diff --git a/net-analyzer/suricata/files/suricata-5.0.0-init b/net-analyzer/suricata/files/suricata-5.0.0-init
deleted file mode 100644
index 1db8137f31a4..000000000000
--- a/net-analyzer/suricata/files/suricata-5.0.0-init
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-SURICATA_BIN=/usr/bin/suricata
-SURICATA_DIR=${SURICATA_DIR:-/etc/suricata}
-SURICATA=${SVCNAME#*.}
-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"
- eval SURICATAOPTS=\$SURICATA_OPTS_${SURICATAID}
- eval SURICATALOGPATH=\$SURICATA_LOG_FILE_${SURICATAID}
- eval SURICATAUSER=\$SURICATA_USER_${SURICATAID}
- eval SURICATAGROUP=\$SURICATA_GROUP_${SURICATAID}
-else
- SURICATACONF=${SURICATA_CONF}
- [ ${#SURICATACONF} -eq 0 ] && SURICATACONF="${SURICATA_DIR}/suricata.yaml" || SURICATACONF="${SURICATA_DIR}/${SURICATACONF}"
- SURICATAPID="/var/run/suricata/suricata.pid"
- SURICATAOPTS=${SURICATA_OPTS}
- SURICATALOGPATH=${SURICATA_LOG_FILE}
- SURICATAUSER=${SURICATA_USER}
- SURICATAGROUP=${SURICATA_GROUP}
-fi
-SURICATAUSER=${SURICATAUSER:-${SURICATA_USER}}
-SURICATAGROUP=${SURICATAGROUP:-${SURICATA_GROUP}}
-[ -e ${SURICATACONF} ] && SURICATAOPTS="-c ${SURICATACONF} ${SURICATAOPTS}"
-[[ -z "${SURICATA_MAX_WAIT_ON_STOP// }" ]] || SURICATA_RETRY="--retry ${SURICATA_MAX_WAIT_ON_STOP}"
-
-description="Suricata IDS/IPS"
-extra_commands="checkconfig dump"
-description_checkconfig="Check config for ${SVCNAME}"
-description_dump="List all config values that can be used with --set"
-extra_started_commands="reload relog"
-description_reload="Live rule and config reload"
-description_relog="Close and re-open all log files"
-
-depend() {
- need net
- after mysql
- after postgresql
-}
-
-checkconfig() {
- if [ ! -d "/var/run/suricata" ] ; then
- checkpath -d /var/run/suricata
- fi
- if [ ${#SURICATALOGPATH} -gt 0 ]; then
- SURICATALOGFILE=$( basename ${SURICATALOGPATH} )
- SURICATALOGFILE=${SURICATALOGFILE:-suricata.log}
- SURICATALOGPATH=$( dirname ${SURICATALOGPATH} )
- if [ ! -d "${SURICATALOGPATH}" ] ; then
- checkpath -d "${SURICATALOGPATH}"
- fi
- if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ] && [ -e "${SURICATALOGPATH}" ]; then
- chown ${SURICATAUSER}:${SURICATAGROUP} "${SURICATALOGPATH}" || return 1
- chown ${SURICATAUSER}:${SURICATAGROUP} "${SURICATALOGPATH}"/* >/dev/null 2>&1 3>&1
- fi
- SURICATAOPTS="${SURICATAOPTS} --set logging.outputs.1.file.filename=${SURICATALOGPATH}/${SURICATALOGFILE}"
- SURICATALOGPATH="-l ${SURICATALOGPATH}"
- fi
- if [ ! -e ${SURICATACONF} ] ; then
- einfo "The configuration file ${SURICATACONF} was not found."
- einfo "If this is OK then make sure you set enough options for ${SVCNAME} in /etc/conf.d/suricata."
- einfo "Take a look at the suricata arguments --set and --dump-config."
- fi
- if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then
- einfo "${SVCNAME} will run as user ${SURICATAUSER}:${SURICATAGROUP}."
- SURICATAOPTS="${SURICATAOPTS} --user=${SURICATAUSER} --group=${SURICATAGROUP}"
- fi
-}
-
-initpidinfo() {
- [ -e ${SURICATAPID} ] && SUR_PID="$(cat ${SURICATAPID})"
- if [ ${#SUR_PID} -gt 0 ]; then
- SUR_PID_CHECK="$(ps -eo pid | grep -c ${SUR_PID})"
- SUR_USER="$(ps -p ${SUR_PID} --no-headers -o user)"
- fi
-}
-
-checkpidinfo() {
- initpidinfo
- if [ ! -e ${SURICATAPID} ]; then
- eerror "${SVCNAME} isn't running"
- return 1
- elif [ ${#SUR_PID} -eq 0 ] || [ $((SUR_PID_CHECK)) -ne 1 ]; then
- eerror "Could not determine PID of ${SVCNAME}! Did the service crash?"
- return 1
- elif [ ${#SUR_USER} -eq 0 ]; then
- eerror "Unable to determine user running ${SVCNAME}!"
- return 1
- elif [ "x${SUR_USER}" != "xroot" ]; then
- ewarn "${SVCNAME} may need to be running as root or as a priviledged user for the extra commands reload and relog to work."
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --exec ${SURICATA_BIN} \
- -- --pidfile ${SURICATAPID} -D ${SURICATAOPTS} ${SURICATALOGPATH} >/dev/null 2>&1
- local SUR_EXIT=$?
- if [ $((SUR_EXIT)) -ne 0 ]; then
- einfo "Could not start ${SURICATA_BIN} with:"
- einfo "--pidfile ${SURICATAPID} -D ${SURICATAOPTS} ${SURICATALOGPATH}"
- einfo "Exit code ${SUR_EXIT}"
- fi
- eend ${SUR_EXIT}
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop ${SURICATA_RETRY} --quiet --pidfile ${SURICATAPID} >/dev/null 2>&1
- eend $?
-}
-
-reload() {
- checkpidinfo || return 1
- checkconfig || return 1
- ebegin "Sending USR2 signal to ${SVCNAME} to perform a live rule and config reload."
- if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then
- start-stop-daemon --user ${SURICATAUSER} --group ${SURICATAGROUP} --signal USR2 --pidfile ${SURICATAPID}
- else
- start-stop-daemon --signal USR2 --pidfile ${SURICATAPID}
- fi
- eend $?
-}
-
-relog() {
- checkpidinfo || return 1
- checkconfig || return 1
- ebegin "Sending HUP signal to ${SVCNAME} to close and re-open all log files."
- if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then
- start-stop-daemon --user ${SURICATAUSER} --group ${SURICATAGROUP} --signal HUP --pidfile ${SURICATAPID}
- else
- start-stop-daemon --signal HUP --pidfile ${SURICATAPID}
- fi
- eend $?
-}
-
-dump() {
- checkconfig || return 1
- ebegin "Dumping ${SVCNAME} config values and quitting."
- ${SURICATA_BIN} --dump-config --pidfile ${SURICATAPID} ${SURICATAOPTS} ${SURICATALOGPATH}
- eend $?
-}
diff --git a/net-analyzer/suricata/files/suricata-5.0.0_configure-lua-flags.patch b/net-analyzer/suricata/files/suricata-5.0.0_configure-lua-flags.patch
deleted file mode 100644
index be956fd94d40..000000000000
--- a/net-analyzer/suricata/files/suricata-5.0.0_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="$enableval"],
-+ [],
- [ enable_lua="no"])
- AC_ARG_ENABLE(luajit,
- AS_HELP_STRING([--enable-luajit],[Enable Luajit support]),
-- [ enable_luajit="$enableval"],
-+ [],
- [ enable_luajit="no"])
- if test "$enable_lua" = "yes"; then
- if test "$enable_luajit" = "yes"; then
diff --git a/net-analyzer/suricata/files/suricata-5.0.0_configure-no-lz4-automagic.patch b/net-analyzer/suricata/files/suricata-5.0.0_configure-no-lz4-automagic.patch
deleted file mode 100644
index 5efce46f6d9f..000000000000
--- a/net-analyzer/suricata/files/suricata-5.0.0_configure-no-lz4-automagic.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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.0_default-config.patch b/net-analyzer/suricata/files/suricata-5.0.0_default-config.patch
deleted file mode 100644
index 07a45c9a5747..000000000000
--- a/net-analyzer/suricata/files/suricata-5.0.0_default-config.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- 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
-@@ -1806,16 +1807,28 @@
- hashmode: hash5tuplesorted
-
- ##
--## Configure Suricata to load Suricata-Update managed rules.
--##
--## If this section is completely commented out move down to the "Advanced rule
--## file configuration".
-+## Configure Suricata to load default rules it comes with.
- ##
-
- default-rule-path: @e_defaultruledir@
-
- rule-files:
-- - suricata.rules
-+ - /etc/suricata/rules/app-layer-events.rules
-+ - /etc/suricata/rules/decoder-events.rules
-+ - /etc/suricata/rules/dhcp-events.rules
-+ - /etc/suricata/rules/dnp3-events.rules
-+ - /etc/suricata/rules/dns-events.rules
-+ - /etc/suricata/rules/files.rules
-+ - /etc/suricata/rules/http-events.rules
-+ - /etc/suricata/rules/ipsec-events.rules
-+ - /etc/suricata/rules/kerberos-events.rules
-+ - /etc/suricata/rules/modbus-events.rules
-+ - /etc/suricata/rules/nfs-events.rules
-+ - /etc/suricata/rules/ntp-events.rules
-+ - /etc/suricata/rules/smb-events.rules
-+ - /etc/suricata/rules/smtp-events.rules
-+ - /etc/suricata/rules/stream-events.rules
-+ - /etc/suricata/rules/tls-events.rules
-
- ##
- ## Auxiliary configuration files.
diff --git a/net-analyzer/suricata/metadata.xml b/net-analyzer/suricata/metadata.xml
index cc49d0aa09f5..1486882b1dd3 100644
--- a/net-analyzer/suricata/metadata.xml
+++ b/net-analyzer/suricata/metadata.xml
@@ -20,7 +20,5 @@
<flag name="nflog">Enable libnetfilter_log support</flag>
<flag name="nfqueue">Enable NFQUEUE support for inline IDP</flag>
<flag name="redis">Enable Redis support</flag>
- <flag name="rules">Install default ruleset</flag>
- <flag name="tools">Install suricatactl, suricatasc and suricata-update</flag>
</use>
</pkgmetadata>
diff --git a/net-analyzer/suricata/suricata-5.0.0.ebuild b/net-analyzer/suricata/suricata-5.0.0.ebuild
deleted file mode 100644
index 9701e036e6a1..000000000000
--- a/net-analyzer/suricata/suricata-5.0.0.ebuild
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit autotools linux-info python-single-r1 systemd
-
-DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
-SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis +rules systemd test tools"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( lua luajit )
- bpf? ( af-packet )
- tools? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="acct-group/suricata
- acct-user/suricata
- dev-libs/jansson
- dev-libs/libpcre
- dev-libs/libyaml
- net-libs/libnet:*
- net-libs/libnfnetlink
- dev-libs/nspr
- dev-libs/nss
- >=net-libs/libhtp-0.5.31
- net-libs/libpcap
- sys-apps/file
- sys-libs/libcap-ng
- bpf? ( >=dev-libs/libbpf-0.0.5 )
- cuda? ( dev-util/nvidia-cuda-toolkit )
- geoip? ( dev-libs/libmaxminddb )
- logrotate? ( app-admin/logrotate )
- lua? ( dev-lang/lua:* )
- luajit? ( dev-lang/luajit:* )
- lz4? ( app-arch/lz4 )
- nflog? ( net-libs/libnetfilter_log )
- nfqueue? ( net-libs/libnetfilter_queue )
- redis? ( dev-libs/hiredis )
- tools? ( dev-python/pyyaml[${PYTHON_USEDEP}] )"
-DEPEND="${CDEPEND}
- dev-lang/rust"
-# Not confirmed that it works yet
-# test? ( dev-util/coccinelle )"
-RDEPEND="${CDEPEND}
- tools? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.0.0_configure-lua-flags.patch"
- "${FILESDIR}/${PN}-5.0.0_configure-no-lz4-automagic.patch"
- "${FILESDIR}/${PN}-5.0.0_default-config.patch"
-)
-
-pkg_pretend() {
- if use bpf && use kernel_linux; then
- if kernel_is -lt 4 15; then
- ewarn "Kernel 4.15 or newer is necessary to use all XDP features like the CPU redirect map"
- fi
-
- CONFIG_CHECK="~XDP_SOCKETS"
- ERROR_XDP_SOCKETS="CONFIG_XDP_SOCKETS is not set, making it impossible for Suricata will to load XDP programs. "
- ERROR_XDP_SOCKETS+="Other eBPF features should work normally."
- check_extra_config
- fi
-}
-
-src_prepare() {
- default
- sed -ie 's/docdir =.*/docdir = ${datarootdir}\/doc\/'${PF}'\//' "${S}/doc/Makefile.am"
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- "--localstatedir=/var" \
- "--enable-non-bundled-htp" \
- "--enable-gccmarch-native=no" \
- $(use_enable af-packet) \
- $(use_enable bpf ebpf) \
- $(use_enable control-socket unix-socket) \
- $(use_enable cuda) \
- $(use_enable detection) \
- $(use_enable geoip) \
- $(use_enable hardened gccprotect) \
- $(use_enable hardened pie) \
- $(use_enable lua) \
- $(use_enable luajit) \
- $(use_enable lz4) \
- $(use_enable nflog) \
- $(use_enable nfqueue) \
- $(use_enable redis hiredis) \
- $(use_enable test coccinelle) \
- $(use_enable test unittests) \
- $(use_enable tools python)
- )
-
- if use debug; then
- myeconfargs+=( $(use_enable debug) )
- # so we can get a backtrace according to "reporting bugs" on upstream web site
- CFLAGS="-ggdb -O0" econf ${myeconfargs[@]}
- else
- econf ${myeconfargs[@]}
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- if use bpf; then
- rm -f ebpf/Makefile.{am,in}
- dodoc -r ebpf/
- keepdir /usr/libexec/suricata/ebpf
- fi
-
- insinto "/etc/${PN}"
- doins etc/{classification,reference}.config threshold.config suricata.yaml
-
- if use rules; then
- insinto "/etc/${PN}/rules"
- doins rules/*.rules
- fi
-
- keepdir "/var/lib/${PN}"
- keepdir "/var/log/${PN}"
-
- fowners -R ${PN}: "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
- fperms 750 "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}"
-
- newinitd "${FILESDIR}/${PN}-5.0.0-init" ${PN}
- newconfd "${FILESDIR}/${PN}-5.0.0-conf" ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
-
- if use logrotate; then
- insopts -m0644
- insinto /etc/logrotate.d
- newins etc/${PN}.logrotate ${PN}
- fi
-}
-
-pkg_postinst() {
- if ! use systemd; then
- elog "The ${PN} init script expects to find the path to the configuration"
- elog "file as well as extra options in /etc/conf.d."
- elog ""
- elog "To create more than one ${PN} service, simply create a new .yaml file for it"
- elog "then create a symlink to the init script from a link called"
- elog "${PN}.foo - like so"
- elog " cd /etc/${PN}"
- elog " ${EDITOR##*/} suricata-foo.yaml"
- elog " cd /etc/init.d"
- elog " ln -s ${PN} ${PN}.foo"
- elog "Then edit /etc/conf.d/${PN} and make sure you specify sensible options for foo."
- elog ""
- elog "You can create as many ${PN}.foo* services as you wish."
- fi
-
- if use bpf; then
- elog "eBPF/XDP files must be compiled (using sys-devel/clang[llvm_targets_BPF]) before use"
- elog "because their configuration is hard-coded. You can find the default ones in"
- elog " ${EPREFIX}/usr/share/doc/${PF}"
- elog "and the common location for eBPF bytecode is"
- elog " ${EPREFIX}/usr/libexec/${PN}"
- elog "For more information, see https://${PN}.readthedocs.io/en/${P}/capture-hardware/ebpf-xdp.html"
- fi
-
- if use logrotate; then
- elog "You enabled the logrotate USE flag. Please make sure you correctly set up the ${PN} logrotate config file in /etc/logrotate.d/."
- fi
-
- if use debug; then
- elog "You enabled the debug USE flag. Please read this link to report bugs upstream:"
- elog "https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Reporting_Bugs"
- elog "You need to also ensure the FEATURES variable in make.conf contains the"
- elog "'nostrip' option to produce useful core dumps or back traces."
- fi
-}