Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] linux/generate-cve-exclusions: show the name and version of the data source
@ 2025-05-29 10:58 Ross Burton
  2025-05-29 10:58 ` [PATCH 2/2] linux-yocto: refresh CVE exclusions Ross Burton
  2025-05-30  7:06 ` [OE-core] [PATCH 1/2] linux/generate-cve-exclusions: show the name and version of the data source Mikko Rapeli
  0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2025-05-29 10:58 UTC (permalink / raw)
  To: openembedded-core

Add another comment to state what the data source for the CVE data was,
specifically the basename of the repository and the "git describe" output
of HEAD.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-kernel/linux/generate-cve-exclusions.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/generate-cve-exclusions.py b/meta/recipes-kernel/linux/generate-cve-exclusions.py
index b45c2d5702a..dfc16663a58 100755
--- a/meta/recipes-kernel/linux/generate-cve-exclusions.py
+++ b/meta/recipes-kernel/linux/generate-cve-exclusions.py
@@ -11,6 +11,7 @@ import json
 import pathlib
 import os
 import glob
+import subprocess
 
 from packaging.version import Version
 
@@ -92,13 +93,16 @@ def main(argp=None):
     parser.add_argument("version", type=Version, help="Kernel version number to generate data for, such as 6.1.38")
 
     args = parser.parse_args(argp)
-    datadir = args.datadir
+    datadir = args.datadir.resolve()
     version = args.version
     base_version = Version(f"{version.major}.{version.minor}")
 
+    data_version = subprocess.check_output(("git", "describe", "--tags", "HEAD"), cwd=datadir, text=True)
+
     print(f"""
 # Auto-generated CVE metadata, DO NOT EDIT BY HAND.
-# Generated at {datetime.datetime.now(datetime.timezone.utc)} for version {version}
+# Generated at {datetime.datetime.now(datetime.timezone.utc)} for kernel version {version}
+# From {datadir.name} {data_version}
 
 python check_kernel_cve_status_version() {{
     this_version = "{version}"
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-30  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 10:58 [PATCH 1/2] linux/generate-cve-exclusions: show the name and version of the data source Ross Burton
2025-05-29 10:58 ` [PATCH 2/2] linux-yocto: refresh CVE exclusions Ross Burton
2025-05-30  7:06 ` [OE-core] [PATCH 1/2] linux/generate-cve-exclusions: show the name and version of the data source Mikko Rapeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox