Ksummit-Discuss Archive on lore.kernel.org
 help / color / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Joel Fernandes <joelaf@google.com>,
	Barret Rhoden <brho@google.com>,
	ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Nieder <jrn@google.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Han-Wen Nienhuys <hanwen@google.com>,
	Theodore Tso <tytso@google.com>,
	David Rientjes <rientjes@google.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [Ksummit-discuss] Allowing something Change-Id (or something like it) in kernel commits
Date: Fri, 23 Aug 2019 23:15:55 +0200 (CEST)
Message-ID: <alpine.DEB.2.21.1908232150580.1939@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190823193832.GE4791@pendragon.ideasonboard.com>

Laurent,

On Fri, 23 Aug 2019, Laurent Pinchart wrote:
> On Fri, Aug 23, 2019 at 09:17:04PM +0200, Thomas Gleixner wrote:
> >
> > Guess what, how I inject the Link to the coverletter of the previous
> > version of a patch series? Definitely not manualy. 
> 
> Would you be able to share your method for automating this ? I'm sure
> many kernel developers could benefit from such automation (both those
> who insert links manually now, and those who don't insert links at all
> because doing it manually is too tedious).

You asked. Don't complain ...

I use quilt for all patch development work and also for my maintainer work,
IOW for everything. So I have tooling around that in and outside of emacs.

I store quilt queues (series file, patches, notes and some more) in git for
versioning. When I post a series I create a mbox with quilt and some custom
scripting around it.

Those scripts check whether there is already a mbox or several in the
patches directory and if not, then the resulting mbox name is mbox-0. If so
then the highest numbered mbox is looked up and the message id of the cover
letter extracted and injected into the template which is loaded into the
editor to write the cover letter. The resulting mbox name is
mbox-$HIGHEST+1. That mbox is then sent out and also archived in git.

For one off patches, I usally do not bother to save it. It's on the
mailing-list, right? So I utilize the method which I have for incoming
(maintainer work) stuff, which allows me to pick the patch from the list,
feed it through the usual machinery and then I have the msgid link as well,
which I then just move into the discard section when I send out V2. That's
also my workflow when I send out a quick fix for an issue in a reply
without changelog etc. If the reporter confirms, then I just pick it up,
add a changelog and commit it.

For incoming stuff, I just mark a full mailthread or several of them in the
mail client, store it as mbox and then I have a script which creates a
quilt series out of it. That script does a bunch of things:

    - Collect Reviewed-by, Acked-by, Tested-by tags either from individual
      replies or replies to the cover letter. The latter apply to the whole
      series.

    - Adds my Signed-off-by

    - Extract message-id for each patch and add the
      Link: https://lkml.kernel.org/r/$MSGID

    - A few magic things which I need for my emacs integration

I do that for review, applying patches and for development (addressing
feedback on a posted series).

Review usually only when it's complex stuff where I really need to see the
context. Emacs + quilt.el allows me to push/pop the patches, to see patch
and context, unapply/reapply hunks. I then can just create a reply from the
current patch (via Link...MSGID) by pulling out the original mail from the
mbox with more scripting magic and emacs shortcuts which are just burned
into my fingers, but I have to look them up in .emacs if someone asks what
I'm doing :)

When done, I just take the replies which I created on the way and send them
out. Either directly or I load them into the mail client when I want to
polish them some more.

For applying stuff, I also push/pop, review, do final tweaks if necessary,
polish the changelog etc. When I'm happy with the result then the series is
imported into git and pushed into a compile machine for basic checks and I
usually kick some smoke test as well. When thats all good I push it out
into my kernel.org tree and let 0-bot and Ingo's test machinery chew on it.

I also use that for development to address review feedback. So I can go
through the replies in the mbox, eventually write a reply, fixup the
corresponding patches, take notes which I can use for the next cover
letter, etc.

For backporting I have a git to quilt export, which I created for all that
speculation disaster work. That one inserts the 'commit xxxx upstream'
note. I use quilt for that because I'm so used to fix rejects in emacs or
to edit the patch (hunk) in the emacs window before applying it. Aside of
that my brain refuses to work with those git conflict markers and these
half consistent git states. That's like me and vi[m]. I just know how to
get out of the mess without creating further damage. :)

