From patchwork Thu Jul 6 10:04:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3274 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:1496:b0:d7:3b0f:3938 with SMTP id b22csp392179dyh; Thu, 6 Jul 2023 03:04:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEO/rA9uHuWVReTkHDDcGQEwwkG2LCSV70l2zCqiRF+9T8ETGthcUJwY4rxF3ydaKMCRVrA X-Received: by 2002:a05:6358:3411:b0:134:e8c6:a888 with SMTP id h17-20020a056358341100b00134e8c6a888mr1642064rwd.8.1688637888523; Thu, 06 Jul 2023 03:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688637888; cv=none; d=google.com; s=arc-20160816; b=YSso5HvjXu8/jPcw6hZ+8s8Oq6Gd6tGRiOpkCKDau3x1P61aTlXlTRmvs43Hhrsdq8 mR8iMRvzMQFPDz+a9Rg1MPsrCd/CRfp+Jj/BrRXGPtYWXkvPAMcIb6gGjkbb4l/1c4L8 VhF2iIP1f+xpu7RHfA4x0qT8D62ZSn2Hrgv2dGGxJOnlf/wHa6wVlYNQ7XzPOs+oNC35 iMbaTmDwoO8oXqSG2a7xSPLAUdlJGSsKg6PVkIhXZ39QhG3RoHsTva3Dy2MT4hbKno9J AfMp2iBF07w6hh4KV2FyK90nST/eMkuh59IpPr93eRYYAqSAzsfpeNr0ibgAYTAG5VFn 0oJA== 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:dkim-signature; bh=iLnm7cCnnOnSbWyZ8G/DtJ86pBd08DmAgOx23X+5QFQ=; fh=egyvB+kLBJ/aa1TEhA8W5cB7oZMSWBoneH8q5SCMHc0=; b=RBo+fCC8+cNDAQ3rd/q7U2KdrjPNKrzDKqroyGViPaUthIF5mnkGUsbh+6TAos/IC7 GUNjfA9QL6DBScDM28kE0BuOX1/ccnFESruFy8XyEJEcotWihbjTohb+dsJ4PVFYqIsS cQlFz41JOZJgg5LW68KvRCGzCVqpZOKKEMJhjPeWOS5MdnSDUhsdTjCiby8IP8ai9Gt+ wQwewScSBVD+8r8C6BM3UtxiPDtYhCSCPgt5FLUECpqrMUSLZJLdcS1gO+B8HRRZTVk3 ntirCnVfLczkeeVWXhxPZnhOAKh/kbNPdZYEL2GFXflRLsTVxMArctyhg6W1TtFuJmGS G+eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=I2ZtSTa8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Wr3VYxzp; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=kt9HN92J; 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 v30-20020a63151e000000b0054405623a4asi1129271pgl.615.2023.07.06.03.04.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2023 03:04:48 -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=I2ZtSTa8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Wr3VYxzp; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=kt9HN92J; 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 1qHLqY-0000kP-2e; Thu, 06 Jul 2023 10:04:22 +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 1qHLqV-0000k5-IX for openvpn-devel@lists.sourceforge.net; Thu, 06 Jul 2023 10:04:20 +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=U9lma2MRGt/tNlGxRek/io+xuX0MZgs8IO0VM0gMF/A=; b=I2ZtSTa84Hs6tJ5F/O8VPn7hmd FB92ijn0b5Jwa8O9QJwZGJkjNW74+2E5QQBEzReEDAA1FBKmGp7W5ulfcs91XxBf5lr9Ikb7ix2tK yaZM0nIh8Yco3vH2oSCun8tBRESDK2HBYoLevY6ETURuY9ynbdbSZsZyTUlihrB2OhkU=; 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=U9lma2MRGt/tNlGxRek/io+xuX0MZgs8IO0VM0gMF/A=; b=Wr3VYxzp1V6amoQJcKXHiGC3/o ntnIagQFErjMgjDDbXcK9JuRg6ESMxLuRuFxAkYDt+YbzJ4B/i84UGcG26xPcSn3YfxuBi3d/jhLR WwRlKgYqIi9EZPz6WWZO/3ZUK+XEATuCOjlDMkKhwQF8HSsm1/EQEnxRadv/RdKd1lTE=; 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 1qHLqT-008KZL-9a for openvpn-devel@lists.sourceforge.net; Thu, 06 Jul 2023 10:04:20 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (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 4QxXDm20pXz9sTb for ; Thu, 6 Jul 2023 12:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1688637848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U9lma2MRGt/tNlGxRek/io+xuX0MZgs8IO0VM0gMF/A=; b=kt9HN92JrPb+m5SuAhf0JjYpK1JcJrprBYE+omQN5NGJWzHorsUKN2uOXVf0ezyU7A5jBU zzqUB7Ui120JMkGeIHla/WYD4Q9RWUmsSrNAYlVFavBEcVeLyYFXtBwFndkbRfdsArINXO 9F806BuNBk84FxOW/rVzbjKg4Ogug7a1UYyQ5/F1T+8PSXIYVtLsTI8bLMhfMD15I4wmHa 7dwdNam2xEx3ZJxG3TYO7aFQqv3s+k1gXofcGzHm3gkgnG/8JPPSRmu6eLOic/dpXnY6bb 1hgojMcq0y4ye4VAnLjCHuqPVxhvkZp79lhrSRV6kgiGpNitDmL60e8uzhpDoA== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Thu, 6 Jul 2023 12:04:07 +0200 Message-Id: <20230706100407.231175-1-frank@lichtenheld.com> In-Reply-To: <20230704130902.105585-1-frank@lichtenheld.com> References: <20230704130902.105585-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: We write a small .bat file wrapper and then force CMake to use that. Note that we need to specify the path with / instead of \ as path separator because otherwise run-cmake action will mangle it. Change-Id: I05d3f7f3f7f7418d1977e523c6dcfb6fa5feb604 Signed-off-by: Frank Lichtenheld --- .github/workflows/build.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions( [...] 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_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1qHLqT-008KZL-9a Subject: [Openvpn-devel] [PATCH] GHA: Add work-around for rst2*.py not being directly executable on Windows 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?1770665162249269046?= X-GMAIL-MSGID: =?utf-8?q?1770665162249269046?= We write a small .bat file wrapper and then force CMake to use that. Note that we need to specify the path with / instead of \ as path separator because otherwise run-cmake action will mangle it. Change-Id: I05d3f7f3f7f7418d1977e523c6dcfb6fa5feb604 Signed-off-by: Frank Lichtenheld --- .github/workflows/build.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) This is an alternate patch to "CMake: Support doc builds on Windows machines that do not have .py file association" since there was some doubt on IRC whether we want to have the complexity inside of CMake or should delegate that to the caller. Let me know your opinions. diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index da2a427c..72edb089 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -286,8 +286,25 @@ jobs: - uses: actions/checkout@v3 - uses: lukka/get-cmake@latest + # since we can't execute .py files directly, do a workaround for rst2html,rst2man + - name: Determine Python script path + run: | + import os + import sysconfig + scripts_path = sysconfig.get_path("scripts",f"{os.name}") + with open(os.environ["GITHUB_ENV"], "a") as env: + print(f"PYTHON_SCRIPTS_DIR={scripts_path}", file=env) + shell: python - name: Install rst2html - run: python -m pip install --upgrade pip docutils + run: | + python -m pip install --upgrade pip docutils + $install_dir = "${{ runner.workspace }}\docutils" + mkdir $install_dir + echo "python $Env:PYTHON_SCRIPTS_DIR\rst2html.py %*" > $install_dir\rst2html.bat + cat $install_dir\rst2html.bat + echo "python $Env:PYTHON_SCRIPTS_DIR\rst2man.py %*" > $install_dir\rst2man.bat + $safe_path = $install_dir.replace("\", "/") + echo "DOCUTILS=$safe_path" >> "$Env:GITHUB_ENV" - name: Restore artifacts, or setup vcpkg (do not install any package) uses: lukka/run-vcpkg@v11 @@ -300,6 +317,7 @@ jobs: if: ${{ matrix.arch == 'arm64' }} with: configurePreset: win-${{ matrix.arch }}-release + configurePresetAdditionalArgs: "[`-DRST2HTML=${{ env.DOCUTILS }}/rst2html.bat`, `-DRST2MAN=${{ env.DOCUTILS }}/rst2man.bat`]" buildPreset: win-${{ matrix.arch }}-release - name: Run CMake with vcpkg.json manifest @@ -307,6 +325,7 @@ jobs: if: ${{ matrix.arch != 'arm64' }} with: configurePreset: win-${{ matrix.arch }}-release + configurePresetAdditionalArgs: "[`-DRST2HTML=${{ env.DOCUTILS }}/rst2html.bat`, `-DRST2MAN=${{ env.DOCUTILS }}/rst2man.bat`]" buildPreset: win-${{ matrix.arch }}-release testPreset: win-${{ matrix.arch }}-release