From patchwork Tue Sep 19 15:56:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3353 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:2697:b0:d7:3b0f:3938 with SMTP id ha23csp1714345dyb; Tue, 19 Sep 2023 08:57:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBMmC1/7KL9uS4/Db+0GIc9hOeCzlxstKbGnRJ+ylC16QrfWUQgmmiKBdSE+pdPAwVNtZD X-Received: by 2002:a05:6a20:734c:b0:140:cb66:73aa with SMTP id v12-20020a056a20734c00b00140cb6673aamr15752943pzc.3.1695139066715; Tue, 19 Sep 2023 08:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695139066; cv=none; d=google.com; s=arc-20160816; b=nGA46r4CNfosQ5TyxV8IBxM6FMrOKQgWh1s6TU7iErCTwl2vSlurSMLTplFp9BzuQV h7iuC6wRJHzU5+DJ3h9ZkXNXTxyJJMwHbfUdoDkD35IToh5htPu53B65hNtvyjVTrH03 cWmsqc6rxB3g2PHGYnntXQcfU4ilto8RimtTGsutp1oLq9RUUuzZjcKWu880DpeX4Q5i miYgLAiuSZTHzY73RokmXGx70/ypeXSCaTOmI/zR7+Tfr4VNIrYIgAwAmOtYM3Mwe4TB GSQiKyO/I65GBBAJjPVB/Kf9XWpc02/yPbpCanGJKFo24x1YSfS9v56prAswODHuJQxO eDhQ== 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:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature; bh=nBJbHEEwDMpM+MnBRhS+72rdrxzrvZYmbNghRs3vsg4=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=fVNfQvlkr4pSXoXXWDscxu0Wfmvh+7+RTxKSaoED8csKd8webMp+nGTqNREE0TbLVu jkrFlBqq+jZERBnKHZaOcegGerkrkthVpX8wmn7WSEc5H6X0hsdAStBcyyVo4xBq1HGZ uhl2jQMiWqTPoCu0FEb0dchQQuhk6omPdMurm5TqOCcgXotTgyHWygJriBYJG8FEfLx5 z8OFVnEf6sNUhWrSbrgW/2UoBJiR0eVvzC0+KTSKR1VM7Fzrz2G3CZFPwQhdiTNKO+NE zIcvIAVvCuoAuwP7h8fAZyY3FY4fZERGQrsmIRW6K7O8cog2n+/PV+926663OnACgwIw 7XIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=TvX10KIe; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fgEK9sJ0; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=H2OEBYzg; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id bm18-20020a656e92000000b005775a0544e6si1208599pgb.135.2023.09.19.08.57.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Sep 2023 08:57:46 -0700 (PDT) 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=TvX10KIe; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fgEK9sJ0; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=H2OEBYzg; 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 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qid5t-0000WP-Al; Tue, 19 Sep 2023 15:56:56 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qid5r-0000WI-AZ for openvpn-devel@lists.sourceforge.net; Tue, 19 Sep 2023 15:56:54 +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:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TC8xNhAykFDSAv2NgdbGTaPWtGPyP5rjdsnpyugWioA=; b=TvX10KIeu65tuzM85nC0YUK4fC iGZauaWBRQXxoEBOxAx4uDk11tPdeWwPSay4kSbwCqls4HNbPWYpxaCuERbPKmhabJtEf8jHDtmEw hj30X2wFzWZVx3aLSOTTxx/bPgPz3Tc8TZhEX/D3M/QDE78JOTvnWK5pY+C6VQq1CoWg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=TC8xNhAykFDSAv2NgdbGTaPWtGPyP5rjdsnpyugWioA=; b=f gEK9sJ0ZQvYiUxGf4FZX7MqO5UG9R4/jGxU8LoUjaoy9VJDzFzHzdo2XKS1OYOIAl2F3qNLzvrvDp fywieQAAW+cz5Ojv8Z1kgaPzfbpGyJ1e+if8c5WHt19ft7fiCJHldQyOczrcPerXMWi0SicARWn9j bk+G4s7KCLcfShOI=; Received: from mout-p-101.mailbox.org ([80.241.56.151]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qid5k-00F0Z8-Ip for openvpn-devel@lists.sourceforge.net; Tue, 19 Sep 2023 15:56:54 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RqmVr5YWmz9snn; Tue, 19 Sep 2023 17:56:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1695138996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TC8xNhAykFDSAv2NgdbGTaPWtGPyP5rjdsnpyugWioA=; b=H2OEBYzgTnz07Py2QynIW8bj7BNv2tDJOCqOzRzKwEKM1g+0wTfyc5OXLMHcsJ/RUi0wYS lSksVVufcGdv4CDXGPScmeaaoONo278f7t6ZSZcUOTlv4dOtVwqNnI1XMhnzFJP7rZSaHq u3J9mMWBhPcfenI7L1Lj7RwD+1rJdFTWVok+kFKhNpFNy9ypqpX7wyO4hNqQtfhluvcDLR Hgnd+WZDOedgCbBw1Izh5WlgHo9a7Cw/iBbt7X7bVbyxk3WMXC/RAx56Vgm5GqCS8xZdCB UUSX7TsKyew8ulj4oEdKpvmfhFPCD01rQ1gsuhirK5VXPOGIPF8QLS75Fuaxcg== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Tue, 19 Sep 2023 17:56:35 +0200 Message-Id: <20230919155635.708557-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.9 (/) 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: These are based on review comments for the 2.6 backport. But since they apply to the original master implementation as well, I address them in this separate patch. - Add documentation to contrib/cmake/*.py - Fix grammar in README.cmake.md - Update a TODO in CMakeLists.txt to better reflect the status quo - Fix indentation in unit_tests' Makefile.am Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 X-Headers-End: 1qid5k-00F0Z8-Ip Subject: [Openvpn-devel] [PATCH] CMake: various small non-functional improvements 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?1777482141925586548?= X-GMAIL-MSGID: =?utf-8?q?1777482141925586548?= These are based on review comments for the 2.6 backport. But since they apply to the original master implementation as well, I address them in this separate patch. - Add documentation to contrib/cmake/*.py - Fix grammar in README.cmake.md - Update a TODO in CMakeLists.txt to better reflect the status quo - Fix indentation in unit_tests' Makefile.am Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- 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/+/342 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Acked-by: lstipakov Manual changes: - Fixed Lev's name in Acked-by line. diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dae665..da5f883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -291,7 +291,7 @@ configure_file(config.h.cmake.in config.h) configure_file(include/openvpn-plugin.h.in openvpn-plugin.h) -# TODO remove later when msvc-config.h is removed and we can always include config.h +# TODO we should remove the need for this, and always include config.h add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/README.cmake.md b/README.cmake.md index 599d8dc..d181b64 100644 --- a/README.cmake.md +++ b/README.cmake.md @@ -24,7 +24,7 @@ ----------- The following tools are expected to be present on the system, you -can them install with a package manager of your choice (e.g. +can install them with a package manager of your choice (e.g. chocolatey, winget) or manually: * CMake diff --git a/contrib/cmake/git-version.py b/contrib/cmake/git-version.py index c2b4452..4f78ac4 100644 --- a/contrib/cmake/git-version.py +++ b/contrib/cmake/git-version.py @@ -22,6 +22,14 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +# Usage: ./git-version.py [directory] +# Find a good textual representation of the git commit currently checked out. +# Make that representation available as CONFIGURE_GIT_REVISION in +# /config-version.h. +# It will prefer a tag name if it is checked out exactly, otherwise will use +# the branch name. 'none' if no branch is checked out (detached HEAD). +# This is used to enhance the output of openvpn --version with Git information. + import os import sys import subprocess diff --git a/contrib/cmake/parse-version.m4.py b/contrib/cmake/parse-version.m4.py index d5ff2bd..3dfb31f 100644 --- a/contrib/cmake/parse-version.m4.py +++ b/contrib/cmake/parse-version.m4.py @@ -22,6 +22,12 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +# Usage: ./parse-version.m4.py m4file [directory] +# Read , extract all lines looking like M4 define(), and translate +# them into CMake style set(). Those are then written out to file +# /version.cmake. +# Intended to be used on top-level version.m4 file. + import os import re import sys diff --git a/tests/unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvpn/Makefile.am index 6b56f84..ef45b11 100644 --- a/tests/unit_tests/openvpn/Makefile.am +++ b/tests/unit_tests/openvpn/Makefile.am @@ -110,7 +110,7 @@ -Wl,--wrap=parse_line \ -Wl,--wrap=rand_bytes tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \ - mock_win32_execve.c \ + mock_win32_execve.c \ $(top_srcdir)/src/openvpn/argv.c \ $(top_srcdir)/src/openvpn/base64.c \ $(top_srcdir)/src/openvpn/buffer.c \