diff options
author | Saul Wold <saul.wold@windriver.com> | 2021-09-01 08:44:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-03 09:53:28 +0100 |
commit | 0d5c2d9f352bb6e81d6e4f2592a074195c26f578 (patch) | |
tree | ff73104aac0639ca91f5971c29e895914a5395fb /meta | |
parent | 25e41200c7e548d5c42ddd2328a43cc2c894d2ea (diff) | |
download | poky-0d5c2d9f352bb6e81d6e4f2592a074195c26f578.tar.gz |
classes/create-spdx: extend DocumentRef to include name
This will create a more uniq DocumentRef, which will allow
the individual spdx files to be merged into a single SBOM
file reflecting the image. Do the same with the runtime dependencies
also
(From OE-Core rev: df7c88a48621d32c02f328eedc314f10d475b758)
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/create-spdx.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index aa3e977b02..72c1385feb 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass | |||
@@ -427,7 +427,7 @@ python do_create_spdx() { | |||
427 | package_doc.creationInfo.creators.append("Person: N/A ()") | 427 | package_doc.creationInfo.creators.append("Person: N/A ()") |
428 | 428 | ||
429 | recipe_ref = oe.spdx.SPDXExternalDocumentRef() | 429 | recipe_ref = oe.spdx.SPDXExternalDocumentRef() |
430 | recipe_ref.externalDocumentId = "DocumentRef-recipe" | 430 | recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name |
431 | recipe_ref.spdxDocument = doc.documentNamespace | 431 | recipe_ref.spdxDocument = doc.documentNamespace |
432 | recipe_ref.checksum.algorithm = "SHA1" | 432 | recipe_ref.checksum.algorithm = "SHA1" |
433 | recipe_ref.checksum.checksumValue = doc_sha1 | 433 | recipe_ref.checksum.checksumValue = doc_sha1 |
@@ -566,7 +566,7 @@ python do_create_runtime_spdx() { | |||
566 | runtime_doc.creationInfo.creators.append("Person: N/A ()") | 566 | runtime_doc.creationInfo.creators.append("Person: N/A ()") |
567 | 567 | ||
568 | package_ref = oe.spdx.SPDXExternalDocumentRef() | 568 | package_ref = oe.spdx.SPDXExternalDocumentRef() |
569 | package_ref.externalDocumentId = "DocumentRef-package" | 569 | package_ref.externalDocumentId = "DocumentRef-package-" + package |
570 | package_ref.spdxDocument = package_doc.documentNamespace | 570 | package_ref.spdxDocument = package_doc.documentNamespace |
571 | package_ref.checksum.algorithm = "SHA1" | 571 | package_ref.checksum.algorithm = "SHA1" |
572 | package_ref.checksum.checksumValue = package_doc_sha1 | 572 | package_ref.checksum.checksumValue = package_doc_sha1 |