From 3f076e4e1a46d45decbb89515231e4dd2a4681a8 Mon Sep 17 00:00:00 2001 From: anolis-bot Date: Mon, 15 Aug 2022 18:09:28 +0800 Subject: [PATCH 1/2] update to dotnet6.0-6.0.108-1.el8_6 Signed-off-by: anolis-bot --- 2000-anolis-dotnet-add-distro.patch | 102 ------------------ ...ine-api-use-work-tree-with-git-apply.patch | 27 ----- dotnet6.0.spec | 40 ++----- download | 2 +- fsharp-use-work-tree-with-git-apply.patch | 11 -- vstest-use-work-tree-with-git-apply.patch | 33 ------ ...f-tasks-use-work-tree-with-git-apply.patch | 11 -- 7 files changed, 9 insertions(+), 217 deletions(-) delete mode 100644 2000-anolis-dotnet-add-distro.patch delete mode 100644 command-line-api-use-work-tree-with-git-apply.patch delete mode 100644 fsharp-use-work-tree-with-git-apply.patch delete mode 100644 vstest-use-work-tree-with-git-apply.patch delete mode 100644 xliff-tasks-use-work-tree-with-git-apply.patch diff --git a/2000-anolis-dotnet-add-distro.patch b/2000-anolis-dotnet-add-distro.patch deleted file mode 100644 index 8da3bd9..0000000 --- a/2000-anolis-dotnet-add-distro.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- ./src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props 2021-10-03 23:24:08.000000000 +0800 -+++ ./src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props.new 2022-02-12 20:37:51.705404475 +0800 -@@ -55,6 +55,14 @@ - true - false - -+ -+ rhel -+ x64;arm64 -+ 8;9 -+ true -+ false -+ -+ - - - linux -@@ -278,6 +286,6 @@ - RuntimeJson="runtime.json" - CompatibilityMap="runtime.compatibility.json" - RuntimeDirectedGraph="$(OutputPath)runtime.json.dgml" -- UpdateRuntimeFiles="$(UpdateRuntimeFiles)" /> -+ UpdateRuntimeFiles="true" /> - - ---- ./src/diagnostics/eng/init-distro-rid.sh 2022-05-03 01:47:58.000000000 +0800 -+++ ./src/diagnostics/eng/init-distro-rid.sh.new 2022-06-09 16:13:49.331928410 +0800 -@@ -51,7 +51,7 @@ - # We have forced __PortableBuild=0. This is because -portablebuld - # has been passed as false. - if (( ${isPortable} == 0 )); then -- if [ "${ID}" == "rhel" ]; then -+ if [ "${ID}" == "rhel" ] || [ "${ID}" = "anolis" ]; then - # remove the last version digit - VERSION_ID=${VERSION_ID%.*} - fi ---- ./src/runtime/eng/native/init-distro-rid.sh 2022-05-03 01:46:20.000000000 +0800 -+++ ./src/runtime/eng/native/init-distro-rid.sh.new 2022-06-09 16:17:38.476897600 +0800 -@@ -41,7 +41,7 @@ - # We have forced __PortableBuild=0. This is because -portablebuld - # has been passed as false. - if (( isPortable == 0 )); then -- if [ "${ID}" = "rhel" ]; then -+ if [ "${ID}" = "rhel" ] || [ "${ID}" = "anolis" ]; then - # remove the last version digit - VERSION_ID="${VERSION_ID%.*}" - fi ---- ./src/deployment-tools/eng/native/init-distro-rid.sh 2022-06-09 16:26:06.117555652 +0800 -+++ ./src/deployment-tools/eng/native/init-distro-rid.sh.new 2022-06-09 16:25:45.862850985 +0800 -@@ -41,7 +41,7 @@ - # We have forced __PortableBuild=0. This is because -portablebuld - # has been passed as false. - if (( isPortable == 0 )); then -- if [ "${ID}" = "rhel" ]; then -+ if [ "${ID}" = "rhel" ] || [ "${ID}" = "anolis" ]; then - # remove the last version digit - VERSION_ID="${VERSION_ID%.*}" - fi ---- ./src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs 2022-05-03 01:46:49.000000000 +0800 -+++ ./src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs.new 2022-06-09 16:30:22.790485373 +0800 -@@ -220,7 +220,7 @@ - lastVersionNumberSeparatorIndex = distroInfo.VersionId.IndexOf('.', lastVersionNumberSeparatorIndex + 1); - } - -- if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine")) -+ if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine" || distroInfo.Id == "anolis")) - { - distroInfo.VersionId = distroInfo.VersionId.Substring(0, lastVersionNumberSeparatorIndex); - } ---- ./src/runtime/src/native/corehost/hostmisc/pal.unix.cpp 2022-05-03 01:46:23.000000000 +0800 -+++ ./src/runtime/src/native/corehost/hostmisc/pal.unix.cpp.new 2022-06-09 16:32:39.621245751 +0800 -@@ -679,6 +679,7 @@ - pal::string_t normalize_linux_rid(pal::string_t rid) - { - pal::string_t rhelPrefix(_X("rhel.")); -+ pal::string_t anolisPrefix(_X("anolis.")); - pal::string_t alpinePrefix(_X("alpine.")); - size_t lastVersionSeparatorIndex = std::string::npos; - -@@ -686,6 +687,10 @@ - { - lastVersionSeparatorIndex = rid.find(_X("."), rhelPrefix.length()); - } -+ else if (rid.compare(0, anolisPrefix.length(), anolisPrefix) == 0) -+ { -+ lastVersionSeparatorIndex = rid.find(_X("."), anolisPrefix.length()); -+ } - else if (rid.compare(0, alpinePrefix.length(), alpinePrefix) == 0) - { - size_t secondVersionSeparatorIndex = rid.find(_X("."), alpinePrefix.length()); -cs ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new ---- ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs 2022-05-03 01:48:00.000000000 +0800 -+++ ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new 2022-06-09 20:41:37.231172301 +0800 -@@ -131,7 +131,7 @@ - // Handle if VersionId is null by just setting the index to -1. - int minorVersionNumberSeparatorIndex = distroInfo.VersionId?.IndexOf('.') ?? -1; - -- if (distroInfo.Id == "rhel" && minorVersionNumberSeparatorIndex != -1) -+ if ((distroInfo.Id == "rhel" || distroInfo.Id == "anolis") && minorVersionNumberSeparatorIndex != -1) - { - distroInfo.VersionId = distroInfo.VersionId.Substring(0, minorVersionNumberSeparatorIndex); - } diff --git a/command-line-api-use-work-tree-with-git-apply.patch b/command-line-api-use-work-tree-with-git-apply.patch deleted file mode 100644 index 552d59d..0000000 --- a/command-line-api-use-work-tree-with-git-apply.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 7a752928ed3588246c4b296feb6cf4946f1b29b7 Mon Sep 17 00:00:00 2001 -From: Omair Majid -Date: Thu, 9 Sep 2021 12:11:39 -0400 -Subject: [PATCH] [ArPow] Use --work-tree with git apply - -This makes things work better in a source-tarball build, where there may -be a .git directory but it's for a different repo than command-line-api. ---- - eng/SourceBuild.props | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index 6cc85018..5e223747 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -15,7 +15,7 @@ - - - - --- -2.31.1 - diff --git a/dotnet6.0.spec b/dotnet6.0.spec index 3b8a86c..01c755e 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -1,6 +1,4 @@ %bcond_with bootstrap -%define anolis_os_version %(source /etc/os-release; echo ${VERSION}) -%define anolis_release .0.1 # Avoid provides/requires from private libraries %global privlibs libhostfxr @@ -22,10 +20,10 @@ # until that's done, disable LTO. This has to happen before setting the flags below. %define _lto_cflags %{nil} -%global host_version 6.0.7 -%global runtime_version 6.0.7 +%global host_version 6.0.8 +%global runtime_version 6.0.8 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 6.0.107 +%global sdk_version 6.0.108 %global sdk_feature_band_version %(echo %{sdk_version} | sed -e 's|[[:digit:]][[:digit:]]$|00|') %global templates_version %{runtime_version} #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -62,7 +60,7 @@ Name: dotnet6.0 Version: %{sdk_rpm_version} -Release: 1%{anolis_release}%{?dist} +Release: 1%{?dist} Summary: .NET Runtime and SDK License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib URL: https://github.com/dotnet/ @@ -92,19 +90,8 @@ Patch101: runtime-mono-remove-ilstrip.patch # https://github.com/dotnet/runtime/pull/66594 Patch102: runtime-66594-s390x-debuginfo.patch -# https://github.com/dotnet/command-line-api/pull/1401 -Patch300: command-line-api-use-work-tree-with-git-apply.patch - -# https://github.com/microsoft/vstest/pull/3046 -Patch400: vstest-use-work-tree-with-git-apply.patch - -# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied -Patch500: fsharp-use-work-tree-with-git-apply.patch # Disable apphost, needed for s390x -Patch501: fsharp-no-apphost.patch - -# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied -Patch600: xliff-tasks-use-work-tree-with-git-apply.patch +Patch500: fsharp-no-apphost.patch # Disable apphost, needed for s390x Patch700: arcade-no-apphost.patch @@ -132,8 +119,6 @@ Patch1501: sdk-22373-portablerid.patch # https://github.com/dotnet/installer/pull/12516 Patch1600: installer-12516-portablerid.patch -Patch2000: 2000-anolis-dotnet-add-distro.patch - %if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 x86_64 s390x %else @@ -417,17 +402,8 @@ pushd src/runtime %patch102 -p1 popd -pushd src/command-line-api -%patch300 -p1 -popd - -pushd src/vstest -%patch400 -p1 -popd - pushd src/fsharp %patch500 -p1 -%patch501 -p1 popd pushd src/arcade @@ -463,7 +439,6 @@ pushd src/installer %patch1600 -p1 popd -%patch2000 -p0 %if ! %{use_bundled_libunwind} sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime/eng/SourceBuild.props @@ -651,8 +626,9 @@ echo "Testing build results for debug symbols..." %changelog -* Tue Aug 09 2022 Liwei Ge - 6.0.107-1.0.1 -- Fix sdk suffix for Anolis OS +* Fri Jul 29 2022 Omair Majid - 6.0.108-1 +- Update to .NET SDK 6.0.108 and Runtime 6.0.8 +- Resolves: RHBZ#2112412 * Fri Jul 01 2022 Andrew Slice - 6.0.107-1 - Update to .NET SDK 6.0.107 and Runtime 6.0.7 diff --git a/download b/download index aa81a31..7b48c6a 100644 --- a/download +++ b/download @@ -1 +1 @@ -e68fab1931527431a990cf06be8534f5 dotnet-v6.0.107-SDK.tar.gz +a17d2981704272a7cfb43502aee069fd dotnet-v6.0.108-SDK.tar.gz diff --git a/fsharp-use-work-tree-with-git-apply.patch b/fsharp-use-work-tree-with-git-apply.patch deleted file mode 100644 index 810cf67..0000000 --- a/fsharp-use-work-tree-with-git-apply.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -15,7 +15,7 @@ - - - - diff --git a/vstest-use-work-tree-with-git-apply.patch b/vstest-use-work-tree-with-git-apply.patch deleted file mode 100644 index 58c139f..0000000 --- a/vstest-use-work-tree-with-git-apply.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b2c4b2427d8c1a2410c4210789caccf1ec87e64a Mon Sep 17 00:00:00 2001 -From: Omair Majid -Date: Thu, 9 Sep 2021 13:21:51 -0400 -Subject: [PATCH] [ArPow] Use --work-tree with git apply - -This makes things work better in a source-tarball build, where there may -be a .git directory somewhere in our parent directories but it's for a -different repo than vstest. In a situation like that a plain `git apply` -will (silently!) ignore patches because they wont apply to the unrelated -repository. That will (eventually) make the source-build fail. -`--work-tree` makes git directly use the directory that we care about. - -See https://github.com/dotnet/source-build/issues/2445 for more details. ---- - eng/SourceBuild.props | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index b365645c..68f82592 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -24,7 +24,7 @@ - - - - --- -2.31.1 - diff --git a/xliff-tasks-use-work-tree-with-git-apply.patch b/xliff-tasks-use-work-tree-with-git-apply.patch deleted file mode 100644 index 810cf67..0000000 --- a/xliff-tasks-use-work-tree-with-git-apply.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -15,7 +15,7 @@ - - - - -- Gitee From d606bd1c09813695f51f3fc0e33a6645b066aaea Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Mon, 14 Feb 2022 22:05:33 +0800 Subject: [PATCH 2/2] build: fix sdk suffix for Anolis OS also add RID for anolis Signed-off-by: Liwei Ge --- 2000-anolis-dotnet-add-distro.patch | 102 ++++++++++++++++++++++++++++ dotnet6.0.spec | 10 ++- 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 2000-anolis-dotnet-add-distro.patch diff --git a/2000-anolis-dotnet-add-distro.patch b/2000-anolis-dotnet-add-distro.patch new file mode 100644 index 0000000..8da3bd9 --- /dev/null +++ b/2000-anolis-dotnet-add-distro.patch @@ -0,0 +1,102 @@ +--- ./src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props 2021-10-03 23:24:08.000000000 +0800 ++++ ./src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props.new 2022-02-12 20:37:51.705404475 +0800 +@@ -55,6 +55,14 @@ + true + false + ++ ++ rhel ++ x64;arm64 ++ 8;9 ++ true ++ false ++ ++ + + + linux +@@ -278,6 +286,6 @@ + RuntimeJson="runtime.json" + CompatibilityMap="runtime.compatibility.json" + RuntimeDirectedGraph="$(OutputPath)runtime.json.dgml" +- UpdateRuntimeFiles="$(UpdateRuntimeFiles)" /> ++ UpdateRuntimeFiles="true" /> + + +--- ./src/diagnostics/eng/init-distro-rid.sh 2022-05-03 01:47:58.000000000 +0800 ++++ ./src/diagnostics/eng/init-distro-rid.sh.new 2022-06-09 16:13:49.331928410 +0800 +@@ -51,7 +51,7 @@ + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( ${isPortable} == 0 )); then +- if [ "${ID}" == "rhel" ]; then ++ if [ "${ID}" == "rhel" ] || [ "${ID}" = "anolis" ]; then + # remove the last version digit + VERSION_ID=${VERSION_ID%.*} + fi +--- ./src/runtime/eng/native/init-distro-rid.sh 2022-05-03 01:46:20.000000000 +0800 ++++ ./src/runtime/eng/native/init-distro-rid.sh.new 2022-06-09 16:17:38.476897600 +0800 +@@ -41,7 +41,7 @@ + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( isPortable == 0 )); then +- if [ "${ID}" = "rhel" ]; then ++ if [ "${ID}" = "rhel" ] || [ "${ID}" = "anolis" ]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi +--- ./src/deployment-tools/eng/native/init-distro-rid.sh 2022-06-09 16:26:06.117555652 +0800 ++++ ./src/deployment-tools/eng/native/init-distro-rid.sh.new 2022-06-09 16:25:45.862850985 +0800 +@@ -41,7 +41,7 @@ + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( isPortable == 0 )); then +- if [ "${ID}" = "rhel" ]; then ++ if [ "${ID}" = "rhel" ] || [ "${ID}" = "anolis" ]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi +--- ./src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs 2022-05-03 01:46:49.000000000 +0800 ++++ ./src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs.new 2022-06-09 16:30:22.790485373 +0800 +@@ -220,7 +220,7 @@ + lastVersionNumberSeparatorIndex = distroInfo.VersionId.IndexOf('.', lastVersionNumberSeparatorIndex + 1); + } + +- if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine")) ++ if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine" || distroInfo.Id == "anolis")) + { + distroInfo.VersionId = distroInfo.VersionId.Substring(0, lastVersionNumberSeparatorIndex); + } +--- ./src/runtime/src/native/corehost/hostmisc/pal.unix.cpp 2022-05-03 01:46:23.000000000 +0800 ++++ ./src/runtime/src/native/corehost/hostmisc/pal.unix.cpp.new 2022-06-09 16:32:39.621245751 +0800 +@@ -679,6 +679,7 @@ + pal::string_t normalize_linux_rid(pal::string_t rid) + { + pal::string_t rhelPrefix(_X("rhel.")); ++ pal::string_t anolisPrefix(_X("anolis.")); + pal::string_t alpinePrefix(_X("alpine.")); + size_t lastVersionSeparatorIndex = std::string::npos; + +@@ -686,6 +687,10 @@ + { + lastVersionSeparatorIndex = rid.find(_X("."), rhelPrefix.length()); + } ++ else if (rid.compare(0, anolisPrefix.length(), anolisPrefix) == 0) ++ { ++ lastVersionSeparatorIndex = rid.find(_X("."), anolisPrefix.length()); ++ } + else if (rid.compare(0, alpinePrefix.length(), alpinePrefix) == 0) + { + size_t secondVersionSeparatorIndex = rid.find(_X("."), alpinePrefix.length()); +cs ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new +--- ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs 2022-05-03 01:48:00.000000000 +0800 ++++ ./src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new 2022-06-09 20:41:37.231172301 +0800 +@@ -131,7 +131,7 @@ + // Handle if VersionId is null by just setting the index to -1. + int minorVersionNumberSeparatorIndex = distroInfo.VersionId?.IndexOf('.') ?? -1; + +- if (distroInfo.Id == "rhel" && minorVersionNumberSeparatorIndex != -1) ++ if ((distroInfo.Id == "rhel" || distroInfo.Id == "anolis") && minorVersionNumberSeparatorIndex != -1) + { + distroInfo.VersionId = distroInfo.VersionId.Substring(0, minorVersionNumberSeparatorIndex); + } diff --git a/dotnet6.0.spec b/dotnet6.0.spec index 01c755e..909ac47 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -1,4 +1,6 @@ %bcond_with bootstrap +%define anolis_os_version %(source /etc/os-release; echo ${VERSION}) +%define anolis_release .0.1 # Avoid provides/requires from private libraries %global privlibs libhostfxr @@ -60,7 +62,7 @@ Name: dotnet6.0 Version: %{sdk_rpm_version} -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: .NET Runtime and SDK License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib URL: https://github.com/dotnet/ @@ -119,6 +121,8 @@ Patch1501: sdk-22373-portablerid.patch # https://github.com/dotnet/installer/pull/12516 Patch1600: installer-12516-portablerid.patch +Patch2000: 2000-anolis-dotnet-add-distro.patch + %if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 x86_64 s390x %else @@ -439,6 +443,7 @@ pushd src/installer %patch1600 -p1 popd +%patch2000 -p0 %if ! %{use_bundled_libunwind} sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime/eng/SourceBuild.props @@ -626,6 +631,9 @@ echo "Testing build results for debug symbols..." %changelog +* Mon Aug 15 2022 Liwei Ge - 6.0.108-1.0.1 +- Fix sdk suffix for Anolis OS + * Fri Jul 29 2022 Omair Majid - 6.0.108-1 - Update to .NET SDK 6.0.108 and Runtime 6.0.8 - Resolves: RHBZ#2112412 -- Gitee