add basic b4 config file
PATCH 1/1 add basic b4 config file
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 shouldn't be necessary if we had a script that b4 prep --auto-to-cc could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a MAINTAINERS file) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is part of the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.html
---
This adds a basic config file for b4 to avoid to have to add the mailing list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.
Note that b4 supports patchwork, c.f.
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?
--- .b4-config | 2 ++ 1 file changed, 2 insertions(+)
.b4-config new file +2 -0
@@ -0,0 +1,2 @@ +[b4] + send-series-cc = [email protected]
---
base-commit: ce166ae25793c11b0a190c531bef0c296fd74497
change-id: 20240524-b4-support-e9855fc54d40
Best regards,
Signature · 1 line
Quentin Schulz <[email protected]>
Quoted 26 lines · Quentin Schulz via lists.openembedded.org
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 shouldn't be necessary if we had a script that b4 prep --auto-to-cc could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is part of the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add the mailing list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.
Quoted 5 lines
Note that b4 supports patchwork, c.f.
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?
I use b4 regularly for meta-openembedded maintenance and it also updates patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
Quoted 30 lines
--- .b4-config | 2 ++ 1 file changed, 2 insertions(+).b4-config new file +2
-1@@ -0,0 +1,2 @@ +[b4] + send-series-cc = [email protected] ---base-commit:
ce166ae25793c11b0a190c531bef0c296fd74497
change-id: 20240524-b4-support-e9855fc54d40Best regards,
--
Quentin Schulz <[email protected]>-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16251): https://lists.openembedded.org/g/bitbake-devel/message/16251
Mute This Topic: https://lists.openembedded.org/mt/106281674/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Khem,
Quoted 37 lines · Khem Raj via lists.openembedded.org
Quoted 26 lines · Quentin Schulz via lists.openembedded.org
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 shouldn't be necessary if we had a script that b4 prep --auto-to-cc could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is part of the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add the mailing list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Quoted 5 lines
Note that b4 supports patchwork, c.f.
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?I use b4 regularly for meta-openembedded maintenance and it also updates patchwork when patch is accepted, I have this config.
Quoted 9 lines
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
Thanks for the example! Would it make sense for me to add the pw parts to this patch as well (in a v2 for example)?
I'm perplexed about the pw-key though. This is very much something we don't want to version nor potentially leak by mistake. I assume it is not possible to add to the global ~/.config/git/config or ~/.gitconfig because the URL would change for example between projects (I assume we may have a different patchwork for OE and YP, but for sure if people maintain kernel stuff as well, then they would have one for kernel.org for example). Mmmm but maybe a simple
git config b4.pw-key "<mykey>"
from within the local git repo would be enough :)
BTW, I see you have -to instead of what I sent (-cc), is there a preference here? (I took Cc since this is what we document in the README).
Cheers,
Quentin
Quoted 51 lines · Quentin Schulz
Hi Khem,
Quoted 37 lines · Khem Raj via lists.openembedded.org
Quoted 26 lines · Quentin Schulz via lists.openembedded.org
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 shouldn't be necessary if we had a script that b4 prep --auto-to-cc could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is part of the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add the mailing list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Quoted 5 lines
Note that b4 supports patchwork, c.f.
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?I use b4 regularly for meta-openembedded maintenance and it also updates patchwork when patch is accepted, I have this config.
Quoted 9 lines
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
Quoted 2 lines
Thanks for the example! Would it make sense for me to add the pw parts to this patch as well (in a v2 for example)?
Maybe, it can be documented like this but I would leave it to the maintainers to promote using b4 not.
Quoted 9 lines
I'm perplexed about the pw-key though. This is very much something we don't want to version nor potentially leak by mistake. I assume it is not possible to add to the global ~/.config/git/config or ~/.gitconfig because the URL would change for example between projects (I assume we may have a different patchwork for OE and YP, but for sure if people maintain kernel stuff as well, then they would have one for kernel.org for example). Mmmm but maybe a simple
Quoted 3 lines
git config b4.pw-key "<mykey>"
from within the local git repo would be enough :)
right, it must be documented clearly. setting up b4 is not simple like a pull request merge.
Quoted 3 lines
BTW, I see you have -to instead of what I sent (-cc), is there a preference here? (I took Cc since this is what we document in the README).
I used --to because at times to field was being left empty.
Quoted 3 lines
Cheers,
Quentin
Quoted 41 lines · Khem Raj via lists.openembedded.org
Quoted 10 lines · Quentin Schulz
Hi Khem,
Quoted 6 lines · Khem Raj via lists.openembedded.org
Quoted 4 lines · Quentin Schulz via lists.openembedded.org
From: Quentin Schulz <[email protected]>
b4[1] is a very nice tool for mail-based contribution. A config[2]
file
Quoted 1 line
Quoted 1 line
Quoted 1 line
exists to set up a few defaults. We can use it to set the Cc
recipients
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to always add, in our case the mailing list.
This shouldn't be necessary if we had a script that b4 prep
--auto-to-cc
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is partof
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add themailing
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Note that b4 supports patchwork, c.f.
Quoted 18 lines
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?
I use b4 regularly for meta-openembedded maintenance and it also
updates
Quoted 10 lines
Quoted 10 lines
patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
This inspired me to revisit the issue I was having with "b4 shazam < message.id for an AUH upgrade>", where
shazam would stumble because of the "scissors line" (--- >8 ---)
Turns out the solution appears to be
[b4]
stdin-pipe-sep = "--- >8 ---"
Quoted 47 lines
Quoted 4 lines
Quoted 1 line
Thanks for the example! Would it make sense for me to add the pw parts to this patch as well (in a v2 for example)?
Maybe, it can be documented like this but I would leave it to the maintainers
to promote using b4 not.Quoted 9 lines
I'm perplexed about the pw-key though. This is very much something we don't want to version nor potentially leak by mistake. I assume it is not possible to add to the global ~/.config/git/config or ~/.gitconfig because the URL would change for example between projects (I assume we may have a different patchwork for OE and YP, but for sure if people maintain kernel stuff as well, then they would have one for kernel.org for example). Mmmm but maybe a simple
Quoted 3 lines
git config b4.pw-key "<mykey>"
from within the local git repo would be enough :)
right, it must be documented clearly. setting up b4 is not simple like a pull
request merge.Quoted 3 lines
BTW, I see you have -to instead of what I sent (-cc), is there a preference here? (I took Cc since this is what we document in the
README).
I used --to because at times to field was being left empty.
Quoted 3 lines
Cheers,
Quentin-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#16264):
https://lists.openembedded.org/g/bitbake-devel/message/16264
Mute This Topic: https://lists.openembedded.org/mt/106281674/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 68 lines · Tim Orling
Quoted 43 lines · Khem Raj via lists.openembedded.org
Quoted 10 lines · Quentin Schulz
Hi Khem,
Quoted 6 lines · Khem Raj via lists.openembedded.org
Quoted 4 lines · Quentin Schulz via lists.openembedded.org
From: Quentin Schulz <[email protected]>
b4[1] is a very nice tool for mail-based contribution. A config[2]
file
Quoted 1 line
Quoted 1 line
Quoted 1 line
exists to set up a few defaults. We can use it to set the Cc
recipients
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to always add, in our case the mailing list.
This shouldn't be necessary if we had a script that b4 prep
--auto-to-cc
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify
some
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is partof
Quoted 1 line
Quoted 1 line
Quoted 1 line
the typical workflow for U-Boot and Linux kernel, but is not
necessary
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
thanks to this patch).
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add themailing
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Note that b4 supports patchwork, c.f.
Quoted 19 lines
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this
repo
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
wants to use b4 to merge stuff?
I use b4 regularly for meta-openembedded maintenance and it also
updates
Quoted 10 lines
Quoted 10 lines
patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
Quoted 8 lines
This inspired me to revisit the issue I was having with "b4 shazam < message.id for an AUH upgrade>", where
shazam would stumble because of the "scissors line" (--- >8 ---)Turns out the solution appears to be
[b4]stdin-pipe-sep = "--- >8 ---"
Correction, where I was having trouble was with "git pw patch apply"
$ git pw patch apply 43726 Failed to apply patch: hint: When you have resolved this problem, run "git am --continue". hint: If you prefer to skip this patch, run "git am --skip" instead. hint: To record the empty patch as an empty commit, run "git am --allow-empty". hint: To restore the original branch and stop patching, run "git am --abort". hint: Disable this message with "git config advice.mergeConflict false" Patch is empty.
Whereas "b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com" works:
$ b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com Grabbing thread from lore.kernel.org/all/0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com/t.mbox.gz Checking for newer revisions Grabbing search results from lore.kernel.org Analyzing 1 messages in the thread Checking attestation on all messages, may take a moment... Retrieving CI status, may take a moment... --- ✓ [PATCH] nghttp2: upgrading to 1.62.0 SUCCEEDED --- ✓ Signed: DKIM/yoctoproject.org --- Total patches: 1 --- Applying: nghttp2: upgrade 1.61.0 -> 1.62.0
Any tricks to getting the Message-Id from patchwork?
Quoted 48 lines
Quoted 48 lines
Quoted 5 lines
Quoted 2 lines
Thanks for the example! Would it make sense for me to add the pw parts to this patch as well (in a v2 for example)?
Maybe, it can be documented like this but I would leave it to the maintainers
to promote using b4 not.Quoted 9 lines
I'm perplexed about the pw-key though. This is very much something we don't want to version nor potentially leak by mistake. I assume it is not possible to add to the global ~/.config/git/config or ~/.gitconfig because the URL would change for example between projects (I assume we may have a different patchwork for OE and YP, but for sure if people maintain kernel stuff as well, then they would have one for kernel.org for example). Mmmm but maybe a simple
Quoted 3 lines
git config b4.pw-key "<mykey>"
from within the local git repo would be enough :)
right, it must be documented clearly. setting up b4 is not simple like a pull
request merge.Quoted 3 lines
BTW, I see you have -to instead of what I sent (-cc), is there a preference here? (I took Cc since this is what we document in the
README).
I used --to because at times to field was being left empty.
Quoted 3 lines
Cheers,
Quentin-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#16264):
https://lists.openembedded.org/g/bitbake-devel/message/16264
Mute This Topic: https://lists.openembedded.org/mt/106281674/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Tim,
Quoted 115 lines · Tim Orling via lists.openembedded.org
Quoted 68 lines · Tim Orling
Quoted 43 lines · Khem Raj via lists.openembedded.org
Quoted 10 lines · Quentin Schulz
Hi Khem,
Quoted 6 lines · Khem Raj via lists.openembedded.org
Quoted 4 lines · Quentin Schulz via lists.openembedded.org
From: Quentin Schulz <[email protected]>
b4[1] is a very nice tool for mail-based contribution. A config[2]
file
Quoted 1 line
Quoted 1 line
Quoted 1 line
exists to set up a few defaults. We can use it to set the Cc
recipients
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to always add, in our case the mailing list.
This shouldn't be necessary if we had a script that b4 prep
--auto-to-cc
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify
some
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is partof
Quoted 1 line
Quoted 1 line
Quoted 1 line
the typical workflow for U-Boot and Linux kernel, but is not
necessary
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
thanks to this patch).
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add themailing
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Note that b4 supports patchwork, c.f.
Quoted 19 lines
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this
repo
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
wants to use b4 to merge stuff?
I use b4 regularly for meta-openembedded maintenance and it also
updates
Quoted 10 lines
Quoted 10 lines
patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"Quoted 8 lines
This inspired me to revisit the issue I was having with "b4 shazam < message.id for an AUH upgrade>", where
shazam would stumble because of the "scissors line" (--- >8 ---)Turns out the solution appears to be
[b4]stdin-pipe-sep = "--- >8 ---"Correction, where I was having trouble was with "git pw patch apply"
$ git pw patch apply 43726 Failed to apply patch: hint: When you have resolved this problem, run "git am --continue". hint: If you prefer to skip this patch, run "git am --skip" instead. hint: To record the empty patch as an empty commit, run "git am --allow-empty". hint: To restore the original branch and stop patching, run "git am --abort". hint: Disable this message with "git config advice.mergeConflict false" Patch is empty.Whereas "b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com" works:
$ b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com Grabbing thread from lore.kernel.org/all/0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com/t.mbox.gz Checking for newer revisions Grabbing search results from lore.kernel.org Analyzing 1 messages in the thread Checking attestation on all messages, may take a moment... Retrieving CI status, may take a moment... --- ✓ [PATCH] nghttp2: upgrading to 1.62.0 SUCCEEDED --- ✓ Signed: DKIM/yoctoproject.org --- Total patches: 1 --- Applying: nghttp2: upgrade 1.61.0 -> 1.62.0
Quoted 2 lines
Any tricks to getting the Message-Id from patchwork?
I assume you mean you want to use the patchwork id with b4 shazam?
In any case, you can send a mail on https://lore.kernel.org/tools/ with [b4] as prefix to ask for help or suggest something :)
Cheers,
Quentin
Hi Tim,
Quoting Tim Orling (2024-05-24 19:36:45)
Quoted 115 lines · Tim Orling
Quoted 69 lines
Quoted 43 lines · Khem Raj via lists.openembedded.org
Quoted 10 lines · Quentin Schulz
Hi Khem,
Quoted 6 lines · Khem Raj via lists.openembedded.org
Quoted 4 lines · Quentin Schulz via lists.openembedded.org
From: Quentin Schulz <[email protected]>
b4[1] is a very nice tool for mail-based contribution. A config[2]
file
Quoted 1 line
Quoted 1 line
Quoted 1 line
exists to set up a few defaults. We can use it to set the Cc
recipients
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
to always add, in our case the mailing list.
This shouldn't be necessary if we had a script that b4 prep
--auto-to-cc
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify
some
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is partof
Quoted 1 line
Quoted 1 line
Quoted 1 line
the typical workflow for U-Boot and Linux kernel, but is not
necessary
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
thanks to this patch).
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add themailing
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Note that b4 supports patchwork, c.f.
Quoted 19 lines
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this
repo
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
wants to use b4 to merge stuff?
I use b4 regularly for meta-openembedded maintenance and it also
updates
Quoted 10 lines
Quoted 10 lines
patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"Quoted 8 lines
This inspired me to revisit the issue I was having with "b4 shazam < message.id for an AUH upgrade>", where
shazam would stumble because of the "scissors line" (--- >8 ---)Turns out the solution appears to be
[b4]stdin-pipe-sep = "--- >8 ---"Correction, where I was having trouble was with "git pw patch apply"
$ git pw patch apply 43726 Failed to apply patch: hint: When you have resolved this problem, run "git am --continue". hint: If you prefer to skip this patch, run "git am --skip" instead. hint: To record the empty patch as an empty commit, run "git am --allow-empty". hint: To restore the original branch and stop patching, run "git am --abort". hint: Disable this message with "git config advice.mergeConflict false" Patch is empty.Whereas "b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com" works:
$ b4 shazam 0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com Grabbing thread from lore.kernel.org/all/0101018f7d589796-87eb5d6d-06ed-4275-b5bc-6bad87216833-000000@us-west-2.amazonses.com/t.mbox.gz Checking for newer revisions Grabbing search results from lore.kernel.org Analyzing 1 messages in the thread Checking attestation on all messages, may take a moment... Retrieving CI status, may take a moment... --- ✓ [PATCH] nghttp2: upgrading to 1.62.0 SUCCEEDED --- ✓ Signed: DKIM/yoctoproject.org --- Total patches: 1 --- Applying: nghttp2: upgrade 1.61.0 -> 1.62.0
Quoted 1 line
Any tricks to getting the Message-Id from patchwork?
I've recently been trying to tackle this for the libcamera project as well.
Essentially - grab the series as json from:
https://patchwork.libcamera.org/api/1.1/series/$SERIES_ID/
Then extract from
data['cover_letter']['msgid']
if there's a cover letter, or
data['patches'][0]['msgid']
otherwise.
I'm using this (quick and dirty, please don't judge the) python code to script getting the message-id.
``` #!/usr/bin/env python3 import requests import sys PATCHWORK_API_URL = "https://patchwork.libcamera.org/api/1.1" def get_first_patch_message_id(series_id): # Get series details series_url = f"{PATCHWORK_API_URL}/series/{series_id}/" response = requests.get(series_url) response.raise_for_status() series_data = response.json() # Check for cover letter and get its msgid if series_data.get('cover_letter'): message_id = series_data['cover_letter']['msgid'] else: # If no cover letter, get the msgid of the first patch if not series_data['patches']: raise ValueError("No patches found in the series") message_id = series_data['patches'][0]['msgid'] return message_id if __name__ == "__main__": if len(sys.argv) != 2: print("Usage: python3 get-message-id.py <series_id>") sys.exit(1) series_id = sys.argv[1] try: message_id = get_first_patch_message_id(series_id) print(f"Message ID of the first patch in the series: {message_id}") except Exception as e: print(f"An error occurred: {e}") ```
--
Kieran
Hi Khem,
Quoted 52 lines · Khem Raj
Quoted 51 lines · Quentin Schulz
Hi Khem,
Quoted 46 lines · Khem Raj via lists.openembedded.org
Quoted 26 lines · Quentin Schulz via lists.openembedded.org
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 shouldn't be necessary if we had a script that b4 prep --auto-to-cc could call to find the mail address(es) to send to. While we could do that, this opens the door to people trying to add a way to notify some people (e.g. a
MAINTAINERSfile) which is not somewhere the project wants to go right now, and this also makes sure the address is always added even if one forgets to run b4 prep --auto-to-cc (which is part of the typical workflow for U-Boot and Linux kernel, but is not necessary thanks to this patch).[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.htmlSigned-off-by Quentin Schulz <[email protected]>---
This adds a basic config file for b4 to avoid to have to add the mailing list by hand. For documentation patches, one will still need to run b4 send --cc [email protected]
manually for sending it to the docs ML as well.Quoted 5 lines
Note that b4 supports patchwork, c.f.
https://b4.docs.kernel.org/en/latest/config.html#patchwork-integration-settings
though I have no clue what it does with it as I am no maintainer, but maybe something worth having a look at if some maintainer of this repo wants to use b4 to merge stuff?I use b4 regularly for meta-openembedded maintenance and it also updates patchwork when patch is accepted, I have this config.
[b4]
pw-url = "https://patchwork.yoctoproject.org/" pw-key = "<mykey>"
pw-project = "oe"
pw-review-state = "under-review"
pw-accept-state = "accepted"
pw-discard-state = "rejected"
send-series-to = "[email protected]"
Quoted 6 lines
Quoted 2 lines
Thanks for the example! Would it make sense for me to add the pw parts to this patch as well (in a v2 for example)?
Maybe, it can be documented like this but I would leave it to the maintainers to promote using b4 not.
Promoting != supporting.
Right now, I was just planning on adding basic support for b4 so that people who are in the know can use it. We can decide whether we want to document this and/or make this the default contribution workflow later, they don't have to happen at the same time.
As for the pw bits, it's one less barrier to maintainers using it if they only have to run
git config b4.pw-key "<mykey>"
once (which I can even put as a comment in the file). It can silently and slowly drive adoption if they only have to run one command for trying things out. Reminder that I'm not a maintainer and I'm not using b4 as a maintainer so I have no clue if this is actually useful to Yocto/OE maintainers.
Paul Barker presented his use of b4+lei 3 years ago and I have a vague recollection Bruce may be doing it but cannot find a presentation of his quickly so maybe I'm misremembering.
Providing those defaults (provided they work) doesn't mean people have to use b4 for contribution or as a maintainer as part of their workflow, we just make it easier for people to use that workflow if they want to.
Quoted 9 lines
Quoted 9 lines
I'm perplexed about the pw-key though. This is very much something we don't want to version nor potentially leak by mistake. I assume it is not possible to add to the global ~/.config/git/config or ~/.gitconfig because the URL would change for example between projects (I assume we may have a different patchwork for OE and YP, but for sure if people maintain kernel stuff as well, then they would have one for kernel.org for example). Mmmm but maybe a simple
Quoted 7 lines
Quoted 3 lines
git config b4.pw-key "<mykey>"
from within the local git repo would be enough :)
right, it must be documented clearly. setting up b4 is not simple like a pull request merge.
Do we want to document this now. If so, where? yocto-docs and bitbake/docs?
Richard "suggested" something a bit more involved for git repos merged into the poky git repo so that it finds stuff automagically, if you are writing patches for bitbake inside poky git repo, bitbake/docs, oe-core, etc... So maybe I should think about something a bit "smarter" :)
Cheers,
Quentin