Skip to content

Commit 4df979a

Browse files
JamesWTruherTravisEz13
authored andcommitted
Create symlinks in publish path for RedHat variants (#4198)
1 parent f1ff790 commit 4df979a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎build.psm1‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,19 @@ cmd.exe /C cd /d "$location" "&" "$($vcPath)\vcvarsall.bat" "$NativeHostArch" "&
486486
Copy-Item -Path "$PSScriptRoot/src/powershell-win-core/Microsoft.PowerShell_profile.ps1" -Destination $publishPath -Force
487487
}
488488

489+
if ($IsRedHatFamily) {
490+
# add two symbolic links to system shared libraries that libmi.so is dependent on to handle
491+
# platform specific changes. This is the only set of platforms needed for this currently
492+
# as Ubuntu has these specific library files in the platform and OSX builds for itself
493+
# against the correct versions.
494+
if ( ! (test-path "$publishPath/libssl.so.1.0.0")) {
495+
$null = New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.10" -Path "$publishPath/libssl.so.1.0.0" -ErrorAction Stop
496+
}
497+
if ( ! (test-path "$publishPath/libcrypto.so.1.0.0")) {
498+
$null = New-Item -Force -ItemType SymbolicLink -Target "/lib64/libcrypto.so.10" -Path "$publishPath/libcrypto.so.1.0.0" -ErrorAction Stop
499+
}
500+
}
501+
489502
# download modules from powershell gallery.
490503
# - PowerShellGet, PackageManagement, Microsoft.PowerShell.Archive
491504
if($PSModuleRestore)

0 commit comments

Comments
 (0)