aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <saul.wold@windriver.com>2021-09-01 08:44:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-03 09:03:36 +0100
commitdf7c88a48621d32c02f328eedc314f10d475b758 (patch)
tree942fb8934430bcd2908c976708deee78ca00ca3f
parent046c05fec9fc5162d7a14971ed1402d86605d229 (diff)
downloadopenembedded-core-contrib-df7c88a48621d32c02f328eedc314f10d475b758.tar.gz
openembedded-core-contrib-df7c88a48621d32c02f328eedc314f10d475b758.tar.bz2
openembedded-core-contrib-df7c88a48621d32c02f328eedc314f10d475b758.zip
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 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>
-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 aa3e977b02..72c1385feb 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -427,7 +427,7 @@ python do_create_spdx() {
package_doc.creationInfo.creators.append("Person: N/A ()")
recipe_ref = oe.spdx.SPDXExternalDocumentRef()
- recipe_ref.externalDocumentId = "DocumentRef-recipe"
+ recipe_ref.externalDocumentId = "DocumentRef-recipe-" + recipe.name
recipe_ref.spdxDocument = doc.documentNamespace
recipe_ref.checksum.algorithm = "SHA1"
recipe_ref.checksum.checksumValue = doc_sha1
@@ -566,7 +566,7 @@ python do_create_runtime_spdx() {
runtime_doc.creationInfo.creators.append("Person: N/A ()")
package_ref = oe.spdx.SPDXExternalDocumentRef()
- package_ref.externalDocumentId = "DocumentRef-package"
+ package_ref.externalDocumentId = "DocumentRef-package-" + package
package_ref.spdxDocument = package_doc.documentNamespace
package_ref.checksum.algorithm = "SHA1"
package_ref.checksum.checksumValue = package_doc_sha1