From patchwork Wed Feb 24 15:28:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1443940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dm0Fh4l16z9sVV; Thu, 25 Feb 2021 02:29:11 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lEw68-00021X-IO; Wed, 24 Feb 2021 15:29:08 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lEw66-00021D-OC for kernel-team@lists.ubuntu.com; Wed, 24 Feb 2021 15:29:06 +0000 Received: from mail-pj1-f69.google.com ([209.85.216.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lEw66-0005RI-AV for kernel-team@lists.ubuntu.com; Wed, 24 Feb 2021 15:29:06 +0000 Received: by mail-pj1-f69.google.com with SMTP id q10so3532340pjd.0 for ; Wed, 24 Feb 2021 07:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=19Hd3nBFbqO4pu+y1QEfBGvyZMBok/dmS5sNG/7FZBI=; b=KGXU4Tn+c4tFq+ZikWjFRdh1FLHV71OnH9poqqDrqhXfihsy45nRpeWyRSoYLM/0Z1 TW7XJMEuwwHTZTopVM9eTIOZsiwZO5el854lcKKJzWy7S4LIvF5H34xMvnUKuredq4JE 5ob+dKOi6giWhjSTZYpZ1jLN2fk7b7/9D8y+ni/y+9UgmZ9VFYj6ZP9PmfUpAlTPqjbo zJx2YxpCAXZi1eH/wxA1uQnE7aNh52a06mRDyrndOySoCaNi0lxodDrJ82zuxxCsXdQV CzOO1kWcy6Oksc51+Op1GYuTa6h3HiUpqHhbR7N0rxLET++nvf0BcN/O/sH4xzqNLILB FoOA== X-Gm-Message-State: AOAM533f4lO6woY/veKLQQHBbkdmw//LE0Ed+KS4ONeeYE8RaZw7O0W3 V5GKq5svASUbErxaT+nQjrwz13/5Vs3oFdpFl/ylIzAKDpY8Ja1vdQFVkI5O7vR2qH65Zf8h/Dk 3wiZ2JOGxvlRXVvruNjkxZwnyemiXvibKuXTMPDrm0w== X-Received: by 2002:a17:90a:be16:: with SMTP id a22mr5303352pjs.32.1614180544517; Wed, 24 Feb 2021 07:29:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJz05UJehvqr3DCPD7m3fekjB/sfxJGmCwEskxp71i0FQnoUy0iap8QgHfh+V7QuskZ2EC23dw== X-Received: by 2002:a17:90a:be16:: with SMTP id a22mr5303332pjs.32.1614180544289; Wed, 24 Feb 2021 07:29:04 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id s138sm3535218pfc.135.2021.02.24.07.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 07:29:03 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH] stable: Added stable-patches.sh Date: Wed, 24 Feb 2021 08:28:59 -0700 Message-Id: <20210224152859.18604-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210224152859.18604-1-tim.gardner@canonical.com> References: <20210224152859.18604-1-tim.gardner@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Signed-off-by: Tim Gardner --- stable/stable-patches.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 stable/stable-patches.sh diff --git a/stable/stable-patches.sh b/stable/stable-patches.sh new file mode 100755 index 00000000..58bed9e9 --- /dev/null +++ b/stable/stable-patches.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Extract a list of patches that have gone in to each stable branch. This script +# is tailored to be run against https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git +# + +if [ ! -f .git/config ] +then + echo You must run this script within a git repository. + exit 1 +fi + +if ! git branch -a | egrep -q "linux-3\.0\.y" +then + echo This does not look like the stable linux repository. + echo git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git + exit 1 +fi + +# Get the latest commit objects and tags +git fetch origin --tags + +# +# Linux stable branches after linux-2.A.B.y are of the form linux-A.B.y. Ignore linux-2.A.B.y branches +# since none of the kernels we deal with are based on a 2.x kernel. I think we can also ignore +# linux-rolling-lts and linux-rolling-stable since any patch in those branches is also in one +# of the other linux-A.B.y branches. +# +git branch -a | egrep -v "linux-2" | egrep "remotes.*linux.*[0-9]" | sed -e 's;remotes/origin/linux-;;' -e 's;\.; ;g' |\ +while read a b y +do + echo linux-$a.$b.y + git fetch origin linux-$a.$b.y + git log --pretty=oneline v$a.$b..remotes/origin/linux-$a.$b.y > linux-$a.$b.y.txt +done + +# +# Now you can grep for your patch subject and quickly figure out what branshes have it. For example, +# +# grep "USB: serial: add IDs for WinChipHead USB->RS232 adapter" *.txt +#