diff --git a/docs/start/envlinux.md b/docs/start/envlinux.md index ddc87bd12..f7927783d 100644 --- a/docs/start/envlinux.md +++ b/docs/start/envlinux.md @@ -5,36 +5,55 @@ ## Supported Distributions and Versions x64 - - Red Hat Enterprise Linux 6 (see note 1), 7 - - CentOS 6 (see note 1), 7 + - Red Hat Enterprise Linux 7 + - CentOS 7 - Oracle Linux 7 - - Fedora 28, 27 - - Debian 9, 8.7 or later versions - - Ubuntu 18.04, Ubuntu 16.04, Ubuntu 14.04 - - Linux Mint 18, 17 - - openSUSE 42.3 or later versions - - SUSE Enterprise Linux (SLES) 12 SP2 or later versions + - Fedora 29+ + - Debian 9+ + - Ubuntu 16.04+ + - Linux Mint 18+ + - openSUSE 15+ + - SUSE Enterprise Linux (SLES) 12 SP2+ -ARM32 (see note 2) - - Debian 9 or later versions - - Ubuntu 18.04 or later versions +## Install .Net Core 3.x Linux Dependencies -> Note 1: Red Hat Enterprise Linux 6 and CentOS 6 require installing the specialized "rhel.6-x64" agent package -> Note 2: ARM instruction set [ARMv7](https://en.wikipedia.org/wiki/List_of_ARM_microarchitectures) or above is required, you can get your device's information by executing `uname -a` - -## Install .Net Core 2.x Linux Dependencies - -The `./config.sh` will check .Net Core 2.x dependencies during agent configuration. +The `./config.sh` will check .Net Core 3.x dependencies during runner configuration. You might see something like this which indicate a dependency's missing. ```bash ./config.sh libunwind.so.8 => not found libunwind-x86_64.so.8 => not found -Dependencies is missing for Dotnet Core 2.1 -Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies. +Dependencies is missing for Dotnet Core 3.0 +Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies. ``` You can easily correct the problem by executing `./bin/installdependencies.sh`. The `installdependencies.sh` script should install all required dependencies on all supported Linux versions > Note: The `installdependencies.sh` script will try to use the default package management mechanism on your Linux flavor (ex. `yum`/`apt-get`/`apt`). You might need to deal with error coming from the package management mechanism related to your setup, like [#1353](https://github.com/Microsoft/vsts-agent/issues/1353) +### Full dependencies list + +Debian based OS (Debian, Ubuntu, Linux Mint) + +- liblttng-ust0 +- libkrb5-3 +- zlib1g +- libssl1.1, libssl1.0.2 or libssl1.0.0 +- libicu63, libicu60, libicu57 or libicu55 + +Fedora based OS (Fedora, Redhat, Centos, Oracle Linux 7) + +- lttng-ust +- openssl-libs +- krb5-libs +- zlib +- libicu + +SUSE based OS (OpenSUSE, SUSE Enterprise) + +- lttng-ust +- libopenssl1_1 +- krb5 +- zlib +- libicu60_2 + ## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x) diff --git a/src/Misc/layoutbin/installdependencies.sh b/src/Misc/layoutbin/installdependencies.sh index 0375c0a43..18b6fcbe9 100755 --- a/src/Misc/layoutbin/installdependencies.sh +++ b/src/Misc/layoutbin/installdependencies.sh @@ -60,10 +60,9 @@ then print_errormessage exit 1 fi - - # ubuntu 18 uses libcurl4 - # ubuntu 14, 16 and other linux use libcurl3 - apt install -y libcurl3 || apt install -y libcurl4 + + # libissl version prefer: libssl1.1 -> libssl1.0.2 -> libssl1.0.0 + apt install -y libssl1.1$ || apt install -y libssl1.0.2$ || apt install -y libssl1.0.0$ if [ $? -ne 0 ] then echo "'apt' failed with exit code '$?'" @@ -71,18 +70,8 @@ then exit 1 fi - # debian 9 use libssl1.0.2 - # other debian linux use libssl1.0.0 - apt install -y libssl1.0.0 || apt install -y libssl1.0.2 - if [ $? -ne 0 ] - then - echo "'apt' failed with exit code '$?'" - print_errormessage - exit 1 - fi - - # libicu version prefer: libicu52 -> libicu55 -> libicu57 -> libicu60 - apt install -y libicu52 || apt install -y libicu55 || apt install -y libicu57 || apt install -y libicu60 + # libicu version prefer: libicu63 -> libicu60 -> libicu57 -> libicu55 -> libicu52 + apt install -y libicu63 || apt install -y libicu60 || apt install -y libicu57 || apt install -y libicu55 || apt install -y libicu52 if [ $? -ne 0 ] then echo "'apt' failed with exit code '$?'" @@ -101,9 +90,8 @@ then exit 1 fi - # ubuntu 18 uses libcurl4 - # ubuntu 14, 16 and other linux use libcurl3 - apt-get install -y libcurl3 || apt-get install -y libcurl4 + # libissl version prefer: libssl1.1 -> libssl1.0.2 -> libssl1.0.0 + apt-get install -y libssl1.1$ || apt-get install -y libssl1.0.2$ || apt install -y libssl1.0.0$ if [ $? -ne 0 ] then echo "'apt-get' failed with exit code '$?'" @@ -111,18 +99,8 @@ then exit 1 fi - # debian 9 use libssl1.0.2 - # other debian linux use libssl1.0.0 - apt-get install -y libssl1.0.0 || apt install -y libssl1.0.2 - if [ $? -ne 0 ] - then - echo "'apt-get' failed with exit code '$?'" - print_errormessage - exit 1 - fi - - # libicu version prefer: libicu52 -> libicu55 -> libicu57 -> libicu60 - apt-get install -y libicu52 || apt install -y libicu55 || apt install -y libicu57 || apt install -y libicu60 + # libicu version prefer: libicu63 -> libicu60 -> libicu57 -> libicu55 -> libicu52 + apt-get install -y libicu63 || apt-get install -y libicu60 || apt install -y libicu57 || apt install -y libicu55 || apt install -y libicu52 if [ $? -ne 0 ] then echo "'apt-get' failed with exit code '$?'" @@ -149,46 +127,7 @@ then command -v dnf if [ $? -eq 0 ] then - useCompatSsl=0 - grep -i 'fedora release 28' /etc/fedora-release - if [ $? -eq 0 ] - then - useCompatSsl=1 - else - grep -i 'fedora release 27' /etc/fedora-release - if [ $? -eq 0 ] - then - useCompatSsl=1 - else - grep -i 'fedora release 26' /etc/fedora-release - if [ $? -eq 0 ] - then - useCompatSsl=1 - fi - fi - fi - - if [ $useCompatSsl -eq 1 ] - then - echo "Use compat-openssl10-devel instead of openssl-devel for Fedora 27/28 (dotnet core requires openssl 1.0.x)" - dnf install -y compat-openssl10 - if [ $? -ne 0 ] - then - echo "'dnf' failed with exit code '$?'" - print_errormessage - exit 1 - fi - else - dnf install -y openssl-libs - if [ $? -ne 0 ] - then - echo "'dnf' failed with exit code '$?'" - print_errormessage - exit 1 - fi - fi - - dnf install -y lttng-ust libcurl krb5-libs zlib libicu + dnf install -y lttng-ust openssl-libs krb5-libs zlib libicu if [ $? -ne 0 ] then echo "'dnf' failed with exit code '$?'" @@ -204,22 +143,13 @@ then command -v yum if [ $? -eq 0 ] then - yum install -y openssl-libs libcurl krb5-libs zlib libicu + yum install -y lttng-ust openssl-libs krb5-libs zlib libicu if [ $? -ne 0 ] then echo "'yum' failed with exit code '$?'" print_errormessage exit 1 fi - - # install lttng-ust separately since it's not part of offical package repository - yum install -y wget && wget -P /etc/yum.repos.d/ https://packages.efficios.com/repo.files/EfficiOS-RHEL7-x86-64.repo && rpmkeys --import https://packages.efficios.com/rhel/repo.key && yum updateinfo && yum install -y lttng-ust - if [ $? -ne 0 ] - then - echo "'lttng-ust' installation failed with exit code '$?'" - print_errormessage - exit 1 - fi else echo "Can not find 'yum'" print_errormessage @@ -230,13 +160,14 @@ then # we might on OpenSUSE OSTYPE=$(grep ID_LIKE /etc/os-release | cut -f2 -d=) echo $OSTYPE - if [ $OSTYPE == '"suse"' ] + echo $OSTYPE | grep "suse" + if [ $? -eq 0 ] then echo "The current OS is SUSE based" command -v zypper if [ $? -eq 0 ] then - zypper -n install lttng-ust libopenssl1_0_0 libcurl4 krb5 zlib libicu52_1 + zypper -n install lttng-ust libopenssl1_1 krb5 zlib libicu60_2 if [ $? -ne 0 ] then echo "'zypper' failed with exit code '$?'" diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index 20ec606f7..6aa889013 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -8,7 +8,7 @@ if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then exit 1 fi -# Check dotnet core 2.1 dependencies for Linux +# Check dotnet core 3.0 dependencies for Linux if [[ (`uname` == "Linux") ]] then command -v ldd > /dev/null @@ -20,29 +20,22 @@ then ldd ./bin/libcoreclr.so | grep 'not found' if [ $? -eq 0 ]; then - echo "Dependencies is missing for Dotnet Core 2.1" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies." + echo "Dependencies is missing for Dotnet Core 3.0" + echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." exit 1 fi ldd ./bin/System.Security.Cryptography.Native.OpenSsl.so | grep 'not found' if [ $? -eq 0 ]; then - echo "Dependencies is missing for Dotnet Core 2.1" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies." + echo "Dependencies is missing for Dotnet Core 3.0" + echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." exit 1 fi ldd ./bin/System.IO.Compression.Native.so | grep 'not found' if [ $? -eq 0 ]; then - echo "Dependencies is missing for Dotnet Core 2.1" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies." - exit 1 - fi - - ldd ./bin/System.Net.Http.Native.so | grep 'not found' - if [ $? -eq 0 ]; then - echo "Dependencies is missing for Dotnet Core 2.1" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies." + echo "Dependencies is missing for Dotnet Core 3.0" + echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." exit 1 fi @@ -59,8 +52,8 @@ then libpath=${LD_LIBRARY_PATH:-} $LDCONFIG_COMMAND -NXv ${libpath//:/} 2>&1 | grep libicu >/dev/null 2>&1 if [ $? -ne 0 ]; then - echo "Libicu's dependencies is missing for Dotnet Core 2.1" - echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.1 dependencies." + echo "Libicu's dependencies is missing for Dotnet Core 3.0" + echo "Execute ./bin/installdependencies.sh to install any missing Dotnet Core 3.0 dependencies." exit 1 fi fi diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj index 2ebdff767..1e866d71f 100644 --- a/src/Runner.Common/Runner.Common.csproj +++ b/src/Runner.Common/Runner.Common.csproj @@ -1,13 +1,14 @@  - netcoreapp2.2 + netcoreapp3.0 Library win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj index 37bf785e2..235850887 100644 --- a/src/Runner.Listener/Runner.Listener.csproj +++ b/src/Runner.Listener/Runner.Listener.csproj @@ -1,13 +1,15 @@  - netcoreapp2.2 + netcoreapp3.0 Exe win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true + true diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj index 6c4fede74..56255ebfe 100644 --- a/src/Runner.PluginHost/Runner.PluginHost.csproj +++ b/src/Runner.PluginHost/Runner.PluginHost.csproj @@ -1,13 +1,15 @@  - netcoreapp2.2 + netcoreapp3.0 Exe win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true + true diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj index 495bc036d..439f35740 100644 --- a/src/Runner.Plugins/Runner.Plugins.csproj +++ b/src/Runner.Plugins/Runner.Plugins.csproj @@ -1,13 +1,14 @@  - netcoreapp2.2 + netcoreapp3.0 Library win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true diff --git a/src/Runner.Sdk/ActionPlugin.cs b/src/Runner.Sdk/ActionPlugin.cs index 5f536e74c..232f89cc7 100644 --- a/src/Runner.Sdk/ActionPlugin.cs +++ b/src/Runner.Sdk/ActionPlugin.cs @@ -70,13 +70,6 @@ namespace GitHub.Runner.Sdk VssClientHttpRequestSettings.Default.UserAgent = headerValues; -#if OS_LINUX || OS_OSX - // The .NET Core 2.1 runtime switched its HTTP default from HTTP 1.1 to HTTP 2. - // This causes problems with some versions of the Curl handler. - // See GitHub issue https://github.com/dotnet/corefx/issues/32376 - VssClientHttpRequestSettings.Default.UseHttp11 = true; -#endif - var certSetting = GetCertConfiguration(); if (certSetting != null) { diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj index f8113085f..332b55328 100644 --- a/src/Runner.Sdk/Runner.Sdk.csproj +++ b/src/Runner.Sdk/Runner.Sdk.csproj @@ -1,13 +1,14 @@  - netcoreapp2.2 + netcoreapp3.0 Library win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true diff --git a/src/Runner.Sdk/Util/VssUtil.cs b/src/Runner.Sdk/Util/VssUtil.cs index 7890f3ef9..4c7605af6 100644 --- a/src/Runner.Sdk/Util/VssUtil.cs +++ b/src/Runner.Sdk/Util/VssUtil.cs @@ -27,13 +27,6 @@ namespace GitHub.Runner.Sdk VssClientHttpRequestSettings.Default.UserAgent = headerValues; VssClientHttpRequestSettings.Default.ClientCertificateManager = clientCert; -#if OS_LINUX || OS_OSX - // The .NET Core 2.1 runtime switched its HTTP default from HTTP 1.1 to HTTP 2. - // This causes problems with some versions of the Curl handler. - // See GitHub issue https://github.com/dotnet/corefx/issues/32376 - VssClientHttpRequestSettings.Default.UseHttp11 = true; -#endif - VssHttpMessageHandler.DefaultWebProxy = proxy; } diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj index d2543cf5e..64d35e90e 100644 --- a/src/Runner.Worker/Runner.Worker.csproj +++ b/src/Runner.Worker/Runner.Worker.csproj @@ -1,13 +1,15 @@ - netcoreapp2.2 + netcoreapp3.0 Exe win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 NU1701;NU1603 $(Version) + true + true diff --git a/src/Sdk/DTExpressions2/Expressions2/IExpressionNodeExtensions.cs b/src/Sdk/DTExpressions2/Expressions2/IExpressionNodeExtensions.cs index ab64596da..c92716797 100644 --- a/src/Sdk/DTExpressions2/Expressions2/IExpressionNodeExtensions.cs +++ b/src/Sdk/DTExpressions2/Expressions2/IExpressionNodeExtensions.cs @@ -56,7 +56,7 @@ namespace GitHub.DistributedTask.Expressions2 // Attempt to match a named-value or index operator. // Note, do not push children of the index operator. - if (node is NamedValue || node is Index) + if (node is NamedValue || node is Sdk.Operators.Index) { // Lazy initialize the pattern segments if (segmentedPatterns is null) @@ -201,7 +201,7 @@ namespace GitHub.DistributedTask.Expressions2 result.Push(node); } // Node is an index - else if (node is Index index) + else if (node is Sdk.Operators.Index index) { while (true) { @@ -218,7 +218,7 @@ namespace GitHub.DistributedTask.Expressions2 break; } // Parameter 0 is an index - else if (parameter0 is Index index2) + else if (parameter0 is Sdk.Operators.Index index2) { index = index2; } diff --git a/src/Sdk/DTExpressions2/Expressions2/Tokens/Token.cs b/src/Sdk/DTExpressions2/Expressions2/Tokens/Token.cs index 3f5903b40..7bb964a46 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Tokens/Token.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Tokens/Token.cs @@ -154,7 +154,7 @@ namespace GitHub.DistributedTask.Expressions2.Tokens { case TokenKind.StartIndex: // "[" case TokenKind.Dereference: // "." - return new Index(); + return new Sdk.Operators.Index(); case TokenKind.LogicalOperator: switch (RawValue) diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj index 13323616c..e9f110a92 100644 --- a/src/Sdk/Sdk.csproj +++ b/src/Sdk/Sdk.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2 + netcoreapp3.0 Library win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true @@ -11,6 +11,7 @@ NETSTANDARD;NET_STANDARD;TRACE 7.3 true + true @@ -21,11 +22,7 @@ - - - - diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index e915b4e86..035a3c182 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -1,6 +1,6 @@  - netcoreapp2.2 + netcoreapp3.0 win-x64;win-x86;linux-x64;linux-arm;rhel.6-x64;osx-x64 true portable-net45+win8 diff --git a/src/dev.sh b/src/dev.sh index 6868a2ffa..396a5f1ce 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -16,7 +16,7 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" PACKAGE_DIR="$SCRIPT_DIR/../_package" DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" -DOTNETSDK_VERSION="2.2.300" +DOTNETSDK_VERSION="3.0.100" DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" RUNNER_VERSION=$(cat runnerversion) diff --git a/src/global.json b/src/global.json index 932387844..2223a05e3 100644 --- a/src/global.json +++ b/src/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.300" + "version": "3.0.100" } } \ No newline at end of file