Add patch to work around TypeLoadException in Mono

Related: RHBZ#2224124
This commit is contained in:
Omair Majid 2023-08-22 17:20:50 -04:00
parent ebce1fb544
commit 79be3e7567
2 changed files with 32 additions and 3 deletions

View File

@ -54,7 +54,7 @@
Name: dotnet%{dotnetver}
Version: %{sdk_rpm_version}
Release: 0.1%{?dist}
Release: 0.2%{?dist}
Summary: .NET Runtime and SDK
License: 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
@ -87,9 +87,11 @@ Source20: check-debug-symbols.py
Source21: dotnet.sh.in
# Disable apphost; there's no net6.0 apphost for ppc64le
Patch1: roslyn-analyzers-ppc64le-apphost.patch
Patch1: roslyn-analyzers-ppc64le-apphost.patch
# https://github.com/dotnet/source-build/discussions/3481
Patch2: vstest-intent-net8.0.patch
Patch2: vstest-intent-net8.0.patch
# https://github.com/dotnet/source-build/issues/3571
Patch3: fix-mono-typeloadexception.patch
%if 0%{?fedora} || 0%{?rhel} >= 8
ExclusiveArch: aarch64 ppc64le s390x x86_64
@ -665,6 +667,10 @@ export COMPlus_LTTng=0
%changelog
* Tue Aug 22 2023 Omair Majid <omajid@redhat.com> - 8.0.100~preview.7-0.2
- Add patch to work around TypeLoadException in Mono
- Related: RHBZ#2224124
* Fri Aug 11 2023 Omair Majid <omajid@redhat.com> - 8.0.100~preview.7-0.1
- Update to .NET SDK 8.0.100 Preview 7 and Runtime 8.0.0 Preview 7

View File

@ -0,0 +1,23 @@
From 02f6303d86672997ec2e6b79b16d5ddbf52118a0 Mon Sep 17 00:00:00 2001
From: Tom Deseyn <tom.deseyn@gmail.com>
Date: Tue, 22 Aug 2023 14:52:36 +0200
Subject: [PATCH] Avoid loading System.Security.Permissions.
source-built Mono fails to load types from this assembly.
---
src/msbuild/src/Shared/ExceptionHandling.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/msbuild/src/Shared/ExceptionHandling.cs b/src/msbuild/src/Shared/ExceptionHandling.cs
index a7ef74e873..3dce645df1 100644
--- a/src/msbuild/src/Shared/ExceptionHandling.cs
+++ b/src/msbuild/src/Shared/ExceptionHandling.cs
@@ -167,7 +167,7 @@ internal static bool IsIoRelatedException(Exception e)
internal static bool IsXmlException(Exception e)
{
return e is XmlException
- || e is XmlSyntaxException
+ // || e is XmlSyntaxException
|| e is XmlSchemaException
|| e is UriFormatException; // XmlTextReader for example uses this under the covers
}