From 5439d5071026555bfa8bdb60f6821c94ac1b5f72 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 19 Sep 2016 16:23:40 -0700 Subject: [PATCH] Add all dependencies to New-UnixPackage Now that I finally have a decent list of dependencies (though it may still be too many), I have expanded the dependencies of the package so that users get better error messages. I've removed ca-certificates as that's not *necessarily* required (but needed on Docker to download over HTTPS). This may be true of other packages too. --- build.psm1 | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/build.psm1 b/build.psm1 index 0bee2ed8a4..81bf045cda 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1194,17 +1194,40 @@ esac chmod 755 "$Staging/$Name" # only the executable should be executable } - $libunwind = switch ($Type) { - "deb" { "libunwind8" } - "rpm" { "libunwind" } - } - - $libicu = switch ($Type) { - "deb" { - if ($IsUbuntu14) { "libicu52" } - elseif ($IsUbuntu16) { "libicu55" } + # Setup package dependencies + # These should match those in the Dockerfiles, but exclude tools like Git, which, and curl + $Dependencies = @() + if ($IsUbuntu) { + $Dependencies = @( + "libc6", + "libcurl3", + "libgcc1", + "libssl1.0.0", + "libstdc++6", + "libtinfo5", + "libunwind8", + "libuuid1", + "zlib1g" + ) + # Please note the different libicu package dependency! + if ($IsUbuntu14) { + $Dependencies += "libicu52" + } elseif ($IsUbuntu16) { + $Dependencies += "libicu55" } - "rpm" { "libicu" } + } elseif ($IsCentOS) { + $Dependencies = @( + "glibc", + "libcurl", + "libgcc", + "libicu", + "openssl", + "libstdc++", + "ncurses-base", + "libunwind", + "uuid", + "zlib" + ) } # iteration is "debian_revision" @@ -1232,11 +1255,12 @@ esac "--description", $Description, "--category", "shells", "--rpm-os", "linux", - "--depends", $libunwind, - "--depends", $libicu, "-t", $Type, "-s", "dir" ) + foreach ($Dependency in $Dependencies) { + $Arguments += @("--depends", $Dependency) + } if ($AfterInstallScript) { $Arguments += @("--after-install", $AfterInstallScript) }