swtpm: fix check for tscd deamon on host
PATCH 1/5 swtpm: fix check for tscd deamon on host
Found a few places that tscd check was trying to run the hosts.
Signed-off-by Armin Kuster <[email protected]>
--- .../swtpm/files/oe_configure.patch | 65 +++++++++++++++++++ meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb | 1 + 2 files changed, 66 insertions(+) create mode 100644 meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch
meta-tpm/recipes-tpm/swtpm/files/oe_configure.patch new file +65 -0
@@ -0,0 +1,65 @@ +Don't check for tscd deamon on host. + +Upstream-Status: OE Specific + +Signed-off-by: Armin Kuster <[email protected]> + +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac ++++ git/configure.ac +@@ -179,15 +179,6 @@ AC_SUBST([LIBTPMS_LIBS]) + AC_CHECK_LIB(c, clock_gettime, LIBRT_LIBS="", LIBRT_LIBS="-lrt") + AC_SUBST([LIBRT_LIBS]) + +-AC_PATH_PROG([TCSD], tcsd) +-if test "x$TCSD" = "x"; then +- have_tcsd=no +- AC_MSG_WARN([tcsd could not be found; typically need it for tss user account and tests]) +-else +- have_tcsd=yes +-fi +-AM_CONDITIONAL([HAVE_TCSD], test "$have_tcsd" != "no") +- + dnl We either need netstat (more common across systems) or 'ss' for test cases + AC_PATH_PROG([NETSTAT], [netstat]) + if test "x$NETSTAT" = "x"; then +@@ -440,23 +431,6 @@ AC_ARG_WITH([tss-group], + [TSS_GROUP="tss"] + ) + +-case $have_tcsd in +-yes) +- AC_MSG_CHECKING([whether TSS_USER $TSS_USER is available]) +- if ! test $(id -u $TSS_USER); then +- AC_MSG_ERROR(["$TSS_USER is not available"]) +- else +- AC_MSG_RESULT([yes]) +- fi +- AC_MSG_CHECKING([whether TSS_GROUP $TSS_GROUP is available]) +- if ! test $(id -g $TSS_GROUP); then +- AC_MSG_ERROR(["$TSS_GROUP is not available"]) +- else +- AC_MSG_RESULT([yes]) +- fi +- ;; +-esac +- + AC_SUBST([TSS_USER]) + AC_SUBST([TSS_GROUP]) + +Index: git/tests/Makefile.am +=================================================================== +--- git.orig/tests/Makefile.am ++++ git/tests/Makefile.am +@@ -83,10 +83,6 @@ TESTS += \ + test_tpm2_swtpm_cert \ + test_tpm2_swtpm_cert_ecc \ + test_tpm2_swtpm_setup_create_cert +-if HAVE_TCSD +-TESTS += \ +- test_tpm2_samples_create_tpmca +-endif + endif + + EXTRA_DIST=$(TESTS) \
meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb +1 -0
@@ -12,6 +12,7 @@ DEPENDS_append = " tpm-tools-native expect-native socat-native python3-pip-nativ SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464" SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \ file://ioctl_h.patch \ + file://oe_configure.patch \ " PE = "1"
Signature · 1 line
2.25.1
PATCH 2/5 python3-suricata-update: update to 1.2.1
Signed-off-by Armin Kuster <[email protected]>
---
...a-update_1.1.1.bb => python3-suricata-update_1.2.1.bb} | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
rename recipes-ids/suricata/{python3-suricata-update_1.1.1.bb => python3-suricata-update_1.2.1.bb} (69%)recipes-ids/suricata/python3-suricata-update_1.2.1.bb renamed from recipes-ids/suricata/python3-suricata-update_1.1.1.bb +5 -3
@@ -5,11 +5,13 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd1e02800a1f548" -SRCREV = "9630630ffc493ca26299d174ee2066aa1405b2d4" -SRC_URI = "git://github.com/OISF/suricata-update;branch='master-1.1.x'" +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" +RDEPENDS_${PN} = "python3-pyyaml python3-logging python3-compression" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
PATCH 4/5 layer.conf: add dynamic-layer for rust pkg
In reply to akusterSigned-off-by Armin Kuster <[email protected]>
--- conf/layer.conf | 4 ++++ 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_security = "8" LAYERSERIES_COMPAT_security = "hardknott" LAYERDEPENDS_security = "core openembedded-layer perl-layer networking-layer meta-python" + +BBFILES_DYNAMIC += " \ +rust-layer:${LAYERDIR}/dynamic-layers/meta-rust/recipes-*/*/*.bb \ +"
Signature · 1 line
2.25.1
PATCH 3/5 suricata: update to 6.0.2
In reply to akusterneeds rust
Signed-off-by Armin Kuster <[email protected]>
--- .../recipes-ids/suricata/files/fixup.patch | 32 + .../recipes-ids/suricata/files/run-ptest | 3 + .../suricata/files/suricata.service | 20 + .../recipes-ids/suricata/files/suricata.yaml | 1326 +++++++++++++++++ .../suricata/files/tmpfiles.suricata | 2 + .../suricata/files/volatiles.03_suricata | 2 + .../recipes-ids/suricata/libhtp_0.5.37.bb | 27 + .../recipes-ids/suricata/suricata.inc | 8 + .../recipes-ids/suricata/suricata_6.0.2.bb | 193 +++ 9 files changed, 1613 insertions(+) create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/fixup.patch create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/run-ptest create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/suricata.service create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/suricata.yaml create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/tmpfiles.suricata create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/files/volatiles.03_suricata create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/libhtp_0.5.37.bb create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/suricata.inc create mode 100644 dynamic-layers/meta-rust/recipes-ids/suricata/suricata_6.0.2.bb
dynamic-layers/meta-rust/recipes-ids/suricata/files/fixup.patch new file +32 -0
@@ -0,0 +1,32 @@ +Skip pkg Makefile from using its own rust steps + +Upstream-Status: OE Specific + +Signed-off-by: Armin Kuster <[email protected]> + +Index: suricata-6.0.2/Makefile.am +=================================================================== +--- suricata-6.0.2.orig/Makefile.am ++++ suricata-6.0.2/Makefile.am +@@ -7,7 +7,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE s + $(SURICATA_UPDATE_DIR) \ + lua \ + acsite.m4 +-SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \ ++SUBDIRS = $(HTP_DIR) src qa rules doc contrib etc python ebpf \ + $(SURICATA_UPDATE_DIR) + + CLEANFILES = stamp-h[0-9]* +Index: suricata-6.0.2/Makefile.in +=================================================================== +--- suricata-6.0.2.orig/Makefile.in ++++ suricata-6.0.2/Makefile.in +@@ -426,7 +426,7 @@ EXTRA_DIST = ChangeLog COPYING LICENSE s + lua \ + acsite.m4 + +-SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \ ++SUBDIRS = $(HTP_DIR) src qa rules doc contrib etc python ebpf \ + $(SURICATA_UPDATE_DIR) + + CLEANFILES = stamp-h[0-9]*
dynamic-layers/meta-rust/recipes-ids/suricata/files/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +suricata -u
dynamic-layers/meta-rust/recipes-ids/suricata/files/suricata.service new file +20 -0
@@ -0,0 +1,20 @@ +[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 +
dynamic-layers/meta-rust/recipes-ids/suricata/files/suricata.yaml new file +1326 -0
1,326 lines not on this page · raw message
dynamic-layers/meta-rust/recipes-ids/suricata/files/tmpfiles.suricata new file +2 -0
@@ -0,0 +1,2 @@ +#Type Path Mode UID GID Age Argument +d /var/log/suricata 0755 root root
dynamic-layers/meta-rust/recipes-ids/suricata/files/volatiles.03_suricata new file +2 -0
@@ -0,0 +1,2 @@ +# <type> <owner> <group> <mode> <path> <linksource> +d root root 0755 /var/log/suricata none
dynamic-layers/meta-rust/recipes-ids/suricata/libhtp_0.5.37.bb new file +27 -0
@@ -0,0 +1,27 @@ +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=596ab7963a1a0e5198e5a1c4aa621843" + +SRC_URI = "git://github.com/OISF/libhtp.git;protocol=https;branch=0.5.x" +SRCREV = "eaa2db29e65e7f2691c18a9022aeb5fb836ec5f1" + +DEPENDS = "zlib" + +inherit autotools-brokensep pkgconfig + +CFLAGS += "-D_DEFAULT_SOURCE" + +#S = "${WORKDIR}/suricata-${VER}/${BPN}" + +S = "${WORKDIR}/git" + +do_configure () { + cd ${S} + ./autogen.sh + oe_runconf +} + +RDEPENDS_${PN} += "zlib" +
dynamic-layers/meta-rust/recipes-ids/suricata/suricata.inc new file +8 -0
@@ -0,0 +1,8 @@ +HOMEPAGE = "http://suricata-ids.org/" +SECTION = "security Monitor/Admin" +LICENSE = "GPLv2" + +VER = "6.0.2" +SRC_URI = "http://www.openinfosecfoundation.org/download/suricata-${VER}.tar.gz" + +SRC_URI[sha256sum] = "5e4647a07cb31b5d6d0049972a45375c137de908a964a44e2d6d231fa3ad4b52"
dynamic-layers/meta-rust/recipes-ids/suricata/suricata_6.0.2.bb new file +193 -0
193 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 5/5 README: cleanup
In reply to akusterAdd note about rust.
Signed-off-by Armin Kuster <[email protected]>
--- README | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
README +15 -12
@@ -11,28 +11,19 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core branch: master - revision: HEAD - prio: default URI: git://git.openembedded.org/meta-openembedded/meta-oe branch: master - revision: HEAD - prio: default URI: git://git.openembedded.org/meta-openembedded/meta-perl branch: master - revision: HEAD - prio: default URI: git://git.openembedded.org/meta-openembedded/meta-python branch: master - revision: HEAD - prio: default URI: git://git.openembedded.org/meta-openembedded/meta-networking branch: master - revision: HEAD - prio: default + Adding the security layer to your build ========================================
@@ -51,11 +42,23 @@ other layers needed. e.g.: /path/to/meta-openembedded/meta-perl \ /path/to/meta-openembedded/meta-python \ /path/to/meta-openembedded/meta-networking \ - /path/to/layer/meta-security \ + /path/to/layer/meta-security " + +Optional Rust dependancy +====================================== +If you want to use the latest Suricata that needs rust, you will need to clone + + URI: https://github.com/meta-rust/meta-rust.git + branch: master + + BBLAYERS += "/path/to/layer/meta-rust" + +This will activate the dynamic-layer mechanism and pull in the newer suricata + Maintenance ------------ +====================================== Send pull requests, patches, comments or questions to [email protected]
Signature · 1 line
2.25.1