summaryrefslogtreecommitdiff
path: root/meta-security/recipes-ids/suricata/suricata_4.1.10.bb
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-03-06 00:22:30 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-03-15 14:02:06 +0300
commit8b1392834def7d17263b45bd1aab35759235fb3e (patch)
tree8c15f7cbef2b020a8f41839f56be0c02f57ac39c /meta-security/recipes-ids/suricata/suricata_4.1.10.bb
parent3e34fba3f6b8389074f64203299fa60ec0fc18e1 (diff)
downloadopenbmc-8b1392834def7d17263b45bd1aab35759235fb3e.tar.xz
meta-security: subtree update:6053e8b8e2..9504d02694
Armin Kuster (19): softhsm: drop pkg as meta-oe has it apparmor: Inherit python3targetconfig python3-suricata-update: Inherit python3targetconfig openscap: Inherit python3targetconfig scap-security-guide: Inherit python3targetconfig nikito: Update common-licenses references to match new names kas-security-base.yml: build setting updates kas-security-base.yml: drop DL_DIR arpwatch: upgrade 3.0 -> 3.1 checksec: upgrade 2.1.0 -> 2.4.0 ding-libs: upgrade 0.5.0 -> 0.6.1 fscryptctl: upgrade 0.1.0 -> 1.0.0 libseccomp: upgrade 2.5.0 -> 2.5.1 python3-privacyidea: upgrade 3.3 -> 3.5.1 python3-scapy: upgrade 2.4.3 -> 2.4.4 samhain: update to 4.4.3 opendnssec: update to 2.1.8 suricata: update to 4.10.0 python3-fail2ban: update to 0.11.2 Jate Sujjavanich (1): scap-security-guide: Fix openembedded platform tests and build Ming Liu (9): ima-evm-utils: set native REQUIRED_DISTRO_FEATURES to empty initramfs-framework-ima: fix a wrong path ima-evm-keys: add recipe initramfs-framework-ima: RDEPENDS on ima-evm-keys meta: refactor IMA/EVM sign rootfs README.md: update according to the refactoring in ima-evm-rootfs.bbclass initramfs-framework-ima: let ima_enabled return 0 ima-evm-rootfs.bbclass: avoid generating /etc/fstab for wic ima-policy-hashed: add CGROUP2_SUPER_MAGIC fsmagic Yi Zhao (1): ibmswtpm2: disable camellia algorithm Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ic7dc6f5425a1493ac0534e10ed682662d109e60c
Diffstat (limited to 'meta-security/recipes-ids/suricata/suricata_4.1.10.bb')
-rw-r--r--meta-security/recipes-ids/suricata/suricata_4.1.10.bb97
1 files changed, 97 insertions, 0 deletions
diff --git a/meta-security/recipes-ids/suricata/suricata_4.1.10.bb b/meta-security/recipes-ids/suricata/suricata_4.1.10.bb
new file mode 100644
index 000000000..3f7beaacf
--- /dev/null
+++ b/meta-security/recipes-ids/suricata/suricata_4.1.10.bb
@@ -0,0 +1,97 @@
+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 \
+ "
+
+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"