Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,21 @@ function Start-PSBootstrap {
elseif ($Environment.IsUbuntu16) { $Deps += "libicu55" }

# Packaging tools
if ($Package) { $Deps += "ruby-dev", "groff" }
if ($Package) { $Deps += "ruby-dev", "groff", "libffi-dev" }

# Install dependencies
Start-NativeExecution {
Invoke-Expression "$sudo apt-get update -qq"
Invoke-Expression "$sudo apt-get install -y -qq $Deps"
# change the fontend from apt-get to noninteractive
$originalDebianFrontEnd=$env:DEBIAN_FRONTEND
$env:DEBIAN_FRONTEND='noninteractive'
try {
Start-NativeExecution {
Invoke-Expression "$sudo apt-get update -qq"
Invoke-Expression "$sudo apt-get install -y -qq $Deps"
}
}
finally {
# change the apt frontend back to the original
$env:DEBIAN_FRONTEND=$originalDebianFrontEnd
}
} elseif ($Environment.IsRedHatFamily) {
# Build tools
Expand All @@ -1567,7 +1576,7 @@ function Start-PSBootstrap {
$Deps += "libicu", "libunwind"

# Packaging tools
if ($Package) { $Deps += "ruby-devel", "rpm-build", "groff" }
if ($Package) { $Deps += "ruby-devel", "rpm-build", "groff", 'libffi-devel' }

$PackageManager = Get-RedHatPackageManager

Expand All @@ -1588,7 +1597,7 @@ function Start-PSBootstrap {
$Deps += "gcc", "cmake", "make"

# Packaging tools
if ($Package) { $Deps += "ruby-devel", "rpmbuild", "groff" }
if ($Package) { $Deps += "ruby-devel", "rpmbuild", "groff", 'libffi-devel' }

$PackageManager = "zypper --non-interactive install"
$baseCommand = "$sudo $PackageManager"
Expand Down Expand Up @@ -1624,8 +1633,8 @@ function Start-PSBootstrap {
if ($Package) {
try {
# We cannot guess if the user wants to run gem install as root
Start-NativeExecution { gem install fpm -v 1.8.1 }
Start-NativeExecution { gem install ronn }
Start-NativeExecution { gem install fpm -v 1.9.3 }
Start-NativeExecution { gem install ronn -v 0.7.3 }
} catch {
Write-Warning "Installation of fpm and ronn gems failed! Must resolve manually."
}
Expand Down