mirror of
https://git.yoctoproject.org/meta-security
synced 2026-01-11 15:00:34 +00:00
suricata: Drop 4.1.x its EOL
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
From b37554e0bc3cf383e6547c5c6a69c6f6849c09e3 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Leblond <eric@regit.org>
|
||||
Date: Wed, 17 Jul 2019 12:35:12 +0200
|
||||
Subject: [PATCH] af-packet: fix build on recent Linux kernels
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Armin kuster <akuster808@gmail.com>
|
||||
---
|
||||
src/source-af-packet.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: suricata-4.1.5/src/source-af-packet.c
|
||||
===================================================================
|
||||
--- suricata-4.1.5.orig/src/source-af-packet.c
|
||||
+++ suricata-4.1.5/src/source-af-packet.c
|
||||
@@ -68,6 +68,10 @@
|
||||
#include <linux/sockios.h>
|
||||
#endif
|
||||
|
||||
+#if HAVE_LINUX_SOCKIOS_H
|
||||
+#include <linux/sockios.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_PACKET_EBPF
|
||||
#include "util-ebpf.h"
|
||||
#include <bpf/libbpf.h>
|
||||
@@ -1,38 +0,0 @@
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-of_by: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
Index: suricata-2.0.5/Makefile.am
|
||||
===================================================================
|
||||
--- suricata-2.0.5.orig/Makefile.am
|
||||
+++ suricata-2.0.5/Makefile.am
|
||||
@@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
|
||||
classification.config threshold.config \
|
||||
reference.config
|
||||
-SUBDIRS = $(HTP_DIR) src qa rules doc contrib scripts
|
||||
+SUBDIRS = src qa rules doc contrib scripts
|
||||
|
||||
CLEANFILES = stamp-h[0-9]*
|
||||
|
||||
Index: suricata-2.0.5/Makefile.in
|
||||
===================================================================
|
||||
--- suricata-2.0.5.orig/Makefile.in
|
||||
+++ suricata-2.0.5/Makefile.in
|
||||
@@ -229,7 +229,6 @@ HAVE_PCAP_CONFIG = @HAVE_PCAP_CONFIG@
|
||||
HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
||||
HAVE_PYTHON_CONFIG = @HAVE_PYTHON_CONFIG@
|
||||
HAVE_WGET = @HAVE_WGET@
|
||||
-HTP_DIR = @HTP_DIR@
|
||||
HTP_LDADD = @HTP_LDADD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
@@ -369,7 +368,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE s
|
||||
classification.config threshold.config \
|
||||
reference.config
|
||||
|
||||
-SUBDIRS = $(HTP_DIR) src qa rules doc contrib scripts
|
||||
+SUBDIRS = src qa rules doc contrib scripts
|
||||
CLEANFILES = stamp-h[0-9]*
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
suricata -u
|
||||
@@ -1,20 +0,0 @@
|
||||
[Unit]
|
||||
Description=Suricata IDS/IDP daemon
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
Documentation=man:suricata(8) man:suricatasc(8)
|
||||
Documentation=https://redmine.openinfosecfoundation.org/projects/suricata/wiki
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
|
||||
RestrictAddressFamilies=
|
||||
ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml eth0
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
PrivateTmp=yes
|
||||
ProtectHome=yes
|
||||
ProtectSystem=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#Type Path Mode UID GID Age Argument
|
||||
d /var/log/suricata 0755 root root
|
||||
@@ -1,2 +0,0 @@
|
||||
# <type> <owner> <group> <mode> <path> <linksource>
|
||||
d root root 0755 /var/log/suricata none
|
||||
@@ -1,15 +0,0 @@
|
||||
SUMMARY = "LibHTP is a security-aware parser for the HTTP protocol and the related bits and pieces."
|
||||
|
||||
require suricata.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
|
||||
|
||||
DEPENDS = "zlib"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
CFLAGS += "-D_DEFAULT_SOURCE"
|
||||
|
||||
S = "${WORKDIR}/suricata-${VER}/${BPN}"
|
||||
|
||||
RDEPENDS_${PN} += "zlib"
|
||||
@@ -1,17 +0,0 @@
|
||||
SUMMARY = "The tool for updating your Suricata rules. "
|
||||
HOMEPAGE = "http://suricata-ids.org/"
|
||||
SECTION = "security Monitor/Admin"
|
||||
LICENSE = "GPLv2"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
|
||||
|
||||
SRCREV = "50e857f75e576e239d8306a6ac55946a1ce252a6"
|
||||
SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.2.x'"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit python3native python3targetconfig setuptools3
|
||||
|
||||
RDEPENDS_${PN} = "python3-pyyaml python3-logging python3-compression"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -1,8 +0,0 @@
|
||||
HOMEPAGE = "http://suricata-ids.org/"
|
||||
SECTION = "security Monitor/Admin"
|
||||
LICENSE = "GPLv2"
|
||||
|
||||
VER = "4.1.10"
|
||||
SRC_URI = "http://www.openinfosecfoundation.org/download/suricata-${VER}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "4013cb13a2f3f7854328cf072319bba41896fad86d6b85b1cff4004f82aa7276"
|
||||
@@ -1,99 +0,0 @@
|
||||
SUMMARY = "The Suricata Engine is an Open Source Next Generation Intrusion Detection and Prevention Engine"
|
||||
|
||||
require suricata.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
|
||||
|
||||
SRC_URI += " \
|
||||
file://volatiles.03_suricata \
|
||||
file://tmpfiles.suricata \
|
||||
file://suricata.yaml \
|
||||
file://suricata.service \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "www.openinfosecfoundation.org/download"
|
||||
|
||||
inherit autotools-brokensep pkgconfig python3-dir systemd ptest
|
||||
|
||||
CFLAGS += "-D_DEFAULT_SOURCE -fcommon"
|
||||
|
||||
CACHED_CONFIGUREVARS = "ac_cv_header_htp_htp_h=yes ac_cv_lib_htp_htp_conn_create=yes \
|
||||
ac_cv_path_HAVE_WGET=no ac_cv_path_HAVE_CURL=no "
|
||||
|
||||
EXTRA_OECONF += " --disable-debug \
|
||||
--enable-non-bundled-htp \
|
||||
--disable-gccmarch-native \
|
||||
--disable-suricata-update \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= "htp jansson file pcre yaml pcap cap-ng net nfnetlink nss nspr"
|
||||
PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'unittests', '', d)}"
|
||||
|
||||
PACKAGECONFIG[htp] = "--with-libhtp-includes=${STAGING_INCDIR} --with-libhtp-libraries=${STAGING_LIBDIR}, ,libhtp,"
|
||||
PACKAGECONFIG[pcre] = "--with-libpcre-includes=${STAGING_INCDIR} --with-libpcre-libraries=${STAGING_LIBDIR}, ,libpcre ,"
|
||||
PACKAGECONFIG[yaml] = "--with-libyaml-includes=${STAGING_INCDIR} --with-libyaml-libraries=${STAGING_LIBDIR}, ,libyaml ,"
|
||||
PACKAGECONFIG[pcap] = "--with-libpcap-includes=${STAGING_INCDIR} --with-libpcap-libraries=${STAGING_LIBDIR}, ,libpcap ,"
|
||||
PACKAGECONFIG[cap-ng] = "--with-libcap_ng-includes=${STAGING_INCDIR} --with-libcap_ng-libraries=${STAGING_LIBDIR}, ,libcap-ng , "
|
||||
PACKAGECONFIG[net] = "--with-libnet-includes=${STAGING_INCDIR} --with-libnet-libraries=${STAGING_LIBDIR}, , libnet,"
|
||||
PACKAGECONFIG[nfnetlink] = "--with-libnfnetlink-includes=${STAGING_INCDIR} --with-libnfnetlink-libraries=${STAGING_LIBDIR}, ,libnfnetlink ,"
|
||||
PACKAGECONFIG[nfq] = "--enable-nfqueue, --disable-nfqueue,libnetfilter-queue,"
|
||||
|
||||
PACKAGECONFIG[jansson] = "--with-libjansson-includes=${STAGING_INCDIR} --with-libjansson-libraries=${STAGING_LIBDIR},,jansson, jansson"
|
||||
PACKAGECONFIG[file] = ",,file, file"
|
||||
PACKAGECONFIG[nss] = "--with-libnss-includes=${STAGING_INCDIR} --with-libnss-libraries=${STAGING_LIBDIR}, nss, nss,"
|
||||
PACKAGECONFIG[nspr] = "--with-libnspr-includes=${STAGING_INCDIR} --with-libnspr-libraries=${STAGING_LIBDIR}, nspr, nspr,"
|
||||
PACKAGECONFIG[python] = "--enable-python, --disable-python, python3, python3"
|
||||
PACKAGECONFIG[unittests] = "--enable-unittests, --disable-unittests,"
|
||||
|
||||
export logdir = "${localstatedir}/log"
|
||||
|
||||
do_install_append () {
|
||||
|
||||
install -d ${D}${sysconfdir}/suricata
|
||||
|
||||
oe_runmake install-conf DESTDIR=${D}
|
||||
|
||||
oe_runmake install-rules DESTDIR=${D}
|
||||
|
||||
install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/03_suricata
|
||||
|
||||
install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
install -m 0644 ${WORKDIR}/tmpfiles.suricata ${D}${sysconfdir}/tmpfiles.d/suricata.conf
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
sed -e s:/etc:${sysconfdir}:g \
|
||||
-e s:/var/run:/run:g \
|
||||
-e s:/var:${localstatedir}:g \
|
||||
-e s:/usr/bin:${bindir}:g \
|
||||
-e s:/bin/kill:${base_bindir}/kill:g \
|
||||
-e s:/usr/lib:${libdir}:g \
|
||||
${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service
|
||||
fi
|
||||
|
||||
# Remove /var/run as it is created on startup
|
||||
rm -rf ${D}${localstatedir}/run
|
||||
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget_${PN} () {
|
||||
if command -v systemd-tmpfiles >/dev/null; then
|
||||
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/suricata.conf
|
||||
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
|
||||
${sysconfdir}/init.d/populate-volatile.sh update
|
||||
fi
|
||||
}
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}"
|
||||
|
||||
PACKAGES =+ "${PN}-socketcontrol"
|
||||
FILES_${PN} += "${systemd_unitdir} ${sysconfdir}/tmpfiles.d"
|
||||
FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}"
|
||||
|
||||
CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml"
|
||||
|
||||
RDEPENDS_${PN}-python = "python"
|
||||
Reference in New Issue
Block a user