| Message ID | 20241226054321.143382-1-hongxu.jia@windriver.com |
|---|---|
| State | Accepted, archived |
| Commit | 0530b45a5f27adff55251ce909ad4f077c1076d6 |
| Headers | show |
| Series | [1/2] meta/lib/oe/spdx30_tasks.py: set license alias to hasConcludedLicense relationship | expand |
On Thu Dec 26, 2024 at 6:43 AM CET, hongxu via lists.openembedded.org wrote: > Set license alias other than spdxId to hasConcludedLicense relationship > > $ echo 'MACHINE = "qemux86-64"' >> conf/local.conf > $ bitbake shadow > $ In tmp/deploy/spdx/3.0.1/corei7-64/recipes/recipe-shadow.spdx.json > Before this commit > ... > { > "type": "Relationship", > ... > "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", > "relationshipType": "hasConcludedLicense", > "to": [ > "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/license/3_24_0/BSD-3-Clause" > ] > }, > ... > > After this commit > ... > { > "type": "Relationship", > ... > "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", > "relationshipType": "hasConcludedLicense", > "to": [ > "http://spdxdocs.org/openembedded-alias/by-doc-hash/cc72db638e3f8e283e722af0ecc77d19f93cc6736700ee76477e3773b6b07b05/shadow/UNIHASH/license/3_24_0/BSD-3-Clause" > ] > }, > ... > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- Hi Hongxu, Just to let you know, I took both this series and the other one, and I had a successful build on the autobuilder, without any of the SPDX warnings we had previously. So I believe issues are now solved.
Got it, thanks for the reply //Hongxu
Reviewed-by: Joshua Watt <JPEWhacker@gmail.com> On Wed, Dec 25, 2024 at 10:43 PM Hongxu Jia <hongxu.jia@windriver.com> wrote: > > Set license alias other than spdxId to hasConcludedLicense relationship > > $ echo 'MACHINE = "qemux86-64"' >> conf/local.conf > $ bitbake shadow > $ In tmp/deploy/spdx/3.0.1/corei7-64/recipes/recipe-shadow.spdx.json > Before this commit > ... > { > "type": "Relationship", > ... > "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", > "relationshipType": "hasConcludedLicense", > "to": [ > "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/license/3_24_0/BSD-3-Clause" > ] > }, > ... > > After this commit > ... > { > "type": "Relationship", > ... > "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", > "relationshipType": "hasConcludedLicense", > "to": [ > "http://spdxdocs.org/openembedded-alias/by-doc-hash/cc72db638e3f8e283e722af0ecc77d19f93cc6736700ee76477e3773b6b07b05/shadow/UNIHASH/license/3_24_0/BSD-3-Clause" > ] > }, > ... > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > meta/lib/oe/spdx30_tasks.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > index ae75311ed1..12588b3949 100644 > --- a/meta/lib/oe/spdx30_tasks.py > +++ b/meta/lib/oe/spdx30_tasks.py > @@ -524,7 +524,7 @@ def create_spdx(d): > build_objset.new_relationship( > source_files, > oe.spdx30.RelationshipType.hasConcludedLicense, > - [recipe_spdx_license], > + [oe.sbom30.get_element_link_id(recipe_spdx_license)], > ) > > dep_sources = {} > -- > 2.34.1 >
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py index ae75311ed1..12588b3949 100644 --- a/meta/lib/oe/spdx30_tasks.py +++ b/meta/lib/oe/spdx30_tasks.py @@ -524,7 +524,7 @@ def create_spdx(d): build_objset.new_relationship( source_files, oe.spdx30.RelationshipType.hasConcludedLicense, - [recipe_spdx_license], + [oe.sbom30.get_element_link_id(recipe_spdx_license)], ) dep_sources = {}
Set license alias other than spdxId to hasConcludedLicense relationship $ echo 'MACHINE = "qemux86-64"' >> conf/local.conf $ bitbake shadow $ In tmp/deploy/spdx/3.0.1/corei7-64/recipes/recipe-shadow.spdx.json Before this commit ... { "type": "Relationship", ... "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", "relationshipType": "hasConcludedLicense", "to": [ "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/license/3_24_0/BSD-3-Clause" ] }, ... After this commit ... { "type": "Relationship", ... "from": "http://spdx.org/spdxdocs/shadow-10e66933-65cf-5a2d-9a1d-99b12a405441/c34a0920c2f689375e786a80ab3176b844997d543b73dd5f99e6ffa8fcc72fee/source/8", "relationshipType": "hasConcludedLicense", "to": [ "http://spdxdocs.org/openembedded-alias/by-doc-hash/cc72db638e3f8e283e722af0ecc77d19f93cc6736700ee76477e3773b6b07b05/shadow/UNIHASH/license/3_24_0/BSD-3-Clause" ] }, ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/lib/oe/spdx30_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)