Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Stefano Tondo" <stondo@gmail.com>,
	<openembedded-core@lists.openembedded.org>
Cc: "Joshua Watt" <JPEWhacker@gmail.com>,
	"Alexander Kanavin" <alex.kanavin@gmail.com>,
	"Stefan Herbrechtsmeier" <stefan.herbrechtsmeier@weidmueller.com>,
	<stefano.tondo.ext@siemens.com>
Subject: Re: [PATCH v2 0/4] spdx30: identity and purls of dependency downloads
Date: Thu, 19 Nov 2026 13:34:41 +0100	[thread overview]
Message-ID: <DMZ6W5V8KTSJ.1SA7GOSZRNZVM@bootlin.com> (raw)
In-Reply-To: <20261118234425.3681880-1-stondo@gmail.com>

On Thu Nov 19, 2026 at 12:44 AM CET, Stefano Tondo wrote:
> Hi,
>
> This series implements the parts of the RFC "spdx30: name, version
> and purl for dependency downloads" [1] that we agreed on. It needs
> the bitbake series "fetch: package identity of crate, gomod and npm
> URLs" [2].
>
> 1. The SPDX of a crate, gomod or npm download gets the name, the
>    version and the purl from the fetcher.
> 2. For Cargo recipes, a new do_cargo_metadata task writes the crate
>    dependency graph for the target. The build links to each crate
>    download with a runtime, build or test scope. A crate that is not
>    used on the target gets an annotation.
> 3. Each output package gets the purls of its source downloads as
>    external identifiers, as Joshua proposed: a statically linked
>    dependency is part of the binary. A purl is left out only when the
>    cargo graph proves that the crate is not in the target. The
>    software_packageUrl of the package does not change.
> 4. Selftests with python3-bcrypt.
>
> For python3-bcrypt, the output package gets the purls of 25 of its
> 42 crates. The other 17 crates are not built into the target.
>
> Two points for review:
>
> - All output packages of a recipe get the purls, also -dbg and -src.
>   I have no proof per package, so I followed the rule "keep the purl
>   unless there is proof".
> - Go recipes have no filter yet. go version -m can give the proof per
>   binary, and I can add it in a follow-up.
>

Hi Stefano,

Thanks for the v2, it does look better in term of memory.

Yet I can see this failure:

ERROR: zip-native-3.0-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated:
...
ERROR: zip-native-3.0-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_create_spdx(d)
     0003:
File: '/srv/pokybuild/yocto-worker/qemux86-world/build/layers/openembedded-core/meta/classes/create-spdx-3.0.bbclass', lineno: 264, function: do_create_spdx
     0260:addtask do_create_recipe_spdx_setscene
     0261:
     0262:python do_create_spdx() {
     0263:    import oe.spdx30_tasks
 *** 0264:    oe.spdx30_tasks.create_spdx(d)
     0265:}
     0266:addtask do_create_spdx after \
     0267:    do_unpack \
     0268:    do_patch \
File: '/srv/pokybuild/yocto-worker/qemux86-world/build/layers/openembedded-core/meta/lib/oe/spdx30_tasks.py', lineno: 1077, function: create_spdx
     1073:    build_inputs = set()
     1074:
     1075:    cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), d.getVar("CVE_VERSION"))
     1076:
 *** 1077:    source_files = add_download_files(d, build_objset)
     1078:    build_inputs |= source_files
     1079:
     1080:    # The output packages inherit the PURLs of the downloads they are built
     1081:    # from, as the code of statically linked dependencies is in them. Only
File: '/srv/pokybuild/yocto-worker/qemux86-world/build/layers/openembedded-core/meta/lib/oe/spdx30_tasks.py', lineno: 642, function: add_download_files
     0638:                )
     0639:            )
     0640:
     0641:            enrich_source_package(d, dl, fd, file_name, primary_purpose)
 *** 0642:            set_package_identity(d, dl, fd)
     0643:
     0644:            if release_date is not None:
     0645:                dl.releaseTime = release_date
     0646:
File: '/srv/pokybuild/yocto-worker/qemux86-world/build/layers/openembedded-core/meta/lib/oe/spdx30_tasks.py', lineno: 472, function: set_package_identity
     0468:
     0469:    Fetchers of package registries (crate, gomod, npm) know which package
     0470:    a URL downloads, see FetchMethod.package_identity() in bitbake.
     0471:    """
 *** 0472:    identity = fd.method.package_identity(fd, d)
     0473:    if identity:
     0474:        dl.name = identity["name"]
     0475:        dl.software_packageVersion = identity["version"]
     0476:        dl.software_packageUrl = identity["purl"]
Exception: AttributeError: 'Wget' object has no attribute 'package_identity'

ERROR: Logfile of failure stored in: /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-64-v3-poky-linux/gstreamer1.0-plugins-rs/0.15.4/temp/log.do_compile.1234281
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: Using rust targets from /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-64-v3-poky-linux/gstreamer1.0-plugins-rs/0.15.4/rust-targets/
| Error: CliError { error: Some(no matching package named `gstreamer` found
| location searched: directory source `/srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-64-v3-poky-linux/gstreamer1.0-plugins-rs/0.15.4/sources/cargo_home/bitbake` (which is replacing registry `crates-io`)
| required by package `gst-plugin-tutorial v0.15.4 (/srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-64-v3-poky-linux/gstreamer1.0-plugins-rs/0.15.4/sources/gstreamer1.0-plugins-rs-0.15.4/tutorial)`
| help: packages with similar names: bitreader
|
| note: offline mode (via `--offline`) can sometimes cause surprising resolution failures
| help: if this error is too confusing you may wish to retry without `--offline`
|
| Stack backtrace:
|    0: <unknown>
|    1: <unknown>
|    2: <unknown>
|    3: <unknown>
|    4: <unknown>
|    5: <unknown>
|    6: <unknown>
|    7: <unknown>
|    8: <unknown>
|    9: <unknown>
|   10: <unknown>
|   11: <unknown>
|   12: <unknown>
|   13: <unknown>
|   14: __libc_start_call_main
|   15: __libc_start_main@GLIBC_2.2.5
|   16: <unknown>), exit_code: 101 }
| WARNING: exit code 1 from a shell command.


And something similar later with lib32-lsb-release:

ERROR: lib32-lsb-release-1.4-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/5072

Can you have a look at the issue?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      parent reply	other threads:[~2026-11-19 12:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 23:44 [PATCH v2 0/4] spdx30: identity and purls of dependency downloads Stefano Tondo
2026-11-18 23:44 ` [PATCH v2 1/4] spdx30: Take name, version and PURL of downloads from the fetcher Stefano Tondo
2026-11-18 23:44 ` [PATCH v2 2/4] spdx30: Record the lifecycle scope of crate dependencies Stefano Tondo
2026-11-18 23:44 ` [PATCH v2 3/4] spdx30: Add the PURLs of the source downloads to the output packages Stefano Tondo
2026-11-18 23:44 ` [PATCH v2 4/4] oeqa/selftest: spdx: Test crate identity, scope and output PURLs Stefano Tondo
2026-11-19 10:03   ` Paul Barker
2026-11-19 10:30     ` Stefano Tondo
2026-11-19 12:34 ` Mathieu Dubois-Briand [this message]

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=DMZ6W5V8KTSJ.1SA7GOSZRNZVM@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=JPEWhacker@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=stefano.tondo.ext@siemens.com \
    --cc=stondo@gmail.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