Skip to contentSkip to conversation

libseccomp: fix ptest failures.

PATCH New akuster 1 participant 4 messages Sep 30, 2020

lore
Share & tools
lore

akuster

author
#0 lore raw

PATCH 1/4 libseccomp: fix ptest failures.

Fixes:
BusyBox v1.32.0 () multi-call binary.
Usage: dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]

Don't use Busybox dd, not compatable. Use coreutils

---
 recipes-security/libseccomp/libseccomp_2.5.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-security/libseccomp/libseccomp_2.5.0.bb +1 -1
index 35365d5..0cf2d70 100644
@@ -45,4 +45,4 @@ do_install_ptest() {
 FILES_${PN} = "${bindir} ${libdir}/${BPN}.so*"
 FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
 
-RDEPENDS_${PN}-ptest = "bash"
+RDEPENDS_${PN}-ptest = "coreutils bash"
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/4 packagegroup-core-security-ptest: remove keyutils-ptest

---
 recipes-core/packagegroup/packagegroup-core-security-ptest.bb | 1 -
 1 file changed, 1 deletion(-)
recipes-core/packagegroup/packagegroup-core-security-ptest.bb +0 -1
index cf34ded..75b816a 100644
@@ -17,7 +17,6 @@ SUMMARY_${PN} = "Security packages with ptests"
 RDEPENDS_${PN} = " \
     ptest-runner \
     samhain-standalone-ptest \
-    keyutils-ptest \
     libseccomp-ptest \
     python3-scapy-ptest \
     suricata-ptest \
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 3/4 security-test-image: simplify

In reply to akuster
---
 recipes-core/images/security-test-image.bb    | 26 ++-----------------
 .../packagegroup-core-security.bb             | 14 ++++++++++
 2 files changed, 16 insertions(+), 24 deletions(-)
recipes-core/images/security-test-image.bb +2 -24
index c71d726..babe3fd 100644
@@ -1,33 +1,11 @@
 DESCRIPTION = "A small image for testing meta-security packages"
 
+require security-build-image.bb
+
 IMAGE_FEATURES += "ssh-server-openssh"
 
 TEST_SUITES = "ssh ping ptest apparmor clamav samhain sssd tripwire checksec smack suricata"
 
 INSTALL_CLAMAV_CVD = "1"
 
-IMAGE_INSTALL = "\
-    packagegroup-base \
-    packagegroup-core-boot \
-    packagegroup-core-security-ptest \
-    clamav \
-    tripwire \
-    checksec \
-    suricata \
-    samhain-standalone \
-    ${@bb.utils.contains("DISTRO_FEATURES", "pam", "sssd", "",d)} \
-    ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor", "",d)} \
-    ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack-test", "",d)} \
-    os-release \
-    " 
-
-
-IMAGE_LINGUAS ?= " "
-
-LICENSE = "MIT"
-
-inherit core-image
-
-export IMAGE_BASENAME = "security-test-image"
-
 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
recipes-core/packagegroup/packagegroup-core-security.bb +14 -0
index 789f4ea..9546e0f 100644
@@ -13,6 +13,7 @@ PACKAGES = "\
     packagegroup-security-hardening \
     packagegroup-security-ids  \
     packagegroup-security-mac  \
+    ${@bb.utils.contains("DISTRO_FEATURES", "ptest", "packagegroup-meta-security-ptest-packages", "", d)} \
     "
 
 RDEPENDS_packagegroup-core-security = "\
@@ -22,6 +23,7 @@ RDEPENDS_packagegroup-core-security = "\
     packagegroup-security-hardening \
     packagegroup-security-ids  \
     packagegroup-security-mac  \
+    ${@bb.utils.contains("DISTRO_FEATURES", "ptest", "packagegroup-meta-security-ptest-packages", "", d)} \
     "
 
 SUMMARY_packagegroup-security-utils = "Security utilities"
@@ -76,3 +78,15 @@ RDEPENDS_packagegroup-security-mac = " \
     ${@bb.utils.contains("DISTRO_FEATURES", "apparmor", "apparmor", "",d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "smack", "smack", "",d)} \
     "
+
+RDEPENDS_packagegroup-meta-security-ptest-packages = "\
+    ptest-runner \
+    samhain-standalone-ptest \
+    libseccomp-ptest \
+    python3-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)} \
+"
Signature · 1 line
2.17.1
author
#3 lore raw

PATCH 4/4 packagegroup-core-security-ptest: remove

In reply to akuster
---
 .../packagegroup-core-security-ptest.bb       | 27 -------------------
 1 file changed, 27 deletions(-)
 delete mode 100644 recipes-core/packagegroup/packagegroup-core-security-ptest.bb
recipes-core/packagegroup/packagegroup-core-security-ptest.bb deleted +0 -27
deleted file mode 100644
index 75b816a..0000000
@@ -1,27 +0,0 @@
-DESCRIPTION = "Security ptest packagegroup"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-inherit features_check
-
-REQUIRED_DISTRO_FEATURES = "ptest"
-
-PACKAGES = "\
-    ${PN} \
-    "
-
-ALLOW_EMPTY_${PN} = "1"
-
-SUMMARY_${PN} = "Security packages with ptests"
-RDEPENDS_${PN} = " \
-    ptest-runner \
-    samhain-standalone-ptest \
-    libseccomp-ptest \
-    python3-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)} \
-    "
Signature · 1 line
2.17.1