From patchwork Mon Mar 4 13:01:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3631 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1888:b0:559:d8ef:cc57 with SMTP id r8csp2640594max; Mon, 4 Mar 2024 05:02:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVGu5iAKnmFRukXuCjcmBcKGLGqQ3zpiSIJy19s5CXIPW9CmnVrp0qhxmaF/3WaCL/EKvdoapIceg3GmgU59MxiHjpbwFU= X-Google-Smtp-Source: AGHT+IHS/1jQhR1+njRvFWCOPvGHOX63BIA5xkFU7VuuCyt2Of/cJssILDJdWU6HZHrPuhDSzCub X-Received: by 2002:a05:6a00:27a0:b0:6e4:8dda:691 with SMTP id bd32-20020a056a0027a000b006e48dda0691mr11796337pfb.3.1709557359860; Mon, 04 Mar 2024 05:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709557359; cv=none; d=google.com; s=arc-20160816; b=v7A7IcMzGixcz/JQMV8J88YLp6rmj1RJ5lG1ZJOMn7PaPWPO2vlUMxGuEsc9sZpv7F F2hQsvj95z7E02/v+dw4+w6upK+HhxWxnLjWN/GNYk4J+j0tZFjmqFveopEbS44uojDR jdif8lkefuAJTvduiqHIe/nEML1upq94HGR71KTc/jq1bJ5NHepxfzix/m+2ScmJ3vcK MS4djcTilRlU0mQxBTUilsyRurGsRnOgxY5SVl6xd1YFIifqDc1a7Sa4LIxZ8M3eAgO0 MmvQJuuAucjhAhDY6yxxTZOT03+XWSTu/jsdab0H1KrnAOeUFTtNYIOXvYb7YYWDPo4E DKGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=woFh6tpIsjmn7rBwTTj5Rg6npb85CftlSrGGX/E+NHE=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=I3pzy5fD/OJ1q31gnlFCV/4S+1xr7g+wDi4q6GGAwnzcOikY/aRMe20vstzU20LNST NYtbmtoUVs0cEExWMVi7UOoUzmHgD0fAOHp4L1v7uq6UYQJRAtEZZ3JbcQiPviE26g7B tKuW6p8vZPsZsQ7LEbSjxjpiplj/IjLSrlyipqe74cKZwXVc29KBOdJR7tHj545YTQsA vAvZj3BEkN1kUE925eZ4n9qcqbckK6LeglVKAoMrIgn/ygE2MFdo98nbGNwEiAReN9o6 TlJ1zWRoopNjlul2izQkA1TdM+glS7Tc7LaxxvgdRqLYyqUocOWW1fK3VKfJvfR+hQUL X8mA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="LmBx3/I4"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FLOEb7PP; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=fTpQ7frt; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id kq15-20020a056a004b0f00b006e6072bce45si2905280pfb.85.2024.03.04.05.02.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2024 05:02:39 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="LmBx3/I4"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FLOEb7PP; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=fTpQ7frt; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rh7xF-0001mH-5D; Mon, 04 Mar 2024 13:02:05 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rh7xE-0001mB-6i for openvpn-devel@lists.sourceforge.net; Mon, 04 Mar 2024 13:02:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/0nX7DNpheNj7Zb7LCG5e23n+9KEXzr6D6uXo/WAMXo=; b=LmBx3/I4RQcCtEJnHi8EO4W9fh iB10c8GK9ooHWCIJNCoLWlMuaOL0uscTJMR2mSuHs8Man82zWzAIOyXKKtsgLX3OzDQAjF2yu3WnE 7fHKaRy0dKM3ecozoh2OLJRt4PTA2jNliibbcbblyvY1GWFmJuME5yZyIcAF1FEUwabM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=/0nX7DNpheNj7Zb7LCG5e23n+9KEXzr6D6uXo/WAMXo=; b=F LOEb7PP1dpFdQLtWFHjwzIIdbBBEVX/FAwD7dXhW9naOuQLClTCS55WqOmdMxIqgQ/4SNcS/c3yxS eD6AMGntoB3jFFNXiWyS6rVUxgUcfe5QNx5egMD72B5cG9Fo42FkWtebaGgi6Re+SLwUST+H4gaoq 4HoYnoVUsec1BUdE=; Received: from mail-wm1-f53.google.com ([209.85.128.53]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1rh7x3-0002BZ-S0 for openvpn-devel@lists.sourceforge.net; Mon, 04 Mar 2024 13:02:04 +0000 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-412e3716783so6611125e9.0 for ; Mon, 04 Mar 2024 05:01:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1709557308; x=1710162108; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=/0nX7DNpheNj7Zb7LCG5e23n+9KEXzr6D6uXo/WAMXo=; b=fTpQ7frt+vtwYbSlUeJhMpMERV9ZDyiWz10fUN8dgHEaGV96KiaYSeTe6trwglI+HV +E9jy+fZyNjg0lUh6eRIzwBoDcWazEmjm+3dRmO82nWp6ud/eAFylJqWizR8bJ8UjMvG wvjoEUutnTGw+/tWZuoGbxzMxK8vLUynIqbsTvFwQyZ8loSw94bxM+hqjvcuv/BB9ria f0KeX78L0wzeJdSNgXD/Ef4l7hKU78D5x4Fh+78+3Y70S2n2D7nON/ne78LuBgsqIflW nul/dtUnRLoQgMyVK3SEbWlcnl18yZIi8dxPystWBzOmWYorWym/XmNp3lcJ+UwrVKMi dYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709557308; x=1710162108; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/0nX7DNpheNj7Zb7LCG5e23n+9KEXzr6D6uXo/WAMXo=; b=S3UQsEawbtDgRZhWASiCVITGb6uQ1ly4siLDCmsw1jchlVb6GbEKqjBP0qHIyFDaB1 nMksuN3OVp4KVUnBIb3EKw44f94pLFDP9HhAQa2Lppyaxga6IDWk+zmChXvr6dnZz2Tc hzmGsI5v26Yvhm9B+Y6dchIvb3n9uuJkutNFxPu6WT13HxeByNFFCdG1xRZG3oENoDeB +uks6oP8//0M8zoZCO7TlOiyXrDLBdT3FhR/+fzztrN8Ucs9v7cDqtMzsZ+vYD0zYeV6 gm6MQPL/Fb58qZDtsVKSgF4fcLk/oa+N67urkm+LV6t4UksktKct9F9tMUBbBb+UzERi 6ffg== X-Gm-Message-State: AOJu0Yx7f9pNhGjlFvBN437wi3cqiPlI42d5RqoC936uENJOibs7AJEa Bgbtm8nGkO453RchmhxeotrJ5Iosz0pzvGfpkAryYNF6hho9km4UQn3Vcl6asBNVwkbVOxCkrjz Q X-Received: by 2002:a05:600c:46d0:b0:412:a109:5000 with SMTP id q16-20020a05600c46d000b00412a1095000mr6840344wmo.0.1709557308244; Mon, 04 Mar 2024 05:01:48 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 17-20020a05600c229100b00412b2afb2c8sm17227582wmf.26.2024.03.04.05.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 05:01:47 -0800 (PST) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Mon, 4 Mar 2024 13:01:47 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: If9cb7d66f079fe1c87fcb5b4e59bc887533d77fa X-Gerrit-Change-Number: 530 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: e8d46d6055c129b2fcac5650f0070651a0324039 References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1rh7x3-0002BZ-S0 Subject: [Openvpn-devel] [S] Change in openvpn[master]: gerrit-send-mail: add missing Signed-off-by X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1792600817987438621?= X-GMAIL-MSGID: =?utf-8?q?1792600817987438621?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/530?usp=email to review the following change. Change subject: gerrit-send-mail: add missing Signed-off-by ...................................................................... gerrit-send-mail: add missing Signed-off-by Our development documentation says we add this automatically when it is missing. So let's do that here as well. Change-Id: If9cb7d66f079fe1c87fcb5b4e59bc887533d77fa Signed-off-by: Frank Lichtenheld --- M dev-tools/gerrit-send-mail.py 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/530/1 diff --git a/dev-tools/gerrit-send-mail.py b/dev-tools/gerrit-send-mail.py index 67a2cf1..10305e2 100755 --- a/dev-tools/gerrit-send-mail.py +++ b/dev-tools/gerrit-send-mail.py @@ -50,6 +50,12 @@ ack = f"{reviewer_name} <{reviewer_mail}>" print(f"Acked-by: {ack}") acked_by.append(ack) + # construct Signed-off-by in case it is missing + owner = json_data["owner"] + owner_name = owner.get("display_name", owner["name"]) + owner_mail = owner.get("email", owner["name"]) + sign_off = f"{owner_name} <{owner_mail}>" + print(f"Signed-off-by: {sign_off}") change_id = json_data["change_id"] # assumes that the created date in Gerrit is in UTC utc_stamp = ( @@ -67,6 +73,7 @@ "target": json_data["branch"], "msg_id": msg_id, "acked_by": acked_by, + "sign_off": sign_off, } @@ -81,10 +88,14 @@ def apply_patch_mods(patch_text, details, args): comment_start = patch_text.index("\n---\n") + len("\n---\n") + signed_off_text = "" + signed_off_comment = "" try: signed_off_start = patch_text.rindex("\nSigned-off-by: ") signed_off_end = patch_text.index("\n", signed_off_start + 1) + 1 except ValueError: # Signed-off missing + signed_off_text = f"Signed-off-by: {details['sign_off']}\n" + signed_off_comment = "\nSigned-off-by line for the author was added as per our policy.\n" signed_off_end = patch_text.index("\n---\n") + 1 assert comment_start > signed_off_end acked_by_text = "" @@ -94,6 +105,7 @@ acked_by_names += f"{ack}\n" patch_text_mod = ( patch_text[:signed_off_end] + + signed_off_text + acked_by_text + patch_text[signed_off_end:comment_start] + f""" @@ -102,6 +114,7 @@ Gerrit URL: {args.url}/c/{details["project"]}/+/{args.changeid} This mail reflects revision {details["revision"]} of this Change. +{signed_off_comment} Acked-by according to Gerrit (reflected above): {acked_by_names} """