summaryrefslogtreecommitdiffstats
path: root/meta/classes/create-spdx.bbclass
diff options
context:
space:
mode:
authorSaul Wold <saul.wold@windriver.com>2021-09-01 13:44:48 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-03 08:53:28 (GMT)
commit0d5c2d9f352bb6e81d6e4f2592a074195c26f578 (patch)
treeff73104aac0639ca91f5971c29e895914a5395fb /meta/classes/create-spdx.bbclass
parent25e41200c7e548d5c42ddd2328a43cc2c894d2ea (diff)
downloadpoky-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/classes/create-spdx.bbclass')
-rw-r--r--meta/classes/create-spdx.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index aa3e977..72c1385 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