public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Sasha Levin <sashal@kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH] scripts: stable: add script to validate backports
Date: Tue, 23 Mar 2021 20:05:21 +0100	[thread overview]
Message-ID: <YFo78StZ6Tq82hHJ@kroah.com> (raw)
In-Reply-To: <CAKwvOd=9HwLcTD8GaMsbEWiTPfZ+fj=vgFOefqBxDYkFiv_6YQ@mail.gmail.com>

On Tue, Mar 23, 2021 at 11:52:26AM -0700, Nick Desaulniers wrote:
> On Tue, Mar 23, 2021 at 6:56 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Mar 16, 2021 at 02:31:33PM -0700, Nick Desaulniers wrote:
> > > A common recurring mistake made when backporting patches to stable is
> > > forgetting to check for additional commits tagged with `Fixes:`. This
> > > script validates that local commits have a `commit <sha40> upstream.`
> > > line in their commit message, and whether any additional `Fixes:` shas
> > > exist in the `master` branch but were not included. It can not know
> > > about fixes yet to be discovered, or fixes sent to the mailing list but
> > > not yet in mainline.
> > >
> > > To save time, it avoids checking all of `master`, stopping early once
> > > we've reached the commit time of the earliest backport. It takes 0.5s to
> > > validate 2 patches to linux-5.4.y when master is v5.12-rc3 and 5s to
> > > validate 27 patches to linux-4.19.y. It does not recheck dependencies of
> > > found fixes; the user is expected to run this script to a fixed point.
> > > It depnds on pygit2 python library for working with git, which can be
> > > installed via:
> > > $ pip3 install pygit2
> > >
> > > It's expected to be run from a stable tree with commits applied.  For
> > > example, consider 3cce9d44321e which is a fix for f77ac2e378be. Let's
> > > say I cherry picked f77ac2e378be into linux-5.4.y but forgot
> > > 3cce9d44321e (true story). If I ran:
> > >
> > > $ ./scripts/stable/check_backports.py
> > > Checking 1 local commits for additional Fixes: in master
> > > Please consider backporting 3cce9d44321e as a fix for f77ac2e378be
> >
> > While interesting, I don't use a git tree for the stable queue, so this
> > doesn't really fit into my workflow, sorry.
> 
> Well, what is your workflow?

Look at the stable-queue.git tree.  It's a set of quilt-managed patches
on top of a solid base (i.e. the last released kernel version.).

The only time git gets involved is when we do a -rc release or when we
do a "real" release, and then we use 'git quiltimport' on the whole
stack.

Here's a script that I use (much too slow, I know), for checking this
type of thing and I try to remember to run it before every cycle of -rc
releases:
	https://github.com/gregkh/commit_tree/blob/master/find_fixes_in_queue

It's a hack, and picks up more things than is really needed, but I would
rather it error on that side than the other.

thanks,

greg k-h

  reply	other threads:[~2021-03-23 19:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 21:31 [PATCH] scripts: stable: add script to validate backports Nick Desaulniers
2021-03-23 13:50 ` Greg Kroah-Hartman
2021-03-23 18:52   ` Nick Desaulniers
2021-03-23 19:05     ` Greg Kroah-Hartman [this message]
2021-03-23 20:28       ` Nick Desaulniers
2021-03-24  9:55         ` Greg Kroah-Hartman
2021-03-26 21:03           ` Tom Saeger
2021-03-27 13:46             ` Greg Kroah-Hartman
2021-03-26  1:33     ` Sasha Levin

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=YFo78StZ6Tq82hHJ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox