Add build support for OpenSUSE 42.1 (#3389)

This commit is contained in:
Travis Plunk 2017-03-22 14:19:51 -07:00 committed by Dongbo Wang
parent 0f099ee9be
commit 27c819ce2e
10 changed files with 54 additions and 13 deletions

View File

@ -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"

View File

@ -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 <travis.plunk@microsoft.com>
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" ]

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}

View File

@ -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": {}
}
}