All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: tools@linux.kernel.org
Cc: users@linux.kernel.org
Subject: b4 v0.7.0 is available
Date: Wed, 26 May 2021 15:25:58 -0400	[thread overview]
Message-ID: <20210526192558.pex7tuorwqvkzxe3@nitro.local> (raw)

Hello, all:

Version 0.7.0 of b4 is now available for use. This release includes mostly
backend changes, but also includes some fixes and adds some oft-requested
features.

# Upgrading

If you've previously installed with pip:

    pip install --user --upgrade b4

If you're using b4 from a git checkout:

    git checkout stable-0.7.y
    git submodule update --init

# What is new

Below is the summary of what is new.

## Patch attestation

This version includes what I hope is the final rewrite of patch attestation
features, which has largely moved into its own tool and library called
"patatt": 

    https://pypi.org/project/patatt/

Patatt allows for end-to-end cryptographic attestation of patches via a
separate X-Developer-Signature email header that is very similar to DKIM. If
you have an hour, you can see my presentation to OpenSSF Digital Attestation
WG here:
https://www.youtube.com/watch?v=no6r1iUqY1A

B4 will check for this header in the messages it retrieves and will invoke
patatt (if found) to perform the attestation check, e.g.:

    $ b4 am -o/tmp 20210521184811.617875-1-konstantin@linuxfoundation.org
    [...]
    Checking attestation on all messages, may take a moment...
    ---
      ✓ [PATCH 1/3] Sign Message-Id header if present
      ✓ [PATCH 2/3] Make header order deterministic
      ✓ [PATCH 3/3] Release as 0.4.0
      ---
      ✓ Signed: openpgp/konstantin@linuxfoundation.org
      ✓ Signed: DKIM/linuxfoundation.org
    ---
    [...]

It is very easy to start signing patches with patatt, so I invite everyone to
test it out. If you are using git-send-email, you can automate the whole thing
to happen behind the scenes via the sendemail-validate hook:
https://pypi.org/project/patatt/#getting-started-as-contributor

If you've been using "b4 attest" for this purpose, you can continue to do so,
just make sure that patatt is installed (it will be automatically pulled in
with pip, or you can "git submodule update --init" if you're using straight
from a git checkout).

## Mailbox and maildir output changes

While troubleshooting some odd DKIM failures, I've discovered that what Git
considers "mbox" and what Python considers "mbox" are two different things,
which resulted in some wrongly escaped ">From" sequences to end up in commits,
as is evidenced here:

    https://git.kernel.org/torvalds/c/137733d08f4a

Starting with version 0.7, "b4 am" will save .mbox files in the format that
git expects. Alternatively, you can set "b4.save-maildirs=yes" or pass -M to
save threads as maildirs, which are also natively supported by git and avoid
any possible ambiguities when it comes to escaping/parsing mbox files.

You can read my full rant about the problem here:
https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=4950093c0c3

## Partial-reroll support

This version of b4 will automatically recognize partial series rerolls, e.g.:

    [PATCH v3 1/3] Patch one
    [PATCH v3 2/3] Patch two
     \- [PATCH v4 2/3] Patch two revised
    [PATCH v3 3/3] Patch three

When we see a new revision show up mid-thread, as a child of another patch
with the same numbers, we will automatically generate a new revision, so
retrieving the above thread with b4 will correctly generate a v4 with reused
patches 1 and 3 from v3:

    [PATCH v3->v4 1/3] Patch one
    [PATCH     v4 2/3] Patch two revised
    [PATCH v3->v4 3/3] Patch three

You can disable this for a thread by passing --no-partial-reroll to b4 am.

## Other small fixes

- We will now do a better job parsing [various] [bracketed] [things] in the
  subject.

- Cherry-picking with -P_ does a better job finding the message you want
  regardless of where it is in the thread.

- You can now pass an mbox via stdin using "b4 am -m -", so now you can use
  "b4 am" as a complete pipe-through from mutt to git am. This is handy for
  offline operations. See here for more detail:
  https://lore.kernel.org/tools/20210517220151.b2bmt5f2jjlgmkos@nitro.local/

- b4 am will warn when it finds a message in the thread with an
  "Obsoleted-by:" follow-up trailer. Running "git am -c" will automatically
  retrieve the linked revision, so contributors can now follow-up to the
  obsoleted revisions by sending a follow-up reply with:
  Obsoleted-by: https://lore.kernel.org/r/new-revision-msgid

- b4 pr --explode can now generate archive-ready threads, including a gzipped
  mbox of all discussion threads linked from commits. This feature is mostly
  for the archival project on the kernel.org side of things.

# Acknowledgements

Special thanks to the following people who helped during this release:

- Kyle Meyer 
- Peter Zijlstra
- Dan Williams
- Morten Linderud
- Mark Brown

Best regards,
Konstantin

             reply	other threads:[~2021-05-26 19:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 19:25 Konstantin Ryabitsev [this message]
2021-05-26 19:41 ` b4 v0.7.0 is available Jason Gunthorpe
2021-05-26 19:56   ` Konstantin Ryabitsev
2021-05-26 19:58     ` Konstantin Ryabitsev
2021-05-26 20:52     ` Jason Gunthorpe
2021-05-27  7:56 ` Geert Uytterhoeven
2021-05-27 12:00   ` Konstantin Ryabitsev
2021-05-27 12:05     ` Geert Uytterhoeven
2021-05-27 13:19       ` Konstantin Ryabitsev
2021-05-27 10:19 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526192558.pex7tuorwqvkzxe3@nitro.local \
    --to=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.