diff options
author | Armin Kuster <akuster808@gmail.com> | 2018-08-05 11:03:54 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-09-01 10:34:02 -0700 |
commit | e296c536878c931b249633611d587625ffe35e55 (patch) | |
tree | 222e34a501f5540e59627dedb108ce6eb458b5f7 | |
parent | 407abe22ef4a7555477de7cb3df8d4b81d31f750 (diff) | |
download | meta-security-e296c536878c931b249633611d587625ffe35e55.tar.gz |
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>
-rw-r--r-- | recipes-security/suricata/suricata_4.0.5.bb (renamed from recipes-security/suricata/suricata_4.0.0.bb) | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/recipes-security/suricata/suricata_4.0.0.bb b/recipes-security/suricata/suricata_4.0.5.bb index 6efa351..6ccf3d2 100644 --- a/recipes-security/suricata/suricata_4.0.0.bb +++ b/recipes-security/suricata/suricata_4.0.5.bb | |||
@@ -4,17 +4,23 @@ require suricata.inc | |||
4 | 4 | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548" |
6 | 6 | ||
7 | SRC_URI += "https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz;name=rules" | ||
8 | |||
7 | SRC_URI += " \ | 9 | SRC_URI += " \ |
8 | file://volatiles.03_suricata \ | 10 | file://volatiles.03_suricata \ |
9 | file://suricata.yaml \ | 11 | file://suricata.yaml \ |
10 | file://suricata.service \ | 12 | file://suricata.service \ |
11 | " | 13 | " |
12 | 14 | ||
15 | SRC_URI[rules.md5sum] = "7e8b570d318c98bff65f2ddc457122cb" | ||
16 | SRC_URI[rules.sha256sum] = "229e3035804c2b816092c6eea09e35f9db0ea421758551a7a740cdd9c15e3feb" | ||
17 | |||
13 | inherit autotools-brokensep pkgconfig python-dir systemd | 18 | inherit autotools-brokensep pkgconfig python-dir systemd |
14 | 19 | ||
15 | CFLAGS += "-D_DEFAULT_SOURCE" | 20 | CFLAGS += "-D_DEFAULT_SOURCE" |
16 | 21 | ||
17 | CACHED_CONFIGUREVARS = "ac_cv_header_htp_htp_h=yes ac_cv_lib_htp_htp_conn_create=yes " | 22 | CACHED_CONFIGUREVARS = "ac_cv_header_htp_htp_h=yes ac_cv_lib_htp_htp_conn_create=yes \ |
23 | ac_cv_path_HAVE_WGET=no ac_cv_path_HAVE_CURL=no " | ||
18 | 24 | ||
19 | EXTRA_OECONF += " --disable-debug \ | 25 | EXTRA_OECONF += " --disable-debug \ |
20 | --enable-non-bundled-htp \ | 26 | --enable-non-bundled-htp \ |
@@ -41,19 +47,20 @@ export logdir = "${localstatedir}/log" | |||
41 | 47 | ||
42 | do_install_append () { | 48 | do_install_append () { |
43 | 49 | ||
50 | install -d ${D}${sysconfdir}/suricata | ||
51 | |||
52 | oe_runmake install-conf DESTDIR=${D} | ||
53 | |||
54 | # mimic move of downloaded rules to e_sysconfrulesdir | ||
55 | cp -rf ${WORKDIR}/rules ${D}${sysconfdir}/suricata | ||
56 | |||
44 | oe_runmake install-rules DESTDIR=${D} | 57 | oe_runmake install-rules DESTDIR=${D} |
45 | 58 | ||
46 | install -d ${D}${sysconfdir}/suricata | ||
47 | install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles | 59 | install -d ${D}${sysconfdir}/suricata ${D}${sysconfdir}/default/volatiles |
48 | install -m 644 classification.config ${D}${sysconfdir}/suricata | ||
49 | install -m 644 reference.config ${D}${sysconfdir}/suricata | ||
50 | install -m 644 ${WORKDIR}/suricata.yaml ${D}${sysconfdir}/suricata | ||
51 | install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/volatiles.03_suricata | 60 | install -m 0644 ${WORKDIR}/volatiles.03_suricata ${D}${sysconfdir}/default/volatiles/volatiles.03_suricata |
52 | 61 | ||
53 | install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata | 62 | install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata |
54 | 63 | ||
55 | install -d ${D}${logdir}/suricata | ||
56 | |||
57 | install -d ${D}${systemd_unitdir}/system | 64 | install -d ${D}${systemd_unitdir}/system |
58 | sed -e s:/etc:${sysconfdir}:g \ | 65 | sed -e s:/etc:${sysconfdir}:g \ |
59 | -e s:/var/run:/run:g \ | 66 | -e s:/var/run:/run:g \ |
@@ -62,7 +69,6 @@ do_install_append () { | |||
62 | -e s:/bin/kill:${base_bindir}/kill:g \ | 69 | -e s:/bin/kill:${base_bindir}/kill:g \ |
63 | -e s:/usr/lib:${libdir}:g \ | 70 | -e s:/usr/lib:${libdir}:g \ |
64 | ${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service | 71 | ${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service |
65 | |||
66 | } | 72 | } |
67 | 73 | ||
68 | pkg_postinst_ontarget_${PN} () { | 74 | pkg_postinst_ontarget_${PN} () { |
@@ -74,7 +80,7 @@ fi | |||
74 | SYSTEMD_PACKAGES = "${PN}" | 80 | SYSTEMD_PACKAGES = "${PN}" |
75 | 81 | ||
76 | PACKAGES =+ "${PN}-socketcontrol" | 82 | PACKAGES =+ "${PN}-socketcontrol" |
77 | FILES_${PN} += "${logdir}/suricata ${systemd_unitdir}" | 83 | FILES_${PN} += "${systemd_unitdir} /run" |
78 | FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}" | 84 | FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}" |
79 | 85 | ||
80 | CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml" | 86 | CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml" |