From: Viktor Szakats Date: Sun, 23 Mar 2025 15:49:06 +0000 (+0100) Subject: GHA/windows: install OpenSSH-Windows manually for transparency X-Git-Tag: curl-8_13_0~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be21c95740dabc1b703603036c339674850fe710;p=thirdparty%2Fcurl.git GHA/windows: install OpenSSH-Windows manually for transparency To have the current latest version, and to avoid the stale, misleading versions installed by Chocolatey. It also installs transparently, faster, and making the source of the binaries clear. Install on drive `D:` for best performance. After much detective work it turns out that the OpenSSH Windows versions installed by Chocolatey aren't what they seem: - The latest pre-release named 9.5.0-beta20240403: https://community.chocolatey.org/packages/openssh/9.5.0-beta20240403 is in reality 8.6.0.0p1-Beta from 2021-05-27: https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win64.zip - The latest "stable" version 8.0.0.1 is in reality: https://community.chocolatey.org/packages/openssh/8.0.0.1 is in reality 8.0.0.0p1-Beta: https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.0.0.0p1-Beta/OpenSSH-Win64.zip Ref: https://github.com/curl/curl/pull/16803#issuecomment-2746365654 Follow-up to 67a7775d1233d702964bff9a0a6b5b9fa036c47a #16704 Follow-up to 0ec72c1ef8d87a29bf2eaa5e36ab173147a4d015 #16672 Closes #16811 --- diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9a82cdb685..763501091a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -738,6 +738,7 @@ jobs: run: shell: msys2 {0} env: + openssh_windows-version: 'v9.8.1.0p1-Preview' VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' VCPKG_DISABLE_METRICS: '1' strategy: @@ -927,10 +928,13 @@ jobs: if [ '${{ matrix.openssh }}' = '' ]; then # MSYS2 openssh /usr/bin/pacman --noconfirm --noprogressbar --sync --needed openssh else # OpenSSH-Windows - [ '${{ matrix.openssh }}' = 'OpenSSH-Windows-Pre' ] && chocopkg+=' --prerelease' - chocopkg+=' openssh' + cd /d || exit 1 + curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 \ + --location 'https://github.com/PowerShell/Win32-OpenSSH/releases/download/${{ env.openssh_windows-version }}/OpenSSH-Win64.zip' --output bin.zip + unzip bin.zip + rm -f bin.zip fi - /c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 --force ${chocopkg} stunnel || true + /c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 --force stunnel || true python3 -m pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary impacket - name: 'downgrade msys2-runtime' @@ -957,7 +961,7 @@ jobs: else TFLAGS+=' ~3022' # 'SCP correct sha256 host key' SCP, server sha256 key check fi - PATH="$PATH:/c/Program Files/OpenSSH-Win64" + PATH="/d/OpenSSH-Win64:$PATH" fi PATH="$PWD/bld/lib/${{ matrix.type }}:$PATH:/c/Program Files (x86)/stunnel/bin" cmake --build bld --config '${{ matrix.type }}' --target test-ci