diff --git a/1000-dotnet-anolis-add-distro.patch b/1000-dotnet-anolis-add-distro.patch
index 344982bc1ae803ac176adffa01fb11c8c8d1d6f3..2276109ac9d3a7a0a874d7ccccb0739c8f85ccf4 100644
--- a/1000-dotnet-anolis-add-distro.patch
+++ b/1000-dotnet-anolis-add-distro.patch
@@ -1,6 +1,6 @@
-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
+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
@@ -24,8 +24,8 @@ diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a72311581
+ 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
+--- 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.
@@ -35,8 +35,8 @@ diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a72311581
# 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
+--- 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.
@@ -46,8 +46,8 @@ diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a72311581
# 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
+--- 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);
}
@@ -57,8 +57,8 @@ diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a72311581
{
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
+--- 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;
@@ -68,8 +68,8 @@ diff -Nur dotnet-v5.0.212-SDK/src/dotnet-runtime.3065735be79d6b7d17e8e3a72311581
{
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
+--- 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)
{
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 2bbb5104068da419585c9c8dbe31bdf59a823b4c..334194c36232006fc571b79167885b0c2356d447 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -21,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 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 }')
@@ -70,6 +70,8 @@ Source2: dotnet.sh.in
Patch1: source-build-remove-test-references-from-patches.patch
+Patch100: runtime-62170-clang13.patch
+
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -189,6 +191,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
@@ -337,6 +341,7 @@ sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
%patch1 -p1
pushd src/dotnet-runtime.*
+%patch100 -p1
popd
pushd src/dotnet-sdk.*
@@ -521,36 +526,39 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0
%changelog
-* Fri Mar 11 2022 - 5.0.212-1.0.1
+* Mon May 30 2022 - 5.0.214-1.0.1
- Fix sdk suffix for Anolis OS
-* Thu Mar 03 2022 Omair Majid - 5.0.212-1
+* 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
-- Resolves: RHBZ#2060496
+- Resolves: RHBZ#2060495
-* Fri Jan 28 2022 Omair Majid - 5.0.211-1
+* Wed Mar 23 2022 Omair Majid - 5.0.211-1
- Update to .NET SDK 5.0.211 and Runtime 5.0.14
-- Resolves: RHBZ#2047767
+- Resolves: RHBZ#2047766
-* Thu Dec 09 2021 Omair Majid - 5.0.210-1
+* Wed Jan 05 2022 Omair Majid - 5.0.210-2
- Update to .NET SDK 5.0.210 and Runtime 5.0.13
-- Resolves: RHBZ#2030738
+- Resolves: RHBZ#2030737
-* Fri Nov 19 2021 Omair Majid - 5.0.209-1
-- Update to .NET SDK 5.0.209 and Runtime 5.0.12
-- Resolves: RHBZ#2024414
+* Thu Dec 02 2021 Omair Majid - 5.0.209-2
+- Bump release
+- Related: RHBZ#2011058
+- Related: RHBZ#2003078
-* Wed Oct 13 2021 Omair Majid - 5.0.208-2
-- Update to .NET SDK 5.0.208 and Runtime 5.0.11
-- Resolves: 2015936
-
-* Sun Oct 10 2021 Omair Majid - 5.0.207-3
-- Disable subpackages that will be provided by .NET 6 SRPM
-- Resolves: RHBZ#1986017
-
-* Fri Sep 24 2021 Omair Majid - 5.0.207-2
-- Update to .NET SDK 5.0.207 and Runtime 5.0.10
-- Resolves: RHBZ#2000319
+* Sun Nov 21 2021 Omair Majid - 5.0.209.1-1
+- Update to .NET SDK 5.0.209 and Runtime 5.0.12
+- Resolves: RHBZ#2024319
+- Resolves: RHBZ#2011058
+- Resolves: RHBZ#2003078
* Thu Aug 12 2021 Omair Majid - 5.0.206-1
- Update to .NET SDK 5.0.206 and Runtime 5.0.9
diff --git a/download b/download
index 08b726920428d1b5627a74412269757634ac43fd..6a071e6a3b609284d8e959f77b31c87baff76cce 100644
--- a/download
+++ b/download
@@ -1 +1 @@
-9c5d3fa8dd1b67afd08d67e3384ca6c9 dotnet-v5.0.212-SDK.tar.gz
+8d2b5013bd32677d7f1a7aa4de7cff70 dotnet-v5.0.214-SDK.tar.gz
diff --git a/runtime-62170-clang13.patch b/runtime-62170-clang13.patch
new file mode 100644
index 0000000000000000000000000000000000000000..5869a699f121de90db7d14b17ec2e8d77a10e284
--- /dev/null
+++ b/runtime-62170-clang13.patch
@@ -0,0 +1,79 @@
+From a89c562f9389fdc2bb1356d3da782d0063951e14 Mon Sep 17 00:00:00 2001
+From: Jan Vorlicek
+Date: Tue, 30 Nov 2021 10:55:21 +0100
+Subject: [PATCH] Fix clang 13 induced runtime issues (#62170)
+
+The clang 13 optimizer started to assume that "this" pointer is always
+properly aligned. That lead to elimination of some code that was actually
+needed.
+It also takes pointer aliasing rules more strictly in one place in jit.
+That caused the optimizer to falsely assume that a callee with an argument
+passed by reference is not modifying that argument and used a stale
+copy of the original value at the caller site.
+
+This change fixes both of the issues. With this fix, runtime compiled
+using clang 13 seems to be fully functional.
+---
+ src/coreclr/src/inc/corhlpr.h | 8 ++++----
+ src/coreclr/src/jit/bitsetasshortlong.h | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/coreclr/src/inc/corhlpr.h b/src/coreclr/src/inc/corhlpr.h
+index 450514da95c..427e8cdc0ff 100644
+--- a/src/coreclr/src/inc/corhlpr.h
++++ b/src/coreclr/src/inc/corhlpr.h
+@@ -336,7 +336,7 @@ struct COR_ILMETHOD_SECT
+ const COR_ILMETHOD_SECT* Next() const
+ {
+ if (!More()) return(0);
+- return ((COR_ILMETHOD_SECT*)(((BYTE *)this) + DataSize()))->Align();
++ return ((COR_ILMETHOD_SECT*)Align(((BYTE *)this) + DataSize()));
+ }
+
+ const BYTE* Data() const
+@@ -374,9 +374,9 @@ struct COR_ILMETHOD_SECT
+ return((AsSmall()->Kind & CorILMethod_Sect_FatFormat) != 0);
+ }
+
+- const COR_ILMETHOD_SECT* Align() const
++ static const void* Align(const void* p)
+ {
+- return((COR_ILMETHOD_SECT*) ((((UINT_PTR) this) + 3) & ~3));
++ return((void*) ((((UINT_PTR) p) + 3) & ~3));
+ }
+
+ protected:
+@@ -579,7 +579,7 @@ typedef struct tagCOR_ILMETHOD_FAT : IMAGE_COR_ILMETHOD_FAT
+
+ const COR_ILMETHOD_SECT* GetSect() const {
+ if (!More()) return (0);
+- return(((COR_ILMETHOD_SECT*) (GetCode() + GetCodeSize()))->Align());
++ return(((COR_ILMETHOD_SECT*) COR_ILMETHOD_SECT::Align(GetCode() + GetCodeSize())));
+ }
+ } COR_ILMETHOD_FAT;
+
+diff --git a/src/coreclr/src/jit/bitsetasshortlong.h b/src/coreclr/src/jit/bitsetasshortlong.h
+index 078cdc810e9..4c52819853f 100644
+--- a/src/coreclr/src/jit/bitsetasshortlong.h
++++ b/src/coreclr/src/jit/bitsetasshortlong.h
+@@ -345,7 +345,7 @@ public:
+ {
+ if (IsShort(env))
+ {
+- (size_t&)out = (size_t)out & ((size_t)gen | (size_t)in);
++ out = (BitSetShortLongRep)((size_t)out & ((size_t)gen | (size_t)in));
+ }
+ else
+ {
+@@ -361,7 +361,7 @@ public:
+ {
+ if (IsShort(env))
+ {
+- (size_t&)in = (size_t)use | ((size_t)out & ~(size_t)def);
++ in = (BitSetShortLongRep)((size_t)use | ((size_t)out & ~(size_t)def));
+ }
+ else
+ {
+--
+2.33.1
+