On Mon, 2026-08-10 at 09:11 +0200, Benjamin Robin wrote:
> Previously, except for a kernel recipe, the source file paths were never
> "resolved" since the KERNEL_SRC_PATH variable is always defined. So in
> the ${PN}-debugsources.json.zstd file the source file paths always started
> with /usr/src/debug/${PN}/${PV} (which is the value of TARGET_DBGSRC_DIR).
> 
> Currently the debugsources.json file is only used by the spdx generation.
> - In `get_patched_src()` the sources of the recipe are extracted (again).
>   The unpack task is executed from a modified local context with UNPACKDIR
>   set to the value of `${SPDXWORK}`. So in summary the sources are
>   extracted in a sub-directory of `${SPDXWORK}`.
> - In `add_package_files()`, with topdir equal to `${SPDXWORK}`, all the
>   files (recursively) found in topdir are listed. For each source file,
>   if the file path (relative to topdir) is in the list of source files
>   retrieved by save_debugsources_info, then the file is added to the SPDX
>   SBoM.
> 
> So try to handle that by replacing ${TARGET_DBGSRC_DIR} by the relative
> path of ${S} relative to ${UNPACKDIR}. If ${S} is not relative to
> ${UNPACKDIR}, do nothing.
> 
> Signed-off-by: Benjamin Robin <[email protected]>

The paths in ${PN}-debugsources.json currently match where the files
will be installed on the target. If we change these to be relative
paths within ${UNPACKDIR} then we would break other ways that the
debugsources json files may be used.

What is currently broken? Can this be fixed at the point where the
debugsources json file is parsed instead of where it is generated? Sorry
if I'm missing some context here.

Best regards,

-- 
Paul Barker

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#243511): 
https://lists.openembedded.org/g/openembedded-core/message/243511
Mute This Topic: https://lists.openembedded.org/mt/120681384/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to