The scripts and tools are all highly undocumented and embarrassing hackery
glued together over two decades; IOW the kind of duct tape engineering
which I fundamentally dislike. :) At least most of my emacs quilt mess is
gone by now as someone with lisp brains did it proper.

That said, my git foo is limited and my oldschool habits have just grown
some warts to utilize the parts of git which I really need and like. Of
course all wrapped in scripts (bash, python, lisp) which hide the gory
details of command line arguments from my brain.

So I can't tell how that can be done in git, but I assume that it's
possible to tweak git-email (or what ever the command is) to emit that
message id and then stash it away in something like git notes for later
retrieval.

For the maintainer side there was something mentioned about some git-am
option which allows to insert the link somehow with some extra hook
magic. IIRC, it's in one of the ksummit threads, but I can't find it right
now.

Thanks,

	tglx

  reply index

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 23:39 Doug Anderson
2019-08-23  0:03 ` Brendan Higgins
2019-08-23  0:17 ` Linus Torvalds
2019-08-23  0:30   ` Olof Johansson
2019-08-23  0:43     ` Guenter Roeck
2019-08-23  0:45       ` Olof Johansson
2019-08-23  1:05         ` Olof Johansson
2019-08-23  1:09           ` Dmitry Torokhov
2019-08-23  1:36         ` Theodore Y. Ts'o
2019-08-23  2:58           ` Linus Torvalds
2019-08-23  3:03             ` Linus Torvalds
2019-08-23 13:15               ` Sean Paul
2019-08-23 15:18                 ` Theodore Y. Ts'o
2019-08-23 15:31                   ` Sean Paul
2019-08-23 15:48                     ` Thomas Gleixner
2019-08-23 16:19                       ` Dmitry Torokhov
2019-08-23 16:35                         ` Joel Fernandes
2019-08-23 16:45                           ` Doug Anderson
2019-08-23 16:54                             ` Joel Fernandes
2019-08-23 18:00                               ` Doug Anderson
2019-08-23 19:08                                 ` Joel Fernandes
2019-08-23 19:15                                   ` Joel Fernandes
2019-08-23 19:23                                     ` Thomas Gleixner
2019-08-23 19:31                                       ` Joel Fernandes
2019-08-24 16:53                                   ` Doug Anderson
2019-08-23 16:46                           ` Dmitry Torokhov
2019-08-23 19:17                             ` Thomas Gleixner
2019-08-23 19:38                               ` Laurent Pinchart
2019-08-23 21:15                                 ` Thomas Gleixner [this message]
2019-08-23 21:25                                   ` Mark Brown
2019-08-24 23:13                                   ` Theodore Y. Ts'o
2019-08-25  7:09                                     ` Thomas Gleixner
2019-08-26 22:05                                       ` Thomas Gleixner
2019-08-28  8:50                                         ` Thomas Gleixner
2019-08-23 20:02                               ` Christian Brauner
2019-08-24 16:34                                 ` Doug Anderson
2019-08-24 18:11                                   ` Linus Torvalds
2019-08-24 23:04                                     ` Theodore Y. Ts'o
2019-08-25  3:11                                       ` Greg Kroah-Hartman
2019-08-27 10:51                                         ` Mark Brown
2019-09-09  8:14                                           ` Michael Ellerman
2019-09-09 12:09                                             ` Mark Brown
2019-08-26 17:13                                     ` Doug Anderson
2019-08-26 17:30                                       ` Joel Fernandes
2019-08-26 21:35                                         ` Doug Anderson
2019-08-26 21:51                                           ` Thomas Gleixner
2019-08-26 22:06                                             ` Doug Anderson
2019-08-26 22:19                                               ` Thomas Gleixner
2019-08-26 23:02                                           ` Theodore Y. Ts'o
2019-08-26 23:11                                             ` Doug Anderson
2019-09-16 14:11                                               ` Christian Brauner
2019-09-16 17:43                                               ` Al Viro
2019-09-16 18:05                                                 ` Doug Anderson
2019-08-26 23:43                                             ` Thomas Gleixner
2019-08-28 12:34                                               ` Christian Brauner
2019-08-27  0:29                                             ` Dmitry Vyukov
2019-08-27  6:06                                               ` Thomas Gleixner
2019-08-27 13:24                                                 ` Dmitry Vyukov
2019-08-27 13:48                                                   ` Greg Kroah-Hartman
2019-08-27 14:01                                                     ` Guenter Roeck
2019-08-27 14:09                                                       ` Thomas Gleixner
2019-08-27 15:33                                                         ` Greg Kroah-Hartman
2019-08-27 15:42                                                           ` Thomas Gleixner
2019-08-27 18:55                                                           ` Konstantin Ryabitsev
2019-08-27 19:53                                                             ` Greg Kroah-Hartman
2019-08-27 21:34                                                               ` Joel Fernandes
2019-08-27 21:38                                                                 ` Joel Fernandes
2019-08-28  9:08                                                                 ` Greg Kroah-Hartman
2019-08-28  9:25                                                                   ` Jani Nikula
2019-08-28 10:04                                                                   ` Martin K. Petersen
2019-08-28 10:53                                                                     ` Thomas Gleixner
2019-08-28 12:46                                                                       ` Martin K. Petersen
2019-08-28 10:42                                                                   ` Mark Brown
2019-08-28 11:41                                                                     ` Greg Kroah-Hartman
2019-08-28 12:22                                                                   ` Christian Brauner
2019-08-28 12:38                                                                   ` Joel Fernandes
2019-08-28 13:58                                                                     ` Theodore Y. Ts'o
2019-08-28 20:39                                                                       ` Doug Anderson
2019-08-28 20:46                                                                         ` Johannes Berg
2019-08-28 21:00                                                                           ` Doug Anderson
2019-08-28 22:15                                                                         ` Rob Herring
2019-08-27 17:34                                                       ` Geert Uytterhoeven
2019-08-27 18:50                                                         ` Guenter Roeck
2019-08-27 14:06                                                   ` Thomas Gleixner
2019-08-27  7:33                                               ` Geert Uytterhoeven
2019-08-27 13:30                                                 ` Dmitry Vyukov
2019-08-27 14:28                                                   ` Paul E. McKenney
2019-08-27 15:06                                                     ` Thomas Gleixner
2019-08-27 15:25                                                       ` Paul E. McKenney
2019-08-28  8:57                                                         ` Dan Carpenter
2019-08-23 15:49                     ` Doug Anderson
2019-08-23 15:54                       ` Thomas Gleixner
2019-08-23 15:59                         ` Thomas Gleixner
2019-08-23 16:38                           ` Doug Anderson
2019-08-23 16:50                             ` Andrew Lunn
2019-08-23 17:50                               ` Doug Anderson
2019-08-23 18:10               ` Konstantin Ryabitsev
2019-08-26 22:19               ` Paul Mackerras
2019-08-27  7:02                 ` Stephen Rothwell
2019-08-23  9:09             ` Vlastimil Babka
2019-08-23 12:48               ` Bhaskar Chowdhury
2019-08-23  1:01   ` Dmitry Torokhov
2019-08-23  1:07   ` Doug Anderson
2019-08-23  1:18     ` Joel Fernandes
2019-09-05  8:12 ` Eric Wong

Reply instructions:

You may reply publically 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=alpine.DEB.2.21.1908232150580.1939@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=brho@google.com \
    --cc=dtor@chromium.org \
    --cc=dvyukov@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanwen@google.com \
    --cc=joelaf@google.com \
    --cc=jrn@google.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=rientjes@google.com \
    --cc=tfiga@chromium.org \
    --cc=tytso@google.com \
    /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

Ksummit-Discuss Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/ksummit-discuss/0 ksummit-discuss/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ksummit-discuss ksummit-discuss/ https://lore.kernel.org/ksummit-discuss \
		ksummit-discuss@lists.linuxfoundation.org
	public-inbox-index ksummit-discuss

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxfoundation.lists.ksummit-discuss


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git