mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
e39b3a43ed
commit
e9b0ebda42
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user