All of lore.kernel.org
 help / color / mirror / Atom feed
* Documentation around adding custom fetchers to layer
@ 2025-09-16 20:04 seth.raymond
  2025-09-17  9:14 ` [yocto] " Ross Burton
  0 siblings, 1 reply; 8+ messages in thread
From: seth.raymond @ 2025-09-16 20:04 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

Hello,

I am attempting to write a couple of custom fetcher that pull secrets from our password manager (using its CLI). To start, I wrote Python classes that inherit from bb.fetch2.FetchMethod and registered them in poky/bitbake/lib/bb/fetch2/__init__.py by importing them and appending them to methods. I confirmed that the fetchers themselves are working as expected and the secrets are getting pulled during the recipe build process.

Of course, I don't (necessarily) want to contribute these fetchers upstream to poky. I would like to add them to one of our company's layers. Our directory structure is laid out like:

top-dir/
|--- build/
|--- layers/
|          |--- poky/
|          |--- meta-matrixspace/
|          |                |--- meta-mtrx-core/  (this is the layer I want to add my fetchers to)
|          |                |--- meta-mtrx-other-layer/
|          |                |--- meta-mtrx-yet-another-layer/

We're based off of scarthgap. I've put my fetchers into top-dir/layers/meta-matrixspace/meta-mtrx-core/lib/bb/fetch2/op.py and updated top-dir/layers/meta-matrixspace/meta-mtrx-core/conf/layer.conf to include

PYTHONPATH .= ":${LAYERDIR}/lib"

When building recipes that use the fetchers, I get parsing errors saying that no fetchers could be found to support the URL:

bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(d)} which triggered exception NoMethodError: Could not find a fetcher which supports the URL: 'optemplate://aes_key.tpl;output=aes.key'
The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]

I'm not seeing any documentation on how to add a custom fetcher to a layer, and the fetchers in poky don't provide enough information on how to register these fetchers. Is this functionality supported, or will we have to fork poky and keep it up-to-date to add a new fetcher?

Thanks,
Seth

[-- Attachment #2: Type: text/html, Size: 2638 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-21 21:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 20:04 Documentation around adding custom fetchers to layer seth.raymond
2025-09-17  9:14 ` [yocto] " Ross Burton
2025-09-17  9:19   ` Alexander Kanavin
2025-09-17 14:45     ` seth.raymond
2025-09-18  7:58       ` Alexander Kanavin
2025-09-18 13:25         ` seth.raymond
2025-09-21 21:22       ` Chuck Wolber
2025-09-17 22:33     ` [bitbake-devel] " Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.