Add symbolic links for libssl and libcrypto to Debian 9 builds to make remoting work. (#7609)

On Debian 9, libmi cannot resolve libssl and libcrypto. This change adds symbolic links to packaging and build to the $PSHOME directory to resolve the issue.

The fix was verified interactively connecting to office 365, importing the session, and ensuring Get-MailBox and Get-User succeed.

Fix #7598
This commit is contained in:
Dan Travison 2018-08-24 15:20:22 -07:00 committed by Travis Plunk
parent 50626a161b
commit 1abf290f83
2 changed files with 22 additions and 3 deletions

View file

@ -597,16 +597,27 @@ Fix steps:
Pop-Location
}
if ($Environment.IsRedHatFamily) {
if ($Environment.IsRedHatFamily -or $Environment.IsDebian9) {
# add two symbolic links to system shared libraries that libmi.so is dependent on to handle
# platform specific changes. This is the only set of platforms needed for this currently
# as Ubuntu has these specific library files in the platform and macOS builds for itself
# against the correct versions.
if ($Environment.IsDebian9){
# NOTE: Debian 8 doesn't need these symlinks
$sslTarget = "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2"
$cryptoTarget = "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2"
}
else { #IsRedHatFamily
$sslTarget = "/lib64/libssl.so.10"
$cryptoTarget = "/lib64/libcrypto.so.10"
}
if ( ! (test-path "$publishPath/libssl.so.1.0.0")) {
$null = New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.10" -Path "$publishPath/libssl.so.1.0.0" -ErrorAction Stop
$null = New-Item -Force -ItemType SymbolicLink -Target $sslTarget -Path "$publishPath/libssl.so.1.0.0" -ErrorAction Stop
}
if ( ! (test-path "$publishPath/libcrypto.so.1.0.0")) {
$null = New-Item -Force -ItemType SymbolicLink -Target "/lib64/libcrypto.so.10" -Path "$publishPath/libcrypto.so.1.0.0" -ErrorAction Stop
$null = New-Item -Force -ItemType SymbolicLink -Target $cryptoTarget -Path "$publishPath/libcrypto.so.1.0.0" -ErrorAction Stop
}
}

View file

@ -1102,6 +1102,14 @@ function New-AfterScripts
$AfterRemoveScript = [io.path]::GetTempFileName()
$packagingStrings.UbuntuAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii
$packagingStrings.UbuntuAfterRemoveScript -f "$Link" | Out-File -FilePath $AfterRemoveScript -Encoding ascii
if ($Environment.IsDebian9) {
# add two symbolic links to system shared libraries that libmi.so is dependent on to handle
# platform specific changes. This appears to be a change in Debian 9; Debian 8 did not need these
# symlinks.
New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" -Path "$Staging/libssl.so.1.0.0" >$null
New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2" -Path "$Staging/libcrypto.so.1.0.0" >$null
}
}
return [PSCustomObject] @{