From patchwork Tue Sep 1 14:36:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142641 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B78FB4BA9033 for ; Tue, 1 Sep 2026 14:38:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B78FB4BA9033 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39]) by sourceware.org (Postfix) with ESMTPS id AD6464BA798A for ; Tue, 1 Sep 2026 14:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD6464BA798A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AD6464BA798A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=38.145.34.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; cv=none; b=gmnpInp8/YGBwn65K64Ooyyym6HuKaDsqEocLEecRZMJg1q1gxiWdEywPurM/0aByl3lNFG3wj4d3IFUxIYc2MRnW5GRF4d+x6YN0ZZQ2T8y8R5cjr/6ZwFai1EdNHhF9+bFrIv1yockZJno6/r1QsUoTbLnF/BN/yHLilU1vrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; c=relaxed/simple; bh=dSL/xVcf5tWMyKnn5ohfwWyjbZU0QnVSe1kPQ0ffK14=; h=From:Date:Subject:To:Message-ID; b=Eo0vqrYdKwLPNn0Z6QUblnOoLwkvH9sTUn60NYIJZkk17v5DwS6zgjcuQrvcltBJvfKnUdKXnzaav4fc1a2wU193Mo7iiXw2pMzJZkhtrnp9RnwYW4vXYoPWu8ci/uJlbxKjV0GUpnXsnCS5hb2rVVtJZWPu/RLTYGr8GJJ1nZo= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD6464BA798A Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id 831B642594 for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:23 +0000 Subject: [PATCH v2 1/6] maintainer_utils.py: Add a store method To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/a32bc75fa32cbedadcdc467aef4fbd731d388d87 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw Add a method that will write out the MAINTAINERS.yml data with a suitable leading comment. This avoids the need, should it arise of having multiple scripts needing to do something similar. Adjust add-write-after.py to use this. Update MAINTAINERS.yml to include the new comment. ChangeLog: * MAINTAINERS.yml: Add initial comment contrib/ChangeLog: * maintainer_utils.py(store): New function. * add-write-after.py(main): Use it. --- MAINTAINERS.yml | 4 ++++ contrib/add-write-after.py | 11 +++++------ contrib/maintainer_utils.py | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 5f1e05bf0b3bb..e14432c67ee18 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -1,3 +1,7 @@ +# If you edit this file, please validate with: +# contrib/maintainer_utils.py +# before committing. + users: - sn: Abson cn: Spencer Abson diff --git a/contrib/add-write-after.py b/contrib/add-write-after.py index 6bbcd8c7e3b22..693bd8cd95362 100755 --- a/contrib/add-write-after.py +++ b/contrib/add-write-after.py @@ -141,13 +141,12 @@ def main(): data['users'] = sorted(data['users'], key = lambda k: (unilower(k['sn']), unilower(k['cn']))) - if opts.outfilename and opts.outfilename != '-': - outfd = open (opts.outfilename, "w", encoding="utf-8") - elif opts.outfilename and opts.outfilename == '-': - outfd = sys.stdout + if opts.outfilename and opts.outfilename == '-': + maintutils.store(data) else: - outfd = open (args[0], "w", encoding="utf-8") - yaml.dump (data, outfd, allow_unicode = True, sort_keys = False) + maintutils.store( + data, + file=opts.outfilename if opts.outfilename else args[0]) return 0 if __name__ == "__main__": diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index 9dfc6f0fea62b..d3af121d075c9 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -296,6 +296,20 @@ def load(file): return data +def store(data, file=None, fd=sys.stdout): + # Make sure we don't write something that is not conformant + validate(data) + if file: + fd = open(file, "w", encoding="utf-8") + print("# If you edit this file, please validate with:", + file=fd) + print("# contrib/maintainer_utils.py ", + file=fd) + print("# before committing.\n", file=fd) + yaml.dump(data, fd, allow_unicode=True, sort_keys=False) + if file: + fd.close() + def main(): if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} path-to-MAINTAINERS.yml") From patchwork Tue Sep 1 14:36:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142642 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 73F384BA23E8 for ; Tue, 1 Sep 2026 14:38:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73F384BA23E8 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [IPv6:2620:52:6:3111::39]) by sourceware.org (Postfix) with ESMTPS id B9F8B4BA799C for ; Tue, 1 Sep 2026 14:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9F8B4BA799C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9F8B4BA799C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2620:52:6:3111::39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; cv=none; b=EOgkZ7Xdv00A0oiMawB/KyiP4Z4rCNloS225TwtzyGfXkwUb3sByNPqJzOkq2sex/ma3Jt5b1IUcY0SIoh9HpNUhgBdWg/5kFfJEXC0oaKJoBBMQ6wrOxSJFdSDKaAM07/rkjxlZELM+NJcPs7sRGVySmagsEdTzRVG+B8rFWys= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; c=relaxed/simple; bh=kxPMZCsnC1a8PqSCaS0rB814A1hBK9fyH+Soe5G71D4=; h=From:Date:Subject:To:Message-ID; b=Ki5eRmr4HKOJzz69fL0Xm6JDz8QBuxpuHt44hVVGIguYpw81DSN5Er4gJB3yqodDYhLVzjyC2Oc8csDDhQs4Dwzfvxp6264ZWf7uZQ3aycy7mB+OXXRWHmCFoPtkK37Km8tN1hBEl5LaldZXfaYMyGGYwzvY5/FjZehHzzepxhI= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9F8B4BA799C Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id 90D7142595 for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:24 +0000 Subject: [PATCH v2 2/6] maintainer_utils: Fix errors in schema. To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/0555ec2bc05dbf25aad892b7810a9507ad802b2b X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw Unfortuately some errors crept into the the schema for the maintainers YAML data which meant that some intended checks were being ignored. Specifically: - Arrays with a minimum size need to use minItems - Strings with a minimum length need to use minLength I both cases, case is important (the validator ignores unrecognized tokens). and "minlength" was being used for both strings and arrays. contrib/ChangeLog: * maintainer_utils.py (maintainer_schema): Fix size validation checks. --- contrib/maintainer_utils.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index d3af121d075c9..51a78ab72eec7 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -47,11 +47,11 @@ maintainer_schema = { 'properties': { 'sn': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, 'cn': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, 'email': { 'type': 'array', @@ -111,23 +111,23 @@ maintainer_schema = { }, ], }, - 'minlength': 1, + 'minItems': 1, }, 'account': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, 'pattern': '[a-zA-Z][a-zA-Z0-9]*', }, 'forgeid': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, 'aliases': { 'type': 'array', - 'minlength': 1, + 'minLength': 1, 'items': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, }, 'inactive': { @@ -145,28 +145,28 @@ maintainer_schema = { 'properties': { 'name': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, 'class': { 'type': 'string', - 'minlength': 1, + 'minLength': 1, }, 'labels': { 'type': 'array', # Disabled until we populate the labels - # 'minlength': 1, + # 'minItems': 1, 'items': { 'type': 'string', - 'minlength': 3, + 'minLength': 3, 'pattern': label_pattern, }, }, 'teams': { 'type': 'array', - 'minlength': 1, + 'minItems': 1, 'items': { 'type': 'string', - 'minlength': 3, + 'minLength': 3, }, }, }, From patchwork Tue Sep 1 14:36:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142646 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61B624BA79BB for ; Tue, 1 Sep 2026 14:39:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61B624BA79BB X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39]) by sourceware.org (Postfix) with ESMTPS id C7C604BA23F4 for ; Tue, 1 Sep 2026 14:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C7C604BA23F4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C7C604BA23F4 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=38.145.34.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; cv=none; b=ghAZJguMgjFXZwPwDk4RglPNWCteJdqTNVjL8S216GErKWq9k3ZHY6XbruWltS/gGKpfSsS57PIddHaae4mkjuhx/hkzYkXI4WAPLnmzrRx2ZWOfk+OBvuki6BwClpiNE1vtupVFl1Rpk6CaMd/TStqyx45daKsfUTZiNHkTGVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; c=relaxed/simple; bh=Y+8zOTZdp77ke5H2rhVb5tUKnU0o+CiCLREaLzEe/yg=; h=From:Date:Subject:To:Message-ID; b=xcp3tQCwz/s9aezqrxZ1iQMi5QhpKmEOZqVQHBUaszv01DvkS5KmfSiiIjSUBJCL1OGG+4p2NjF37JKePYJ83mkwggLL0OHUtcZ+IbQ9GheG3Oq5TZBmORVwiHuvzBFcMBR5NL0+WURpvQilBzOkhi0DmkLrJkC0DkPR8Ww3A10= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7C604BA23F4 Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id 9E7A542596 for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:25 +0000 Subject: [PATCH v2 3/6] maintainer_utils: Move DCO entries outside of roles. To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/66c26b5261785a79a9b6db0fce420a549c1c4f21 X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, PP_MIME_FAKE_ASCII_TEXT, PROLO_LEO1, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw Logically, DCO entries are just another list of email addresses; they aren't really roles within the project. This patch splits them out of the roles entry into their own list. It does make it a bit more work to re-generate the MAINTAINERS file, but it isn't enough to continue using the existing structure. While there, add some additional validation of DCO entries: addresses used for a DCO must either be in the list of active emails or the list of inactive ones. contrib/ChangeLog: * maintainer_utils.py (maintainer_schema): Move the DCO data to a top-level user list. Ensure that each user entry has at least one of roles and DCO. (_check_dco): New function. (validate): Use it. Handle roles being absent. * gen-MAINTAINERS.py (format_output): Scan the list of DCO entries if generating the DCO table. Split the overflowing field logic into ... (paginate): ... here. * add-write-after.py (getuserdata): Write DCO data to new field. Check that DCO email address is known and add to inactive_email if not. ChangeLog: * MAINTAINERS.yml: Move all DCO 'roles' to a separate list. --- MAINTAINERS.yml | 194 +++++++++++++++++++++++------------- contrib/add-write-after.py | 12 ++- contrib/gen-MAINTAINERS.py | 40 ++++++-- contrib/maintainer_utils.py | 40 ++++++-- 4 files changed, 192 insertions(+), 94 deletions(-) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index e14432c67ee18..b48c753ede972 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -71,8 +71,9 @@ users: - soumyaa@gcc.gnu.org roles: - WriteAfter - - DCO: soumyaa@nvidia.com account: soumyaa + DCO: + - soumyaa@nvidia.com - sn: Arras cn: Paul-Antoine Arras email: @@ -227,11 +228,12 @@ users: - dbarboza@ventanamicro.com roles: - WriteAfter - - DCO: dbarboza@qti.qualcomm.com - - DCO: dbarboza@ventanamicro.com account: dbarboza aliases: - Daniel Henrique Barboza + DCO: + - dbarboza@qti.qualcomm.com + - dbarboza@ventanamicro.com - sn: Bauermann cn: Thiago Jung Bauermann email: @@ -340,11 +342,12 @@ users: roles: - Reviewer: register allocation - WriteAfter - - DCO: bergner@tenstorrent.com account: bergner inactive_email: - bergner@linux.ibm.com - bergner@vnet.ibm.com + DCO: + - bergner@tenstorrent.com - sn: Berlin cn: Daniel Berlin email: @@ -845,8 +848,9 @@ users: - dhruvc@gcc.gnu.org roles: - WriteAfter - - DCO: dhruvc@nvidia.com account: dhruvc + DCO: + - dhruvc@nvidia.com - sn: Chen cn: Dehao Chen email: @@ -864,11 +868,12 @@ users: - chen.zhongyao@zte.com.cn roles: - WriteAfter - - DCO: chen.zhongyao@zte.com.cn - - DCO: chenzhongyao.hit@gmail.com account: zhongyao aliases: - zhongyao + DCO: + - chen.zhongyao@zte.com.cn + - chenzhongyao.hit@gmail.com - sn: Chêne cn: Fabien Chêne email: @@ -966,8 +971,9 @@ users: - jchrist@gcc.gnu.org roles: - WriteAfter - - DCO: jchrist@linux.ibm.com account: jchrist + DCO: + - jchrist@linux.ibm.com - sn: Christina cn: Tamar Christina email: @@ -1063,10 +1069,11 @@ users: - alx@gcc.gnu.org roles: - WriteAfter - - DCO: alx@kernel.org account: alx inactive_email: - alx.manpages@gmail.com + DCO: + - alx@kernel.org - sn: Conner cn: Josh Conner email: @@ -1187,8 +1194,9 @@ users: - peppe@gcc.gnu.org roles: - WriteAfter - - DCO: giuseppe.dangelo@kdab.com account: peppe + DCO: + - giuseppe.dangelo@kdab.com - sn: Dabbelt cn: Palmer Dabbelt email: @@ -1238,14 +1246,15 @@ users: - Maintainer: riscv port - Reviewer: vectorizer (+ tree-if-conv) - WriteAfter - - DCO: rdapp.gcc@gmail.com - - DCO: rdapp@qti.qualcomm.com - - DCO: rdapp@ventanamicro.com account: rdapp inactive_email: - rdapp@linux.ibm.com - rdapp@linux.vnet.ibm.com - rdapp@oss.qualcomm.com + DCO: + - rdapp.gcc@gmail.com + - rdapp@qti.qualcomm.com + - rdapp@ventanamicro.com - sn: Dardis cn: Simon Dardis email: @@ -1677,10 +1686,11 @@ users: roles: - Reviewer: CTF, BTF, bpf port - WriteAfter - - DCO: david.faust@oss.qualcomm.com account: dfaust inactive_email: - david.faust@oracle.com + DCO: + - david.faust@oss.qualcomm.com - sn: Feifer cn: Sam Feifer email: @@ -1763,8 +1773,9 @@ users: - kaelfandrew@gmail.com roles: - WriteAfter - - DCO: kaelfandrew@gmail.com account: kael + DCO: + - kaelfandrew@gmail.com - sn: Franke cn: Daniel Franke email: @@ -1918,11 +1929,12 @@ users: - pgodbole@gcc.gnu.org roles: - WriteAfter - - DCO: pgodbole@nvidia.com account: pgodbole inactive_email: - prachi.godbole@imgtec.com - prachigodbole@gcc.gnu.org + DCO: + - pgodbole@nvidia.com - sn: Granlund cn: Torbjorn Granlund email: @@ -2067,10 +2079,11 @@ users: - eikansh@gcc.gnu.org roles: - WriteAfter - - DCO: eikansh.gupta@oss.qualcomm.com account: eikansh inactive_email: - quic_eikagupt@quicinc.com + DCO: + - eikansh.gupta@oss.qualcomm.com - sn: Gupta cn: Vineet Gupta email: @@ -2089,7 +2102,6 @@ users: - naveenh@gcc.gnu.org roles: - WriteAfter - - DCO: naveen.siddegowda@oss.qualcomm.com account: naveenh aliases: - Naveen Gowda @@ -2099,6 +2111,8 @@ users: - naveen.hurugalawadi@caviumnetworks.com - naveen.s@kpitcummins.com - naveenh@marvell.com + DCO: + - naveen.siddegowda@oss.qualcomm.com - sn: Hagog cn: Mostafa Hagog email: @@ -2313,11 +2327,12 @@ users: - Maintainer: '*gimpl*' - Maintainer: '*vrp, ranger' - WriteAfter - - DCO: aldy@quesejoda.com account: aldyh inactive_email: - aldyh@cygnus.com - aldyh@redhat.com + DCO: + - aldy@quesejoda.com - sn: Herron cn: Philip Herron email: @@ -2730,8 +2745,9 @@ users: - mjires@gcc.gnu.org roles: - WriteAfter - - DCO: mjires@suse.cz account: mjires + DCO: + - mjires@suse.cz - sn: Johnson cn: Janis Johnson email: @@ -3078,10 +3094,11 @@ users: - mkretz@gcc.gnu.org roles: - WriteAfter - - DCO: m.kretz@gsi.de account: mkretz inactive_email: - kretz@kde.org + DCO: + - m.kretz@gsi.de - sn: Krupp cn: Louis Krupp email: @@ -3098,11 +3115,12 @@ users: - prathamesh3492@gcc.gnu.org roles: - WriteAfter - - DCO: prathameshk@nvidia.com account: prathamesh3492 inactive_email: - bilbotheelffriend@gmail.com - prathamesh.kulkarni@linaro.org + DCO: + - prathameshk@nvidia.com - sn: Kumar cn: Venkataramanan Kumar email: @@ -3205,9 +3223,10 @@ users: - tlange@gcc.gnu.org roles: - WriteAfter - - DCO: mail@tim-lange.me account: tlange inactive: true + DCO: + - mail@tim-lange.me - sn: Langton cn: Asher Langton email: @@ -3269,11 +3288,6 @@ users: - Maintainer: scheduler (+ haifa) email: jeffreyalaw@gmail.com - WriteAfter: jeffreyalaw@gmail.com - - DCO: jefflaw@qti.qualcomm.com - - DCO: jeffrey.law@oss.qualcomm.com - - DCO: jeffreyalaw@gmail.com - - DCO: jlaw@tachyum.com - - DCO: jlaw@ventanamicro.com account: law aliases: - jlaw @@ -3282,6 +3296,12 @@ users: - law@cygnus.com - law@redhat.com - law@torsion.usersys.redhat.com + DCO: + - jefflaw@qti.qualcomm.com + - jeffrey.law@oss.qualcomm.com + - jeffreyalaw@gmail.com + - jlaw@tachyum.com + - jlaw@ventanamicro.com - sn: Lawrence cn: Alan Lawrence email: @@ -3338,8 +3358,9 @@ users: - garthlei@gcc.gnu.org roles: - WriteAfter - - DCO: garthlei@linux.alibaba.com account: garthlei + DCO: + - garthlei@linux.alibaba.com - sn: Lemke cn: James Lemke email: @@ -3413,8 +3434,8 @@ users: cn: Jim Lin email: - jim@andestech.com - roles: - - DCO: jim@andestech.com + DCO: + - jim@andestech.com - sn: Lin cn: Kewen Lin email: @@ -3446,8 +3467,9 @@ users: - martin.liska@hey.com roles: - WriteAfter - - DCO: martin.liska@hey.com account: marxin + DCO: + - martin.liska@hey.com - sn: Liu cn: Hao Liu email: @@ -3592,7 +3614,6 @@ users: - hjl@gcc.gnu.org roles: - WriteAfter - - DCO: hjl.tools@gmail.com account: hjl inactive_email: - hjl@gnu.ai.mit.edu @@ -3600,6 +3621,8 @@ users: - hjl@lucon.org - hjl@nynexst.com - hongjiu.lu@intel.com + DCO: + - hjl.tools@gmail.com - sn: Luo cn: Longjun Luo email: @@ -3607,8 +3630,9 @@ users: - anatasluo@gcc.gnu.org roles: - WriteAfter - - DCO: luolongjuna@gmail.com account: anatasluo + DCO: + - luolongjuna@gmail.com - sn: Luo cn: Xiong Hu Luo email: @@ -3667,8 +3691,9 @@ users: - c8ef@outlook.com roles: - WriteAfter - - DCO: yuao@gcc.gnu.org account: yuao + DCO: + - yuao@gcc.gnu.org - sn: Machado cn: Luis Machado email: @@ -3742,10 +3767,11 @@ users: - matmal01@gcc.gnu.org roles: - WriteAfter - - DCO: mmalcomson@nvidia.com account: matmal01 inactive_email: - matthew.malcomson@arm.com + DCO: + - mmalcomson@nvidia.com - sn: Maltsev cn: Mikhail Maltsev email: @@ -3768,9 +3794,10 @@ users: - Maintainer: libga68 email: jemarch@gnu.org - WriteAfter - - DCO: jemarch@gnu.org account: jemarch forgeid: jemarch + DCO: + - jemarch@gnu.org - sn: Markianos-Wright cn: Stamatis Markianos-Wright email: @@ -4036,12 +4063,13 @@ users: - mir@gcc.gnu.org roles: - WriteAfter - - DCO: mir@sourceware.org account: mir inactive: true inactive_email: - mirimmad17@gmail.com - mirimmad@outlook.com + DCO: + - mir@sourceware.org - sn: Miranda cn: Cupertino Miranda email: @@ -4182,10 +4210,11 @@ users: roles: - Maintainer: Modula-2 front end - WriteAfter - - DCO: gaiusmod2@gmail.com account: gaius inactive_email: - gaius.mulley@southwales.ac.uk + DCO: + - gaiusmod2@gmail.com - sn: Müllner cn: Christoph Müllner email: @@ -4199,9 +4228,9 @@ users: email: - smunnang@qti.qualcomm.com - smunnangi1@ventanamicro.com - roles: - - DCO: smunnang@qti.qualcomm.com - - DCO: smunnangi1@ventanamicro.com + DCO: + - smunnang@qti.qualcomm.com + - smunnangi1@ventanamicro.com - sn: Munroe cn: Steven Munroe email: @@ -4263,11 +4292,12 @@ users: - nsz@gcc.gnu.org roles: - WriteAfter - - DCO: nsz@gcc.gnu.org account: nsz inactive: true inactive_email: - szabolcs.nagy@arm.com + DCO: + - nsz@gcc.gnu.org - sn: Nascimento cn: Victor Do Nascimento email: @@ -4568,11 +4598,12 @@ users: - Maintainer: Rust - Maintainer: libgrust - WriteAfter - - DCO: pierre.emmanuel.patry@opensrcsec.com - - DCO: pierre-emmanuel.patry@embecosm.com inactive_email: - pierre-emmanuel.patry@embecosm.com account: pep + DCO: + - pierre.emmanuel.patry@opensrcsec.com + - pierre-emmanuel.patry@embecosm.com - sn: Pavenis cn: Andris Pavenis email: @@ -4635,10 +4666,11 @@ users: - mikpe@gcc.gnu.org roles: - WriteAfter - - DCO: mikpelinux@gmail.com account: mikpe inactive_email: - mikpe@it.uu.se + DCO: + - mikpelinux@gmail.com - sn: Pfau cn: Johannes Pfau email: @@ -4688,8 +4720,6 @@ users: email: pinskia@gmail.com - Reviewer: aarch64 port - WriteAfter: andrew.pinski@qualcomm.com - - DCO: andrew.pinski@oss.qualcomm.com - - DCO: quic_apinski@quicinc.com account: pinskia forgeid: pinskia inactive_email: @@ -4700,6 +4730,9 @@ users: - apinski@cavium.com - apinski@marvell.com - pinskia@physics.uc.edu + DCO: + - andrew.pinski@oss.qualcomm.com + - quic_apinski@quicinc.com - sn: Pitre cn: Nicolas Pitre email: @@ -4784,13 +4817,14 @@ users: - siddhesh@gcc.gnu.org roles: - WriteAfter - - DCO: siddhesh@gotplt.org account: siddhesh inactive_email: - siddhesh.poyarekar@gmail.com - siddhesh.poyarekar@linaro.org - siddhesh@redhat.com - siddhesh@sourceware.org + DCO: + - siddhesh@gotplt.org - sn: Praveen cn: Vidya Praveen email: @@ -4881,7 +4915,6 @@ users: roles: - Maintainer: arm port - WriteAfter - - DCO: ramanara@nvidia.com account: ramana inactive_email: - ramana.gcc@gmail.com @@ -4890,17 +4923,20 @@ users: - ramana.radhakrishnan@codito.com - ramana.radhakrishnan@linaro.org - ramana@codito.com + DCO: + - ramanara@nvidia.com - sn: Rahimi cn: Navid Rahimi email: - navidr@gcc.gnu.org roles: - WriteAfter - - DCO: navidr@gcc.gnu.org account: navidr inactive: true inactive_email: - navidrahimi@microsoft.com + DCO: + - navidr@gcc.gnu.org - sn: Raj cn: Rishi Raj email: @@ -4908,9 +4944,10 @@ users: - rshraj45035@gcc.gnu.org roles: - WriteAfter - - DCO: rishiraj45035@gmail.com account: rshraj45035 inactive: true + DCO: + - rishiraj45035@gmail.com - sn: Raman cn: Easwaran Raman email: @@ -5004,8 +5041,9 @@ users: - egas@gcc.gnu.org roles: - WriteAfter - - DCO: egas.g.ribeiro@gmail.com account: egas + DCO: + - egas.g.ribeiro@gmail.com - sn: Richards cn: Alfie Richards email: @@ -5249,12 +5287,13 @@ users: - tbsaunde@gcc.gnu.org roles: - WriteAfter - - DCO: tbsaunde+gcc@tbsaunde.org account: tbsaunde inactive: true inactive_email: - tbsaunde@tbsaunde.org - tsaunders@mozilla.com + DCO: + - tbsaunde+gcc@tbsaunde.org - sn: Sawdey cn: Aaron Sawdey email: @@ -5312,14 +5351,14 @@ users: cn: Bill Schmidt email: - bill.schmidt@fastmail.com - roles: - - DCO: bill.schmidt@fastmail.com inactive: true inactive_email: - wschmidt@linux.ibm.com - wschmidt@linux.vnet.ibm.com - wschmidt@vnet.ibm.com - wschmidt@vnet.linux.ibm.com + DCO: + - bill.schmidt@fastmail.com - sn: Schmidt cn: Will Schmidt email: @@ -5490,8 +5529,9 @@ users: - nathanieloshead@gmail.org roles: - WriteAfter - - DCO: nathanieloshead@gmail.org account: nshead + DCO: + - nathanieloshead@gmail.org - sn: Shen cn: Tim Shen email: @@ -5534,12 +5574,13 @@ users: - Maintainer: libcpp - Maintainer: gcov - WriteAfter - - DCO: nathan@acm.org account: nathan inactive_email: - nathan@codesourcery.com - nathans@fb.com - sidwell@codesourcery.com + DCO: + - nathan@acm.org - sn: Singhai cn: Sharad Singhai email: @@ -5593,11 +5634,12 @@ users: - emsr@gcc.gnu.org roles: - WriteAfter - - DCO: esmithrowland@gmail.com account: emsr inactive: true inactive_email: - 3dw4rd@verizon.net + DCO: + - esmithrowland@gmail.com - sn: Sokolov cn: Anatoly Sokolov email: @@ -5636,10 +5678,11 @@ users: - maskray@gcc.gnu.org roles: - WriteAfter - - DCO: maskray@gcc.gnu.org account: maskray inactive_email: - maskray@google.com + DCO: + - maskray@gcc.gnu.org - sn: Stallman cn: Richard Stallman email: @@ -5981,11 +6024,12 @@ users: roles: - Maintainer: aarch64 port - WriteAfter - - DCO: ktkachov@nvidia.com account: ktkachov forgeid: ktkachov inactive_email: - kyrylo.tkachov@arm.com + DCO: + - ktkachov@nvidia.com - sn: Tobler cn: Andreas Tobler email: @@ -6019,11 +6063,12 @@ users: - tomner@gcc.gnu.org roles: - WriteAfter - - DCO: tomner@bahnhof.se account: tomner inactive: true inactive_email: - tomner@kth.se + DCO: + - tomner@bahnhof.se - sn: Tomsich cn: Philipp Tomsich email: @@ -6104,12 +6149,13 @@ users: - uecker@tugraz.at roles: - WriteAfter - - DCO: uecker@gcc.gnu.org account: uecker inactive_email: - martin.uecker@med.uni-goettingen.de - muecker@gwdg.de - uecker@eecs.berkeley.edu + DCO: + - uecker@gcc.gnu.org - sn: Ung cn: David Ung email: @@ -6203,10 +6249,11 @@ users: - kugan@gcc.gnu.org roles: - WriteAfter - - DCO: kvivekananda@nvidia.com account: kugan inactive_email: - kuganv@linaro.org + DCO: + - kvivekananda@nvidia.com - sn: Volkov cn: Artemiy Volkov email: @@ -6285,7 +6332,6 @@ users: roles: - Maintainer: c++ runtime libs - WriteAfter - - DCO: jwakely@redhat.com account: redi forgeid: redi inactive_email: @@ -6293,6 +6339,8 @@ users: - jw@kayari.org - jwakely.gcc@gmail.com - redi@kayari.org + DCO: + - jwakely@redhat.com - sn: Walfridsson cn: Krister Walfridsson email: @@ -6437,9 +6485,10 @@ users: - alexanderw@gcc.gnu.org roles: - WriteAfter - - DCO: alexanderw@gcc.gnu.org account: alexanderw inactive: true + DCO: + - alexanderw@gcc.gnu.org - sn: Wielaard cn: Mark Wielaard email: @@ -6557,8 +6606,9 @@ users: roles: - Maintainer: nds32 port - WriteAfter - - DCO: jasonwucj@gmail.com account: jasonwucj + DCO: + - jasonwucj@gmail.com - sn: Wu cn: Le-Chun Wu email: @@ -6801,9 +6851,10 @@ users: - quic_pzheng@quicinc.com roles: - WriteAfter - - DCO: pengxuan.zheng@oss.qualcomm.com - - DCO: quic_pzheng@quicinc.com account: pzheng + DCO: + - pengxuan.zheng@oss.qualcomm.com + - quic_pzheng@quicinc.com - sn: Zhong cn: Juzhe Zhong email: @@ -6841,11 +6892,12 @@ users: - raphael.zinsly@oss.qualcomm.com roles: - WriteAfter - - DCO: rzinsly@qti.qualcomm.com - - DCO: rzinsly@ventanamicro.com account: rzinsly aliases: - Raphael Moreira Zinsly + DCO: + - rzinsly@qti.qualcomm.com + - rzinsly@ventanamicro.com - sn: Zippel cn: Roman Zippel email: diff --git a/contrib/add-write-after.py b/contrib/add-write-after.py index 693bd8cd95362..c6c11bbcf5c87 100755 --- a/contrib/add-write-after.py +++ b/contrib/add-write-after.py @@ -107,11 +107,21 @@ def getuserdata(): newuser['forgeid'] = forgeid print("If you are using a Developer Certificate of Origin (DCO)") print("you can add appropriate email addresses here") + dco = [] + inactive_emails = [] while (e := ask("DCO email (return to stop)", None, required=False)): if email_valid(e): - newuser['roles'].append({'DCO': e}) + dco.append(e) + if e not in newuser['email']: + print(f"<{e}> not mentioned in the above list of emails.") + print("Adding it to inactive_emails list.") + inactive_emails.append(e) else: print ("That address does not look valid. Ignored.") + if len(inactive_emails) > 0: + newuser['inactive_email'] = inactive_emails + if len(dco) > 0: + newuser['DCO'] = dco return newuser def main(): diff --git a/contrib/gen-MAINTAINERS.py b/contrib/gen-MAINTAINERS.py index 124505d2890e2..4fcc4dcfc8527 100755 --- a/contrib/gen-MAINTAINERS.py +++ b/contrib/gen-MAINTAINERS.py @@ -211,6 +211,21 @@ def uni2alower(txt): return unidecode.unidecode(txt).lower() +def paginate(data, widths): + """ + Calculate the field widths for 'data', taking into account over-long + elements. + """ + w = dict() + col = 0 + overrun = 0 + for field, width in widths: + width -= overrun + w[field] = max(width, 1) + overrun = max(len(data[field]) - width, 0) + return w + + def format_output(outfile, data): global active_only all_users = data['users'] @@ -229,7 +244,19 @@ def format_output(outfile, data): role = section['filter']['role'] subclass = section['filter'].get('subclass') for u in all_users: - for r in filter(lambda x: role in x, u['roles']): + if role == 'DCO': + for email in u.get('DCO', []): + d = { + 'email': email, + 'account': u.get('account', '-'), + 'sn': u['sn'], + 'cn': u['cn'], + 'subsystem': None, + } + d['w'] = paginate(d, section['widths']) + l.append(d) + continue + for r in filter(lambda x: role in x, u.get('roles', [])): if subclass: sc = [ s @@ -249,20 +276,11 @@ def format_output(outfile, data): 'cn': u['cn'], 'subsystem': r[role] if type(r) == dict else None, } - if role == 'DCO': - d['email'] = r['DCO'] if role == 'WriteAfter' and type(r) == dict: d['email'] = r['WriteAfter'] elif type(r) == dict and 'email' in r: d['email'] = r['email'] - w = dict() - col = 0 - overrun = 0 - for field, width in section['widths']: - width -= overrun - w[field] = max(width, 1) - overrun = max(len(d[field]) - width, 0) - d['w'] = w + d['w'] = paginate(d, section['widths']) l.append(d) kfn = itemgetter(*section['filter']['order']) for u in sorted( diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index 51a78ab72eec7..8199fd588758f 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -67,6 +67,14 @@ maintainer_schema = { 'format': 'email', }, }, + 'DCO': { + 'type': 'array', + 'items': { + 'type': 'string', + 'format': 'email', + }, + "minItems": 1, + }, 'roles': { 'type': 'array', 'items': { @@ -82,10 +90,6 @@ maintainer_schema = { 'type': 'string', 'format': 'email', }, - 'DCO': { - 'type': 'string', - 'format': 'email', - }, }, 'additionalProperties': False, }, @@ -135,7 +139,11 @@ maintainer_schema = { }, }, 'additionalProperties': False, - 'required': ['sn', 'cn', 'email', 'roles'], + 'required': ['sn', 'cn', 'email'], + 'anyOf': [ + {'required': ['roles']}, + {'required': ['DCO']}, + ], }, }, 'subsystems': { @@ -236,6 +244,15 @@ def _check_schema(data): return +def _check_dco(user): + # An email addrss in a DCO entry must also be listed in either the + # active emails list, or the inactive_emails list. + emails = set(user['email'] + user.get('inactive_email', [])) + for dco in user['DCO']: + if dco not in emails: + _error(f"User: {user['cn']} DCO {dco} not listed in other emails") + + def validate(data): """Check the data against the schema and our own consistency checks""" _check_schema(data) @@ -246,12 +263,17 @@ def validate(data): # subsystems list; Maintainer entires must also have a class entry, though # that is optional for Reviewers. for u in data['users']: + if 'DCO' in u: + _check_dco(u) + # The schema ensures that at least one of 'DCO' or 'roles' + # exists, so if roles is missing, we're done. + if 'roles' not in u: + continue # Users with the 'BZ' role should not have any other roles; we # can quickly skip the additional checks if that is the case. if len(u['roles']) == 1 and u['roles'][0] == 'BZ': continue seen_writeafter = False - only_dco = True for r in u['roles']: if isinstance(r, str): if r == 'BZ': @@ -260,14 +282,10 @@ def validate(data): ) if r == 'WriteAfter': seen_writeafter = True - only_dco = False continue if 'WriteAfter' in r: seen_writeafter = True need_class = True - if 'DCO' in r: - continue - only_dco = False n = r.get('Maintainer') if not n: need_class = False @@ -283,7 +301,7 @@ def validate(data): _error(f"No subsystem entry for '{n}'.") else: _error(f"Multiple subsystem entries for '{n}'.") - if not seen_writeafter and not only_dco: + if not seen_writeafter: _error(f"User '{u['cn']}' lacks WriteAfter role.") if error_count: sys.exit(1) From patchwork Tue Sep 1 14:36:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142645 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93E2D4BA79BA for ; Tue, 1 Sep 2026 14:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93E2D4BA79BA X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [IPv6:2620:52:6:3111::39]) by sourceware.org (Postfix) with ESMTPS id D693D4BA23EB for ; Tue, 1 Sep 2026 14:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D693D4BA23EB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D693D4BA23EB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2620:52:6:3111::39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; cv=none; b=K3F0jSPZat+VU2GFCegCgpVlX8RTDo2zEg/j4Yvljr9IcfhARWVf/40TNGv0N+uEDeGGwF51qS1mK44nIAWGhNQbSU55jylzfvJAwZwgFpqzeO8LiSiYIJXk5nJGBBwDMGI/nez0jld18rCtnhOlEOBN8RYAXPV4JpKZLtFi0Qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273457; c=relaxed/simple; bh=sdtOGAg/B+JfVFf60o/WN/bUF/cd8Fad54LqM8dtHz4=; h=From:Date:Subject:To:Message-ID; b=YYBgdQA++CXSoFAU7GhObL46WIr+h/khNMqEjxsF7NiPvrR0cKVo11yD0qwlbk8xF17UABt5fuWF5OwqY0ZiM+pGOO9dxSqO/fSy4MTG36/xCk6YpOnwzG5bZYDRZxrgpK2RczLnUIIQFjP8IG7cLlBiLjqtlBfl0iGJdg2b4gk= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D693D4BA23EB Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id AC9A24259F for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:26 +0000 Subject: [PATCH v2 4/6] maintainer_utils: support inactive_DCO To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/2d8c7ef893c61797598f875879656bda080207d0 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw I've already seen cases of people removing a DCO entry when they change email addresses. We don't want that to happen, but it's difficult to enforce this via the tools without reading history of the YAML data. Make it a bit more obvious what to do with historical DCO entries by adding an inactive_DCO entry that mirrors the treatment of inactive_email. We don't (at present) use the additional information, but at some time in the future the forge might use this to detect submissions with a retired DCO address. ChangeLog: * MAINTAINERS.yml: Convert an entry to use inactive_DCO. contrib/ChangeLog: * maintainer_utils.py (maintainer_schema): Allow inactive_DCO for retired DCO addresses. (_check_dco): Validate inactive_DCO entries as well. (validate): Check inactive_DCO data. * gen-MAINTAINERS.py (format_output): Combine inactive_DCO with DCO entries. --- MAINTAINERS.yml | 1 + contrib/gen-MAINTAINERS.py | 2 +- contrib/maintainer_utils.py | 30 ++++++++++++++++++++++++------ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index b48c753ede972..64b185dc74bff 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -4603,6 +4603,7 @@ users: account: pep DCO: - pierre.emmanuel.patry@opensrcsec.com + inactive_DCO: - pierre-emmanuel.patry@embecosm.com - sn: Pavenis cn: Andris Pavenis diff --git a/contrib/gen-MAINTAINERS.py b/contrib/gen-MAINTAINERS.py index 4fcc4dcfc8527..ae9e12bb0d1ae 100755 --- a/contrib/gen-MAINTAINERS.py +++ b/contrib/gen-MAINTAINERS.py @@ -245,7 +245,7 @@ def format_output(outfile, data): subclass = section['filter'].get('subclass') for u in all_users: if role == 'DCO': - for email in u.get('DCO', []): + for email in u.get('DCO', []) + u.get('inactive_DCO', []): d = { 'email': email, 'account': u.get('account', '-'), diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index 8199fd588758f..13861a0401c47 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -75,6 +75,14 @@ maintainer_schema = { }, "minItems": 1, }, + 'inactive_DCO': { + 'type': 'array', + 'items': { + 'type': 'string', + 'format': 'email', + }, + "minItems": 1, + }, 'roles': { 'type': 'array', 'items': { @@ -143,6 +151,7 @@ maintainer_schema = { 'anyOf': [ {'required': ['roles']}, {'required': ['DCO']}, + {'required': ['inactive_DCO']}, ], }, }, @@ -247,10 +256,18 @@ def _check_schema(data): def _check_dco(user): # An email addrss in a DCO entry must also be listed in either the # active emails list, or the inactive_emails list. - emails = set(user['email'] + user.get('inactive_email', [])) - for dco in user['DCO']: + emails = user['email'] + for dco in user.get('DCO', []): + if dco not in emails: + _error(f"User: {user['cn']} DCO {dco} not listed in emails") + emails = user.get('inactive_email', []) + for dco in user.get('inactive_DCO', []): if dco not in emails: - _error(f"User: {user['cn']} DCO {dco} not listed in other emails") + _error( + f"User: {user['cn']} inactive_DCO {dco} not listed in inactive_emails" + ) + if dco in user.get('DCO', []): + _error(f"User: {user['cn']} inactive_DCO {dco} also listed in DCO") def validate(data): @@ -263,10 +280,11 @@ def validate(data): # subsystems list; Maintainer entires must also have a class entry, though # that is optional for Reviewers. for u in data['users']: - if 'DCO' in u: + if 'DCO' in u or 'inactive_DCO' in u: _check_dco(u) - # The schema ensures that at least one of 'DCO' or 'roles' - # exists, so if roles is missing, we're done. + # The schema ensures that at least one of 'DCO', + # 'inactive_DCO' or 'roles' exists, so if roles is missing, + # we're done. if 'roles' not in u: continue # Users with the 'BZ' role should not have any other roles; we From patchwork Tue Sep 1 14:36:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142643 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7E0C4BA23C1 for ; Tue, 1 Sep 2026 14:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7E0C4BA23C1 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [IPv6:2620:52:6:3111::39]) by sourceware.org (Postfix) with ESMTPS id 71C514BA2E35 for ; Tue, 1 Sep 2026 14:37:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71C514BA2E35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 71C514BA2E35 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2620:52:6:3111::39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273459; cv=none; b=GaOBjWn7/gr50fk+3lXPKEiYt/B7ax3HrzqgZGPNh65HwGkypknsZLMNyNPrN1DbZAXwXH9rDqwQmWG1Y2vr6Z4Bjj4U51Qp0BUo6vvxaLyQBKpPRVvQ6yp4w4/1TIS/2Qr11L6yxmLRTs0+6/7csdu0cfLLwpGRlvk2b4SA2tM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273459; c=relaxed/simple; bh=29J3MxKTLfLXn/p9Rx1Vsf0D1KN6Rd2bWrCxL5075rk=; h=From:Date:Subject:To:Message-ID; b=qSF9oG7CloWw+o12qciRU51+w5OEGfpwGojkRl7KPiZP97jO7Wx2HSx1uaq/znty7ZHmauaBqgrDLLaokblwp/E2dpLly8Jj2KyzafpnkG8uNytKQz4KzkRYzS8slxn3NcgY+SS45JEh9DAaujW3yL0BiTrlPiHchfet2Plu+zs= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71C514BA2E35 Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id B9FCB425A0 for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:27 +0000 Subject: [PATCH v2 5/6] maintainer_utils: Ensure the list of user data is sorted. To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/8bfe6f3c173d5501c61e4afdf09e21018f61ea46 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw The YAML data for the list of maintainers is sorted by surname (sn) and full name (cn). Add a sort function that we use before storing the data, with a couple of additional keys (account and forgeid) to ensure the list is always fully ordered. When verifying the data check the sort order. Since the store routine now handles this, clean up add-write-after to remove the now unneeded sorting. contrib/ChangeLog: * maintainer_utils.py (_unilower): New function. (sort_users): Likewise. (verify): Check the sort order of the user data. (store): Sort the user data before writing it. * add-write-after.py (unilower): Delete (main): No need to sort the user data here now. --- contrib/add-write-after.py | 9 +-------- contrib/maintainer_utils.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/contrib/add-write-after.py b/contrib/add-write-after.py index c6c11bbcf5c87..690fdbfb80200 100755 --- a/contrib/add-write-after.py +++ b/contrib/add-write-after.py @@ -25,17 +25,12 @@ import os import pwd import re import sys -import unidecode import yaml from optparse import OptionParser import maintainer_utils as maintutils -def unilower(txt): - """return a lower-case version of txt, mapping accented characters - onto their ASCII near equivalents.""" - return unidecode.unidecode(txt).lower() def get_surname(name): parts = name.split() @@ -148,9 +143,7 @@ def main(): print("Note, this script can only be used to add new accounts.") return 1 data['users'].append (newuser) - data['users'] = sorted(data['users'], - key = lambda k: (unilower(k['sn']), - unilower(k['cn']))) + if opts.outfilename and opts.outfilename == '-': maintutils.store(data) else: diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index 13861a0401c47..462d7d44e71e6 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -253,6 +253,12 @@ def _check_schema(data): return +def _unilower(txt): + """return a lower-case version of txt, mapping accented characters + onto their ASCII near equivalents.""" + return unidecode.unidecode(txt).lower() + + def _check_dco(user): # An email addrss in a DCO entry must also be listed in either the # active emails list, or the inactive_emails list. @@ -270,6 +276,19 @@ def _check_dco(user): _error(f"User: {user['cn']} inactive_DCO {dco} also listed in DCO") +def sort_users(user_data): + """Sort the user data into canonical order.""" + return sorted( + user_data, + key = lambda k: ( + _unilower(k['sn']), + _unilower(k['cn']), + k.get('account', ''), + k.get('forgeid', ''), + ) + ) + + def validate(data): """Check the data against the schema and our own consistency checks""" _check_schema(data) @@ -321,6 +340,17 @@ def validate(data): _error(f"Multiple subsystem entries for '{n}'.") if not seen_writeafter: _error(f"User '{u['cn']}' lacks WriteAfter role.") + + sorted = sort_users(data['users']) + if sorted != data['users']: + _error("User data is incorrectly sorted.") + for right, wrong in zip(sorted, data['users']): + if right != wrong: + print( + f"First incorrect entry is for {wrong['cn']}", + file=sys.stderr + ) + break if error_count: sys.exit(1) return @@ -333,6 +363,7 @@ def load(file): def store(data, file=None, fd=sys.stdout): + data['users'] = sort_users(data['users']) # Make sure we don't write something that is not conformant validate(data) if file: From patchwork Tue Sep 1 14:36:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw via Sourceware Forge X-Patchwork-Id: 142644 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 423494BA901D for ; Tue, 1 Sep 2026 14:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 423494BA901D X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from forge-stage.sourceware.org (vm08.sourceware.org [IPv6:2620:52:6:3111::39]) by sourceware.org (Postfix) with ESMTPS id 756704BA23C1 for ; Tue, 1 Sep 2026 14:37:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 756704BA23C1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=forge-stage.sourceware.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=forge-stage.sourceware.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 756704BA23C1 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2620:52:6:3111::39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273459; cv=none; b=UG6ckkxPuefqDi/Zqy771x5sO9U9hMeySM1qMVirL4BJz3Cn2NaO5wkOimIH/ZRUeXJJR3g36TGFM+Rwyfe5yZ9qDS3vlddWc3MFV2wU/EI99NdMEMiVC/EQ3ncBjxUObS74IGBTx1DKJgWWelW0bO8aNG1ewyZhhyoVh/L9BN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788273459; c=relaxed/simple; bh=ylm7ydIHtiTBFj0cQdzbWG2BdmJV/88sGoFJmqrA9yA=; h=From:Date:Subject:To:Message-ID; b=BdIsQxD3AjmQeIfiAZm0dOVUgoY91b2csAK8Vkr1p6LFzYgN5GqQRA7QGTXqFvC4eKvfTje5QcD6r0gnaY/mrSwAouOaouzoTjbtYgnWzReJgra+GIAOWa+ITYLqk4d9szRrUJX0iLg/g9K8ctstVQ4C1QPS5uUSYclQySzLoFE= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 756704BA23C1 Received: from forge-stage.sourceware.org (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by forge-stage.sourceware.org (Postfix) with ESMTPS id C7789425A1 for ; Tue, 01 Sep 2026 14:37:37 +0000 (UTC) From: Richard Earnshaw via Sourceware Forge Date: Tue, 01 Sep 2026 14:36:28 +0000 Subject: [PATCH v2 6/6] maintainer_utils: more array size verification. To: gcc-patches mailing list Message-ID: X-Mailer: batrachomyomachia X-Requested-Reviewer: rdfm X-Pull-Request-Organization: gcc X-Pull-Request-Repository: gcc X-Pull-Request: https://forge.sourceware.org/gcc/gcc/pulls/222 References: In-Reply-To: X-Patch-URL: https://forge.sourceware.org/rearnsha/gcc/commit/e0c068b90f85ced75698301c0a19c264653e1416 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gcc-patches mailing list , rearnsha@arm.com Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Richard Earnshaw There always needs to be one email address associated with a user and the inactive_emails and aliases entries should be omitted if empty, so set the minimum size of all three to 1. contrib/ChangeLog: * maintainer_utils.py (maintainer_schema): Set the minimum array size to 1 for email, inactive_email and aliases. --- contrib/maintainer_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py index 462d7d44e71e6..554beff09ff7d 100755 --- a/contrib/maintainer_utils.py +++ b/contrib/maintainer_utils.py @@ -59,6 +59,7 @@ maintainer_schema = { 'type': 'string', 'format': 'email', }, + 'minItems': 1, }, 'inactive_email': { 'type': 'array', @@ -66,6 +67,7 @@ maintainer_schema = { 'type': 'string', 'format': 'email', }, + 'minItems': 1, }, 'DCO': { 'type': 'array', @@ -136,11 +138,11 @@ maintainer_schema = { }, 'aliases': { 'type': 'array', - 'minLength': 1, 'items': { 'type': 'string', 'minLength': 1, }, + 'minItems': 1, }, 'inactive': { 'type': 'boolean',