Re: [Openvpn-devel] [PATCH] work around false positive warning with mingw 12
Am 06.07.23 um 19:19 schrieb Heiko Hund: When cross compiling for Windows with Ubuntu 23.04 mingw complains about route.c:344:26: warning: ‘special.S_un.S_addr’ may be used uninitialized which is wrong technically. However the workaround isn't really intrusive and while there are other warnings caused by libtool, the cmake mingw build completes with -Werror now. Change-Id: I8a0f59707570722eab41af2db76980ced04e6d54 Signed-off-by: Heiko Hund --- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 0d04a5a3..0b369da4 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -319,7 +319,7 @@ init_route(struct route_ipv4 *r, const in_addr_t default_netmask = IPV4_NETMASK_HOST; bool status; int ret; -struct in_addr special; +struct in_addr special = {0}; CLEAR(*r); r->option = ro; Good enough. Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH] work around false positive warning with mingw 12
When cross compiling for Windows with Ubuntu 23.04 mingw complains about route.c:344:26: warning: ‘special.S_un.S_addr’ may be used uninitialized which is wrong technically. However the workaround isn't really intrusive and while there are other warnings caused by libtool, the cmake mingw build completes with -Werror now. Change-Id: I8a0f59707570722eab41af2db76980ced04e6d54 Signed-off-by: Heiko Hund --- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 0d04a5a3..0b369da4 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -319,7 +319,7 @@ init_route(struct route_ipv4 *r, const in_addr_t default_netmask = IPV4_NETMASK_HOST; bool status; int ret; -struct in_addr special; +struct in_addr special = {0}; CLEAR(*r); r->option = ro; -- 2.39.2 ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH applied] Re: CMake: Support doc builds on Windows machines that do not have .py file association
Your patch has been applied to the master branch. commit 22213a8834ba5ba5c9818015730edbf3766ad915 Author: Frank Lichtenheld Date: Tue Jul 4 15:09:02 2023 +0200 CMake: Support doc builds on Windows machines that do not have .py file association Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Message-Id: <20230704130902.105585-1-fr...@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26813.html Signed-off-by: Gert Doering -- kind regards, Gert Doering ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH] GHA: Add work-around for rst2*.py not being directly executable on Windows
I had this problem on both arm64 and x64 machines and CMake patch fixed it. So I'd also go with that. to 6. heinäk. 2023 klo 13.46 Arne Schwabe (a...@rfc2549.org) kirjoitti: > > Am 06.07.23 um 12:21 schrieb Frank Lichtenheld: > > On Thu, Jul 06, 2023 at 12:04:07PM +0200, Frank Lichtenheld wrote: > >> 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. > > > > Personally I prefer the original solution inside CMake. > > It just solves the problem in a wide range of potential setups > > without additional effort required by the caller. I think the > > slightly increased complexity can be accepted for that. > > I concur for the same reasons. This is also harder for people to > replicate on their own setups. They will have to manually write scripts > instead of jsut having cmake dealing with the problem. > > Arne > > > > ___ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel -- -Lev ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH] GHA: Add work-around for rst2*.py not being directly executable on Windows
Am 06.07.23 um 12:21 schrieb Frank Lichtenheld: On Thu, Jul 06, 2023 at 12:04:07PM +0200, Frank Lichtenheld wrote: 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. Personally I prefer the original solution inside CMake. It just solves the problem in a wide range of potential setups without additional effort required by the caller. I think the slightly increased complexity can be accepted for that. I concur for the same reasons. This is also harder for people to replicate on their own setups. They will have to manually write scripts instead of jsut having cmake dealing with the problem. Arne ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH] GHA: Add work-around for rst2*.py not being directly executable on Windows
On Thu, Jul 06, 2023 at 12:04:07PM +0200, Frank Lichtenheld wrote: > 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. Personally I prefer the original solution inside CMake. It just solves the problem in a wide range of potential setups without additional effort required by the caller. I think the slightly increased complexity can be accepted for that. Regards, -- Frank Lichtenheld ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH] GHA: Add work-around for rst2*.py not being directly executable on Windows
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 -- 2.34.1 ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel