From 21ebb41212677cb14ae1f049a100eca1d9d082cb Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Mon, 11 Dec 2023 11:08:29 +0800 Subject: [PATCH 1/3] update to dotnet6.0-6.0.125-1.src.rpm Signed-off-by: Zhao Hang --- 2000-anolis-dotnet-add-distro.patch | 103 ------------------ dist | 1 + dotnet6.0.spec | 160 +++++++++++++--------------- download | 2 +- 4 files changed, 76 insertions(+), 190 deletions(-) delete mode 100644 2000-anolis-dotnet-add-distro.patch create mode 100644 dist 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 new file mode 100644 index 0000000..37a6f9c --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8_9 diff --git a/dotnet6.0.spec b/dotnet6.0.spec index 7532039..a34a2db 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -1,6 +1,5 @@ -%bcond_with bootstrap -%define anolis_os_version %(source /etc/os-release; echo ${VERSION}) -%define anolis_release .0.1 +# CentOS Koji doesn't understand %%bootstrap +%bcond_with bootstrap_dotnet # Avoid provides/requires from private libraries %global privlibs libhostfxr @@ -22,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.24 -%global runtime_version 6.0.24 +%global host_version 6.0.25 +%global runtime_version 6.0.25 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 6.0.124 +%global sdk_version 6.0.125 %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,19 +61,20 @@ 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/ -%if %{with bootstrap} +%if %{with bootstrap_dotnet} +%global bootstrap_sdk_version 6.0.120 # The source is generated on a RHEL box via: # ./build-dotnet-tarball --bootstrap %%{upstream_tag} Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.xz # Generated via ./build-arm64-bootstrap-tarball -Source1: dotnet-arm64-prebuilts-2021-10-29.tar.gz +Source1: dotnet-prebuilts-%{bootstrap_sdk_version}-arm64.tar.gz # Generated manually, same pattern as the arm64 tarball -Source2: dotnet-s390x-prebuilts-2021-10-29.tar.gz +Source2: dotnet-prebuilts-%{bootstrap_sdk_version}-s390x.tar.gz %else # The source is generated on a RHEL box via: # ./build-dotnet-tarball %%{upstream_tag} @@ -87,7 +87,7 @@ Source11: dotnet.sh.in # Fix using lld on RHEL Patch100: runtime-arm64-lld-fix.patch -# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315 +# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315 Patch101: runtime-mono-remove-ilstrip.patch # Disable apphost, needed for s390x @@ -115,8 +115,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 @@ -126,7 +124,7 @@ ExclusiveArch: x86_64 BuildRequires: clang BuildRequires: cmake BuildRequires: coreutils -%if %{without bootstrap} +%if %{without bootstrap_dotnet} BuildRequires: dotnet-sdk-6.0 BuildRequires: dotnet-sdk-6.0-source-built-artifacts %endif @@ -336,7 +334,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 @@ -352,7 +350,7 @@ These are not meant for general use. %prep -%if %{without bootstrap} +%if %{without bootstrap_dotnet} %setup -q -n dotnet-%{upstream_tag} %else @@ -372,11 +370,28 @@ tar xf packages/prebuilt/dotnet-sdk*.tar.gz -C .dotnet/ rm packages/prebuilt/dotnet-sdk*.tar.gz boot_sdk_version=$(ls -1 .dotnet/sdk/) sed -i -E 's|"dotnet": "[^"]+"|"dotnet" : "'$boot_sdk_version'"|' global.json + +%ifarch ppc64le s390x +ilasm_version=$(ls packages/prebuilt| grep -i ilasm | tr 'A-Z' 'a-z' | sed -E 's|runtime.linux-'%{runtime_arch}'.microsoft.netcore.ilasm.||' | sed -E 's|.nupkg$||') +echo $ilasm_version + +mkdir -p packages-customized-local +pushd packages-customized-local +tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz +sed -i -E 's|[^<]+|'$ilasm_version'|' PackageVersions.props +sed -i -E 's|[^<]+|'$ilasm_version'|' PackageVersions.props +sed -i -E 's|[^<]+|'$ilasm_version'|' PackageVersions.props +sed -i -E 's|[^<]+|'$ilasm_version'|' PackageVersions.props +tar czf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz * +popd + %endif %endif -%if %{without bootstrap} +%endif + +%if %{without bootstrap_dotnet} # Remove all prebuilts find -iname '*.dll' -type f -delete find -iname '*.so' -type f -delete @@ -434,7 +449,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 @@ -443,7 +457,7 @@ sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_L %build cat /etc/os-release -%if %{without bootstrap} +%if %{without bootstrap_dotnet} # We need to create a copy because we will mutate this cp -a %{_libdir}/dotnet previously-built-dotnet %endif @@ -485,7 +499,7 @@ export EXTRA_CXXFLAGS="$CXXFLAGS" export EXTRA_LDFLAGS="$LDFLAGS" VERBOSE=1 ./build.sh \ -%if %{without bootstrap} +%if %{without bootstrap_dotnet} --with-sdk previously-built-dotnet \ %endif -- \ @@ -531,32 +545,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/ @@ -577,30 +591,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 @@ -635,49 +631,41 @@ echo "Testing build results for debug symbols..." %changelog -* Thu Nov 02 2023 Liwei Ge - 6.0.124-1.0.1 -- Fix sdk suffix for Anolis OS -- Update netstandard-targeting-pack-2.1 acquisition method (Zhao Hang) +* Thu Nov 02 2023 Omair Majid - 6.0.125-1 +- Update to .NET SDK 6.0.125 and Runtime 6.0.25 +- Resolves: RHEL-15360 -* Mon Oct 23 2023 Omair Majid - 6.0.124-1 +* Tue Oct 24 2023 Omair Majid - 6.0.124-2 - Update to .NET SDK 6.0.124 and Runtime 6.0.24 -- Resolves: RHEL-14465 +- Resolves: RHEL-14466 -* Wed Oct 04 2023 Omair Majid - 6.0.123-1 +* Mon Oct 16 2023 Omair Majid - 6.0.123-2 - Update to .NET SDK 6.0.123 and Runtime 6.0.23 -- Resolves: RHEL-11694 +- Resolves: RHEL-11696 -* Fri Sep 01 2023 Omair Majid - 6.0.122-1 +* Tue Sep 12 2023 Omair Majid - 6.0.122-2 - Update to .NET SDK 6.0.122 and Runtime 6.0.22 -- Resolves: RHEL-2012 +- Resolves: RHEL-1996 + +* Thu Aug 24 2023 Omair Majid - 6.0.121-4 +- Disable bootstrap +- Related: RHBZ#2228566 + +* Wed Aug 23 2023 Omair Majid - 6.0.121-3 +- Rebootstrap +- Related: RHBZ#2228566 -* Wed Aug 02 2023 Omair Majid - 6.0.121-1 +* Wed Aug 09 2023 Omair Majid - 6.0.121-2 - Update to .NET SDK 6.0.121 and Runtime 6.0.21 -- Resolves: RHBZ#2228568 +- Resolves: RHBZ#2228566 -* Tue Jul 04 2023 Omair Majid - 6.0.120-1 +* Tue Jul 11 2023 Omair Majid - 6.0.120-2 - Update to .NET SDK 6.0.120 and Runtime 6.0.20 -- Resolves: RHBZ#2219639 +- Resolves: RHBZ#2219636 -* Tue Jun 20 2023 Omair Majid - 6.0.119-1 +* Thu Jul 06 2023 Omair Majid - 6.0.119-2 - 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 -- Resolves: RHBZ#2212378 - -* Thu May 04 2023 Omair Majid - 6.0.117-2 -- Update to .NET SDK 6.0.117 and Runtime 6.0.17 -- Resolves: RHBZ#2190262 - -* Wed Apr 12 2023 Omair Majid - 6.0.116-2 -- Update to .NET SDK 6.0.116 and Runtime 6.0.16 -- Resolves: RHBZ#2183580 - -* Wed Mar 15 2023 Omair Majid - 6.0.115-2 -- Update to .NET SDK 6.0.115 and Runtime 6.0.15 -- Resolves: RHBZ#2174980 +- Resolves: RHBZ#2216218 * Thu Feb 16 2023 Omair Majid - 6.0.114-2 - Update to .NET SDK 6.0.114 and Runtime 6.0.14 diff --git a/download b/download index 855ac3b..6d60f76 100644 --- a/download +++ b/download @@ -1 +1 @@ -47a486aa0aaf369dc632b8a2d20fa4e5 dotnet-v6.0.124.tar.gz +32a42603ca57637caf365350f7db3a93 dotnet-v6.0.125.tar.gz -- Gitee From 174917312e76dc870688faa0e94db5c6305d2e34 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 a34a2db..0e132c3 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/ @@ -115,6 +117,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 @@ -449,6 +453,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 @@ -631,6 +636,9 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog +* Mon Dec 11 2023 Liwei Ge - 6.0.125-1.0.1 +- Fix sdk suffix for Anolis OS + * Thu Nov 02 2023 Omair Majid - 6.0.125-1 - Update to .NET SDK 6.0.125 and Runtime 6.0.25 - Resolves: RHEL-15360 -- Gitee From 807c3259760278ce7c297d5c71c7c0c1733b18f2 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 0e132c3..802067d 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -338,7 +338,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 @@ -550,32 +550,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/ @@ -596,12 +596,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 @@ -638,6 +656,7 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog * Mon Dec 11 2023 Liwei Ge - 6.0.125-1.0.1 - Fix sdk suffix for Anolis OS +- Update netstandard-targeting-pack-2.1 acquisition method (Zhao Hang) * Thu Nov 02 2023 Omair Majid - 6.0.125-1 - Update to .NET SDK 6.0.125 and Runtime 6.0.25 -- Gitee