From nobody Mon Feb 9 19:04:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53064+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53064+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578566979; cv=none; d=zohomail.com; s=zohoarc; b=kSKM5PXwUxxZZUFrX6L2GvbU/o+eG66fZ8aBHSnccGQXuxxpOJBElaxk7bGcGefZT9hRgT7qaqwZ7bLVlcTPAb4lq/XI3YBZjVVKT8fKwdeMvBLBchdUfltUfmHH4c/EvbAt3acRKvsJYflxfrs3NTI0ONia7462ruwQNpU4nRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578566979; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XcyJJU6wHmrec9jWBRgpyzeVnEk+03JNEPcUkB2F1AE=; b=jZITxOkQ2BFcx1gn9OSo/sVCnUprzOzyF2ef757QC7U5RE46L3MnKwRpLs8tciyCCdGIxKovm2ifJmrsSDCrX635IqtPiPCmGiwvppaM+DOUoC6TTEwDmWwBOXqmebyKB3fsmuj+5R79hYP3JGRSFmX3aG41DTzTaPbBgTTDbFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53064+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578566979519467.5205276042543; Thu, 9 Jan 2020 02:49:39 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id b03zYY1788612xwAbRMk2RUP; Thu, 09 Jan 2020 02:49:39 -0800 X-Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.7112.1578566978529192733 for ; Thu, 09 Jan 2020 02:49:38 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-395-9vQyjekgOta_anOh6SQj-Q-1; Thu, 09 Jan 2020 05:49:36 -0500 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5406A801E6C; Thu, 9 Jan 2020 10:49:35 +0000 (UTC) X-Received: from x1w.redhat.com (ovpn-204-107.brq.redhat.com [10.40.204.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C964060BE0; Thu, 9 Jan 2020 10:49:33 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: Liming Gao , Bob Feng , devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Jordan Justen Subject: [edk2-devel] [PATCH v3 3/4] BaseTools/PatchCheck.py: Check the patch author email address Date: Thu, 9 Jan 2020 11:49:17 +0100 Message-Id: <20200109104918.29750-4-philmd@redhat.com> In-Reply-To: <20200109104918.29750-1-philmd@redhat.com> References: <20200109104918.29750-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 9vQyjekgOta_anOh6SQj-Q-1 X-Mimecast-Spam-Score: 0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,philmd@redhat.com X-Gm-Message-State: 87g7OPrDIjtWcVSyhV0WR9Gjx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578566979; bh=1owiYoVEhZnBr259IiFsWpBUA+a7axNDwnTAIN3YVR4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Gvt9/8p1wwskxuPibC474zUwzYBeZKg9kdyZkNo6rQ+t9+vUhY3ugXE62+/3DD9+/k7 aPYWJzN+165UzMW4KNvQWnjD/rlDN3ajSGxOuawg6KOMDzB2eiu+5oLd+De7Df7dlRNYY mztgMkmUTPtbL7ZA+GiwP4LAmgriiM8cErY= X-ZohoMail-DKIM: pass (identity @groups.io) To avoid patches committed with incorrect email address, use the EmailAddressCheck class on the author email too. Example: $ python BaseTools/Scripts/PatchCheck.py 1a04951309f Checking git commit: 1a04951309f The 'Author' email address is not valid: * The email address cannot contain a space: /o=3DIntel/ou=3DExternal \ (FYDIBOHF25SPDLT)/cn=3DRecipients/cn=3Dfe425ca7e5f4401abed22b904fe5d964 Cc: Liming Gao Cc: Jordan Justen Reviewed-by: Bob Feng Signed-off-by: Philippe Mathieu-Daude --- BaseTools/Scripts/PatchCheck.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 42b923cb927e..e7b3c3bae47a 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -451,6 +451,9 @@ class CheckOnePatch: self.patch =3D patch self.find_patch_pieces() =20 + email_check =3D EmailAddressCheck(self.author_email, 'Author') + email_ok =3D email_check.ok + msg_check =3D CommitMessageCheck(self.commit_subject, self.commit_= msg) msg_ok =3D msg_check.ok =20 @@ -459,7 +462,7 @@ class CheckOnePatch: diff_check =3D GitDiffCheck(self.diff) diff_ok =3D diff_check.ok =20 - self.ok =3D msg_ok and diff_ok + self.ok =3D email_ok and msg_ok and diff_ok =20 if Verbose.level =3D=3D Verbose.ONELINE: if self.ok: @@ -537,6 +540,8 @@ class CheckOnePatch: self.commit_subject =3D self.commit_subject.replace('\n', '') self.commit_subject =3D self.subject_prefix_re.sub('', self.commit= _subject, 1) =20 + self.author_email =3D pmail['from'] + class CheckGitCommits: """Reads patches from git based on the specified git revision range. =20 --=20 2.21.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53064): https://edk2.groups.io/g/devel/message/53064 Mute This Topic: https://groups.io/mt/69576886/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-