[yocto] [meta-security][PATCH 06/13] suricata: add ptest

Armin Kuster akuster808 at gmail.com
Sun Oct 28 11:50:21 PDT 2018


Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 recipes-security/suricata/files/run-ptest   | 3 +++
 recipes-security/suricata/suricata_4.0.5.bb | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 recipes-security/suricata/files/run-ptest

diff --git a/recipes-security/suricata/files/run-ptest b/recipes-security/suricata/files/run-ptest
new file mode 100644
index 0000000..666ba9c
--- /dev/null
+++ b/recipes-security/suricata/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+suricata -u
diff --git a/recipes-security/suricata/suricata_4.0.5.bb b/recipes-security/suricata/suricata_4.0.5.bb
index 90b4638..6c0a109 100644
--- a/recipes-security/suricata/suricata_4.0.5.bb
+++ b/recipes-security/suricata/suricata_4.0.5.bb
@@ -10,12 +10,13 @@ SRC_URI += " \
            file://volatiles.03_suricata \
            file://suricata.yaml \
            file://suricata.service \
+           file://run-ptest \
            "
 
 SRC_URI[rules.md5sum] = "205c5e5b54e489207ed892c03ad75b33"
 SRC_URI[rules.sha256sum] = "4aa81011b246875a57181c6a0569ca887845e366904bcaf0043220f33bd69798"
 
-inherit autotools-brokensep pkgconfig python-dir systemd 
+inherit autotools-brokensep pkgconfig python-dir systemd ptest
 
 CFLAGS += "-D_DEFAULT_SOURCE"
 
@@ -28,6 +29,8 @@ EXTRA_OECONF += " --disable-debug \
     "
 
 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 ,"
@@ -42,6 +45,7 @@ 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, python, python" 
+PACKAGECONFIG[unittests] = "--enable-unittests, --disable-unittests," 
 
 export logdir = "${localstatedir}/log"
 
-- 
2.7.4



More information about the yocto mailing list