stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: Backport dependencies helper
Date: Fri, 3 Apr 2020 16:24:56 +0200	[thread overview]
Message-ID: <20200403142456.GC4088318@kroah.com> (raw)
In-Reply-To: <20200331123217.GM4189@sasha-vm>

On Tue, Mar 31, 2020 at 08:32:17AM -0400, Sasha Levin wrote:
> Hi all,
> 
> I wanted to share a resource I've been using to help me with doing
> backports to various stable kernels.
> 
> In the Stable Kernel world, when we need to backport a patch, we'd
> rather take any relevant dependencies to make the patch work cleanly on
> an older kernel, rather than modifying the patch and diverging from
> upstream.
> 
> This raises an interesting problem: how do we figure out which other
> patches might be "interesting" to look at? git-blame is a great tool,
> but it takes a while to go through the history of a patch, and given the
> volume of patches we need to look at, it just isn't enough.
> 
> So here's a tool in the form of a git repo that can help point out these
> interesting patches:
> 
>        https://git.kernel.org/pub/scm/linux/kernel/git/sashal/deps.git/
> 
> How does it work, you might ask? It's actually quite simple: Each
> directory represents a kernel version which we'll call K, and each file
> inside that directory is named after an upstream commit we'll call C,
> and it's content are the list of commits one would need to apply on top
> of kernel K to "reach" commit C.
> 
> For example, let's say we want to apply:
> 
>        f8788d86ab28 ("Linux 5.6-rc3")
> 
> On top of the v5.5 kernel tree. All we need to do is:
> 
>        $ cat v5.5/f8788d86ab28f61f7b46eb6be375f8a726783636
>        f8788d86ab28 ("Linux 5.6-rc3")
>        11a48a5a18c6 ("Linux 5.6-rc2")
>        bb6d3fb354c5 ("Linux 5.6-rc1")
> 
> If you don't feel like cloning the repo (which contains quite a few
> files), you can also use kernel.org's web interface in a script that
> might look something like this:
> 
>        #!/bin/bash
>        curl https://git.kernel.org/pub/scm/linux/kernel/git/sashal/deps.git/plain/$1/$2
> 
> And then simply:
> 
>        $ ./deps.sh v5.5 f8788d86ab28f61f7b46eb6be375f8a726783636
>        f8788d86ab28 ("Linux 5.6-rc3")
>        11a48a5a18c6 ("Linux 5.6-rc2")
>        bb6d3fb354c5 ("Linux 5.6-rc1")
> 
> Caveats:
> 
> - Each file is limited to 50 entries. I feel that at that point it
>   stops being useful.
> - Each file stops if a merge commit is hit.
> - I might have bugs in my scripts and some entries are broken, please
>   report those if you see them.

This is really cool, thanks for posting this, and for doing this work.

greg k-h

      parent reply	other threads:[~2020-04-03 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 12:32 Backport dependencies helper Sasha Levin
2020-03-31 13:44 ` Willy Tarreau
2020-03-31 14:08   ` Sasha Levin
2020-03-31 14:41     ` Willy Tarreau
2020-04-03 14:24 ` Greg KH [this message]

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=20200403142456.GC4088318@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).