summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2022-07-15 08:47:47 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-01 16:27:30 +0100
commitca3a1f17cc672c74272f8e1797d345051bf9821f (patch)
tree342619116b71bce52d5d66d477381521feef4e99 /meta
parentdb4ce356a84df1a50ae95df17c172a36d0023975 (diff)
downloadpoky-ca3a1f17cc672c74272f8e1797d345051bf9821f.tar.gz
sstatesig: Include all dependencies in SPDX task signatures
SDPX generation involves looking through BB_TASKDEPDATA for dependencies, then linking to the generated documents for those dependencies. These document links use a checksum to validate the document, which means that if a upstream document changes, all downstream documents must be regenerated to get the new checksum, otherwise the compendium of documents produced by the build will have broken links; therefore all dependent task should be included in the signature (even from "ABI safe" recipes). (From OE-Core rev: 7549429fc93218dee33b216010b2c36a9f814091) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 5fe543b9ceec971cf0297ff0ae3b0ccc4703cece) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/sstatesig.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 7150bd0929..de65244932 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -24,10 +24,19 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
24 return "/allarch.bbclass" in inherits 24 return "/allarch.bbclass" in inherits
25 def isImage(mc, fn): 25 def isImage(mc, fn):
26 return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn]) 26 return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn])
27 def isSPDXTask(task):
28 return task in ("do_create_spdx", "do_create_runtime_spdx")
27 29
28 depmc, _, deptaskname, depmcfn = bb.runqueue.split_tid_mcfn(dep) 30 depmc, _, deptaskname, depmcfn = bb.runqueue.split_tid_mcfn(dep)
29 mc, _ = bb.runqueue.split_mc(fn) 31 mc, _ = bb.runqueue.split_mc(fn)
30 32
33 # Keep all dependencies between SPDX tasks in the signature. SPDX documents
34 # are linked together by hashes, which means if a dependent document changes,
35 # all downstream documents must be re-written (even if they are "safe"
36 # dependencies).
37 if isSPDXTask(task) and isSPDXTask(deptaskname):
38 return True
39
31 # (Almost) always include our own inter-task dependencies (unless it comes 40 # (Almost) always include our own inter-task dependencies (unless it comes
32 # from a mcdepends). The exception is the special 41 # from a mcdepends). The exception is the special
33 # do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass. 42 # do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass.