]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
spdx3: support to override the version of a package in SBOM 3
authorHongxu Jia <hongxu.jia@windriver.com>
Mon, 24 Mar 2025 06:54:07 +0000 (14:54 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Mar 2025 17:18:05 +0000 (17:18 +0000)
commite6ff5f4d870624795bd36572f5c2bfeec90d83ce
tree3c29ba9e63c9488323ebf5bd082cf2f4c49d9bcf
parent15f256962f2b0f64c887137259a7f96cdac63150
spdx3: support to override the version of a package in SBOM 3

By default, still use ${PV} as the the version of a package in SBOM 3
$ bitbake acl
$ jq . tmp/deploy/spdx/3.0.1/core2-64/packages/package-acl.spdx.json
...
    {
      "type": "software_Package",
       ...
      "name": "acl",
      "software_packageVersion": "2.3.2"
    },
...

Support to override it by setting SPDX_PACKAGE_VERSION, such as
set SPDX_PACKAGE_VERSION = "${EXTENDPKGV}" in local.conf to append
PR to software_packageVersion in SBOM 3
$ echo 'SPDX_PACKAGE_VERSION = "${EXTENDPKGV}"' >> conf/local.conf
$ bitbake acl
$ jq . tmp/deploy/spdx/3.0.1/core2-64/packages/package-acl.spdx.json
...
    {
      "type": "software_Package",
       ...
      "name": "acl",
      "software_packageVersion": "2.3.2-r0"
    },
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/create-spdx-3.0.bbclass
meta/lib/oe/spdx30_tasks.py