From patchwork Fri Mar 8 12:05:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3641 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:5897:b0:559:d8ef:cc57 with SMTP id h23csp2132508max; Fri, 8 Mar 2024 04:06:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUZAqElePUHfZLnHMgtz37JoRgEicSekXtJ30zL8gxysrfjTwJBsvfArymF1Z316vhbxSCpUO13I1zkbnPhI2jWCz73fB0= X-Google-Smtp-Source: AGHT+IHlKaYcUVHhtuF50+Nl8Q7CP6FHSAuvg1bb8z1l7gVdN8VxCW0OL5PO1oF+EWAX+/OOHcTm X-Received: by 2002:a05:6e02:1a43:b0:366:2018:8383 with SMTP id u3-20020a056e021a4300b0036620188383mr1806705ilv.3.1709899616216; Fri, 08 Mar 2024 04:06:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709899616; cv=none; d=google.com; s=arc-20160816; b=G2QdssghFyyK3am73DnVsUYmIJVXbwql8aaRF/zpCdKNGSENNqGYdbpUQqA5Alo0N5 59ix8Cyv6Gt3lhgoUQii+hGy/lLk4o1AT0yyliqBMA5vUJ8tVT6V6jnfynfJQt0Fidn0 hBoDqm14F7p9AXn3V738Vx+G9rj6UWSdGIqLNb8Z7T6Dx5GnvzZMCDmgvSfB8KHvtb4m u35DC9dOW2UW21Tmq5gAQKFdSTQVeMsdJIQK3PQ6D9Qa1RI7AlUJgvGdLoNJHzDaceoI sA3fEcwzXIqIJVqtR7uEoObqD/8hF2NcF4bJ7mt4X0y3qCp11ivKxAFm8n9VAVbSzpTG 5tsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=v3bxg7yY73q9Bd4lFGQd1FQcs3CADk2qtrh6vJ1nUzo=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=UmsGQcn1t70xskGlAUlI7UjQz36qARQ/4FDDSgktOXAqJLuuLXEglY4PCrq5QX/+fG KYEGJyhAlcWbdnqSe7BC36m00QjJH5kO/Z0UF77FRtJsSs/bA/Ib0RfyfbKnEPh+hjPh /vW/+QaFZUCsLoLDzf/I0O8WaZJRsujJRpvcjmMFWz2kJf/vnaQndFfN6sI85hlf82M2 Ox0UKQ9BuHTLWP7qnsyNkasI2Xny5frCc6PGUM9RRCQCvFRMRiC9+jvGs/powlZjrftQ XaLw8ZCFwkX4eHkDRewGSP56thGTHRgJcpqSktCRUMFsmizPXN5rkJ6XngX9xr6rHVO0 O4bw==; 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=W3yEyCuO; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=laU01dwl; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id r17-20020a63e511000000b005dc8a17167csi16096455pgh.529.2024.03.08.04.06.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2024 04:06:56 -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=W3yEyCuO; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=laU01dwl; 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=muc.de 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 1riYzT-00028g-2O; Fri, 08 Mar 2024 12:06:19 +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 1riYzR-00028Z-80 for openvpn-devel@lists.sourceforge.net; Fri, 08 Mar 2024 12:06:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xBDXOYyzgxM9sNyJTbYKIgq4RkWtF0brlf14blA0XVA=; b=W3yEyCuOrunv1WUaSMh/d900on 30hnXuziN5ChRMwj4diwtEkpiFAHiT7A1Kmg4X3K6WC2oxddvZchmUeRbg1PFUVIIGixDCUqgYRql xoocFvOJkoFNHzj5wG/Jfa7Gka0n4l53qBhbWvNThBP13QXYTH2Y8gxGqG/Vv2pmilYs=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xBDXOYyzgxM9sNyJTbYKIgq4RkWtF0brlf14blA0XVA=; b=laU01dwlaOLK65qUAFq+XhxLw5 pNd7Iw2qqDSSONunzNUePodN85/xUQPVFnH7icEh03zQzczjEMZ6othMVB/kXE99rxZKrdS9VWoiu ofPBsyggZcTMCb7bd0ACI6VLj6cDNx3LmVtW0myrhYfg0C3rGdr0wKN/Q2XCH3yZWr2g=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1riYzG-0006fB-3N for openvpn-devel@lists.sourceforge.net; Fri, 08 Mar 2024 12:06:17 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 428C5wfv009075 for ; Fri, 8 Mar 2024 13:05:58 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 428C5wKY009074 for openvpn-devel@lists.sourceforge.net; Fri, 8 Mar 2024 13:05:58 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 8 Mar 2024 13:05:57 +0100 Message-ID: <20240308120557.9065-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.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: From: Frank Lichtenheld 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 Acked-by: Gert Doering --- Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1riYzG-0006fB-3N Subject: [Openvpn-devel] [PATCH v1] 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1792959699726615275?= X-GMAIL-MSGID: =?utf-8?q?1792959699726615275?= From: Frank Lichtenheld 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 Acked-by: Gert Doering --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/530 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering 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} """