]> git.feebdaed.xyz Git - 0xmirror/ovs.git/commitdiff
appveyor: More robust OpenSSL installation wrt path changes.
authorIlya Maximets <i.maximets@ovn.org>
Fri, 12 Sep 2025 11:27:23 +0000 (13:27 +0200)
committerIlya Maximets <i.maximets@ovn.org>
Mon, 29 Sep 2025 19:20:09 +0000 (21:20 +0200)
AppVeyor had an issue where C:\OpenSSL-Win64 folder didn't exist for
some reason and the installation of OpenSSL was placing it into
C:\Program Files\OpenSSL-Win64 instead as well.  After that we couldn't
find the libraries and the build failed:
  https://help.appveyor.com/discussions/problems/38517-cannot-find-path-copenssl-win64-because-it-does-not-exist

It's better if we check the paths and install into specific location to
be more resilient to this kind of environment issues, i.e. make less
assumptions.

While at it, fixing the slash type for the path.  Remove-Item somehow
accepts the "wrong" one, but a backslash is more native in paths on
Windows.  We use forward slash while in msys2 shell, but should not use
it in PowerShell environment.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
appveyor.yml

index b09086a3e12e703e5d86fcc490f75b9048678903..77ec792e38d694f4e9d5faae9076ed5d988a0ea1 100644 (file)
@@ -19,7 +19,10 @@ cache:
 
 install:
 - ps: |
-    Remove-Item -Recurse -Force -Path C:/OpenSSL-Win64
+    $OpenSSLPath = "C:\OpenSSL-Win64"
+    if (Test-Path $OpenSSLPath) {
+        Remove-Item -Recurse -Force -Path $OpenSSLPath
+    }
     New-Item -ItemType Directory -Force -Path C:\ovs-build-downloads
 
     # Find and download the latest stable OpenSSl 3.0.
@@ -52,8 +55,13 @@ install:
     }
 
     Write-Host "Installing:" $destination
-    Start-Process -FilePath $destination `
-        -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait
+    $installArgs = @{
+        FilePath     = $destination
+        ArgumentList = '/silent /verysilent /sp- /suppressmsgboxes ' +
+                       '/DIR="' + $OpenSSLPath + '"'
+        Wait         = $true
+    }
+    Start-Process @installArgs
 
 - ps: git clone -q https://git.code.sf.net/p/pthreads4w/code c:\pthreads4w-code
 - ps: python3 -m pip install pypiwin32 --disable-pip-version-check