From 666a0c6ccfcfc116aed905a12525256e6385d11c Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Tue, 13 Jun 2023 11:01:48 -0400 Subject: lynis: move to main meta-security layer Signed-off-by: Armin Kuster --- ...001-osdetection-add-OpenEmbedded-and-Poky.patch | 51 ---------------------- .../recipes-auditors/lynis/lynis_3.0.8.bb | 42 ------------------ ...001-osdetection-add-OpenEmbedded-and-Poky.patch | 51 ++++++++++++++++++++++ recipes-compliance/lynis/lynis_3.0.8.bb | 42 ++++++++++++++++++ 4 files changed, 93 insertions(+), 93 deletions(-) delete mode 100644 meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch delete mode 100644 meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb create mode 100644 recipes-compliance/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch create mode 100644 recipes-compliance/lynis/lynis_3.0.8.bb diff --git a/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch b/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch deleted file mode 100644 index d365ec1..0000000 --- a/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 4b1de197ee0dd259cc05d5faf7fd38b580d841d2 Mon Sep 17 00:00:00 2001 -From: Armin Kuster -Date: Tue, 2 May 2023 16:22:13 -0400 -Subject: [PATCH] osdetection: add OpenEmbedded and Poky - -Signed-off-by: Armin Kuster - -Upstream-Status: Pending -https://github.com/CISOfy/lynis/pull/1390 - -Signed-off-by: Armin Kuster - ---- - include/osdetection | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/include/osdetection b/include/osdetection -index 989b1b3..e5974e5 100644 ---- a/include/osdetection -+++ b/include/osdetection -@@ -308,6 +308,12 @@ - OS_REDHAT_OR_CLONE=1 - OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - ;; -+ "nodistro") -+ LINUX_VERSION="openembedded" -+ OS_NAME="OpenEmbedded" -+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') -+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') -+ ;; - "opensuse-tumbleweed") - LINUX_VERSION="openSUSE Tumbleweed" - # It's rolling release but has a snapshot version (the date of the snapshot) -@@ -330,6 +336,14 @@ - OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - ;; -+ "poky") -+ LINUX_VERSION="Poky" -+ OS_NAME="openembedded" -+ LINUX_VERSION_LIKE="openembedded" -+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') -+ OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') -+ -+ ;; - "pop") - LINUX_VERSION="Pop!_OS" - LINUX_VERSION_LIKE="Ubuntu" --- -2.25.1 - diff --git a/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb b/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb deleted file mode 100644 index 0a49812..0000000 --- a/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2017 Armin Kuster -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Lynis is a free and open source security and auditing tool." -HOMEDIR = "https://cisofy.com/" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3edd6782854304fd11da4975ab9799c1" - -SRC_URI = "https://cisofy.com/files/${BPN}-${PV}.tar.gz \ - file://0001-osdetection-add-OpenEmbedded-and-Poky.patch \ - " - -SRC_URI[sha256sum] = "98373a4cc9d0471ab9bebb249e442fcf94b6bf6d4e9c6fc0b22bca1506646c63" - -S = "${WORKDIR}/${BPN}" - -inherit autotools-brokensep - -do_compile[noexec] = "1" -do_configure[noexec] = "1" - -do_install () { - install -d ${D}/${bindir} - install -d ${D}/${sysconfdir}/lynis - install -m 555 ${S}/lynis ${D}/${bindir} - - install -d ${D}/${datadir}/lynis/db - install -d ${D}/${datadir}/lynis/plugins - install -d ${D}/${datadir}/lynis/include - install -d ${D}/${datadir}/lynis/extras - - cp -r ${S}/db/* ${D}/${datadir}/lynis/db/. - cp -r ${S}/plugins/* ${D}/${datadir}/lynis/plugins/. - cp -r ${S}/include/* ${D}/${datadir}/lynis/include/. - cp -r ${S}/extras/* ${D}/${datadir}/lynis/extras/. - cp ${S}/*.prf ${D}/${sysconfdir}/lynis -} - -FILES:${PN} += "${sysconfdir}/developer.prf ${sysconfdir}/default.prf" -FILES:${PN}-doc += "lynis.8 FAQ README CHANGELOG.md CONTRIBUTIONS.md CONTRIBUTORS.md" - -RDEPENDS:${PN} += "procps findutils" diff --git a/recipes-compliance/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch b/recipes-compliance/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch new file mode 100644 index 0000000..d365ec1 --- /dev/null +++ b/recipes-compliance/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch @@ -0,0 +1,51 @@ +From 4b1de197ee0dd259cc05d5faf7fd38b580d841d2 Mon Sep 17 00:00:00 2001 +From: Armin Kuster +Date: Tue, 2 May 2023 16:22:13 -0400 +Subject: [PATCH] osdetection: add OpenEmbedded and Poky + +Signed-off-by: Armin Kuster + +Upstream-Status: Pending +https://github.com/CISOfy/lynis/pull/1390 + +Signed-off-by: Armin Kuster + +--- + include/osdetection | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/include/osdetection b/include/osdetection +index 989b1b3..e5974e5 100644 +--- a/include/osdetection ++++ b/include/osdetection +@@ -308,6 +308,12 @@ + OS_REDHAT_OR_CLONE=1 + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + ;; ++ "nodistro") ++ LINUX_VERSION="openembedded" ++ OS_NAME="OpenEmbedded" ++ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') ++ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') ++ ;; + "opensuse-tumbleweed") + LINUX_VERSION="openSUSE Tumbleweed" + # It's rolling release but has a snapshot version (the date of the snapshot) +@@ -330,6 +336,14 @@ + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + ;; ++ "poky") ++ LINUX_VERSION="Poky" ++ OS_NAME="openembedded" ++ LINUX_VERSION_LIKE="openembedded" ++ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') ++ OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') ++ ++ ;; + "pop") + LINUX_VERSION="Pop!_OS" + LINUX_VERSION_LIKE="Ubuntu" +-- +2.25.1 + diff --git a/recipes-compliance/lynis/lynis_3.0.8.bb b/recipes-compliance/lynis/lynis_3.0.8.bb new file mode 100644 index 0000000..0a49812 --- /dev/null +++ b/recipes-compliance/lynis/lynis_3.0.8.bb @@ -0,0 +1,42 @@ +# Copyright (C) 2017 Armin Kuster +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Lynis is a free and open source security and auditing tool." +HOMEDIR = "https://cisofy.com/" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3edd6782854304fd11da4975ab9799c1" + +SRC_URI = "https://cisofy.com/files/${BPN}-${PV}.tar.gz \ + file://0001-osdetection-add-OpenEmbedded-and-Poky.patch \ + " + +SRC_URI[sha256sum] = "98373a4cc9d0471ab9bebb249e442fcf94b6bf6d4e9c6fc0b22bca1506646c63" + +S = "${WORKDIR}/${BPN}" + +inherit autotools-brokensep + +do_compile[noexec] = "1" +do_configure[noexec] = "1" + +do_install () { + install -d ${D}/${bindir} + install -d ${D}/${sysconfdir}/lynis + install -m 555 ${S}/lynis ${D}/${bindir} + + install -d ${D}/${datadir}/lynis/db + install -d ${D}/${datadir}/lynis/plugins + install -d ${D}/${datadir}/lynis/include + install -d ${D}/${datadir}/lynis/extras + + cp -r ${S}/db/* ${D}/${datadir}/lynis/db/. + cp -r ${S}/plugins/* ${D}/${datadir}/lynis/plugins/. + cp -r ${S}/include/* ${D}/${datadir}/lynis/include/. + cp -r ${S}/extras/* ${D}/${datadir}/lynis/extras/. + cp ${S}/*.prf ${D}/${sysconfdir}/lynis +} + +FILES:${PN} += "${sysconfdir}/developer.prf ${sysconfdir}/default.prf" +FILES:${PN}-doc += "lynis.8 FAQ README CHANGELOG.md CONTRIBUTIONS.md CONTRIBUTORS.md" + +RDEPENDS:${PN} += "procps findutils" -- cgit v1.2.3-54-g00ecf