From 27c819ce2e2140818d4be8ad44928cc181492a26 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 22 Mar 2017 14:19:51 -0700 Subject: [PATCH] Add build support for OpenSUSE 42.1 (#3389) --- build.psm1 | 16 +++++++++---- docker/release/opensuse42.1/Dockerfile | 27 ++++++++++++++++++++++ src/ResGen/project.json | 3 ++- src/TypeCatalogGen/project.json | 3 ++- src/TypeCatalogParser/project.json | 3 ++- src/powershell-unix/project.json | 3 ++- test/PSReadLine/project.json | 3 ++- test/csharp/project.json | 3 ++- test/tools/CreateChildProcess/project.json | 3 ++- test/tools/EchoArgs/project.json | 3 ++- 10 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 docker/release/opensuse42.1/Dockerfile diff --git a/build.psm1 b/build.psm1 index 2f365ff77b..596d27d9f8 100644 --- a/build.psm1 +++ b/build.psm1 @@ -40,6 +40,7 @@ if ($IsLinux) { $IsFedora = $LinuxInfo.ID -match 'fedora' -and $LinuxInfo.VERSION_ID -ge 24 $IsOpenSUSE = $LinuxInfo.ID -match 'opensuse' $IsOpenSUSE13 = $IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '13' + ${IsOpenSUSE42.1} = $IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '42.1' $IsRedHatFamily = $IsCentOS -or $IsFedora -or $IsOpenSUSE # Workaround for temporary LD_LIBRARY_PATH hack for Fedora 24 @@ -99,7 +100,8 @@ function Start-PSBuild { "win10-x64", "osx.10.11-x64", "osx.10.12-x64", - "opensuse.13.2-x64")] + "opensuse.13.2-x64", + "opensuse.42.1-x64")] [Parameter(ParameterSetName='CoreCLR')] [string]$Runtime, @@ -473,7 +475,8 @@ function New-PSOptions { "win10-x64", "osx.10.11-x64", "osx.10.12-x64", - "opensuse.13.2-x64")] + "opensuse.13.2-x64", + "opensuse.42.1-x64")] [string]$Runtime, [switch]$Publish, @@ -1668,14 +1671,14 @@ esac # We currently only support: # CentOS 7 # Fedora 24+ - # OpenSUSE 13.2 + # OpenSUSE 42.1 (13.2 might build but is EOL) # Also SEE: https://fedoraproject.org/wiki/Packaging:DistTag if ($IsCentOS) { $rpm_dist = "el7.centos" } elseif ($IsFedora) { $version_id = $LinuxInfo.VERSION_ID $rpm_dist = "fedora.$version_id" - } elseif ($IsOpenSUSE13) { + } elseif ($IsOpenSUSE) { $version_id = $LinuxInfo.VERSION_ID $rpm_dist = "suse.$version_id" } @@ -2695,7 +2698,8 @@ function Start-CrossGen { "win10-x64", "osx.10.11-x64", "osx.10.12-x64", - "opensuse.13.2-x64")] + "opensuse.13.2-x64", + "opensuse.42.1-x64")] [string] $Runtime ) @@ -2761,6 +2765,8 @@ function Start-CrossGen { "fedora.24-x64" } elseif ($IsOpenSUSE13) { "opensuse.13.2-x64" + } elseif (${IsOpenSUSE42.1}) { + "opensuse.42.1-x64" } } elseif ($IsOSX) { "osx.10.10-x64" diff --git a/docker/release/opensuse42.1/Dockerfile b/docker/release/opensuse42.1/Dockerfile new file mode 100644 index 0000000000..202f1eee0c --- /dev/null +++ b/docker/release/opensuse42.1/Dockerfile @@ -0,0 +1,27 @@ +# Docker image file that describes an OpenSUSE 42.1 (AKA leap 42.1) image with PowerShell installed from PowerShell Release +FROM opensuse:42.1 +LABEL maintainer Travis Plunk + +ARG POWERSHELL_VERSION=6.0.0_alpha.17 +ARG POWERSHELL_RELEASE=v6.0.0-alpha.17 +ARG FORK=PowerShell +ARG POWERSHELL_PACKAGE=powershell-$POWERSHELL_VERSION-1.suse.42.1.x86_64.rpm + +# Update, Install packages to generate localedef and CURL which is used by RPM +# add the Microsoft key as trusted to install packgages using RPM +# Install PowerShell then clean up +RUN zypper --non-interactive update --skip-interactive \ + && zypper --non-interactive install \ + glibc-locale \ + glibc-i18ndata \ + curl \ + && rpm --import https://packages.microsoft.com/keys/microsoft.asc \ + && zypper --non-interactive install https://github.com/$FORK/PowerShell/releases/download/$POWERSHELL_RELEASE/$POWERSHELL_PACKAGE \ + && zypper --non-interactive clean --all + +# Setup the locale +ENV LANG en_US.UTF-8 +ENV LC_ALL $LANG +RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG + +ENTRYPOINT [ "powershell" ] diff --git a/src/ResGen/project.json b/src/ResGen/project.json index 7d54715e6e..9fb6d2e3c1 100644 --- a/src/ResGen/project.json +++ b/src/ResGen/project.json @@ -29,6 +29,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/src/TypeCatalogGen/project.json b/src/TypeCatalogGen/project.json index 80e8c2f9d0..c97c307bfd 100644 --- a/src/TypeCatalogGen/project.json +++ b/src/TypeCatalogGen/project.json @@ -54,6 +54,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/src/TypeCatalogParser/project.json b/src/TypeCatalogParser/project.json index 468126b044..3ace4faeeb 100644 --- a/src/TypeCatalogParser/project.json +++ b/src/TypeCatalogParser/project.json @@ -51,6 +51,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/src/powershell-unix/project.json b/src/powershell-unix/project.json index 40807a8f62..08db20eeee 100644 --- a/src/powershell-unix/project.json +++ b/src/powershell-unix/project.json @@ -105,6 +105,7 @@ "fedora.24-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/test/PSReadLine/project.json b/test/PSReadLine/project.json index d4f6d053c0..658d38e2de 100644 --- a/test/PSReadLine/project.json +++ b/test/PSReadLine/project.json @@ -31,6 +31,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/test/csharp/project.json b/test/csharp/project.json index 5685b7afa2..5044e59fe7 100644 --- a/test/csharp/project.json +++ b/test/csharp/project.json @@ -37,6 +37,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/test/tools/CreateChildProcess/project.json b/test/tools/CreateChildProcess/project.json index fc54d4d307..b3cbc77ef2 100644 --- a/test/tools/CreateChildProcess/project.json +++ b/test/tools/CreateChildProcess/project.json @@ -27,6 +27,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } } diff --git a/test/tools/EchoArgs/project.json b/test/tools/EchoArgs/project.json index 3d2c587a4d..b81da60a3b 100644 --- a/test/tools/EchoArgs/project.json +++ b/test/tools/EchoArgs/project.json @@ -27,6 +27,7 @@ "win10-x64": { }, "osx.10.11-x64": { }, "osx.10.12-x64": { }, - "opensuse.13.2-x64": {} + "opensuse.13.2-x64": {}, + "opensuse.42.1-x64": {} } }