<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/create-spdx-3.0.bbclass, branch master-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=master-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=master-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-10-27T11:37:43+00:00</updated>
<entry>
<title>create-spdx-3.0: add SPDX_LICENSES to SPDX3_DEP_FILES</title>
<updated>2025-10-27T11:37:43+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>jose.quaresma@oss.qualcomm.com</email>
</author>
<published>2025-10-22T09:06:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=aedcbcaae148968fa95f7ced26d4696da0cf63b6'/>
<id>urn:sha1:aedcbcaae148968fa95f7ced26d4696da0cf63b6</id>
<content type='text'>
If we have changes on SPDX_LICENSES content we ended up building invalid sstate-cache archives.
The default value for the SPDX_LICENSES is the file meta/files/spdx-licenses.json but this file
don't use the bitbake fetcher and because of this their checksum is not validated.
So we need to add this file to the build dependency chain of the SPDX.

For example, currently we have bump from 3.24.0 to 3.27.0 on master-next for the file
meta/files/spdx-licenses.json. Since the file content is not taken into account, we end
up creating invalid sstate-cache artifacts on the autobuilder on master-next builds.
This created sstate-cache artifacts will also be available to master branch users
that are using the upstream sstate-cache mirror.

If someone is using the public mirror but still following the master branch
they will encounter something like the following error which this change aims to resolve.

| ERROR: initramfs-rootfs-image-1.0-r0 do_create_image_sbom_spdx: http://spdxdocs.org/openembedded-alias/by-doc-hash/57301e8063a8bf25308226271627db2b78675cda9f648c5c6c14a2b9c18f48dc/zlib/UNIHASH/license/3_27_0/Zlib not found in /work/build/tmp/deploy/spdx/3.0.1/armv8a/by-spdxid-hash/57/57301e8063a8bf25308226271627db2b78675cda9f648c5c6c14a2b9c18f48dc.spdx.json

(From OE-Core rev: 10669f6f615058293671fb16454601580b7b34e9)

Signed-off-by: Jose Quaresma &lt;jose.quaresma@oss.qualcomm.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>spdx-3.0: replace SPDX3_LIB_DEP_FILES with SPDX3_DEP_FILES</title>
<updated>2025-10-27T11:37:43+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>jose.quaresma@oss.qualcomm.com</email>
</author>
<published>2025-10-22T09:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b22cfc5ef1bb80236c0f3892b17a55f2364ce243'/>
<id>urn:sha1:b22cfc5ef1bb80236c0f3892b17a55f2364ce243</id>
<content type='text'>
We can have more files types in the chain of dependencies and not just libs.

(From OE-Core rev: f400ba75f2d7987abb177a43f94874a7fdc1ec0a)

Signed-off-by: Jose Quaresma &lt;jose.quaresma@oss.qualcomm.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>spdx30: Provide software_packageUrl field in SPDX 3.0 SBOM</title>
<updated>2025-05-08T09:28:18+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2025-04-28T05:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2207150bc74811cce9df72464ce867e6f6b8b3ec'/>
<id>urn:sha1:2207150bc74811cce9df72464ce867e6f6b8b3ec</id>
<content type='text'>
Define var-SPDX_PACKAGE_URL to provide software_packageUrl field [1][2]
in SPDX 3.0 SBOM, support to override with package name
SPDX_PACKAGE_URL:&lt;pkgname&gt;

Currently, the format of purl is not defined in Yocto, set empty for now
until we have a comprehensive plan for what Yocto purls look like.
But users could customize their own purl by setting var-SPDX_PACKAGE_URL

[1] https://spdx.github.io/spdx-spec/v3.0.1/model/Software/Properties/packageUrl/
[2] https://spdx.github.io/spdx-spec/v3.0.1/annexes/pkg-url-specification/

(From OE-Core rev: c8e6953a0b6f59ffca994c440069db39e60b12d2)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>spdx3: support to override the version of a package in SBOM 3</title>
<updated>2025-03-24T17:29:16+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2025-03-24T06:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0834a9cdf684fc906f5afb20493579324cedea7b'/>
<id>urn:sha1:0834a9cdf684fc906f5afb20493579324cedea7b</id>
<content type='text'>
By default, still use ${PV} as the the version of a package in SBOM 3
$ bitbake acl
$ jq . tmp/deploy/spdx/3.0.1/core2-64/packages/package-acl.spdx.json
...
    {
      "type": "software_Package",
       ...
      "name": "acl",
      "software_packageVersion": "2.3.2"
    },
...

Support to override it by setting SPDX_PACKAGE_VERSION, such as
set SPDX_PACKAGE_VERSION = "${EXTENDPKGV}" in local.conf to append
PR to software_packageVersion in SBOM 3
$ echo 'SPDX_PACKAGE_VERSION = "${EXTENDPKGV}"' &gt;&gt; conf/local.conf
$ bitbake acl
$ jq . tmp/deploy/spdx/3.0.1/core2-64/packages/package-acl.spdx.json
...
    {
      "type": "software_Package",
       ...
      "name": "acl",
      "software_packageVersion": "2.3.2-r0"
    },
