Add support for building dotnet CLI on Debian.
This commit is contained in:
parent
c33c2ff127
commit
ee4bbb43ff
6 changed files with 47 additions and 14 deletions
|
@ -17,6 +17,7 @@
|
|||
"osx.10.10-x64": {},
|
||||
"ubuntu.14.04-x64": {},
|
||||
"centos.7-x64": {},
|
||||
"rhel.7.2-x64": {}
|
||||
"rhel.7.2-x64": {},
|
||||
"debian.8.2-x64": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,11 +65,20 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
|||
}
|
||||
}
|
||||
|
||||
public static bool IsDebian
|
||||
{
|
||||
get
|
||||
{
|
||||
var osname = PlatformServices.Default.Runtime.OperatingSystem;
|
||||
return string.Equals(osname, "debian", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsLinux
|
||||
{
|
||||
get
|
||||
{
|
||||
return IsUbuntu || IsCentOS || IsRHEL;
|
||||
return IsUbuntu || IsCentOS || IsRHEL || IsDebian;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,6 +127,10 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
|||
{
|
||||
return BuildPlatform.RHEL;
|
||||
}
|
||||
else if (IsDebian)
|
||||
{
|
||||
return BuildPlatform.Debian;
|
||||
}
|
||||
else
|
||||
{
|
||||
return default(BuildPlatform);
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
|||
OSX = 4,
|
||||
Ubuntu = 5,
|
||||
CentOS = 6,
|
||||
RHEL = 7
|
||||
RHEL = 7,
|
||||
Debian = 8
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
packageId = "toolchain.ubuntu.14.04-x64.Microsoft.DotNet.AppDep";
|
||||
}
|
||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
|
||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL || CurrentPlatform.IsDebian)
|
||||
{
|
||||
c.Warn($"Native compilation is not yet working on {CurrentPlatform.Current}");
|
||||
return c.Success();
|
||||
|
@ -308,6 +308,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// CentOS runtime is in the runtime.rhel.7-x64... package.
|
||||
packageId = "runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsDebian)
|
||||
{
|
||||
packageId = "runtime.debian.8.2-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsOSX)
|
||||
{
|
||||
packageId = "runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
|
|
|
@ -85,6 +85,8 @@ current_os()
|
|||
echo "centos"
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||
echo "rhel.7"
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||
echo "debian"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -106,11 +108,19 @@ check_pre_reqs() {
|
|||
fi
|
||||
|
||||
if [ "$(uname)" = "Linux" ]; then
|
||||
[ -z "$(ldconfig -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && _failing=true
|
||||
[ -z "$(ldconfig -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && _failing=true
|
||||
[ -z "$(ldconfig -p | grep libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && _failing=true
|
||||
[ -z "$(ldconfig -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && _failing=true
|
||||
[ -z "$(ldconfig -p | grep gettext)" ] && say_err "Unable to locate gettext. Install gettext to continue" && _failing=true
|
||||
|
||||
if ! [ -x "$(command -v ldconfig)" ]; then
|
||||
echo "ldconfig is not in PATH, trying /sbin/ldconfig."
|
||||
LDCONFIG_COMMAND="/sbin/ldconfig"
|
||||
else
|
||||
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 libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl 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 gettext)" ] && say_err "Unable to locate gettext. Install gettext to continue" && _failing=true
|
||||
fi
|
||||
|
||||
if [ "$_failing" = true ]; then
|
||||
|
|
|
@ -226,6 +226,10 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
Console.WriteLine("Skipping native compilation tests on CentOS/RHEL - https://github.com/dotnet/cli/issues/453");
|
||||
isSupported = false;
|
||||
break;
|
||||
case "debian":
|
||||
Console.WriteLine("Skipping native compilation tests on Debian - https://github.com/dotnet/cli/issues/1666");
|
||||
isSupported = false;
|
||||
break;
|
||||
case "windows":
|
||||
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
|
||||
isSupported = RuntimeInformation.ProcessArchitecture != Architecture.X86;
|
||||
|
|
Loading…
Reference in a new issue