diff mbox series

.b4-config: configure `b4` for Buildroot

Message ID 20240709-support-b4-v1-1-ef971fe9a893@collins.com
State Accepted
Headers show
Series .b4-config: configure `b4` for Buildroot | expand

Commit Message

Brandon Maier July 9, 2024, 2:16 p.m. UTC
`b4` is a commandline tool to make patch-based development easier[1]. It
is primarily used for Linux kernel development, but can be configured to
support any project that has a public-inbox endpoint. Buildroot has a
public-inbox mirror at "https://lore.kernel.org/buildroot/".

We configure some basic settings that tell `b4` where to send patches
and how to use get-developers.

[1] https://b4.docs.kernel.org/en/latest/

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
I am planning to send a future patch to hook `./utils/check-package`
into `b4`. This reminds users to run check-package with `b4 prep
--check` before sending a patch series. But support for custom check
commands is broken in the latest version of `b4` and I am waiting on a
fix I submitted upstream[1].

[1] https://lore.kernel.org/tools/20240626-b4-config-check-cmd-v1-1-83fc971196f9@collins.com/T/#u
---
 .b4-config | 7 +++++++
 1 file changed, 7 insertions(+)


---
base-commit: 3ebc7c69d56430c34eba4c869d1d4fe4d1e8de55
change-id: 20240626-support-b4-41d61b8e4d60

Best regards,

Comments

Arnout Vandecappelle July 14, 2024, 8:35 p.m. UTC | #1
On 09/07/2024 16:16, Brandon Maier via buildroot wrote:
> `b4` is a commandline tool to make patch-based development easier[1]. It
> is primarily used for Linux kernel development, but can be configured to
> support any project that has a public-inbox endpoint. Buildroot has a
> public-inbox mirror at "https://lore.kernel.org/buildroot/".
> 
> We configure some basic settings that tell `b4` where to send patches
> and how to use get-developers.
> 
> [1] https://b4.docs.kernel.org/en/latest/
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>

  Applied to master, thanks.

> ---
> I am planning to send a future patch to hook `./utils/check-package`
> into `b4`. This reminds users to run check-package with `b4 prep
> --check` before sending a patch series. But support for custom check
> commands is broken in the latest version of `b4` and I am waiting on a
> fix I submitted upstream[1].

  In addition, check-package doesn't accept patches as its input at the moment. 
IIUC that's what the check hook is supposed to receive.

  I have the following in a post-commit hook:

git diff HEAD^- --name-only --diff-filter=ACM | \
         xargs -r ./utils/check-package

but I don't think that "git diff" command can be reused for handling the check 
command.

  Regards,
  Arnout

> 
> [1] https://lore.kernel.org/tools/20240626-b4-config-check-cmd-v1-1-83fc971196f9@collins.com/T/#u
> ---
>   .b4-config | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/.b4-config b/.b4-config
> new file mode 100644
> index 0000000000..1943458f2f
> --- /dev/null
> +++ b/.b4-config
> @@ -0,0 +1,7 @@
> +# Configuration for the `b4` tool
> +# See https://b4.docs.kernel.org/en/latest/config.html
> +[b4]
> +    send-series-to = buildroot@buildroot.org
> +    send-auto-cc-cmd = "./utils/get-developers -e -"
> +
> +# vim: set filetype=gitconfig:
> 
> ---
> base-commit: 3ebc7c69d56430c34eba4c869d1d4fe4d1e8de55
> change-id: 20240626-support-b4-41d61b8e4d60
> 
> Best regards,
Brandon Maier July 15, 2024, 12:41 p.m. UTC | #2
Hi Arnout,

On Sun Jul 14, 2024 at 8:35 PM UTC, Arnout Vandecappelle via buildroot wrote:
>
>
> On 09/07/2024 16:16, Brandon Maier via buildroot wrote:
> > `b4` is a commandline tool to make patch-based development easier[1]. It
> > is primarily used for Linux kernel development, but can be configured to
> > support any project that has a public-inbox endpoint. Buildroot has a
> > public-inbox mirror at "https://lore.kernel.org/buildroot/".
> >
> > We configure some basic settings that tell `b4` where to send patches
> > and how to use get-developers.
> >
> > [1] https://b4.docs.kernel.org/en/latest/
> >
> > Signed-off-by: Brandon Maier <brandon.maier@collins.com>
>
>   Applied to master, thanks.
>
> > ---
> > I am planning to send a future patch to hook `./utils/check-package`
> > into `b4`. This reminds users to run check-package with `b4 prep
> > --check` before sending a patch series. But support for custom check
> > commands is broken in the latest version of `b4` and I am waiting on a
> > fix I submitted upstream[1].
>
>   In addition, check-package doesn't accept patches as its input at the moment.
> IIUC that's what the check hook is supposed to receive.
>
>   I have the following in a post-commit hook:
>
> git diff HEAD^- --name-only --diff-filter=ACM | \
>          xargs -r ./utils/check-package
>
> but I don't think that "git diff" command can be reused for handling the check
> command.

I modified check-package to accept patch files directly. I made
check-package scan through patch files for lines matching "+++
a/file/that/is/patched" and run on those files directly. Which is
effectively the same thing as your post-commit hook.

Thanks for applying!
Brandon

>
>   Regards,
>   Arnout
>
> >
> > [1] https://lore.kernel.org/tools/20240626-b4-config-check-cmd-v1-1-83fc971196f9@collins.com/T/#u
> > ---
> >   .b4-config | 7 +++++++
> >   1 file changed, 7 insertions(+)
> >
> > diff --git a/.b4-config b/.b4-config
> > new file mode 100644
> > index 0000000000..1943458f2f
> > --- /dev/null
> > +++ b/.b4-config
> > @@ -0,0 +1,7 @@
> > +# Configuration for the `b4` tool
> > +# See https://b4.docs.kernel.org/en/latest/config.html
> > +[b4]
> > +    send-series-to = buildroot@buildroot.org
> > +    send-auto-cc-cmd = "./utils/get-developers -e -"
> > +
> > +# vim: set filetype=gitconfig:
> >
> > ---
> > base-commit: 3ebc7c69d56430c34eba4c869d1d4fe4d1e8de55
> > change-id: 20240626-support-b4-41d61b8e4d60
> >
> > Best regards,
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Peter Korsgaard Aug. 20, 2024, 5:12 p.m. UTC | #3
>>>>> "Brandon" == Brandon Maier via buildroot <buildroot@buildroot.org> writes:

 > `b4` is a commandline tool to make patch-based development easier[1]. It
 > is primarily used for Linux kernel development, but can be configured to
 > support any project that has a public-inbox endpoint. Buildroot has a
 > public-inbox mirror at "https://lore.kernel.org/buildroot/".

 > We configure some basic settings that tell `b4` where to send patches
 > and how to use get-developers.

 > [1] https://b4.docs.kernel.org/en/latest/

 > Signed-off-by: Brandon Maier <brandon.maier@collins.com>

Committed to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/.b4-config b/.b4-config
new file mode 100644
index 0000000000..1943458f2f
--- /dev/null
+++ b/.b4-config
@@ -0,0 +1,7 @@ 
+# Configuration for the `b4` tool
+# See https://b4.docs.kernel.org/en/latest/config.html
+[b4]
+    send-series-to = buildroot@buildroot.org
+    send-auto-cc-cmd = "./utils/get-developers -e -"
+
+# vim: set filetype=gitconfig: