From a3cf82eef75a25c259511db792a4a1bda445421c Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Tue, 31 May 2022 10:22:40 +0800 Subject: [PATCH 1/2] update to dotnet5.0-5.0.214-1.el8_6 Signed-off-by: Zhao Hang --- 1000-dotnet-anolis-add-distro.patch | 91 ----------------------------- dotnet5.0.spec | 24 ++++---- download | 2 +- 3 files changed, 14 insertions(+), 103 deletions(-) delete mode 100644 1000-dotnet-anolis-add-distro.patch diff --git a/1000-dotnet-anolis-add-distro.patch b/1000-dotnet-anolis-add-distro.patch deleted file mode 100644 index 344982b..0000000 --- a/1000-dotnet-anolis-add-distro.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a.new/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props ---- dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2022-03-01 10:27:04.000000000 +0800 -+++ dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a.new/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2022-03-11 13:51:34.255987938 +0800 -@@ -25,6 +25,14 @@ - 21;22;23;24;25;26;27;28;29 - - -+ -+ rhel -+ x64;arm64 -+ 8 -+ true -+ false -+ -+ - - linux - x64 -@@ -249,6 +257,6 @@ - RuntimeJson="runtime.json" - CompatibilityMap="runtime.compatibility.json" - RuntimeDirectedGraph="$(PackageReportDir)$(Id)$(NuspecSuffix)-runtime.json.dgml" -- UpdateRuntimeFiles="$(UpdateRuntimeFiles)" /> -+ UpdateRuntimeFiles="true" /> - - ---- dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/eng/native/init-distro-rid.sh 2022-05-17 09:26:01.940587615 +0800 -+++ dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/eng/native/init-distro-rid.sh.new 2022-05-17 09:25:10.434811640 +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 ---- dotnet-v5.0.212-SDK/src/diagnostics.47296ca69bb66180c132f3b16667f904dfc7c6c7/eng/init-distro-rid.sh 2022-03-01 10:27:48.000000000 +0800 -+++ dotnet-v5.0.212-SDK/src/diagnostics.47296ca69bb66180c132f3b16667f904dfc7c6c7/eng/init-distro-rid.sh.new 2022-05-17 11:28:26.290612114 +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 ---- dotnet-v5.0.212-SDK/src/dotnet-sdk.983ff3c3e84516a257537c7f26c3e3d44b08afbe/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs 2022-03-01 10:27:31.000000000 +0800 -+++ dotnet-v5.0.212-SDK/src/dotnet-sdk.983ff3c3e84516a257537c7f26c3e3d44b08afbe/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs.new 2022-05-17 12:21:56.629862215 +0800 -@@ -211,7 +211,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); - } ---- dotnet-v5.0.212-SDK/src/arcade.6eec4404c2df5bfa46e5da52383c881c5cca3a9f/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs 2022-03-01 10:26:37.000000000 +0800 -+++ dotnet-v5.0.212-SDK/src/arcade.6eec4404c2df5bfa46e5da52383c881c5cca3a9f/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new 2022-05-17 12:36:21.524546024 +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); - } ---- dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/src/installer/corehost/cli/hostmisc/pal.unix.cpp 2022-05-17 14:17:31.131811793 +0800 -+++ dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a723115810b43c9b3a/src/installer/corehost/cli/hostmisc/pal.unix.cpp.new 2022-05-17 16:16:25.407854400 +0800 -@@ -652,6 +652,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; - -@@ -659,6 +660,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()); diff --git a/dotnet5.0.spec b/dotnet5.0.spec index c7c925c..4717220 100644 --- a/dotnet5.0.spec +++ b/dotnet5.0.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %bcond_with bootstrap # Avoid provides/requires from private libraries @@ -21,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 5.0.15 -%global runtime_version 5.0.15 +%global host_version 5.0.17 +%global runtime_version 5.0.17 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 5.0.212 +%global sdk_version 5.0.214 %global templates_version %{runtime_version} #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -57,7 +56,7 @@ Name: dotnet5.0 Version: %{sdk_rpm_version} -Release: 2%{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/ @@ -75,8 +74,6 @@ Patch100: runtime-62170-clang13.patch # Disable telemetry by default; make it opt-in Patch500: sdk-telemetry-optout.patch -Patch1000: 1000-dotnet-anolis-add-distro.patch - %if 0%{?fedora} > 32 || 0%{?rhel} > 8 ExclusiveArch: aarch64 x86_64 %else @@ -191,6 +188,8 @@ Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release} # libicu is dlopen()ed Requires: libicu%{?_isa} +# See src/runtime.*/src/libraries/Native/AnyOS/brotli-version.txt +Provides: bundled(brotli) = 1.0.9 %if %{use_bundled_libunwind} Provides: bundled(libunwind) = 1.3 %endif @@ -346,8 +345,6 @@ pushd src/dotnet-sdk.* %patch500 -p1 popd -%patch1000 -p1 - %ifnarch x86_64 mkdir -p artifacts/obj/%{runtime_arch}/Release cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props @@ -524,8 +521,13 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog -* Mon May 30 2022 - 5.0.212-2.0.1 -- Fix sdk suffix for Anolis OS +* Thu May 05 2022 Omair Majid - 5.0.214-1 +- Update to .NET SDK 5.0.214 and Runtime 5.0.17 +- Resolves: RHBZ#2082258 + +* Thu Apr 28 2022 Omair Majid - 5.0.213-2 +- Update to .NET SDK 5.0.213 and Runtime 5.0.16 +- Resolves: RHBZ#2080053 * Wed Mar 23 2022 Omair Majid - 5.0.212-2 - Update to .NET SDK 5.0.212 and Runtime 5.0.15 diff --git a/download b/download index 08b7269..6a071e6 100644 --- a/download +++ b/download @@ -1 +1 @@ -9c5d3fa8dd1b67afd08d67e3384ca6c9 dotnet-v5.0.212-SDK.tar.gz +8d2b5013bd32677d7f1a7aa4de7cff70 dotnet-v5.0.214-SDK.tar.gz -- Gitee From 39c160eb817b5bab7366ed1d14f8c91d4316ca96 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 17 May 2022 20:08:05 +0800 Subject: [PATCH 2/2] build: add anolis platform --- 1000-dotnet-anolis-add-distro.patch | 91 +++++++++++++++++++++++++++++ dotnet5.0.spec | 10 +++- 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 1000-dotnet-anolis-add-distro.patch diff --git a/1000-dotnet-anolis-add-distro.patch b/1000-dotnet-anolis-add-distro.patch new file mode 100644 index 0000000..2276109 --- /dev/null +++ b/1000-dotnet-anolis-add-distro.patch @@ -0,0 +1,91 @@ +diff -Nur dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e.new/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props +--- dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2022-03-01 10:27:04.000000000 +0800 ++++ dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e.new/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2022-03-11 13:51:34.255987938 +0800 +@@ -25,6 +25,14 @@ + 21;22;23;24;25;26;27;28;29 + + ++ ++ rhel ++ x64;arm64 ++ 8 ++ true ++ false ++ ++ + + linux + x64 +@@ -249,6 +257,6 @@ + RuntimeJson="runtime.json" + CompatibilityMap="runtime.compatibility.json" + RuntimeDirectedGraph="$(PackageReportDir)$(Id)$(NuspecSuffix)-runtime.json.dgml" +- UpdateRuntimeFiles="$(UpdateRuntimeFiles)" /> ++ UpdateRuntimeFiles="true" /> + + +--- dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/eng/native/init-distro-rid.sh 2022-05-17 09:26:01.940587615 +0800 ++++ dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/eng/native/init-distro-rid.sh.new 2022-05-17 09:25:10.434811640 +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 +--- dotnet-v5.0.214-SDK/src/diagnostics.47296ca69bb66180c132f3b16667f904dfc7c6c7/eng/init-distro-rid.sh 2022-03-01 10:27:48.000000000 +0800 ++++ dotnet-v5.0.214-SDK/src/diagnostics.47296ca69bb66180c132f3b16667f904dfc7c6c7/eng/init-distro-rid.sh.new 2022-05-17 11:28:26.290612114 +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 +--- dotnet-v5.0.214-SDK/src/dotnet-sdk.3fdf76c35026e311b7edc245d4b3d9e812fe532e/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs 2022-03-01 10:27:31.000000000 +0800 ++++ dotnet-v5.0.214-SDK/src/dotnet-sdk.3fdf76c35026e311b7edc245d4b3d9e812fe532e/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs.new 2022-05-17 12:21:56.629862215 +0800 +@@ -211,7 +211,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); + } +--- dotnet-v5.0.214-SDK/src/arcade.6eec4404c2df5bfa46e5da52383c881c5cca3a9f/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs 2022-03-01 10:26:37.000000000 +0800 ++++ dotnet-v5.0.214-SDK/src/arcade.6eec4404c2df5bfa46e5da52383c881c5cca3a9f/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs.new 2022-05-17 12:36:21.524546024 +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); + } +--- dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/src/installer/corehost/cli/hostmisc/pal.unix.cpp 2022-05-17 14:17:31.131811793 +0800 ++++ dotnet-v5.0.214-SDK/src/dotnet-runtime.6a984143635bde23e728abaaccbde52f5ea8fa3e/src/installer/corehost/cli/hostmisc/pal.unix.cpp.new 2022-05-17 16:16:25.407854400 +0800 +@@ -652,6 +652,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; + +@@ -659,6 +660,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()); diff --git a/dotnet5.0.spec b/dotnet5.0.spec index 4717220..d6f0927 100644 --- a/dotnet5.0.spec +++ b/dotnet5.0.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %bcond_with bootstrap # Avoid provides/requires from private libraries @@ -56,7 +57,7 @@ Name: dotnet5.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/ @@ -74,6 +75,8 @@ Patch100: runtime-62170-clang13.patch # Disable telemetry by default; make it opt-in Patch500: sdk-telemetry-optout.patch +Patch1000: 1000-dotnet-anolis-add-distro.patch + %if 0%{?fedora} > 32 || 0%{?rhel} > 8 ExclusiveArch: aarch64 x86_64 %else @@ -345,6 +348,8 @@ pushd src/dotnet-sdk.* %patch500 -p1 popd +%patch1000 -p1 + %ifnarch x86_64 mkdir -p artifacts/obj/%{runtime_arch}/Release cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props @@ -521,6 +526,9 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog +* Tue May 31 2022 - 5.0.214-1.0.1 +- Fix sdk suffix for Anolis OS + * Thu May 05 2022 Omair Majid - 5.0.214-1 - Update to .NET SDK 5.0.214 and Runtime 5.0.17 - Resolves: RHBZ#2082258 -- Gitee