From: Paul Barker <paul@pbarker.dev>
To: Benjamin Robin <benjamin.robin@bootlin.com>,
openembedded-core@lists.openembedded.org
Cc: jpewhacker@gmail.com, antonin.godard@bootlin.com,
mathieu.dubois-briand@bootlin.com, thomas.petazzoni@bootlin.com,
daniel.turull@ericsson.com
Subject: Re: [PATCH 2/2] package: fix source path in save_debugsources_info()
Date: Sun, 16 Aug 2026 11:46:11 +0100 [thread overview]
Message-ID: <96d72ef99f426d380cd090740ff636df1512ba2f.camel@pbarker.dev> (raw)
In-Reply-To: <20260810-fix-save-debugsources-info-v1-2-2e83131bcf01@bootlin.com>
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 <benjamin.robin@bootlin.com>
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
next prev parent reply other threads:[~2026-08-16 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 7:11 [PATCH 0/2] package: improve save_debugsources_info() Benjamin Robin
2026-08-10 7:11 ` [PATCH 1/2] package: Fix source info when PACKAGE_DEBUG_STATIC_SPLIT is set Benjamin Robin
2026-08-10 7:11 ` [PATCH 2/2] package: fix source path in save_debugsources_info() Benjamin Robin
2026-08-16 10:46 ` Paul Barker [this message]
2026-08-16 11:12 ` Benjamin Robin
2026-08-16 11:25 ` Benjamin Robin
2026-08-16 11:37 ` Paul Barker
2026-08-16 12:19 ` Benjamin Robin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96d72ef99f426d380cd090740ff636df1512ba2f.camel@pbarker.dev \
--to=paul@pbarker.dev \
--cc=antonin.godard@bootlin.com \
--cc=benjamin.robin@bootlin.com \
--cc=daniel.turull@ericsson.com \
--cc=jpewhacker@gmail.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox