From 77223615f90f8bdeb009e3e9277b1f33c8dda785 Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Wed, 31 Jul 2024 13:28:51 +0800 Subject: [PATCH 1/3] update to 6.0.132-1 Signed-off-by: Bo Ren --- 2000-anolis-dotnet-add-distro.patch | 103 --------------------- dist | 2 +- dotnet6.0.spec | 93 +++++++------------ download | 2 +- runtime-re-enable-implicit-rejection.patch | 27 ------ 5 files changed, 37 insertions(+), 190 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/dist b/dist index 37a6f9c..1fe92cf 100644 --- a/dist +++ b/dist @@ -1 +1 @@ -an8_9 +an8_10 diff --git a/dotnet6.0.spec b/dotnet6.0.spec index 51cc10d..3cacd43 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -1,7 +1,5 @@ # CentOS Koji doesn't understand %%bootstrap %bcond_with bootstrap_dotnet -%define anolis_os_version %(source /etc/os-release; echo ${VERSION}) -%define anolis_release .0.1 # Avoid provides/requires from private libraries %global privlibs libhostfxr @@ -23,10 +21,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.29 -%global runtime_version 6.0.29 +%global host_version 6.0.32 +%global runtime_version 6.0.32 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 6.0.129 +%global sdk_version 6.0.132 %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 }') @@ -63,7 +61,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/ @@ -119,8 +117,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 @@ -340,7 +336,7 @@ applications using the .NET SDK. %dotnet_targeting_pack dotnet-apphost-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Host.%{runtime_id} %dotnet_targeting_pack dotnet-targeting-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Ref %dotnet_targeting_pack aspnetcore-targeting-pack-6.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 6.0 Microsoft.AspNetCore.App.Ref -%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref +#%%dotnet_targeting_pack netstandard-targeting-pack-2.1 %%{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref %package -n dotnet-sdk-6.0-source-built-artifacts @@ -456,7 +452,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 @@ -553,32 +548,32 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \; find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \; # Provided by dotnet-host from another SRPM -install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/ -install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/ +#install -dm 0755 %%{buildroot}%%{_sysconfdir}/profile.d/ +#install dotnet.sh %%{buildroot}%%{_sysconfdir}/profile.d/ # Provided by dotnet-host from another SRPM -install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions +#install -dm 0755 %%{buildroot}/%%{_datadir}/bash-completion/completions # dynamic completion needs the file to be named the same as the base command -install src/sdk/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet +#install src/sdk/scripts/register-completions.bash %%{buildroot}/%%{_datadir}/bash-completion/completions/dotnet # TODO: the zsh completion script needs to be ported to use #compdef #install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions #install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet # Provided by dotnet-host from another SRPM -install -dm 0755 %{buildroot}%{_bindir} -ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/ +#install -dm 0755 %%{buildroot}%%{_bindir} +#ln -s ../../%%{_libdir}/dotnet/dotnet %%{buildroot}%%{_bindir}/ # Provided by dotnet-host from another SRPM -install -dm 0755 %{buildroot}%{_mandir}/man1/ -find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \; +#install -dm 0755 %%{buildroot}%%{_mandir}/man1/ +#find -iname 'dotnet*.1' -type f -exec cp {} %%{buildroot}%%{_mandir}/man1/ \; # Provided by dotnet-host from another SRPM -install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet -echo "%{_libdir}/dotnet" >> install_location -install install_location %{buildroot}%{_sysconfdir}/dotnet/ -echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch} -install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/ +#install -dm 0755 %%{buildroot}%%{_sysconfdir}/dotnet +#echo "%%{_libdir}/dotnet" >> install_location +#install install_location %%{buildroot}%%{_sysconfdir}/dotnet/ +#echo "%%{_libdir}/dotnet" >> install_location_%%{runtime_arch} +#install install_location_%%{runtime_arch} %%{buildroot}%%{_sysconfdir}/dotnet/ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/ @@ -599,30 +594,12 @@ echo "Testing build results for debug symbols..." %{buildroot}%{_libdir}/dotnet/dotnet --version # Provided by dotnet-host from another SRPM -#rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt -#rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt -#rm %{buildroot}%{_libdir}/dotnet/dotnet +rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt +rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt +rm %{buildroot}%{_libdir}/dotnet/dotnet # Provided by netstandard-targeting-pack-2.1 from another SRPM -#rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 - -%files -n dotnet -# empty package useful for dependencies - -%files -n dotnet-host -%dir %{_libdir}/dotnet -%{_libdir}/dotnet/dotnet -%dir %{_libdir}/dotnet/host -%dir %{_libdir}/dotnet/host/fxr -%{_bindir}/dotnet -%license %{_libdir}/dotnet/LICENSE.txt -%license %{_libdir}/dotnet/ThirdPartyNotices.txt -%doc %{_mandir}/man1/dotnet*.1.gz -%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh -%config(noreplace) %{_sysconfdir}/dotnet -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/dotnet +rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %files -n dotnet-hostfxr-6.0 @@ -657,29 +634,29 @@ echo "Testing build results for debug symbols..." %changelog -* Wed Apr 17 2024 Liwei Ge - 6.0.129-1.0.1 -- Fix sdk suffix for Anolis OS -- Update netstandard-targeting-pack-2.1 acquisition method (Zhao Hang) +* Thu Jun 27 2024 Omair Majid - 6.0.132-1 +- Update to .NET SDK 6.0.132 and Runtime 6.0.32 +- Resolves: RHEL-45319 -* Tue Apr 02 2024 Omair Majid - 6.0.129-1 +* Tue Apr 09 2024 Omair Majid - 6.0.129-2 - Update to .NET SDK 6.0.129 and Runtime 6.0.29 -- Resolves: RHEL-31196 +- Resolves: RHEL-31194 -* Thu Feb 29 2024 Omair Majid - 6.0.128-1 +* Tue Mar 19 2024 Omair Majid - 6.0.128-2 - Update to .NET SDK 6.0.128 and Runtime 6.0.28 -- Resolves: RHEL-27538 +- Resolves: RHEL-27539 -* Thu Feb 01 2024 Omair Majid - 6.0.127-1 +* Wed Feb 14 2024 Omair Majid - 6.0.127-2 - Update to .NET SDK 6.0.127 and Runtime 6.0.27 -- Resolves: RHEL-23786 +- Resolves: RHEL-23784 -* Wed Dec 20 2023 Omair Majid - 6.0.126-1 +* Mon Jan 15 2024 Omair Majid - 6.0.126-2 - Update to .NET SDK 6.0.126 and Runtime 6.0.26 -- Resolves: RHEL-19804 +- Resolves: RHEL-19798 -* Thu Nov 02 2023 Omair Majid - 6.0.125-1 +* Mon Dec 11 2023 Omair Majid - 6.0.125-2 - Update to .NET SDK 6.0.125 and Runtime 6.0.25 -- Resolves: RHEL-15360 +- Resolves: RHEL-15348 * Tue Oct 24 2023 Omair Majid - 6.0.124-2 - Update to .NET SDK 6.0.124 and Runtime 6.0.24 diff --git a/download b/download index 7253bff..b5ae106 100644 --- a/download +++ b/download @@ -1 +1 @@ -1568e87b39e88e29691f18d4c1219b62 dotnet-v6.0.129.tar.gz +0dfec067b54749217e63ac84c15d1b98 dotnet-v6.0.132.tar.gz diff --git a/runtime-re-enable-implicit-rejection.patch b/runtime-re-enable-implicit-rejection.patch index 0455ad0..3e96a1e 100644 --- a/runtime-re-enable-implicit-rejection.patch +++ b/runtime-re-enable-implicit-rejection.patch @@ -47,33 +47,6 @@ index 55a044d62a6..e72d42e87d2 100644 using (RSA rsa = RSAFactory.Create(TestData.RSA2048Params)) { void RoundtripEmpty(RSAEncryptionPadding paddingMode) -@@ -692,26 +701,6 @@ public void NotSupportedValueMethods() - } - } - -- [ConditionalTheory] -- [InlineData(new byte[] { 1, 2, 3, 4 })] -- [InlineData(new byte[0])] -- public void Decrypt_Pkcs1_ErrorsForInvalidPadding(byte[] data) -- { -- if (data.Length == 0 && !PlatformSupportsEmptyRSAEncryption) -- { -- throw new SkipTestException("Platform does not support RSA encryption of empty data."); -- } -- -- using (RSA rsa = RSAFactory.Create(TestData.RSA2048Params)) -- { -- byte[] encrypted = Encrypt(rsa, data, RSAEncryptionPadding.Pkcs1); -- encrypted[1] ^= 0xFF; -- -- // PKCS#1, the data, and the key are all deterministic so this should always throw an exception. -- Assert.ThrowsAny(() => Decrypt(rsa, encrypted, RSAEncryptionPadding.Pkcs1)); -- } -- } -- - [Fact] - public void Decrypt_Pkcs1_BadPadding() - { @@ -726,23 +715,5 @@ public static IEnumerable OaepPaddingModes } } -- Gitee From 8a7f050db1faa31be44221241ac23f55643400ca Mon Sep 17 00:00:00 2001 From: qhw01063182 Date: Fri, 16 Sep 2022 15:09:40 +0800 Subject: [PATCH 2/3] 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 3cacd43..b9f3cc7 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -1,5 +1,7 @@ # CentOS Koji doesn't understand %%bootstrap %bcond_with bootstrap_dotnet +%define anolis_os_version %(source /etc/os-release; echo ${VERSION}) +%define anolis_release .0.1 # Avoid provides/requires from private libraries %global privlibs libhostfxr @@ -61,7 +63,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/ @@ -117,6 +119,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 @@ -452,6 +456,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 @@ -634,6 +639,9 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog +* Wed Jul 31 2024 Liwei Ge - 6.0.132-1.0.1 +- Fix sdk suffix for Anolis OS + * Thu Jun 27 2024 Omair Majid - 6.0.132-1 - Update to .NET SDK 6.0.132 and Runtime 6.0.32 - Resolves: RHEL-45319 -- Gitee From 6f2a6d69c5f51733d815997e7a21b34b17f735f1 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Wed, 15 Feb 2023 15:23:11 +0800 Subject: [PATCH 3/3] spec: update netstandard-targeting-pack-2.1 acquisition method Signed-off-by: Zhao Hang --- dotnet6.0.spec | 55 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/dotnet6.0.spec b/dotnet6.0.spec index b9f3cc7..7a78bc9 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -340,7 +340,7 @@ applications using the .NET SDK. %dotnet_targeting_pack dotnet-apphost-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Host.%{runtime_id} %dotnet_targeting_pack dotnet-targeting-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Ref %dotnet_targeting_pack aspnetcore-targeting-pack-6.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 6.0 Microsoft.AspNetCore.App.Ref -#%%dotnet_targeting_pack netstandard-targeting-pack-2.1 %%{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref +%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref %package -n dotnet-sdk-6.0-source-built-artifacts @@ -553,32 +553,32 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \; find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \; # Provided by dotnet-host from another SRPM -#install -dm 0755 %%{buildroot}%%{_sysconfdir}/profile.d/ -#install dotnet.sh %%{buildroot}%%{_sysconfdir}/profile.d/ +install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/ +install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/ # Provided by dotnet-host from another SRPM -#install -dm 0755 %%{buildroot}/%%{_datadir}/bash-completion/completions +install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions # dynamic completion needs the file to be named the same as the base command -#install src/sdk/scripts/register-completions.bash %%{buildroot}/%%{_datadir}/bash-completion/completions/dotnet +install src/sdk/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet # TODO: the zsh completion script needs to be ported to use #compdef #install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions #install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet # Provided by dotnet-host from another SRPM -#install -dm 0755 %%{buildroot}%%{_bindir} -#ln -s ../../%%{_libdir}/dotnet/dotnet %%{buildroot}%%{_bindir}/ +install -dm 0755 %{buildroot}%{_bindir} +ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/ # Provided by dotnet-host from another SRPM -#install -dm 0755 %%{buildroot}%%{_mandir}/man1/ -#find -iname 'dotnet*.1' -type f -exec cp {} %%{buildroot}%%{_mandir}/man1/ \; +install -dm 0755 %{buildroot}%{_mandir}/man1/ +find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \; # Provided by dotnet-host from another SRPM -#install -dm 0755 %%{buildroot}%%{_sysconfdir}/dotnet -#echo "%%{_libdir}/dotnet" >> install_location -#install install_location %%{buildroot}%%{_sysconfdir}/dotnet/ -#echo "%%{_libdir}/dotnet" >> install_location_%%{runtime_arch} -#install install_location_%%{runtime_arch} %%{buildroot}%%{_sysconfdir}/dotnet/ +install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet +echo "%{_libdir}/dotnet" >> install_location +install install_location %{buildroot}%{_sysconfdir}/dotnet/ +echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch} +install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/ @@ -599,12 +599,30 @@ echo "Testing build results for debug symbols..." %{buildroot}%{_libdir}/dotnet/dotnet --version # Provided by dotnet-host from another SRPM -rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt -rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt -rm %{buildroot}%{_libdir}/dotnet/dotnet +#rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt +#rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt +#rm %{buildroot}%{_libdir}/dotnet/dotnet # Provided by netstandard-targeting-pack-2.1 from another SRPM -rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 +#rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 + +%files -n dotnet +# empty package useful for dependencies + +%files -n dotnet-host +%dir %{_libdir}/dotnet +%{_libdir}/dotnet/dotnet +%dir %{_libdir}/dotnet/host +%dir %{_libdir}/dotnet/host/fxr +%{_bindir}/dotnet +%license %{_libdir}/dotnet/LICENSE.txt +%license %{_libdir}/dotnet/ThirdPartyNotices.txt +%doc %{_mandir}/man1/dotnet*.1.gz +%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh +%config(noreplace) %{_sysconfdir}/dotnet +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/dotnet %files -n dotnet-hostfxr-6.0 @@ -641,6 +659,7 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog * Wed Jul 31 2024 Liwei Ge - 6.0.132-1.0.1 - Fix sdk suffix for Anolis OS +- Update netstandard-targeting-pack-2.1 acquisition method (Zhao Hang) * Thu Jun 27 2024 Omair Majid - 6.0.132-1 - Update to .NET SDK 6.0.132 and Runtime 6.0.32 -- Gitee