Skip to contentSkip to conversation

kernel-hardening-checker: backport recipe

PATCH In review [email protected] 2 participants 5 messages Aug 19, 2025 – Sep 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-hardening-checker: backport recipe

From: Michael Opdenacker <[email protected]>

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

---
 ...ject.toml-fix-up-license-information.patch | 31 ++++++++++++++
 ...-relax-setuptool-version-requirement.patch | 29 +++++++++++++
 .../kernel-hardening-checker_0.6.10.2.bb      | 41 +++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb
meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch new file +31 -0
new file mode 100644
index 0000000000..4460146722
@@ -0,0 +1,31 @@
+From e94c486c6c3473979ce5be627f030cc95ce165e6 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <[email protected]>
+Date: Sun, 17 Aug 2025 17:27:21 +0200
+Subject: [PATCH 1/2] pyproject.toml: fix up license information
+
+Without this change, the Python tooling complains that you
+can't have both "license" and "license-files" settings in pyproject.toml.
+
+This issue doesn't happen any more with the Python tooling
+in master (as of August 2025), so it's irrelevant for upstream.
+
+Signed-off-by: Michael Opdenacker <[email protected]>
+Upstream-Status: Inappropriate [oe specific]
+---
+ pyproject.toml | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index a0b75c3..79e710b 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -20,8 +20,7 @@ authors = [
+ maintainers = [
+   {name = "Alexander Popov", email = "[email protected]"}
+ ]
+-license = "GPL-3.0-only"
+-license-files = ["LICENSE.txt"]
++license = { text = "GPL-3.0-only" }
+ classifiers = [
+     "Development Status :: 5 - Production/Stable",
+     "Topic :: Security",
meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch new file +29 -0
new file mode 100644
index 0000000000..05a8126c4e
@@ -0,0 +1,29 @@
+From 7c64511d2dcb58bc4d83dd41667c1f9295ca9712 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <[email protected]>
+Date: Tue, 19 Aug 2025 21:47:05 +0200
+Subject: [PATCH 2/2] pyproject.toml: relax setuptool version requirement
+
+To match with what's available in Scarthgap
+It turns out that setuptools 69 is sufficient for building this tool.
+The developer may have aligned the version with his testing environment.
+
+This patch is not needed on meta-openembedded master which has a recent enough
+version.
+
+Signed-off-by: Michael Opdenacker <[email protected]>
+Upstream-Status: Inappropriate [oe specific]
+---
+ pyproject.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 79e710b..a8b59d8 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools >= 77.0.3"]
++requires = ["setuptools >= 69"]
+ build-backend = "setuptools.build_meta"
+ 
+ [tool.setuptools.packages.find]
meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb new file +41 -0

41 lines not on this page · raw message

#1 lore raw
Quoted 8 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

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

Quoted 8 lines
---
 ...ject.toml-fix-up-license-information.patch | 31 ++++++++++++++
 ...-relax-setuptool-version-requirement.patch | 29 +++++++++++++
 .../kernel-hardening-checker_0.6.10.2.bb      | 41 +++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch
 create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb

Note that new recipes are only accepted in master branch, not in stable branches.

#2 lore raw

Hi Gyorgy

Thanks for your reply!

Quoted 17 lines · Gyorgy Sarvari
Quoted 8 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

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

Quoted 8 lines
---
  ...ject.toml-fix-up-license-information.patch | 31 ++++++++++++++
  ...-relax-setuptool-version-requirement.patch | 29 +++++++++++++
  .../kernel-hardening-checker_0.6.10.2.bb      | 41 +++++++++++++++++++
  3 files changed, 101 insertions(+)

create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb

Quoted 2 lines

Note that new recipes are only accepted in master branch, not in stable branches.

However, this has already been accepted in master (https://git.openembedded.org/meta-openembedded/commit/?id=5ae3536204ba3764b03647ab75169ee65ca43531)
It's true that meta-oe didn't originally have this recipe, but what's the harm in sharing with LTS users that could have the same need as mine? The risk of breaking tests again meta-oe?

I'm reading https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS ... I guess such a backport qualifies as a "new feature". But does this really apply to meta-openembedded which is not officially part of the LTS?

On the other hand, mixin layers are supposed to be for "potentially invasive changes", which is not the case here. So, where are such (new) backports supposed to be shared?

Thanks
Michael.

Signature · 4 lines
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
#3 lore raw
Quoted 22 lines · Michael Opdenacker

Hi Gyorgy

Thanks for your reply!

Quoted 17 lines · Gyorgy Sarvari
Quoted 16 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

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

---
  ...ject.toml-fix-up-license-information.patch | 31 ++++++++++++++
  ...-relax-setuptool-version-requirement.patch | 29 +++++++++++++
  .../kernel-hardening-checker_0.6.10.2.bb      | 41 +++++++++++++++++++
  3 files changed, 101 insertions(+)

create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0001-pyproject.toml-fix-up-license-information.patch create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/files/0002-pyproject.toml-relax-setuptool-version-requirement.patch create mode 100644 meta-oe/recipes-security/kernel-hardening-checker/kernel-hardening-checker_0.6.10.2.bb

Quoted 7 lines
Quoted 2 lines

Note that new recipes are only accepted in master branch, not in stable branches.

However, this has already been accepted in master
(https://git.openembedded.org/meta-openembedded/commit/?id=5ae3536204ba3764b03647ab75169ee65ca43531)
It's true that meta-oe didn't originally have this recipe, but what's the harm in sharing with LTS users that could have the same need as mine? The risk of breaking tests again meta-oe?

At the end of the day it's of course the branch maintainer's call if he accepts the extra recipe and the testing and maintenance tasks that come with it, but I don't recall it happening in recent years.

I think it would make precedent - if this recipe is accepted, why wouldn't others be accepted? When does a small addition become an unacceptably risky or big one? Stability is boring - and that's the point. This of course is just the personal opinion of an internet rando (me), and not official in any shape or form.

Quoted 7 lines

I'm reading https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS
... I guess such a backport qualifies as a "new feature". But does this really apply to meta-openembedded which is not officially part of the LTS?

On the other hand, mixin layers are supposed to be for "potentially invasive changes", which is not the case here.
So, where are such (new) backports supposed to be shared?

Such backports usually live in product specific layers (sometimes in other community layers that take up the task of acting like a mixin layer) until the project updates to a release that contains that recipe.

Quoted 3 lines

Thanks
Michael.

#4 lore raw

Greetings.

Quoted 19 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 5 lines

However, this has already been accepted in master
(https://git.openembedded.org/meta-openembedded/commit/?id=5ae3536204ba3764b03647ab75169ee65ca43531)
It's true that meta-oe didn't originally have this recipe, but what's the harm in sharing with LTS users that could have the same need as mine? The risk of breaking tests again meta-oe?

At the end of the day it's of course the branch maintainer's call if he accepts the extra recipe and the testing and maintenance tasks that come with it, but I don't recall it happening in recent years.

I think it would make precedent - if this recipe is accepted, why wouldn't others be accepted? When does a small addition become an unacceptably risky or big one? Stability is boring - and that's the point. This of course is just the personal opinion of an internet rando (me), and not official in any shape or form.

Quoted 4 lines

I'm reading https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS
... I guess such a backport qualifies as a "new feature". But does this really apply to meta-openembedded which is not officially part of the LTS?

Quoted 6 lines
Quoted 3 lines

On the other hand, mixin layers are supposed to be for "potentially invasive changes", which is not the case here.
So, where are such (new) backports supposed to be shared?

Such backports usually live in product specific layers (sometimes in other community layers that take up the task of acting like a mixin layer) until the project updates to a release that contains that recipe.

Any further objections to adding this backport to the scarthgap branch of meta-oe?

I guess there is no risk of breaking anything else in meta-oe/scarthgap, but if we don't want to accept exceptions to the rule (even for meta-oe which is not strictly part of the LTS), I'll create my own layer for LTS users who could be interested. I guess meta-security won't be a suitable candidate the upstream recipe is in meta-oe.

Cheers
Michael.

Signature · 4 lines
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/