Merge pull request #7688 from janvorli/enable-rhel6
Enable RHEL 6 support
This commit is contained in:
commit
2af264d70b
9 changed files with 58 additions and 28 deletions
|
@ -4,6 +4,6 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' AND $(HostRid.StartsWith('rhel.6')) ">true</SkipBuildingInstallers>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
||||
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' ">true</UsePortableLinuxSharedFramework>
|
||||
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
|
||||
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' AND '$(Rid)' != 'rhel.6-x64' ">true</UsePortableLinuxSharedFramework>
|
||||
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' AND '$(Rid)' != 'rhel.6-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
|
||||
<HighEntropyVA>true</HighEntropyVA>
|
||||
|
||||
<!-- Only use asset target fallback that we set (not implicit one to net461). -->
|
||||
|
|
|
@ -68,8 +68,8 @@ $env:VSTEST_TRACE_BUILD=1
|
|||
# install a stage0
|
||||
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
|
||||
|
||||
Write-Output "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
Write-Output "$dotnetInstallPath -Channel ""master"" -version ""2.1.0-preview1-007172"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
Invoke-Expression "$dotnetInstallPath -Channel ""master"" -version ""2.1.0-preview1-007172"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
|
||||
|
|
27
run-build.sh
27
run-build.sh
|
@ -51,6 +51,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
REPOROOT="$DIR"
|
||||
|
||||
ARCHITECTURE="x64"
|
||||
BOOTSTRAP_CLI=
|
||||
|
||||
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
||||
|
||||
BUILD=1
|
||||
|
@ -61,51 +63,44 @@ CUSTOM_BUILD_ARGS=
|
|||
# Set nuget package cache under the repo
|
||||
[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
|
||||
|
||||
args=( "$@" )
|
||||
args=( )
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-c|--configuration)
|
||||
export CONFIGURATION=$2
|
||||
args=( "${args[@]/$1}" )
|
||||
args=( "${args[@]/$2}" )
|
||||
shift
|
||||
;;
|
||||
--nopackage)
|
||||
export DOTNET_BUILD_SKIP_PACKAGING=1
|
||||
args=( "${args[@]/$1}" )
|
||||
;;
|
||||
--skip-prereqs)
|
||||
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
|
||||
export DOTNET_INSTALL_SKIP_PREREQS=1
|
||||
args=( "${args[@]/$1}" )
|
||||
;;
|
||||
--nobuild)
|
||||
BUILD=0
|
||||
;;
|
||||
--architecture)
|
||||
ARCHITECTURE=$2
|
||||
args=( "${args[@]/$1}" )
|
||||
args=( "${args[@]/$2}" )
|
||||
shift
|
||||
;;
|
||||
--runtime-id)
|
||||
CUSTOM_BUILD_ARGS="/p:Rid=\"$2\""
|
||||
args=( "${args[@]/$1}" )
|
||||
args=( "${args[@]/$2}" )
|
||||
shift
|
||||
;;
|
||||
# This is here just to eat away this parameter because CI still passes this in.
|
||||
--targets)
|
||||
args=( "${args[@]/$1}" )
|
||||
args=( "${args[@]/$2}" )
|
||||
shift
|
||||
;;
|
||||
--linux-portable)
|
||||
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
|
||||
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
|
||||
args=( "${args[@]/$1}" )
|
||||
;;
|
||||
--bootstrap-cli)
|
||||
BOOTSTRAP_CLI=$2
|
||||
shift
|
||||
;;
|
||||
--help)
|
||||
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help]"
|
||||
|
@ -121,6 +116,7 @@ while [[ $# > 0 ]]; do
|
|||
exit 0
|
||||
;;
|
||||
*)
|
||||
args=(${args[@]} $1)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
@ -150,7 +146,12 @@ export VSTEST_TRACE_BUILD=1
|
|||
export DOTNET_MULTILEVEL_LOOKUP=0
|
||||
|
||||
# Install a stage 0
|
||||
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
|
||||
if [ "$BOOTSTRAP_CLI" == "" ]; then
|
||||
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --version "2.1.0-preview1-007172" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
|
||||
else
|
||||
echo "Copying bootstrap cli from $BOOTSTRAP_CLI"
|
||||
cp -r $BOOTSTRAP_CLI/* "$DOTNET_INSTALL_DIR"
|
||||
fi
|
||||
|
||||
EXIT_CODE=$?
|
||||
if [ $EXIT_CODE != 0 ]; then
|
||||
|
|
30
scripts/obtain/dotnet-install.sh
vendored
30
scripts/obtain/dotnet-install.sh
vendored
|
@ -84,6 +84,10 @@ get_os_download_name_from_platform() {
|
|||
echo "opensuse.42.1"
|
||||
return 0
|
||||
;;
|
||||
"rhel.6"*)
|
||||
echo "rhel.6"
|
||||
return 0
|
||||
;;
|
||||
"rhel.7"*)
|
||||
echo "rhel"
|
||||
return 0
|
||||
|
@ -115,8 +119,14 @@ get_current_os_name() {
|
|||
if [ "$uname" = "Darwin" ]; then
|
||||
echo "osx"
|
||||
return 0
|
||||
else
|
||||
if [ "$uname" = "Linux" ]; then
|
||||
elif [ "$uname" = "Linux" ]; then
|
||||
local distro_specific_osname
|
||||
distro_specific_osname=$(get_distro_specific_os_name) || return 1
|
||||
|
||||
if [ "$distro_specific_osname" = "rhel.6" ]; then
|
||||
echo $distro_specific_osname
|
||||
return 0
|
||||
else
|
||||
echo "linux"
|
||||
return 0
|
||||
fi
|
||||
|
@ -144,6 +154,12 @@ get_distro_specific_os_name() {
|
|||
echo "$os"
|
||||
return 0
|
||||
fi
|
||||
elif [ -e /etc/redhat-release ]; then
|
||||
local redhatRelease=$(</etc/redhat-release)
|
||||
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
|
||||
echo "rhel.6"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -191,10 +207,12 @@ check_pre_reqs() {
|
|||
LDCONFIG_COMMAND="ldconfig"
|
||||
fi
|
||||
|
||||
[ -z "$($LDCONFIG_COMMAND -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND -p | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true
|
||||
LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${LD_LIBRARY_PATH//:/ }"
|
||||
|
||||
[ -z "$($LDCONFIG_COMMAND | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true
|
||||
fi
|
||||
|
||||
if [ "$failing" = true ]; then
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
switch (rid)
|
||||
{
|
||||
case "fedora.24-x64":
|
||||
case "rhel.6-x64":
|
||||
case "opensuse.42.1-x64":
|
||||
case "ubuntu.16.10-x64":
|
||||
case "linux-x64":
|
||||
|
@ -25,6 +26,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
switch (rid)
|
||||
{
|
||||
case "linux-x64":
|
||||
case "rhel.6-x64":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (framework == "netcoreapp2.0")
|
||||
{
|
||||
switch (rid)
|
||||
{
|
||||
case "rhel.6-x64":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +42,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue