mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +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: a06234b35977b9a2af2679d6c601a79acbde5f7c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5e66e2b79faec2285d249b16457ecc63c4042444) Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
parent
1b038ff8ed
commit
19d0501915
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user