From 79be3e7567ff2be3c6e8fed4a5cbf27f62d99894 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Tue, 22 Aug 2023 17:20:50 -0400 Subject: [PATCH] Add patch to work around TypeLoadException in Mono Related: RHBZ#2224124 --- dotnet8.0.spec | 12 +++++++++--- fix-mono-typeloadexception.patch | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 fix-mono-typeloadexception.patch diff --git a/dotnet8.0.spec b/dotnet8.0.spec index f4cf52b..5657dec 100644 --- a/dotnet8.0.spec +++ b/dotnet8.0.spec @@ -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 - 8.0.100~preview.7-0.2 +- Add patch to work around TypeLoadException in Mono +- Related: RHBZ#2224124 + * Fri Aug 11 2023 Omair Majid - 8.0.100~preview.7-0.1 - Update to .NET SDK 8.0.100 Preview 7 and Runtime 8.0.0 Preview 7 diff --git a/fix-mono-typeloadexception.patch b/fix-mono-typeloadexception.patch new file mode 100644 index 0000000..08b0917 --- /dev/null +++ b/fix-mono-typeloadexception.patch @@ -0,0 +1,23 @@ +From 02f6303d86672997ec2e6b79b16d5ddbf52118a0 Mon Sep 17 00:00:00 2001 +From: Tom Deseyn +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 + }