[macOS] improve openssl@1.1 installation on arm64 (#8353)

This commit is contained in:
Mikhail Koliada
2023-09-21 13:57:24 +02:00
committed by GitHub
parent a0f082f47b
commit ed105d016e
2 changed files with 8 additions and 5 deletions

View File

@@ -4,11 +4,15 @@ source ~/utils/utils.sh
echo "Install openssl@1.1"
brew_smart_install "openssl@1.1"
# Intel-related symlinks, not needed on arm64 for now
if ! is_VenturaArm64; then
# Symlink brew openssl@1.1 to `/usr/local/bin` as Homebrew refuses
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /usr/local/bin/openssl
else
# arm64 has a different installation prefix for brew
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /opt/homebrew/bin/openssl
fi
if ! is_VenturaArm64; then
# Most of buildsystems and scripts look up ssl here
ln -sf $(brew --cellar openssl@1.1)/1.1* /usr/local/opt/openssl
fi

View File

@@ -1,7 +1,6 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
Describe "OpenSSL" -Skip:($os.IsVenturaArm64) {
Describe "OpenSSL" {
Context "OpenSSL Version" {
It "OpenSSL is available" {
"openssl version" | Should -ReturnZeroExitCode
@@ -10,7 +9,7 @@ Describe "OpenSSL" -Skip:($os.IsVenturaArm64) {
Context "OpenSSL 1.1 Path Check" {
It "OpenSSL 1.1 path exists" {
$openSSLpath = "/usr/local/opt/openssl@1.1"
$openSSLpath = brew --prefix openssl@1.1
$openSSLpath | Should -Exist
}
}
@@ -21,4 +20,4 @@ Describe "OpenSSL" -Skip:($os.IsVenturaArm64) {
$commandResult.Output | Should -Match "OpenSSL 1.1"
}
}
}
}