diff mbox series

[RFC,v2] add basic support for b4 contribution workflow

Message ID 20250203-b4-support-v2-1-cf1194bf3aad@cherry.de (mailing list archive)
State New
Headers show
Series [RFC,v2] add basic support for b4 contribution workflow | expand

Commit Message

Quentin Schulz Feb. 3, 2025, 3:21 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

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 uses the b4-wrapper-poky.py script for checking 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 <quentin.schulz@cherry.de>
---
This is marked as RFC for two reasons:
- this depends on the following patch series for OE-Core:
  https://lore.kernel.org/openembedded-core/20250203-b4-support-v2-0-848008ad29ea@cherry.de/T/#m24b6594da5d57d0715e16636ad2936b1478f08ae
- this depends on the script used to merge OE-Core into poky to NOT
  overwrite .b4-config from poky added in this patch series with the one
  from OE-Core,

Note that b4 will not work for modifications made to .b4-config for poky
as it'll detect that as being for OE-Core. Since the file will
eventually exist in both repos, I have no clue how to handle that.
---
Changes in v2:
- moved script to OE-Core repo (in another patch series now)
- updated path to reflect new location in OE-Core (scripts/) and name
  (b4-wrapper-poky.py instead of b4-wrapper.py),
- Link to v1: https://lore.kernel.org/r/20250123-b4-support-v1-1-4841f52eccbb@cherry.de
---
 .b4-config | 3 +++
 1 file changed, 3 insertions(+)


---
base-commit: 66f6a6f59b2f0b282376b2752fa86f03d0e848e2
change-id: 20250117-b4-support-e4cca7ad3106

Best regards,
diff mbox series

Patch

diff --git a/.b4-config b/.b4-config
new file mode 100644
index 0000000000000000000000000000000000000000..bdcdff0ca21fa9197be34fc910d3b9200da63905
--- /dev/null
+++ b/.b4-config
@@ -0,0 +1,3 @@ 
+[b4]
+  prep-perpatch-check-cmd = ./scripts/b4-wrapper-poky.py prep-perpatch-check-cmd
+  send-auto-cc-cmd = ./scripts/b4-wrapper-poky.py send-auto-cc-cmd