Message ID | cover.1691049436.git.quic_gurus@quicinc.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1018140vqx; Thu, 3 Aug 2023 02:23:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkh7uP3vb2WUV+LMU76fa5CtOEzh1d3hbD9A2qnUcmh2ebclILZ202XX+gWYFE1Dbg/OHQ X-Received: by 2002:a05:6a00:2405:b0:680:f6fe:8908 with SMTP id z5-20020a056a00240500b00680f6fe8908mr17123796pfh.9.1691054582681; Thu, 03 Aug 2023 02:23:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691054582; cv=none; d=google.com; s=arc-20160816; b=VELsDitNoVmbtoQy3wH9w1K5dlxd8awaaJZNO/NIRzvRrpebVPZZcyHNGkAqfuhqOw vlE/dT+L81+OESYqiL5q9D/hfVfCjc6gm90DutwJHIauk+VDKn+sHYqENPe6b6R60i3k n+suB3ZQIRjNGvZiwU3GE4p+CEk9dEmsPGpiyvkVvV8BPipkXo1cO2fyihTZEp5fTw0F 5W8/SFl/MGEEoiTtpUTlYqTdFNtAmYiFoaGMJw4YG9cloqIT6ncaiET/7y0aSKe/6P12 +if4XZc7mNZHbzYy5ktxGb/2FBPlQfeFLDHcfaHkSGLStKMGoZQilieD1ar/bgX2sHxW WyvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6L+Hc3W81ZyuNI/v3f6fIFyjOKpvOIgXQ0T8pUgtihs=; fh=gmCpQYfiZMIHJphEKf7/EoEYgg1xceTaIen44W/Tddw=; b=wr7gogbAPYlsrMCj7EzZ7yUYM/a2W2495CKAXEet6UpApcIvXkiaxaawg3VkOkmOLH 5BLCaU1WXuif0sRF66nALn4Fz2B0TsR7eUATn2dkwMOOQCyb1IClqdPeNYOMER4g1x7F uQFhcZLht12FwhAjCMxzhzFo7qAT7g14MA+dUYPxDra/RogS7ZAuNuZpDUuYSZV3tU/b MCtu0E+lfxBfShgGz7tZeNZdKir39D0Jj59iMTScai96Q5LYEUHUYqdb9wKV1MkLS1yr kjW3UXczV6uvBbQZ/1QqWsoKHWa4rKagjuR71UQdWphKgl5OUWaPaEam+VTfvMILmEtX tZTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AyR+nkGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a056a00238200b0068740bcd8d7si6380917pfc.362.2023.08.03.02.22.48; Thu, 03 Aug 2023 02:23:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AyR+nkGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234429AbjHCI1v (ORCPT <rfc822;jeff.pang.chn@gmail.com> + 99 others); Thu, 3 Aug 2023 04:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbjHCI1I (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Aug 2023 04:27:08 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BFF1BF9; Thu, 3 Aug 2023 01:24:36 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3736wXS5024241; Thu, 3 Aug 2023 08:23:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=6L+Hc3W81ZyuNI/v3f6fIFyjOKpvOIgXQ0T8pUgtihs=; b=AyR+nkGJ3+dzU7Dt5I2fsn9WOq8+K6xi0bdsC2Koke1J+ho3+aQ7hQxa7B911bM3QfM1 Rc+mlc8z3T7ady1qWkLefPgiKghu+799akKXbGZFNvOWYKGDelIwu7uA1n8JljPqLRJi Ozvsb9EDkBeJZ2b/wvGxrc94BHTsrdZpFp3rVgRrjvTaOf9KVpqUK2XLBOd/lFdIVk3k FI2vXx5OA9Xcrws3qOIWu6idOccYTeLUXmixPpgLawiJSe9enLVmjwjXlmWXXpfis65u OIbTHqGRmo+3TzKGL8ZsdrlqolkSs/jJnABXXw8X6o4c+BvqeDXskd+bGrhy27Ps+s7S Eg== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s7n93jb58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Aug 2023 08:23:24 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3738NNNM024095 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Aug 2023 08:23:23 GMT Received: from hu-gurus-sd.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 3 Aug 2023 01:23:21 -0700 From: Guru Das Srinagesh <quic_gurus@quicinc.com> To: Masahiro Yamada <masahiroy@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Andrew Morton <akpm@linux-foundation.org>, "Nicolas Schier" <nicolas@fjasle.eu>, Kees Cook <keescook@chromium.org>, "Bjorn Andersson" <andersson@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, Will Deacon <will@kernel.org>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, <quic_pkondeti@quicinc.com>, <u.kleine-koenig@pengutronix.de> CC: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-pm@vger.kernel.org>, Guru Das Srinagesh <quic_gurus@quicinc.com> Subject: [PATCH v2 0/1] Add add-maintainer.py script Date: Thu, 3 Aug 2023 01:23:15 -0700 Message-ID: <cover.1691049436.git.quic_gurus@quicinc.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4hRBLHCEHBkVt6oDw5CVW5xFK6eKPSee X-Proofpoint-ORIG-GUID: 4hRBLHCEHBkVt6oDw5CVW5xFK6eKPSee X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-03_06,2023-08-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 bulkscore=0 mlxlogscore=635 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 impostorscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308030073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773199250120873603 X-GMAIL-MSGID: 1773199250120873603 |
Series |
Add add-maintainer.py script
|
|
Message
Guru Das Srinagesh
Aug. 3, 2023, 8:23 a.m. UTC
When pushing patches to upstream, the `get_maintainer.pl` script is used to determine whom to send the patches to. Instead of having to manually process the output of the script, add a wrapper script to do that for you. The add-maintainer.py script adds maintainers (and mailing lists) to a patch, editing it in-place. Thanks to Bjorn for being a sounding board to this idea and for his valuable suggestions. Please try out this script with `--verbosity debug` for verifying that it's doing "the right thing". I've tested this with a patch series from various subsystems to ensure variety of maintainers and lists output and found it to be doing what it is supposed to do. I referred to the following links during development of this script: - https://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python - https://stackoverflow.com/questions/4146009/python-get-list-indexes-using-regular-expression - https://stackoverflow.com/questions/10507230/insert-line-at-middle-of-file-with-python v1 -> v2: - Added set-union logic based on Pavan's comments [1] and Bjorn's early suggestion - Expanded audience and added more mailing lists to get more review comments and feedback [1] https://lore.kernel.org/lkml/63764b84-3ebd-4081-836f-4863af196228@quicinc.com/ Guru Das Srinagesh (1): scripts: Add add-maintainer.py scripts/add-maintainer.py | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100755 scripts/add-maintainer.py
Comments
Hi, On 03/08/2023 10:23, Guru Das Srinagesh wrote: > When pushing patches to upstream, the `get_maintainer.pl` script is used to > determine whom to send the patches to. Instead of having to manually process > the output of the script, add a wrapper script to do that for you. > > The add-maintainer.py script adds maintainers (and mailing lists) to a patch, > editing it in-place. FYI the b4 prep command does this: https://github.com/mricon/b4/blob/e8045d1353165cc065b2f1b180bf1b0846af510e/b4/ez.py#L2055 Perhaps it could be useful to make sure the output is similar ? So far I've been very satisfied by the output of b4 auto_to_cc. Thanks, Neil > > Thanks to Bjorn for being a sounding board to this idea and for his valuable > suggestions. > > Please try out this script with `--verbosity debug` for verifying that it's > doing "the right thing". I've tested this with a patch series from various > subsystems to ensure variety of maintainers and lists output and found it to be > doing what it is supposed to do. > > I referred to the following links during development of this script: > - https://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python > - https://stackoverflow.com/questions/4146009/python-get-list-indexes-using-regular-expression > - https://stackoverflow.com/questions/10507230/insert-line-at-middle-of-file-with-python > > v1 -> v2: > - Added set-union logic based on Pavan's comments [1] and Bjorn's early suggestion > - Expanded audience and added more mailing lists to get more review comments and feedback > > [1] https://lore.kernel.org/lkml/63764b84-3ebd-4081-836f-4863af196228@quicinc.com/ > > Guru Das Srinagesh (1): > scripts: Add add-maintainer.py > > scripts/add-maintainer.py | 113 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 113 insertions(+) > create mode 100755 scripts/add-maintainer.py >
On Aug 03 2023 11:16, Neil Armstrong wrote: > Hi, > > On 03/08/2023 10:23, Guru Das Srinagesh wrote: > >When pushing patches to upstream, the `get_maintainer.pl` script is used to > >determine whom to send the patches to. Instead of having to manually process > >the output of the script, add a wrapper script to do that for you. > > > >The add-maintainer.py script adds maintainers (and mailing lists) to a patch, > >editing it in-place. > > FYI the b4 prep command does this: > https://github.com/mricon/b4/blob/e8045d1353165cc065b2f1b180bf1b0846af510e/b4/ez.py#L2055 > > Perhaps it could be useful to make sure the output is similar ? > > So far I've been very satisfied by the output of b4 auto_to_cc. Thank you - let me check this tool out. Guru Das.
On Aug 03 2023 01:23, Guru Das Srinagesh wrote: > When pushing patches to upstream, the `get_maintainer.pl` script is used to > determine whom to send the patches to. Instead of having to manually process > the output of the script, add a wrapper script to do that for you. > > The add-maintainer.py script adds maintainers (and mailing lists) to a patch, > editing it in-place. Could I request reviews from the other maintainers as well, please? Just to see if I should continue working on this script or if the `b4` tool obviates the need for such a script. Thank you. Guru Das.
Thanks for the comments, Krzysztof. On Aug 15 2023 23:06, Krzysztof Kozlowski wrote: > On 10/08/2023 20:55, Guru Das Srinagesh wrote: > > On Aug 03 2023 01:23, Guru Das Srinagesh wrote: > >> When pushing patches to upstream, the `get_maintainer.pl` script is used to > >> determine whom to send the patches to. Instead of having to manually process > >> the output of the script, add a wrapper script to do that for you. > >> > >> The add-maintainer.py script adds maintainers (and mailing lists) to a patch, > >> editing it in-place. > > > > Could I request reviews from the other maintainers as well, please? Just to see > > if I should continue working on this script or if the `b4` tool obviates the > > need for such a script. > > I send a bit of patches but I use very simple workflow. It is really > simple, so simple, that I was always surprised how people can make their > life difficult with some complicated process to send patches... and then > obviously skip some maintainers, because of that process. Exactly - this script aims to solve precisely that problem. It fills the gap between running `get_maintainers.pl` and having to manually edit its output to add "To: " and "Cc: " and somehow incorporate it in the body of the patch(es). With this script, the workflow would be as simple as: 1. Generate patches using `git format-patch` 2. Run `add-maintainer.py` on the above patches 3. `git send-email` the patches. That's it - no need to manually work with email addresses. > I almost always feed git send-email with addresses from > scripts/get_maintainers.pl. This tool would not bring any benefits to my > simple workflow. In the light of the 3-step workflow I've envisioned above, could you please elaborate why not? If anything, it will only save a developer's time. > For newcomers, OTOH, I would either recommend simple workflow or just > use b4. Why? Because if you cannot use git-send-email, then it means > your email setup will make your life difficult and adding maintainers to > existing patch won't help you. You've mentioned a "simple workflow" many times - could you please share more details on the steps you follow in your workflow for sending patches? > This tool depends on the command line and shell interface of > scripts/get_maintainers.pl which is another reason why it might not be a > good idea. Could you please elaborate on why depending on the output of `get_maintainer.pl` is a bad idea? It's what everyone uses, no? Thank you. Guru Das.
On Aug 18 2023 10:33, Neil Armstrong wrote: > My opinion is that it would be a better idea to add a new output mode > to scripts/get_maintainer.pl than adding another script on top of it. Sorry, I don't follow. The problem that this script is solving is getting the output of `get_maintainer.pl` neatly into a patch according to this scheme: 1. Generate patches using `git format-patch` 2. Run `add-maintainer.py` on the above patches 3. `git send-email` the patches. Not sure how adding a new output mode to `get_maintainer.pl` fits in this problem space. Unless you mean to add a switch to it so that it automatically edits the patch in-place (like `add-maintainer.py` does) and adds all the addresses directly to the patch - in which case, that would be feature creep. > Or document somewhere how to use get_maintainer.pl with git-format-patch > without any additional scripts. IMHO, `Documentation/process/submitting-patches.rst` should be updated with at least one or two options addressing how to get from the aforementioned step #1 -> step #3 addressing the problem that is being solved by step #2. In this vacuum, every developer and maintainer appears to have their own solution that works for them. Thank you. Guru Das.