mirror of
https://git.yoctoproject.org/meta-security
synced 2026-06-01 13:10:33 +00:00
suricata: update 4.0.5
Fix rules make. Don't allow the makefile to download the rules. Use fetcher add install configs and remove manual intall of those files Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
+15
-9
@@ -4,17 +4,23 @@ require suricata.inc
|
|||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
|
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548"
|
||||||
|
|
||||||
|
SRC_URI += "https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz;name=rules"
|
||||||
|
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
file://volatiles.03_suricata \
|
file://volatiles.03_suricata \
|
||||||
file://suricata.yaml \
|
file://suricata.yaml \
|
||||||
file://suricata.service \
|
file://suricata.service \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SRC_URI[rules.md5sum] = "7e8b570d318c98bff65f2ddc457122cb"
|
||||||
|
SRC_URI[rules.sha256sum] = "229e3035804c2b816092c6eea09e35f9db0ea421758551a7a740cdd9c15e3feb"
|
||||||
|
|
||||||
inherit autotools-brokensep pkgconfig python-dir systemd
|
inherit autotools-brokensep pkgconfig python-dir systemd
|
||||||
|
|
||||||
CFLAGS += "-D_DEFAULT_SOURCE"
|
CFLAGS += "-D_DEFAULT_SOURCE"
|
||||||
|
|
||||||
CACHED_CONFIGUREVARS = "ac_cv_header_htp_htp_h=yes ac_cv_lib_htp_htp_conn_create=yes "
|
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 \
|
EXTRA_OECONF += " --disable-debug \
|
||||||
--enable-non-bundled-htp \
|
--enable-non-bundled-htp \
|
||||||
@@ -41,19 +47,20 @@ export logdir = "${localstatedir}/log"
|
|||||||
|
|
||||||
do_install_append () {
|
do_install_append () {
|
||||||
|
|
||||||
|
install -d ${D}${sysconfdir}/suricata
|
||||||
|
|
||||||
|
oe_runmake install-conf DESTDIR=${D}
|
||||||
|
|
||||||
|
# mimic move of downloaded rules to e_sysconfrulesdir
|
||||||
|
cp -rf ${WORKDIR}/rules ${D}${sysconfdir}/suricata
|
||||||
|
|
||||||
oe_runmake install-rules DESTDIR=${D}
|
oe_runmake install-rules DESTDIR=${D}
|
||||||
|
|
||||||
install -d ${D}${sysconfdir}/suricata
|
|
||||||
install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles
|
install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles
|
||||||
install -m 644 classification.config ${D}${sysconfdir}/suricata
|
|
||||||
install -m 644 reference.config ${D}${sysconfdir}/suricata
|
|
||||||
install -m 644 ${WORKDIR}/suricata.yaml ${D}${sysconfdir}/suricata
|
|
||||||
install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/volatiles.03_suricata
|
install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/volatiles.03_suricata
|
||||||
|
|
||||||
install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata
|
install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata
|
||||||
|
|
||||||
install -d ${D}${logdir}/suricata
|
|
||||||
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
sed -e s:/etc:${sysconfdir}:g \
|
sed -e s:/etc:${sysconfdir}:g \
|
||||||
-e s:/var/run:/run:g \
|
-e s:/var/run:/run:g \
|
||||||
@@ -62,7 +69,6 @@ do_install_append () {
|
|||||||
-e s:/bin/kill:${base_bindir}/kill:g \
|
-e s:/bin/kill:${base_bindir}/kill:g \
|
||||||
-e s:/usr/lib:${libdir}:g \
|
-e s:/usr/lib:${libdir}:g \
|
||||||
${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service
|
${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_ontarget_${PN} () {
|
pkg_postinst_ontarget_${PN} () {
|
||||||
@@ -74,7 +80,7 @@ fi
|
|||||||
SYSTEMD_PACKAGES = "${PN}"
|
SYSTEMD_PACKAGES = "${PN}"
|
||||||
|
|
||||||
PACKAGES =+ "${PN}-socketcontrol"
|
PACKAGES =+ "${PN}-socketcontrol"
|
||||||
FILES_${PN} += "${logdir}/suricata ${systemd_unitdir}"
|
FILES_${PN} += "${systemd_unitdir} /run"
|
||||||
FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}"
|
FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}"
|
||||||
|
|
||||||
CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml"
|
CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml"
|
||||||
Reference in New Issue
Block a user