...

(From OE-Core rev: e6ff5f4d870624795bd36572f5c2bfeec90d83ce)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib: Fix dependencies on SPDX code</title>
<updated>2025-03-11T21:29:50+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2025-03-11T14:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=143103a1c457ebfd4fe088cc5d8233b934d3e2a9'/>
<id>urn:sha1:143103a1c457ebfd4fe088cc5d8233b934d3e2a9</id>
<content type='text'>
The SPDX library code was being ignored from taskhash calculations due
to accidentally being omitted from BBIMPORTS. This meant that changes in
the code or dependent variables would not cause the task to rebuild
correctly.

In order to add spdx_common, convert the `Dep` object from a named tuple
to a frozen dataclass. These function more or less equivalently, but the
bitbake code parser cannot handle named tuples.

Finally, the vardepsexclude that used to be present on the recipe tasks
needs to be moved to the python code in order for the variables to be
correctly ignored. Several unused exclusions were removed

(From OE-Core rev: eb597bf61cbcb0a4d43149404c93eec0894fb4c7)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes: create-spdx: Fix variable dependencies</title>
<updated>2024-12-05T17:07:10+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2024-12-03T22:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dfb279f49ed40fe8a1ad0df767d965f0373abed8'/>
<id>urn:sha1:dfb279f49ed40fe8a1ad0df767d965f0373abed8</id>
<content type='text'>
A few variable dependencies were incorrect from the SPDX tasks, which
prevented rebuilds from occurring, or caused them to occur when they
should not.

(From OE-Core rev: 38a5dd136b3a3713e63d23598011efe1c4b0f459)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>spdx: Fix SPDX tasks not running when code changes</title>
<updated>2024-11-23T14:44:54+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2024-11-22T15:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9ca371643776d1b4d9b3beae79482ba6be7618a9'/>
<id>urn:sha1:9ca371643776d1b4d9b3beae79482ba6be7618a9</id>
<content type='text'>
The SPDX code makes heavy use of python classes. While this works very
well, the bitbake dependency parser is unable to understand how to deal
with them, and thus changes to the class code do not cause rebuilds to
occur. To correct this, add the library files that include SPDX code as
file checksums for the SPDX tasks. If this method works well for SPDX,
we will look at implementing something similar in the bitbake dependency
parser that should allow correct checksums without having to explicitly
add them to each class.

(From OE-Core rev: 6ac3033b77a0d1f7ab15801c5c65931adede3923)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>create-spdx-{2.2,3.0}: fix do_create_spdx dependency while spdx include sources</title>
<updated>2024-11-01T12:07:12+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2024-10-30T05:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8f4759806ee868a32a063943059345641eb26f22'/>
<id>urn:sha1:8f4759806ee868a32a063943059345641eb26f22</id>
<content type='text'>
Call function ${@create_spdx_source_deps(d)} or ${create_spdx_source_deps(d)}
along with addtask not working, use task do_create_spdx flag 'depends'
to instead

Move function create_spdx_source_deps to spdx-common.bbclass for both of
create-spdx-2.2.bbclass and create-spdx-3.0.bbclass

(From OE-Core rev: dda4b7ccd416ef370634babd150e944f2aa9116e)

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Reviewed-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>create-spdx-3.0: Upgrade to SPDX 3.0.1</title>
<updated>2024-09-30T16:07:18+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2024-09-27T15:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2e594183251f22dd6ba040d410766f7a4c959fca'/>
<id>urn:sha1:2e594183251f22dd6ba040d410766f7a4c959fca</id>
<content type='text'>
Upgrades the SPDX 3.0 implementation from 3.0.0 -&gt; 3.0.1. This version
introduced some breaking changes. Effectively, 3.0.0 was a pre-release
version that we do not need to support any longer.

(From OE-Core rev: 7e6509a19f6146f0dad0be7037ff4b3268d0128c)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests</title>
<updated>2024-07-26T11:28:42+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-07-25T10:40:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7c1de3118fef96fa899ae5365f80ea8ccb1a5876'/>
<id>urn:sha1:7c1de3118fef96fa899ae5365f80ea8ccb1a5876</id>
<content type='text'>
Currently, "tarball" sdk based recipes don't generate SPDX manifests as they
don't include the rootfs generation classes. Split the SPDX 3.0 image class into
two so the SDK components can be included where needed.

To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which
the SDK code can use.

Migrate testsdk usage to this.

Also move the image/sdk spdx classes to classes-recipe rather than the general classes
directory since they'd never be included on a global level.

For buildtools-tarball, it has its own testsdk functions so disable the class there as
a deferred inherit would overwrite it.

(From OE-Core rev: 662396533177b72cc1d83e95841b27f7e42dcb20)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
