diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2024-10-29 22:07:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-01 12:07:12 +0000 |
commit | ce192383d5ace25f50462341165340052097108a (patch) | |
tree | 9ccefca643a7cf6663b4feb04bd5ddbba7d85c7b /meta/classes | |
parent | 8f4759806ee868a32a063943059345641eb26f22 (diff) | |
download | poky-ce192383d5ace25f50462341165340052097108a.tar.gz |
create-spdx-{2.2,3.0}: support SPDX include source for work-share directory
Originally, while SPDX_INCLUDE_SOURCES = "1" [1], there is bug in scan
for gcc, libgcc in which the sources locates in work-share directory.
Copy source from ${WORKDIR} to ${SPDXWORK} did not satisfy the situation
while ${S} was not included in ${WORKDIR}
This commit aim to support SPDX include source for work-share directory
1. If is_work_shared_spdx, Copy source from ${S} to ${SPDXWORK},
normally the dest dir in ${SPDXWORK} has the same basename dir of ${S};
but for kernel source, rename basename dir 'kernel-source' to ${BP} (${BPN}-${PV})
2. For SPDX source copy, do hard link copy to save copy time
3. Move do_patch to no work shared situation along with do_unpack
4. Tweak task do_create_spdx dependencies to assure the patched source
in work share is ready for SPDX source copy
5. Remove bb.data.inherits_class('kernel', d) from is_work_shared_spdx,
the kernel source locates in 'work-shared', test kernel.bbclass is not
necessary
[1] https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-SPDX_INCLUDE_SOURCES
(From OE-Core rev: 64454b1956a9b50d6c89a3f3d7c594c1272cb289)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Reviewed-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/spdx-common.bbclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/spdx-common.bbclass b/meta/classes/spdx-common.bbclass index ad02da5cd6..d3cdc8b6ce 100644 --- a/meta/classes/spdx-common.bbclass +++ b/meta/classes/spdx-common.bbclass | |||
@@ -57,6 +57,15 @@ def create_spdx_source_deps(d): | |||
57 | if oe.spdx_common.has_task(d, "do_shared_workdir"): | 57 | if oe.spdx_common.has_task(d, "do_shared_workdir"): |
58 | deps.append("%s:do_shared_workdir" % pn) | 58 | deps.append("%s:do_shared_workdir" % pn) |
59 | 59 | ||
60 | # For gcc-source-${PV} source code | ||
61 | if oe.spdx_common.has_task(d, "do_preconfigure"): | ||
62 | deps.append("%s:do_preconfigure" % pn) | ||
63 | elif oe.spdx_common.has_task(d, "do_patch"): | ||
64 | deps.append("%s:do_patch" % pn) | ||
65 | # For gcc-cross-x86_64 source code | ||
66 | elif oe.spdx_common.has_task(d, "do_configure"): | ||
67 | deps.append("%s:do_configure" % pn) | ||
68 | |||
60 | return " ".join(deps) | 69 | return " ".join(deps) |
61 | 70 | ||
62 | 71 | ||