summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@rootcommit.com>2025-08-19 20:39:46 +0000
committerAnuj Mittal <anuj.mittal@intel.com>2025-09-12 08:15:13 +0800
commit2222925e923f8b151f62a7a5fb343be52aab0b15 (patch)
tree6e6fcf1967ce0dd01928622595db641f230468ab
parentf2b163a416a1e96b8a4e6f428380fdbfc1fcaaec (diff)
downloadmeta-openembedded-2222925e923f8b151f62a7a5fb343be52aab0b15.tar.gz
kernel-hardening-checker: backport recipe
This recipe is a Scarthgap backport of kernel-hardening-checker_0.6.10.2.bb in the master branch as of August 19, 2025. Tested on qemux86-64 and on beaglebone-yocto Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch31
-rw-r--r--meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch29
-rw-r--r--meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb41
3 files changed, 101 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch b/meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch
new file mode 100644
index 0000000000..4460146722
--- /dev/null
+++ b/meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch
@@ -0,0 +1,31 @@
1From e94c486c6c3473979ce5be627f030cc95ce165e6 Mon Sep 17 00:00:00 2001
2From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
3Date: Sun, 17 Aug 2025 17:27:21 +0200
4Subject: [PATCH 1/2] pyproject.toml: fix up license information
5
6Without this change, the Python tooling complains that you
7can't have both "license" and "license-files" settings in pyproject.toml.
8
9This issue doesn't happen any more with the Python tooling
10in master (as of August 2025), so it's irrelevant for upstream.
11
12Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
13Upstream-Status: Inappropriate [oe specific]
14---
15 pyproject.toml | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18diff --git a/pyproject.toml b/pyproject.toml
19index a0b75c3..79e710b 100644
20--- a/pyproject.toml
21+++ b/pyproject.toml
22@@ -20,8 +20,7 @@ authors = [
23 maintainers = [
24 {name = "Alexander Popov", email = "alex.popov@linux.com"}
25 ]
26-license = "GPL-3.0-only"
27-license-files = ["LICENSE.txt"]
28+license = { text = "GPL-3.0-only" }
29 classifiers = [
30 "Development Status :: 5 - Production/Stable",
31 "Topic :: Security",
diff --git a/meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch b/meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch
new file mode 100644
index 0000000000..05a8126c4e
--- /dev/null
+++ b/meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch
@@ -0,0 +1,29 @@
1From 7c64511d2dcb58bc4d83dd41667c1f9295ca9712 Mon Sep 17 00:00:00 2001
2From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
3Date: Tue, 19 Aug 2025 21:47:05 +0200
4Subject: [PATCH 2/2] pyproject.toml: relax setuptool version requirement
5
6To match with what's available in Scarthgap
7It turns out that setuptools 69 is sufficient for building this tool.
8The developer may have aligned the version with his testing environment.
9
10This patch is not needed on meta-openembedded master which has a recent enough
11version.
12
13Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
14Upstream-Status: Inappropriate [oe specific]
15---
16 pyproject.toml | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/pyproject.toml b/pyproject.toml
20index 79e710b..a8b59d8 100644
21--- a/pyproject.toml
22+++ b/pyproject.toml
23@@ -1,5 +1,5 @@
24 [build-system]
25-requires = ["setuptools >= 77.0.3"]
26+requires = ["setuptools >= 69"]
27 build-backend = "setuptools.build_meta"
28
29 [tool.setuptools.packages.find]
diff --git a/meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb b/meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb
new file mode 100644
index 0000000000..c0ae0f0d3c
--- /dev/null
+++ b/meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb
@@ -0,0 +1,41 @@
1SUMMARY = "A tool for checking the security hardening options of the Linux kernel"
2DESCRIPTION = "\
3 There are plenty of security hardening options for the Linux kernel; Kconfig \
4 options (compile-time); Kernel cmdline arguments (boot-time); Sysctl \
5 parameters (runtime). A lot of them have to be enabled manually to make the \
6 system more secure which is difficult to track. This tool helps with this \
7 task by checking and reporting about the settings compared to a list of \
8 recommendation. \
9"
10HOMEPAGE = "https://github.com/a13xp0p0v/kernel-hardening-checker"
11BUGTRACKER = "https://github.com/a13xp0p0v/kernel-hardening-checker/issues"
12LICENSE = "GPL-3.0-only"
13LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504"
14
15SRC_URI = "git://github.com/a13xp0p0v/kernel-hardening-checker;protocol=https;branch=master \
16 file://0001-pyproject.toml-fix-up-license-information.patch \
17 file://0002-pyproject.toml-relax-setuptool-version-requirement.patch"
18
19SRCREV = "0ebece346f187e7d3589883cc1d194fcd1c3cda8"
20
21S = "${WORKDIR}/git"
22
23PACKAGE_ARCH = "${MACHINE_ARCH}"
24
25RDEPENDS:${PN} = "\
26 python3-json \
27 python3-misc \
28 python3-compression \
29 bash \
30"
31
32# /boot/config is required for the analysis
33RRECOMMENDS:${PN}:class-target = "\
34 kernel-dev \
35"
36
37inherit python_setuptools_build_meta
38
39# allow to run on build host, if you don't want it in the image
40# oe-run-native kernel-hardening-checker-native kernel-hardening-checker ...
41BBCLASSEXTEND = "native"