summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2025-05-29 11:58:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-29 15:14:37 +0100
commite9b0ebda42fe67fb23ce72dafde419a392ba2149 (patch)
treea1462301676e05d5625ca8b57e8dc41aecac14c1
parente39b3a43ed9aa98faed5a412fe9f1ba7ec8e799b (diff)
downloadpoky-e9b0ebda42fe67fb23ce72dafde419a392ba2149.tar.gz
linux/generate-cve-exclusions: show the name and version of the data source
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. (From OE-Core rev: 5e66e2b79faec2285d249b16457ecc63c4042444) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-kernel/linux/generate-cve-exclusions.py8
1 files 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 b45c2d5702..dfc16663a5 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
11import pathlib 11import pathlib
12import os 12import os
13import glob 13import glob
14import subprocess
14 15
15from packaging.version import Version 16from packaging.version import Version
16 17
@@ -92,13 +93,16 @@ def main(argp=None):
92 parser.add_argument("version", type=Version, help="Kernel version number to generate data for, such as 6.1.38") 93 parser.add_argument("version", type=Version, help="Kernel version number to generate data for, such as 6.1.38")
93 94
94 args = parser.parse_args(argp) 95 args = parser.parse_args(argp)
95 datadir = args.datadir 96 datadir = args.datadir.resolve()
96 version = args.version 97 version = args.version
97 base_version = Version(f"{version.major}.{version.minor}") 98 base_version = Version(f"{version.major}.{version.minor}")
98 99
100 data_version = subprocess.check_output(("git", "describe", "--tags", "HEAD"), cwd=datadir, text=True)
101
99 print(f""" 102 print(f"""
100# Auto-generated CVE metadata, DO NOT EDIT BY HAND. 103# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
101# Generated at {datetime.datetime.now(datetime.timezone.utc)} for version {version} 104# Generated at {datetime.datetime.now(datetime.timezone.utc)} for kernel version {version}
105# From {datadir.name} {data_version}
102 106
103python check_kernel_cve_status_version() {{ 107python check_kernel_cve_status_version() {{
104 this_version = "{version}" 108 this_version = "{version}"