Enable RHEL 6 support
This change enables RHEL 6 support. It also adds a new command line option to the run-build.sh script that enables passing in a folder containing a bootstrap CLI. This helps in bringup of new target platforms.
This commit is contained in:
parent
f3932fab2d
commit
90e217831b
9 changed files with 58 additions and 28 deletions
|
@ -4,6 +4,6 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<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>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<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>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<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>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<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>
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
|
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
|
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
|
||||||
|
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' AND $(HostRid.StartsWith('rhel.6')) ">true</SkipBuildingInstallers>
|
||||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
||||||
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' ">true</UsePortableLinuxSharedFramework>
|
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' AND '$(Rid)' != 'rhel.6-x64' ">true</UsePortableLinuxSharedFramework>
|
||||||
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
|
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' AND '$(Rid)' != 'rhel.6-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
|
||||||
<HighEntropyVA>true</HighEntropyVA>
|
<HighEntropyVA>true</HighEntropyVA>
|
||||||
|
|
||||||
<!-- Only use asset target fallback that we set (not implicit one to net461). -->
|
<!-- 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
|
# install a stage0
|
||||||
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
|
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
|
||||||
|
|
||||||
Write-Output "$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"" -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)
|
if ($LastExitCode -ne 0)
|
||||||
{
|
{
|
||||||
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
|
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"
|
REPOROOT="$DIR"
|
||||||
|
|
||||||
ARCHITECTURE="x64"
|
ARCHITECTURE="x64"
|
||||||
|
BOOTSTRAP_CLI=
|
||||||
|
|
||||||
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
||||||
|
|
||||||
BUILD=1
|
BUILD=1
|
||||||
|
@ -61,51 +63,44 @@ CUSTOM_BUILD_ARGS=
|
||||||
# Set nuget package cache under the repo
|
# Set nuget package cache under the repo
|
||||||
[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
|
[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
|
||||||
|
|
||||||
args=( "$@" )
|
args=( )
|
||||||
|
|
||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||||
case $lowerI in
|
case $lowerI in
|
||||||
-c|--configuration)
|
-c|--configuration)
|
||||||
export CONFIGURATION=$2
|
export CONFIGURATION=$2
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
args=( "${args[@]/$2}" )
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--nopackage)
|
--nopackage)
|
||||||
export DOTNET_BUILD_SKIP_PACKAGING=1
|
export DOTNET_BUILD_SKIP_PACKAGING=1
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
;;
|
;;
|
||||||
--skip-prereqs)
|
--skip-prereqs)
|
||||||
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
|
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
|
||||||
export DOTNET_INSTALL_SKIP_PREREQS=1
|
export DOTNET_INSTALL_SKIP_PREREQS=1
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
;;
|
;;
|
||||||
--nobuild)
|
--nobuild)
|
||||||
BUILD=0
|
BUILD=0
|
||||||
;;
|
;;
|
||||||
--architecture)
|
--architecture)
|
||||||
ARCHITECTURE=$2
|
ARCHITECTURE=$2
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
args=( "${args[@]/$2}" )
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--runtime-id)
|
--runtime-id)
|
||||||
CUSTOM_BUILD_ARGS="/p:Rid=\"$2\""
|
CUSTOM_BUILD_ARGS="/p:Rid=\"$2\""
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
args=( "${args[@]/$2}" )
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
# This is here just to eat away this parameter because CI still passes this in.
|
# This is here just to eat away this parameter because CI still passes this in.
|
||||||
--targets)
|
--targets)
|
||||||
args=( "${args[@]/$1}" )
|
|
||||||
args=( "${args[@]/$2}" )
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--linux-portable)
|
--linux-portable)
|
||||||
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
|
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
|
||||||
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
|
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
|
||||||
args=( "${args[@]/$1}" )
|
;;
|
||||||
|
--bootstrap-cli)
|
||||||
|
BOOTSTRAP_CLI=$2
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--help)
|
--help)
|
||||||
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help]"
|
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help]"
|
||||||
|
@ -121,6 +116,7 @@ while [[ $# > 0 ]]; do
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
args=(${args[@]} $1)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -150,7 +146,12 @@ export VSTEST_TRACE_BUILD=1
|
||||||
export DOTNET_MULTILEVEL_LOOKUP=0
|
export DOTNET_MULTILEVEL_LOOKUP=0
|
||||||
|
|
||||||
# Install a stage 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=$?
|
EXIT_CODE=$?
|
||||||
if [ $EXIT_CODE != 0 ]; then
|
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"
|
echo "opensuse.42.1"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
"rhel.6"*)
|
||||||
|
echo "rhel.6"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
"rhel.7"*)
|
"rhel.7"*)
|
||||||
echo "rhel"
|
echo "rhel"
|
||||||
return 0
|
return 0
|
||||||
|
@ -115,8 +119,14 @@ get_current_os_name() {
|
||||||
if [ "$uname" = "Darwin" ]; then
|
if [ "$uname" = "Darwin" ]; then
|
||||||
echo "osx"
|
echo "osx"
|
||||||
return 0
|
return 0
|
||||||
else
|
elif [ "$uname" = "Linux" ]; then
|
||||||
if [ "$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"
|
echo "linux"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -144,6 +154,12 @@ get_distro_specific_os_name() {
|
||||||
echo "$os"
|
echo "$os"
|
||||||
return 0
|
return 0
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -191,10 +207,12 @@ check_pre_reqs() {
|
||||||
LDCONFIG_COMMAND="ldconfig"
|
LDCONFIG_COMMAND="ldconfig"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$($LDCONFIG_COMMAND -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
|
LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${LD_LIBRARY_PATH//:/ }"
|
||||||
[ -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 | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
|
||||||
[ -z "$($LDCONFIG_COMMAND -p | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl 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
|
fi
|
||||||
|
|
||||||
if [ "$failing" = true ]; then
|
if [ "$failing" = true ]; then
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
switch (rid)
|
switch (rid)
|
||||||
{
|
{
|
||||||
case "fedora.24-x64":
|
case "fedora.24-x64":
|
||||||
|
case "rhel.6-x64":
|
||||||
case "opensuse.42.1-x64":
|
case "opensuse.42.1-x64":
|
||||||
case "ubuntu.16.10-x64":
|
case "ubuntu.16.10-x64":
|
||||||
case "linux-x64":
|
case "linux-x64":
|
||||||
|
@ -25,6 +26,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
switch (rid)
|
switch (rid)
|
||||||
{
|
{
|
||||||
case "linux-x64":
|
case "linux-x64":
|
||||||
|
case "rhel.6-x64":
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (framework == "netcoreapp2.0")
|
||||||
|
{
|
||||||
|
switch (rid)
|
||||||
|
{
|
||||||
|
case "rhel.6-x64":
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,4 +42,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue