diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/create-spdx-2.2.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass index 9aede86870..28a42e009f 100644 --- a/meta/classes/create-spdx-2.2.bbclass +++ b/meta/classes/create-spdx-2.2.bbclass | |||
@@ -32,6 +32,8 @@ SPDX_PRETTY ??= "0" | |||
32 | 32 | ||
33 | SPDX_LICENSES ??= "${COREBASE}/meta/files/spdx-licenses.json" | 33 | SPDX_LICENSES ??= "${COREBASE}/meta/files/spdx-licenses.json" |
34 | 34 | ||
35 | SPDX_CUSTOM_ANNOTATION_VARS ??= "" | ||
36 | |||
35 | SPDX_ORG ??= "OpenEmbedded ()" | 37 | SPDX_ORG ??= "OpenEmbedded ()" |
36 | SPDX_SUPPLIER ??= "Organization: ${SPDX_ORG}" | 38 | SPDX_SUPPLIER ??= "Organization: ${SPDX_ORG}" |
37 | SPDX_SUPPLIER[doc] = "The SPDX PackageSupplier field for SPDX packages created from \ | 39 | SPDX_SUPPLIER[doc] = "The SPDX PackageSupplier field for SPDX packages created from \ |
@@ -404,7 +406,6 @@ def collect_dep_sources(d, dep_recipes): | |||
404 | 406 | ||
405 | return sources | 407 | return sources |
406 | 408 | ||
407 | |||
408 | python do_create_spdx() { | 409 | python do_create_spdx() { |
409 | from datetime import datetime, timezone | 410 | from datetime import datetime, timezone |
410 | import oe.sbom | 411 | import oe.sbom |
@@ -481,6 +482,10 @@ python do_create_spdx() { | |||
481 | if description: | 482 | if description: |
482 | recipe.description = description | 483 | recipe.description = description |
483 | 484 | ||
485 | if d.getVar("SPDX_CUSTOM_ANNOTATION_VARS"): | ||
486 | for var in d.getVar('SPDX_CUSTOM_ANNOTATION_VARS').split(): | ||
487 | recipe.annotations.append(create_annotation(d, var + "=" + d.getVar(var))) | ||
488 | |||
484 | # Some CVEs may be patched during the build process without incrementing the version number, | 489 | # Some CVEs may be patched during the build process without incrementing the version number, |
485 | # so querying for CVEs based on the CPE id can lead to false positives. To account for this, | 490 | # so querying for CVEs based on the CPE id can lead to false positives. To account for this, |
486 | # save the CVEs fixed by patches to source information field in the SPDX. | 491 | # save the CVEs fixed by patches to source information field in the SPDX. |