Re: [poky] [PATCH RFC] add basic support for b4 contribution workflow

Richard Purdie <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <1b89daa292508bd4aa9621616b7164b1b0523be7.camel@linuxfoundation.org>
On Thu, 2025-01-23 at 16:44 +0100, Quentin Schulz via lists.yoctoproject.org wrote:
> From: Quentin Schulz <[email protected]>
> 
> b4[1] is a very nice tool for mail-based contribution. A config[2] file
> exists to set up a few defaults. We can use it to set the Cc recipients
> to always add, in our case the mailing list.
> 
> This also adds a wrapper script that is called by b4 to check that each
> patch in the series is only for one project. Indeed, poky is actually
> a "collection" of multiple repositories, namely BitBake,
> OpenEmbedded-Core and the Yocto Docs. One patch should therefore not
> make changes in multiple of those projects otherwise it cannot be
> merged.
> Additionally, a check is added to make sure that a series only touches
> files from one project to avoid having to figure out which patch is to
> be merged by which maintainer in which project repo.
> 
> Moreover, it is not uncommon to have people develop patches for those
> projects from within poky. This wrapper figures out which mailing lists
> to send patches to based on the files that are modified in the series.
> Considering that patches to the bitbake/doc/ directory need to be sent
> to both the bitbake and yocto-docs mailing list, this wrapper handles
> that. A limitation of the script (lsdiff actually) is that it doesn't
> know how to handle empty files, but those should be of rather rare
> occurrences.
> 
> Note that this script requires hardcoding of paths that are handled by
> different projects to map files to projects. Anything not mapped is
> assumed part of OE-Core.
> 
> [1] https://pypi.org/project/b4/
> [2] https://b4.docs.kernel.org/en/latest/config.html
> 
> Signed-off-by: Quentin Schulz <[email protected]>
> ---
> This is marked as RFC because I believe there's some additional plumbing
> required to make this work reliably.
> 
> Indeed, OE-Core will also get its own .b4-config,
> c.f. https://lore.kernel.org/openembedded-core/[email protected]/T/#u
> 
> So the same file will exist in both OE-Core and poky, at the same
> location. The one from poky should always be this one (or with changes
> contributed via the poky mailing list) and not overridden during a merge
> by an update from the one in OE-Core. Not sure how to handle that yet
> though, does anyone know how this merging of trees is done in poky and
> what can be done to make this safe?

I can sort that bit. Basically we mark the config file as not being
synced by combo-layer.

> There's also a decision that was made to not allow patches to different
> projects in a series, but maybe that's not desired.
> 
> Finally, I'm not sure about the appropriate copyright holder for the
> patch and the license, I personally don't care, so up to you.

Those look fine to me.

> ---
>  .b4-config    |   3 ++
>  b4-wrapper.py | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 165 insertions(+)

I'm not against this but I would like to:

a) Put the script into OE-Core, just so that we don't have "magic"
things in poky.
b) Perhaps name it something a little more poky specific
c) Move it into the scripts subdir

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.