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