os-release: remove OS_RELEASE_FEILD extending
PATCH 1/13 os-release: remove OS_RELEASE_FEILD extending
depends on the OS_RELEASRE_FEILD os-release changes in core otherwise yocto-check-layer will fail
--- meta-security-compliance/recipes-core/os-release/os-release.bbappend | 3 --- 1 file changed, 3 deletions(-)
meta-security-compliance/recipes-core/os-release/os-release.bbappend +0 -3
@@ -1,4 +1 @@ -OS_RELEASE_FIELDS += "CPE_NAME" - CPE_NAME="cpe:/o:openembedded:nodistro:0" -
Signature · 1 line
2.7.4
PATCH 2/13 tpm2-abrmd: update to 2.0.2
---
.../tpm2-abrmd/{tpm2-abrmd_2.0.1.bb => tpm2-abrmd_2.0.2.bb} | 9 ++++-----
.../{tpm2simulator-native_138.bb => tpm2simulator_138.bb} | 0
2 files changed, 4 insertions(+), 5 deletions(-)
rename meta-tpm/recipes-tpm/tpm2-abrmd/{tpm2-abrmd_2.0.1.bb => tpm2-abrmd_2.0.2.bb} (86%)
rename meta-tpm/recipes-tpm/tpm2simulator/{tpm2simulator-native_138.bb => tpm2simulator_138.bb} (100%)meta-tpm/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.2.bb renamed from meta-tpm/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.1.bb +4 -5
@@ -9,15 +9,16 @@ SECTION = "security/tpm" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" -DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2.0-tss glib-2.0-native \ +DEPENDS = "autoconf-archive dbus glib-2.0 tpm2.0-tss glib-2.0-native \ libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim" + SRC_URI = "\ git://github.com/01org/tpm2-abrmd.git \ file://tpm2-abrmd-init.sh \ file://tpm2-abrmd.default \ " -SRCREV = "80f8966b90d6394ad568e362d2936b333c2822bb" +SRCREV = "d0120ace58d97bc9520c0d558657eaca87ae73b1" S = "${WORKDIR}/git"
@@ -34,9 +35,7 @@ USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "tss" USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" -PACKAGECONFIG ?="udev" -PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}" - +PACKAGECONFIG ?="${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}" PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --with-systemdsystemunitdir=no" do_install_append() {
meta-tpm/recipes-tpm/tpm2simulator/tpm2simulator_138.bb renamed from meta-tpm/recipes-tpm/tpm2simulator/tpm2simulator-native_138.bb +0 -0
Signature · 1 line
2.7.4
PATCH 3/13 packagegroup-security-tpm2: add and remove packages
In reply to Armin Kuster--- meta-tpm/recipes-core/packagegroup/packagegroup-security-tpm2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-tpm/recipes-core/packagegroup/packagegroup-security-tpm2.bb +2 -2
@@ -1,4 +1,4 @@ -DESCRIPTION = "Security packagegroup for Poky" +DESCRIPTION = "TPM2 packagegroup for Security" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -14,5 +14,5 @@ RDEPENDS_packagegroup-security-tpm2 = " \ libtss2 \ libtss2-tcti-device \ libtss2-tcti-mssim \ - resourcemgr \ + tpm2-abrmd \ "
Signature · 1 line
2.7.4
PATCH 4/13 swtpm: switch to stable branch and clean up recipe
In reply to Armin Kuster--- meta-tpm/recipes-tpm/swtpm/swtpm_1.0.bb | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
meta-tpm/recipes-tpm/swtpm/swtpm_1.0.bb +5 -17
@@ -3,22 +3,21 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8" SECTION = "apps" -DEPENDS = "libtasn1 expect socat glib-2.0 libtpm libtpm-native" +DEPENDS = "libtasn1 expect socat glib-2.0 net-tools-native libtpm libtpm-native" # configure checks for the tools already during compilation and # then swtpm_setup needs them at runtime DEPENDS += "tpm-tools-native expect-native socat-native" -SRCREV = "66b42f52ef363998cb57f039889d59381d20bdf1" -SRC_URI = "git://github.com/stefanberger/swtpm.git \ - file://fix_lib_search_path.patch \ +SRCREV = "94bb9f2d716d09bcc6cd2a2e033018f8592008e7" +SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=tpm2-preview.v2 \ file://fix_fcntl_h.patch \ file://ioctl_h.patch \ " S = "${WORKDIR}/git" -inherit autotools-brokensep pkgconfig +inherit autotools pkgconfig PARALLEL_MAKE = "" TSS_USER="tss"
@@ -35,21 +34,12 @@ EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}" -# dup bootstrap -do_configure_prepend () { - libtoolize --force --copy - autoheader - aclocal - automake --add-missing -c - autoconf -} - USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system ${TSS_USER}" USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir \ --no-create-home --shell /bin/false ${BPN}" -RDEPENDS_${PN} = "libtpm expect socat bash" +RDEPENDS_${PN} = "libtpm expect socat bash tpm-tools" BBCLASSEXTEND = "native nativesdk"
@@ -58,5 +48,3 @@ python() { 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): raise bb.parse.SkipRecipe('Cuse enabled which requires meta-filesystems to be present.') } - -RDEPENDS_${PN} += "tpm-tools"
Signature · 1 line
2.7.4
PATCH 5/13 packagegroup-core-security: add few more ptest packages
In reply to Armin Kuster--- recipes-security/packagegroup/packagegroup-core-security.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-security/packagegroup/packagegroup-core-security.bb +3 -1
@@ -65,7 +65,7 @@ RDEPENDS_packagegroup-security-ids = " \ SUMMARY_packagegroup-security-mac = "Security Mandatory Access Control systems" RDEPENDS_packagegroup-security-mac = " \ ${@bb.utils.contains("DISTRO_FEATURES", "tomoyo", "ccs-tools", "",d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "", "",d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor", "",d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack", "",d)} \ "
@@ -76,5 +76,7 @@ RDEPENDS_packagegroup-security-ptest = " \ keyutils-ptest \ libseccomp-ptest \ python-scapy-ptest \ + ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor-ptest", "",d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-ptest", "",d)} \ ptest-runner \ "
Signature · 1 line
2.7.4
PATCH 6/13 suricata: add ptest
In reply to Armin Kuster--- 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
recipes-security/suricata/files/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +suricata -u
recipes-security/suricata/suricata_4.0.5.bb +5 -1
@@ -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"
Signature · 1 line
2.7.4
PATCH 7/13 packagegroup-core-security: add suricata-ptest
In reply to Armin Kuster--- recipes-security/packagegroup/packagegroup-core-security.bb | 1 + 1 file changed, 1 insertion(+)
recipes-security/packagegroup/packagegroup-core-security.bb +1 -0
@@ -76,6 +76,7 @@ RDEPENDS_packagegroup-security-ptest = " \ keyutils-ptest \ libseccomp-ptest \ python-scapy-ptest \ + suricata-ptest \ ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor-ptest", "",d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-ptest", "",d)} \ ptest-runner \
Signature · 1 line
2.7.4
PATCH 8/13 security-build-image: remove X11
In reply to Armin Kuster--- recipes-security/images/security-build-image.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
recipes-security/images/security-build-image.bb +1 -3
@@ -6,9 +6,7 @@ IMAGE_INSTALL = "\ packagegroup-base \ packagegroup-core-boot \ packagegroup-core-security \ - os-release \ - ${@bb.utils.contains("DISTRO_FEATURES", "x11", "packagegroup-xfce-base", "", d)} \ - ${CORE_IMAGE_EXTRA_INSTALL}" + os-release" IMAGE_LINGUAS ?= " "
Signature · 1 line
2.7.4
PATCH 9/13 tripwire: add ptest
In reply to Armin Kuster--- recipes-security/tripwire/files/run-ptest | 3 +++ recipes-security/tripwire/tripwire_2.4.3.6.bb | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 recipes-security/tripwire/files/run-ptest
recipes-security/tripwire/files/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +./twtest.pl
recipes-security/tripwire/tripwire_2.4.3.6.bb +8 -1
@@ -16,11 +16,12 @@ SRC_URI = "\ file://twcfg.txt \ file://twinstall.sh \ file://twpol-yocto.txt \ + file://run-ptest \ " S = "${WORKDIR}/git" -inherit autotools-brokensep update-rc.d +inherit autotools-brokensep update-rc.d ptest INITSCRIPT_NAME = "tripwire" INITSCRIPT_PARAMS = "start 40 S ."
@@ -58,9 +59,15 @@ do_install () { install -m 0644 ${WORKDIR}/tripwire.txt ${D}${docdir}/${BPN} } +do_install_ptest_append () { + install -d ${D}${PTEST_PATH}/tests + cp -a ${S}/src/test-harness/* ${D}${PTEST_PATH} +} FILES_${PN} += "${libdir} ${docdir}/${PN}/*" FILES_${PN}-dbg += "${sysconfdir}/${PN}/.debug" FILES_${PN}-staticdev += "${localstatedir}/lib/${PN}/lib*.a" +FILES_${PN}-ptest += "${PTEST_PATH}/tests " RDEPENDS_${PN} += " perl nano msmtp cronie" +RDEPENDS_${PN}-ptest = " perl lib-perl"
Signature · 1 line
2.7.4
PATCH 10/13 packagegroup-core-security: add tripwire ptest
In reply to Armin Kuster--- recipes-security/packagegroup/packagegroup-core-security.bb | 1 + 1 file changed, 1 insertion(+)
recipes-security/packagegroup/packagegroup-core-security.bb +1 -0
@@ -77,6 +77,7 @@ RDEPENDS_packagegroup-security-ptest = " \ libseccomp-ptest \ python-scapy-ptest \ suricata-ptest \ + tripwire-ptest \ ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor-ptest", "",d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-ptest", "",d)} \ ptest-runner \
Signature · 1 line
2.7.4
PATCH 11/13 fail2ban: add ptest
In reply to Armin Kuster--- recipes-security/fail2ban/files/run-ptest | 3 +++ recipes-security/fail2ban/python-fail2ban.inc | 9 ++++++++- recipes-security/fail2ban/python-fail2ban_0.10.3.1.bb | 2 ++ recipes-security/fail2ban/python3-fail2ban_0.10.3.1.bb | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 recipes-security/fail2ban/files/run-ptest
recipes-security/fail2ban/files/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +##PYTHON## fail2ban-testcases
recipes-security/fail2ban/python-fail2ban.inc +8 -1
@@ -14,9 +14,10 @@ SRC_URI = " \ git://github.com/fail2ban/fail2ban.git;branch=0.11 \ file://initd \ file://fail2ban_setup.py \ + file://run-ptest \ " -inherit update-rc.d +inherit update-rc.d ptest S = "${WORKDIR}/git"
@@ -35,6 +36,12 @@ do_install_append () { chown -R root:root ${D}/${bindir} } +do_install_ptest_append () { + install -d ${D}${PTEST_PATH} + sed -i -e 's/##PYTHON##/${PYTHON_PN}/g' ${D}${PTEST_PATH}/run-ptest + install -D ${S}/bin/fail2ban-testcases ${D}${PTEST_PATH} +} + FILES_${PN} += "/run" INSANE_SKIP_${PN}_append = "already-stripped"
recipes-security/fail2ban/python-fail2ban_0.10.3.1.bb +2 -0
@@ -1,2 +1,4 @@ inherit setuptools require python-fail2ban.inc + +RDEPENDS_${PN}-ptest = "python python-modules python-fail2ban"
recipes-security/fail2ban/python3-fail2ban_0.10.3.1.bb +2 -0
@@ -1,2 +1,4 @@ inherit setuptools3 require python-fail2ban.inc + +RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
Signature · 1 line
2.7.4
PATCH 12/13 packagegroup-core-security: add fail2ban ptest to image
In reply to Armin Kuster--- recipes-security/packagegroup/packagegroup-core-security.bb | 1 + 1 file changed, 1 insertion(+)
recipes-security/packagegroup/packagegroup-core-security.bb +1 -0
@@ -78,6 +78,7 @@ RDEPENDS_packagegroup-security-ptest = " \ python-scapy-ptest \ suricata-ptest \ tripwire-ptest \ + python3-fail2ban-ptest \ ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor-ptest", "",d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-ptest", "",d)} \ ptest-runner \
Signature · 1 line
2.7.4
PATCH 13/13 layer.conf: update ptest var to align with core
In reply to Armin Kuster--- conf/layer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
conf/layer.conf +1 -1
@@ -13,4 +13,4 @@ LAYERSERIES_COMPAT_security = "thud" LAYERDEPENDS_security = "core openembedded-layer perl-layer networking-layer meta-python" -DEFAULT_TEST_SUITES_pn-security-build-image = " ${MINTESTSUITE} ssh scp ptest" +DEFAULT_TEST_SUITES_pn-security-build-image = " ${PTESTTESTSUITE}"
Signature · 1 line
2.7.4