From 20cfeff35d1aba9c69655e86c1d0090da13ffede Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Mon, 24 Jul 2023 11:06:11 +0800 Subject: [PATCH 1/2] update to dotnet6.0-6.0.120-1 Signed-off-by: Zhao Hang --- 2000-anolis-dotnet-add-distro.patch | 103 ---------------------------- dotnet6.0.spec | 22 +++--- download | 2 +- 3 files changed, 12 insertions(+), 115 deletions(-) delete mode 100644 2000-anolis-dotnet-add-distro.patch diff --git a/2000-anolis-dotnet-add-distro.patch b/2000-anolis-dotnet-add-distro.patch deleted file mode 100644 index 59ebd93..0000000 --- a/2000-anolis-dotnet-add-distro.patch +++ /dev/null @@ -1,103 +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" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then -+ if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]] || [ "${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,7 +679,8 @@ - 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.")); - pal::string_t rockyPrefix(_X("rocky.")); - 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 ca2f5df..41b5715 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.18 -%global runtime_version 6.0.18 +%global host_version 6.0.20 +%global runtime_version 6.0.20 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 6.0.118 +%global sdk_version 6.0.120 %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/ @@ -115,8 +113,6 @@ Patch1001: msbuild-no-systemconfiguration.patch Patch1500: sdk-telemetry-optout.patch -Patch2000: 2000-anolis-dotnet-add-distro.patch - %if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 x86_64 s390x %else @@ -434,7 +430,6 @@ popd pushd src/installer 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 @@ -617,8 +612,13 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog -* Thu Jun 15 2023 Liwei Ge - 6.0.118-1.0.1 -- Fix sdk suffix for Anolis OS +* Tue Jul 04 2023 Omair Majid - 6.0.120-1 +- Update to .NET SDK 6.0.120 and Runtime 6.0.20 +- Resolves: RHBZ#2219639 + +* Tue Jun 20 2023 Omair Majid - 6.0.119-1 +- Update to .NET SDK 6.0.119 and Runtime 6.0.19 +- Resolves: RHBZ#2216221 * Thu Jun 01 2023 Andrew Slice - 6.0.118-1 - Update to .NET SDK 6.0.118 and Runtime 6.0.18 diff --git a/download b/download index bf88f0c..325d81a 100644 --- a/download +++ b/download @@ -1 +1 @@ -8e66a275a25f6094c9a8d50bec1330d5 dotnet-v6.0.118.tar.gz +f356418034031aea30ff8405d8689cb2 dotnet-v6.0.120.tar.gz -- Gitee From 0cbb5f7caf6f373c3cae7b73702e3fc288938e47 Mon Sep 17 00:00:00 2001 From: qhw01063182 Date: Fri, 16 Sep 2022 15:09:40 +0800 Subject: [PATCH 2/2] build: fix sdk suffix for Anolis OS --- 2000-anolis-dotnet-add-distro.patch | 103 ++++++++++++++++++++++++++++ dotnet6.0.spec | 10 ++- 2 files changed, 112 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..59ebd93 --- /dev/null +++ b/2000-anolis-dotnet-add-distro.patch @@ -0,0 +1,103 @@ +--- ./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" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then ++ if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]] || [ "${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,7 +679,8 @@ + 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.")); + pal::string_t rockyPrefix(_X("rocky.")); + 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 41b5715..533aed1 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/ @@ -113,6 +115,8 @@ Patch1001: msbuild-no-systemconfiguration.patch Patch1500: sdk-telemetry-optout.patch +Patch2000: 2000-anolis-dotnet-add-distro.patch + %if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 x86_64 s390x %else @@ -430,6 +434,7 @@ popd pushd src/installer 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 @@ -612,6 +617,9 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog +* Mon Jul 24 2023 Liwei Ge - 6.0.120-1.0.1 +- Fix sdk suffix for Anolis OS + * Tue Jul 04 2023 Omair Majid - 6.0.120-1 - Update to .NET SDK 6.0.120 and Runtime 6.0.20 - Resolves: RHBZ#2219639 -- Gitee