From dae1b71eec26e45890adbc5b02f803fbeb9ec855 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 22 Feb 2021 22:15:46 +0100 Subject: [PATCH 1/3] backport patch: fix early return in Process.Start (#1839410) --- mono-6.12.0-fix-process-start.patch | 42 +++++++++++++++++++++++++++++ mono.spec | 8 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 mono-6.12.0-fix-process-start.patch diff --git a/mono-6.12.0-fix-process-start.patch b/mono-6.12.0-fix-process-start.patch new file mode 100644 index 0000000..4b9e02c --- /dev/null +++ b/mono-6.12.0-fix-process-start.patch @@ -0,0 +1,42 @@ +From 325577feffad1f87b07d92710c0d37c79c5f50a1 Mon Sep 17 00:00:00 2001 +From: Ryan Lucia +Date: Thu, 4 Feb 2021 08:55:48 -0500 +Subject: [PATCH] Fix early return in Process.Start + +--- + mono/metadata/w32process-unix.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/mono/metadata/w32process-unix.c b/mono/metadata/w32process-unix.c +index 663cc6ff5111..d030101aede6 100644 +--- a/mono/metadata/w32process-unix.c ++++ b/mono/metadata/w32process-unix.c +@@ -2032,6 +2032,9 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + + static char *handler; + static gunichar2 *handler_utf16; ++#ifndef HOST_DARWIN ++ gboolean finished = FALSE; ++#endif + + if (handler_utf16 == (gunichar2 *)-1) { + ret = FALSE; +@@ -2057,6 +2060,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + if (handler == NULL){ + handler_utf16 = (gunichar2 *) -1; + ret = FALSE; ++ finished = TRUE; + } else { + /* kfmclient needs exec argument */ + char *old = handler; +@@ -2067,9 +2071,8 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + } + } + MONO_EXIT_GC_SAFE; +- if (ret == FALSE){ ++ if (finished) + goto done; +- } + #endif + handler_utf16 = g_utf8_to_utf16 (handler, -1, NULL, NULL, NULL); + g_free (handler); diff --git a/mono.spec b/mono.spec index 7d787ec..340ae47 100644 --- a/mono.spec +++ b/mono.spec @@ -24,7 +24,7 @@ %global xamarinrelease 107 Name: mono Version: 6.12.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cross-platform, Open Source, .NET development framework License: MIT @@ -58,6 +58,8 @@ Patch11: 0001-Replace-new-Csharp-features-with-old-ones.patch Patch12: 0001-Reenable-mdoc.exe-build.patch # fix issue with conflicts between i686 and x86_64 package (#1853724) Patch13: mono-6.6.0-fix-multi-arch-issue.patch +# fix issue with process start (#1839410) +Patch14: mono-6.12.0-fix-process-start.patch BuildRequires: make BuildRequires: bison @@ -349,6 +351,7 @@ pushd external/api-doc-tools popd %patch12 -p1 %patch13 -p1 +%patch14 -p1 # don't build mono-helix-client which requires the helix-binaries to build sed -i 's|mono-helix-client||g' mcs/tools/Makefile @@ -941,6 +944,9 @@ cert-sync /etc/pki/tls/certs/ca-bundle.crt %files complete %changelog +* Mon Feb 22 2021 Timotheus Pokorra - 6.12.0-3 +- backport patch: fix early return in Process.Start (#1839410) + * Tue Jan 26 2021 Fedora Release Engineering - 6.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 5bdd34efa54ad5917cbc48768d797e2f9488b3e7 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 27 Feb 2021 18:05:17 +0100 Subject: [PATCH 2/3] Upgrade to Mono 6.12.0.122 --- mono.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mono.spec b/mono.spec index 340ae47..8b37b08 100644 --- a/mono.spec +++ b/mono.spec @@ -21,10 +21,10 @@ %undefine _missing_build_ids_terminate_build %endif -%global xamarinrelease 107 +%global xamarinrelease 122 Name: mono Version: 6.12.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Cross-platform, Open Source, .NET development framework License: MIT @@ -944,6 +944,9 @@ cert-sync /etc/pki/tls/certs/ca-bundle.crt %files complete %changelog +* Sat Feb 27 2021 Timotheus Pokorra - 6.12.0-4 +- Upgrade to Mono 6.12.0.122 + * Mon Feb 22 2021 Timotheus Pokorra - 6.12.0-3 - backport patch: fix early return in Process.Start (#1839410) diff --git a/sources b/sources index 79a23db..bc8dc61 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mono-6.12.0.107.tar.xz) = 567cd37847bd5a0bf78df8a3ada2ed2cfb10e466fffb5aadc3d145751552720bdd1fc2a734fba142b91f2e221f42b6717d6eb3f7c8823cbec3d458b10712d7ea +SHA512 (mono-6.12.0.122.tar.xz) = 0fbd4147498cc81e384933147eb6aa5c559d17a794a308af7ffa43dce51e0faefde24fc75e987ed804dcb161b52756944bc3611100fc0a4adcc260ca97ddaecd From c35112f0d4dff13fab3fa03761a2f07aa08203a9 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Sat, 27 Feb 2021 18:18:31 +0100 Subject: [PATCH 3/3] drop mono-6.12.0-fix-process-start.patch because it is already part of mono-6.12.0.122 --- mono-6.12.0-fix-process-start.patch | 42 ----------------------------- mono.spec | 3 --- 2 files changed, 45 deletions(-) delete mode 100644 mono-6.12.0-fix-process-start.patch diff --git a/mono-6.12.0-fix-process-start.patch b/mono-6.12.0-fix-process-start.patch deleted file mode 100644 index 4b9e02c..0000000 --- a/mono-6.12.0-fix-process-start.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 325577feffad1f87b07d92710c0d37c79c5f50a1 Mon Sep 17 00:00:00 2001 -From: Ryan Lucia -Date: Thu, 4 Feb 2021 08:55:48 -0500 -Subject: [PATCH] Fix early return in Process.Start - ---- - mono/metadata/w32process-unix.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/mono/metadata/w32process-unix.c b/mono/metadata/w32process-unix.c -index 663cc6ff5111..d030101aede6 100644 ---- a/mono/metadata/w32process-unix.c -+++ b/mono/metadata/w32process-unix.c -@@ -2032,6 +2032,9 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar - - static char *handler; - static gunichar2 *handler_utf16; -+#ifndef HOST_DARWIN -+ gboolean finished = FALSE; -+#endif - - if (handler_utf16 == (gunichar2 *)-1) { - ret = FALSE; -@@ -2057,6 +2060,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar - if (handler == NULL){ - handler_utf16 = (gunichar2 *) -1; - ret = FALSE; -+ finished = TRUE; - } else { - /* kfmclient needs exec argument */ - char *old = handler; -@@ -2067,9 +2071,8 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar - } - } - MONO_EXIT_GC_SAFE; -- if (ret == FALSE){ -+ if (finished) - goto done; -- } - #endif - handler_utf16 = g_utf8_to_utf16 (handler, -1, NULL, NULL, NULL); - g_free (handler); diff --git a/mono.spec b/mono.spec index 8b37b08..5d04452 100644 --- a/mono.spec +++ b/mono.spec @@ -58,8 +58,6 @@ Patch11: 0001-Replace-new-Csharp-features-with-old-ones.patch Patch12: 0001-Reenable-mdoc.exe-build.patch # fix issue with conflicts between i686 and x86_64 package (#1853724) Patch13: mono-6.6.0-fix-multi-arch-issue.patch -# fix issue with process start (#1839410) -Patch14: mono-6.12.0-fix-process-start.patch BuildRequires: make BuildRequires: bison @@ -351,7 +349,6 @@ pushd external/api-doc-tools popd %patch12 -p1 %patch13 -p1 -%patch14 -p1 # don't build mono-helix-client which requires the helix-binaries to build sed -i 's|mono-helix-client||g' mcs/tools/Makefile