Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: ross.burton@arm.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/2] linux/generate-cve-exclusions: show the name and version of the data source
Date: Fri, 30 May 2025 10:06:52 +0300	[thread overview]
Message-ID: <aDlZDCZusvsZft7_@nuoska> (raw)
In-Reply-To: <20250529105808.1943410-1-ross.burton@arm.com>

Hi,

On Thu, May 29, 2025 at 11:58:07AM +0100, Ross Burton via lists.openembedded.org wrote:
> 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)

It's good to add "--always" if the repo, or clone/cached one, does not include tags
for what ever reason.

Cheers,

-Mikko


      parent reply	other threads:[~2025-05-30  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Mikko Rapeli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aDlZDCZusvsZft7_@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox