create-spdx-3.0: make create_spdx depend on CVE_STATUS
PATCH 1/2 create-spdx-3.0: make create_spdx depend on CVE_STATUS
From: Peter Marko <[email protected]>
SPDX3 classes now add CVE_STATUS information to spdx. So the task needs to be rebuilt when CVE_STATUS changes.
This is true since commit 1ff496546279d8a97df5ec475007cfb095c2a0bc
--- meta/classes/create-spdx-3.0.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/create-spdx-3.0.bbclass +1 -0
@@ -138,6 +138,7 @@ python do_create_spdx() { oe.spdx30_tasks.create_spdx(d) } do_create_spdx[vardeps] += "\ + CVE_STATUS \ SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ SPDX_PACKAGE_ADDITIONAL_PURPOSE \ SPDX_PROFILES \
PATCH 2/2 spdx30: handle Unknown CVE_STATUS
From: Peter Marko <[email protected]>
CVE_STATUS can be also "Unknown" since oe-core commit d25f1817752bc8a84c40dcbef75f7559801ce15e
When this status type is used, build fails with e.g.
ERROR: openssl-3.4.1-r0 do_create_spdx: Unknown CVE-2025-0001 status 'Unknown'
Since this is now a valid status, it needs to be handled.
It cannot be mapped to any VEX status (see below), so just skip it. Possible VEX statuses are: NOT AFFECTED, AFFECTED, FIXED, and UNDER INVESTIGATION.
--- meta/lib/oe/spdx30_tasks.py | 2 ++ 1 file changed, 2 insertions(+)
meta/lib/oe/spdx30_tasks.py +2 -0
@@ -724,6 +724,8 @@ def create_spdx(d): ) else: bb.fatal(f"Unknown detail '{detail}' for ignored {cve}") + elif status == "Unknown": + bb.note(f"Skipping {cve} with status 'Unknown'") else: bb.fatal(f"Unknown {cve} status '{status}'")
Quoted 19 lines · Peter Marko
From: Peter Marko <[email protected]>
SPDX3 classes now add
CVE_STATUSinformation to spdx. So the task needs to be rebuilt whenCVE_STATUSchanges.This is true since commit
1ff496546279d8a97df5ec475007cfb095c2a0bcSigned-off-by Peter Marko <[email protected]>cc Joshua Watt <[email protected]>--- meta/classes/create-spdx-3.0.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/create-spdx-3.0.bbclass +0
-0
meta/classes/create-spdx-3.0.bbclass python do_create_spdx() { · line 141
Quoted 4 lines
meta/classes/create-spdx-3.0.bbclass +1
-0@@ -138,6 +138,7 @@ python do_create_spdx() { oe.spdx30_tasks.create_spdx(d) } do_create_spdx[vardeps] += "\ + CVE_STATUS \
Seems fine to me, unless RP thinks we should add cve_check to BBIMPORTS instead?
Quoted 3 lines
meta/classes/create-spdx-3.0.bbclass +0
-0SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ SPDX_PACKAGE_ADDITIONAL_PURPOSE \ SPDX_PROFILES \
Quoted 16 lines · Joshua Watt
Quoted 14 lines · Peter Marko
From: Peter Marko <[email protected]>
SPDX3 classes now add
CVE_STATUSinformation to spdx. So the task needs to be rebuilt whenCVE_STATUSchanges.This is true since commit
1ff496546279d8a97df5ec475007cfb095c2a0bcSigned-off-by Peter Marko <[email protected]>cc Joshua Watt <[email protected]>---
meta/classes/create-spdx-3.0.bbclass | 1 +1 file changed, 1 insertion(+)
Quoted 13 lines
meta/classes/create-spdx-3.0.bbclass python do_create_spdx() { · line 141
Quoted 10 lines
meta/classes/create-spdx-3.0.bbclass +1
-0@@ -138,6 +138,7 @@ python do_create_spdx() { oe.spdx30_tasks.create_spdx(d) } do_create_spdx[vardeps] += "\ + CVE_STATUS \Seems fine to me, unless RP thinks we should add
cve_checkto BBIMPORTS instead?
That would potentially see off other problems in the future. Is there a reason we wouldn't want to do that?
Cheers,
Richard
Quoted 32 lines · Richard Purdie
Quoted 16 lines · Joshua Watt
Quoted 14 lines · Peter Marko
From: Peter Marko <[email protected]>
SPDX3 classes now add
CVE_STATUSinformation to spdx. So the task needs to be rebuilt whenCVE_STATUSchanges.This is true since commit
1ff496546279d8a97df5ec475007cfb095c2a0bcSigned-off-by Peter Marko <[email protected]>cc Joshua Watt <[email protected]>--- meta/classes/create-spdx-3.0.bbclass | 1 + 1 file changed, 1 insertion(+)Quoted 13 lines
meta/classes/create-spdx-3.0.bbclass python do_create_spdx() { · line 141
Quoted 10 lines
meta/classes/create-spdx-3.0.bbclass +1
-0@@ -138,6 +138,7 @@ python do_create_spdx() { oe.spdx30_tasks.create_spdx(d) } do_create_spdx[vardeps] += "\ + CVE_STATUS \Seems fine to me, unless RP thinks we should add
cve_checkto BBIMPORTS instead?
Quoted 2 lines
That would potentially see off other problems in the future. Is there a reason we wouldn't want to do that?
I can't think of one, as long as it actually works :). I'm testing it now and I'll send the patch if works
Quoted 4 lines
Cheers,
Richard
Quoted 35 lines · Joshua Watt
Quoted 32 lines · Richard Purdie
Quoted 29 lines · Joshua Watt
Quoted 20 lines · Peter Marko
From: Peter Marko <[email protected]>
SPDX3 classes now add
CVE_STATUSinformation to spdx. So the task needs to be rebuilt whenCVE_STATUSchanges.This is true since commit
1ff496546279d8a97df5ec475007cfb095c2a0bcSigned-off-by Peter Marko <[email protected]>cc Joshua Watt <[email protected]>--- meta/classes/create-spdx-3.0.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/create-spdx-3.0.bbclass +0
-0meta/classes/create-spdx-3.0.bbclass python do_create_spdx() { · line 141
Quoted 4 lines
meta/classes/create-spdx-3.0.bbclass +1
-0@@ -138,6 +138,7 @@ python do_create_spdx() { oe.spdx30_tasks.create_spdx(d) } do_create_spdx[vardeps] += "\ + CVE_STATUS \Seems fine to me, unless RP thinks we should add
cve_checkto BBIMPORTS instead?
Quoted 5 lines
Quoted 2 lines
That would potentially see off other problems in the future. Is there a reason we wouldn't want to do that?
I can't think of one, as long as it actually works :). I'm testing it now and I'll send the patch if works
Just to follow up on this; I think we can fix this more systemically in bitbake and/or make improvements to make it easier to specify these types of dependencies in the actual code that references them (see jpew/var-flag-deps on poky-contrib for some prototypes), so I think it would be better to take that approach than this one (at least on master, this is likely better for backport fixes)
Quoted 5 lines
Quoted 5 lines
Cheers,
Richard