diff --git a/msys2-runtime/0001-Add-MSYS2-triplet.patch b/msys2-runtime/0001-Add-MSYS2-triplet.patch index a83d943d21b..e332c60ba36 100644 --- a/msys2-runtime/0001-Add-MSYS2-triplet.patch +++ b/msys2-runtime/0001-Add-MSYS2-triplet.patch @@ -1,4 +1,4 @@ -From 51380ec75b3f11228cb680f3a4d71fc1957e5aec Mon Sep 17 00:00:00 2001 +From bdad035f0baf6fa584ca10913e9948c0aba2970e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 20:40:45 +0300 diff --git a/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch b/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch index 0443ec2fd2a..e486f75bddc 100644 --- a/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch +++ b/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch @@ -1,4 +1,4 @@ -From a116f418453dc6b272c3b58fcb1498790efccd6f Mon Sep 17 00:00:00 2001 +From 900232bfff4076c483307b4af8f2bbf9b50a600f Mon Sep 17 00:00:00 2001 From: Kaleb Barrett Date: Sun, 14 Mar 2021 18:58:55 -0500 Subject: [PATCH 02/N] Fix msys library name in import libraries diff --git a/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch b/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch index 4809d05f4f5..ab89665d1e1 100644 --- a/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch +++ b/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch @@ -1,4 +1,4 @@ -From f858c02bdb8d3444691dd99165718a1dd67ea753 Mon Sep 17 00:00:00 2001 +From 585fadf7eab7cc83f6445adcd30b5c2b2e9357f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:09:17 +0300 @@ -277,7 +277,7 @@ index 9508f3e..3c40e0f 100644 w32len = cygheap->installation_key.Length / sizeof (WCHAR); if (w32len diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc -index 3195d57..18271f5 100644 +index a560a3f..8590929 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -526,14 +526,14 @@ int exec_prepared_command (PWCHAR command) @@ -298,10 +298,10 @@ index 3195d57..18271f5 100644 break; } diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc -index 6658a23..5d2fe12 100644 +index 6a1ef03..7244fa4 100644 --- a/winsup/cygwin/fhandler/pipe.cc +++ b/winsup/cygwin/fhandler/pipe.cc -@@ -727,7 +727,11 @@ fhandler_pipe::close () +@@ -751,7 +751,11 @@ fhandler_pipe::close () return ret; } @@ -314,10 +314,10 @@ index 6658a23..5d2fe12 100644 /* Create a pipe, and return handles to the read and write ends, just like CreatePipe, but ensure that the write end permits diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc -index fa6bf10..12a0ab3 100644 +index 4f0f718..eb51c6d 100644 --- a/winsup/cygwin/fhandler/pty.cc +++ b/winsup/cygwin/fhandler/pty.cc -@@ -927,7 +927,11 @@ fhandler_pty_slave::open (int flags, mode_t) +@@ -875,7 +875,11 @@ fhandler_pty_slave::open (int flags, mode_t) pipe_reply repl; DWORD len; @@ -329,7 +329,7 @@ index fa6bf10..12a0ab3 100644 &cygheap->installation_key, get_minor ()); termios_printf ("dup handles via master control pipe %s", buf); if (!CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl, -@@ -1206,7 +1210,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) +@@ -1137,7 +1141,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) { char pipe[MAX_PATH]; __small_sprintf (pipe, @@ -341,7 +341,7 @@ index fa6bf10..12a0ab3 100644 &cygheap->installation_key, get_minor ()); pipe_request req = { GetCurrentProcessId () }; pipe_reply repl; -@@ -2090,7 +2098,11 @@ fhandler_pty_master::close () +@@ -2021,7 +2029,11 @@ fhandler_pty_master::close () pipe_reply repl; DWORD len; @@ -353,7 +353,7 @@ index fa6bf10..12a0ab3 100644 &cygheap->installation_key, get_minor ()); acquire_output_mutex (mutex_timeout); if (master_ctl) -@@ -2996,7 +3008,11 @@ fhandler_pty_master::setup () +@@ -2927,7 +2939,11 @@ fhandler_pty_master::setup () /* Create master control pipe which allows the master to duplicate the pty pipe handles to processes which deserve it. */ @@ -365,7 +365,7 @@ index fa6bf10..12a0ab3 100644 &cygheap->installation_key, unit); master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, -@@ -3880,7 +3896,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, +@@ -3816,7 +3832,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, { char pipe[MAX_PATH]; __small_sprintf (pipe, @@ -436,7 +436,7 @@ index 1e4cf98..b77598b 100644 } \ } \ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h -index 0f87fbc..2e624a9 100644 +index fb821a6..1c68287 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -502,7 +502,11 @@ details. */ @@ -617,7 +617,7 @@ index 43b5803..db1d5c8 100644 ts.SourceIdentifier.LowPart = kerberos_auth ? 0x0105 : 0x0106; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index 9d88b60..ed564c8 100644 +index 11033bc..2d7071b 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -339,7 +339,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) @@ -626,15 +626,15 @@ index 9d88b60..ed564c8 100644 { - /* Create unique filename. Start with a dot, followed by "cyg" + /* Create unique filename. Start with a dot, followed by "msys" - transposed into the Unicode low surrogate area (U+dc00) on file - systems supporting Unicode (except Samba), followed by the inode - number in hex, followed by a path hash in hex. The combination + transposed to the Unicode private use area in the U+f700 area + on file systems supporting Unicode (except Samba), followed by + the inode number in hex, followed by a path hash in hex. The @@ -347,7 +347,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) RtlAppendUnicodeToString (&recycler, (pc.fs_flags () & FILE_UNICODE_ON_DISK && !pc.fs_is_samba ()) -- ? L".\xdc63\xdc79\xdc67" : L".cyg"); -+ ? L".\xdc6d\xdc73\xdc79\xdc73" : L".msys"); +- ? L".\xf763\xf779\xf767" : L".cyg"); ++ ? L".\xf76d\xf773\xf779\xf773" : L".msys"); pfii = (PFILE_INTERNAL_INFORMATION) infobuf; status = NtQueryInformationFile (fh, &io, pfii, sizeof *pfii, FileInternalInformation); diff --git a/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch b/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch index 21256ab7d83..7f0abd2cd90 100644 --- a/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch +++ b/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch @@ -1,4 +1,4 @@ -From b084abe0ec93354984d37d0ec09fab39984d1e90 Mon Sep 17 00:00:00 2001 +From d076660c2d88cc79897b73b53134b040d623c547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:17:46 +0300 @@ -1086,7 +1086,7 @@ index 1802e76..84851a1 100644 /* Cover functions to the path conversion routines. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index d01f678..845121f 100644 +index f5a4b91..902cef8 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -292,6 +292,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch b/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch index 0f76797cb99..bace977b6d5 100644 --- a/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch +++ b/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch @@ -1,4 +1,4 @@ -From f16038529ae929ad0371de5b7a8ba651b1888e29 Mon Sep 17 00:00:00 2001 +From 35a477b5cd63373397b0dc713de7b95d610ad300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:29:01 +0300 diff --git a/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch b/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch index 1f55d628097..02ceef9d229 100644 --- a/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch +++ b/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch @@ -1,4 +1,4 @@ -From 6393488c9d7048ba7081374b806397c74ee2def6 Mon Sep 17 00:00:00 2001 +From 41ed62e6f51e80b764de465ab9f9045552107813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:45:06 +0300 diff --git a/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch b/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch index 453071d420c..c0cf1b51513 100644 --- a/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch +++ b/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch @@ -1,4 +1,4 @@ -From 06ea20e4eceef17d67a404d670b439e87f282450 Mon Sep 17 00:00:00 2001 +From 8096583fac66461dbe1414f210d998a3087c1ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:47:21 +0300 diff --git a/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch b/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch index c72d105058d..bfb0970d6a4 100644 --- a/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch +++ b/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch @@ -1,4 +1,4 @@ -From 222fd37c0b4f4502a0dd67ab3369fb630ded3420 Mon Sep 17 00:00:00 2001 +From 0ba54e8cc1940f94e9cde6b6c74cb6a8fb240d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:48:54 +0300 diff --git a/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch b/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch index 6afc95a9007..96b74f17d89 100644 --- a/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch +++ b/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch @@ -1,4 +1,4 @@ -From 41e8ada0d105959dfd3a1665875a09b64ceb06a3 Mon Sep 17 00:00:00 2001 +From e28b7422e206f39202a9f1f840a84cd7a59287c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 21:50:55 +0300 @@ -10,7 +10,7 @@ Strace is a Windows program so MSYS2 will convert all arguments and environment 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 845121f..ace43db 100644 +index 902cef8..d7affaa 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -545,11 +545,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0010-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0010-strace.cc-Don-t-set-MSYS-noglob.patch index 12d078bb49c..afe9c593b45 100644 --- a/msys2-runtime/0010-strace.cc-Don-t-set-MSYS-noglob.patch +++ b/msys2-runtime/0010-strace.cc-Don-t-set-MSYS-noglob.patch @@ -1,4 +1,4 @@ -From 766e55c1bea155c16b8fe28506b86f661c292dc6 Mon Sep 17 00:00:00 2001 +From 4a24304b8b1463097d2532f327eb9e44f272a303 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 23 Aug 2015 20:47:30 +0100 Subject: [PATCH 10/N] strace.cc: Don't set MSYS=noglob diff --git a/msys2-runtime/0011-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0011-Add-debugging-for-strace-make_command_line.patch index 28293be1ec7..2fa3fcfd770 100644 --- a/msys2-runtime/0011-Add-debugging-for-strace-make_command_line.patch +++ b/msys2-runtime/0011-Add-debugging-for-strace-make_command_line.patch @@ -1,4 +1,4 @@ -From 4f01c3f5c7c3201c46d682f378d8b1ddbd7a0d87 Mon Sep 17 00:00:00 2001 +From b3a4a5bd44740716566e221dba0625e117d92ab4 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 09:52:47 +0100 Subject: [PATCH 11/N] Add debugging for strace make_command_line diff --git a/msys2-runtime/0012-strace-quiet-be-really-quiet.patch b/msys2-runtime/0012-strace-quiet-be-really-quiet.patch index c6c861e2870..56991c5addc 100644 --- a/msys2-runtime/0012-strace-quiet-be-really-quiet.patch +++ b/msys2-runtime/0012-strace-quiet-be-really-quiet.patch @@ -1,4 +1,4 @@ -From d43f1eebf2fed9c1c9321eecae12b4830fc19b92 Mon Sep 17 00:00:00 2001 +From f8c098028cde692958bfed365c8877a038860d6c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 May 2017 18:13:32 +0200 Subject: [PATCH 12/N] strace --quiet: be *really* quiet diff --git a/msys2-runtime/0013-path_conv-special-case-root-directory-to-have-traili.patch b/msys2-runtime/0013-path_conv-special-case-root-directory-to-have-traili.patch index d3774c1d569..aff060ca1c8 100644 --- a/msys2-runtime/0013-path_conv-special-case-root-directory-to-have-traili.patch +++ b/msys2-runtime/0013-path_conv-special-case-root-directory-to-have-traili.patch @@ -1,4 +1,4 @@ -From 0053f7b38e025ef1358958232e0231c455cc2bc3 Mon Sep 17 00:00:00 2001 +From c4d9d83ede9abf0c47949bd3ac6f91fd3325dc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= Date: Sun, 14 Apr 2019 22:13:51 +0300 diff --git a/msys2-runtime/0014-When-converting-to-a-Unix-path-avoid-double-trailing.patch b/msys2-runtime/0014-When-converting-to-a-Unix-path-avoid-double-trailing.patch index ed06a650abf..249ff27acb7 100644 --- a/msys2-runtime/0014-When-converting-to-a-Unix-path-avoid-double-trailing.patch +++ b/msys2-runtime/0014-When-converting-to-a-Unix-path-avoid-double-trailing.patch @@ -1,4 +1,4 @@ -From 1e8a891f5ec4bb1b96f18c07b7180999c14b8ce0 Mon Sep 17 00:00:00 2001 +From 1c5a6e869c61b66c9924c38a9948413667e3ee44 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 8 Nov 2022 16:24:20 +0100 Subject: [PATCH 14/N] When converting to a Unix path, avoid double trailing diff --git a/msys2-runtime/0015-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch b/msys2-runtime/0015-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch index 034d00d3e12..c6423f6cf52 100644 --- a/msys2-runtime/0015-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch +++ b/msys2-runtime/0015-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch @@ -1,4 +1,4 @@ -From 673065dd1eeedc82dda43aaeb435040be2703ea4 Mon Sep 17 00:00:00 2001 +From 8b5e9b55a1021d73b91a49cc640f2817394a5bb5 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 20 Nov 2022 13:57:36 +0100 Subject: [PATCH 15/N] msys2_path_conv: pass PC_NOFULL to path_conv diff --git a/msys2-runtime/0016-path-conversion-Introduce-ability-to-switch-off-conv.patch b/msys2-runtime/0016-path-conversion-Introduce-ability-to-switch-off-conv.patch index e2878a575cc..bb379bbf1d9 100644 --- a/msys2-runtime/0016-path-conversion-Introduce-ability-to-switch-off-conv.patch +++ b/msys2-runtime/0016-path-conversion-Introduce-ability-to-switch-off-conv.patch @@ -1,4 +1,4 @@ -From e1db14849f307053cf0728f385fd8e2c884b4d03 Mon Sep 17 00:00:00 2001 +From b09fb7fd5a22f32b58938da80aff0d02193c64c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?= Date: Wed, 17 Jun 2015 09:30:41 +0200 Subject: [PATCH 16/N] path-conversion: Introduce ability to switch off diff --git a/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch index d37cd1e37a5..8fa51417ec1 100644 --- a/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch +++ b/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch @@ -1,4 +1,4 @@ -From f6e516da390ea3f729132274db1303ab95a61e7c Mon Sep 17 00:00:00 2001 +From b2391806dbe3f72235fe1431940631f26757a2f0 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:52:09 +0100 Subject: [PATCH 17/N] dcrt0.cc: Untangle allow_glob from winshell diff --git a/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch index e45bd1ed1b1..946e8201161 100644 --- a/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch +++ b/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch @@ -1,4 +1,4 @@ -From 1059fbbdea827dc369d76eb59d2c2bf087faa84b Mon Sep 17 00:00:00 2001 +From 1e94f3ee1dc663bc0292324bef65be88c74c30fa Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 24 Aug 2015 00:48:06 +0100 Subject: [PATCH 18/N] dcrt0.cc (globify): Don't quote literal strings diff --git a/msys2-runtime/0019-Add-debugging-for-build_argv.patch b/msys2-runtime/0019-Add-debugging-for-build_argv.patch index c29c61ec10e..3dd4d4cca0e 100644 --- a/msys2-runtime/0019-Add-debugging-for-build_argv.patch +++ b/msys2-runtime/0019-Add-debugging-for-build_argv.patch @@ -1,4 +1,4 @@ -From f8da08fd7e82b038fe2e278153bc6545dae232b0 Mon Sep 17 00:00:00 2001 +From e6c5e3ec30c0c99d797b69314d5721eaca2d752b Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:18:52 +0100 Subject: [PATCH 19/N] Add debugging for build_argv diff --git a/msys2-runtime/0020-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0020-environ.cc-New-facility-environment-variable-MSYS2_E.patch index 57236159a56..65a75f30b87 100644 --- a/msys2-runtime/0020-environ.cc-New-facility-environment-variable-MSYS2_E.patch +++ b/msys2-runtime/0020-environ.cc-New-facility-environment-variable-MSYS2_E.patch @@ -1,4 +1,4 @@ -From 03d6fe120a36c805008cc611ad140e2a222dc8b0 Mon Sep 17 00:00:00 2001 +From d44fc10030e02b339fe4253b2cf3d6d3e72e5c92 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 10 Apr 2016 21:47:41 +0100 Subject: [PATCH 20/N] environ.cc: New facility/environment variable @@ -98,7 +98,7 @@ index d52deba..c4dbe02 100644 extern inline void transform_chars (PUNICODE_STRING upath, USHORT start_idx) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc -index 767384f..160c996 100644 +index 4220f62..5446654 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -311,6 +311,26 @@ NT_readline::gets () @@ -141,7 +141,7 @@ index b1a088a..39819dc 100644 { /* Since we've got regex linked we should maybe switch to that, but diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index ace43db..57231b3 100644 +index d7affaa..5b3cbeb 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -293,8 +293,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0021-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch b/msys2-runtime/0021-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch index ff9187b1bb8..db4ca25c8be 100644 --- a/msys2-runtime/0021-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch +++ b/msys2-runtime/0021-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch @@ -1,4 +1,4 @@ -From 90d66ee649c0b2f265583942352725e9fac74aa9 Mon Sep 17 00:00:00 2001 +From 98c164175f51d79bc91caaad905b386e8d45615b Mon Sep 17 00:00:00 2001 From: SquallATF Date: Mon, 10 Sep 2018 11:32:18 +0300 Subject: [PATCH 21/N] Fix native symbolic link spawn passing wrong arg0 @@ -8,7 +8,7 @@ Subject: [PATCH 21/N] Fix native symbolic link spawn passing wrong arg0 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 57231b3..9d2a016 100644 +index 5b3cbeb..b97c6da 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -50,7 +50,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt) diff --git a/msys2-runtime/0022-Introduce-the-enable_pcon-value-for-MSYS.patch b/msys2-runtime/0022-Introduce-the-enable_pcon-value-for-MSYS.patch index 47b15adeee0..4c584b8cad8 100644 --- a/msys2-runtime/0022-Introduce-the-enable_pcon-value-for-MSYS.patch +++ b/msys2-runtime/0022-Introduce-the-enable_pcon-value-for-MSYS.patch @@ -1,4 +1,4 @@ -From 7b84fed8f06744f2d308c6ace42275b4941cb90c Mon Sep 17 00:00:00 2001 +From d12ab6d59cbc9473f29afdf2bd12318a1a5f09ea Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 19 May 2020 13:49:37 +0200 Subject: [PATCH 22/N] Introduce the `enable_pcon` value for `MSYS` diff --git a/msys2-runtime/0023-popen-call-usr-bin-sh-instead-of-bin-sh.patch b/msys2-runtime/0023-popen-call-usr-bin-sh-instead-of-bin-sh.patch index 6482f0358fc..9e6a64d8aea 100644 --- a/msys2-runtime/0023-popen-call-usr-bin-sh-instead-of-bin-sh.patch +++ b/msys2-runtime/0023-popen-call-usr-bin-sh-instead-of-bin-sh.patch @@ -1,4 +1,4 @@ -From 6f87e23bae318aa95fefe6d40a6630901d91c2aa Mon Sep 17 00:00:00 2001 +From 865ad5d64ececf728b8027043684b5e2a4e9ae2a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 5 Jun 2020 20:09:11 +0200 Subject: [PATCH 23/N] popen: call /usr/bin/sh instead of /bin/sh @@ -17,10 +17,10 @@ in this scenario, so this maybe should be extended to all of them. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index ed564c8..fe4b9cb 100644 +index 2d7071b..e584e96 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc -@@ -4423,7 +4423,7 @@ popen (const char *command, const char *in_type) +@@ -4425,7 +4425,7 @@ popen (const char *command, const char *in_type) fcntl (stdchild, F_SETFD, stdchild_state | FD_CLOEXEC); /* Start a shell process to run the given command without forking. */ diff --git a/msys2-runtime/0024-Expose-full-command-lines-to-other-Win32-processes-b.patch b/msys2-runtime/0024-Expose-full-command-lines-to-other-Win32-processes-b.patch index 2a1b1e93cce..2c4def8fb2e 100644 --- a/msys2-runtime/0024-Expose-full-command-lines-to-other-Win32-processes-b.patch +++ b/msys2-runtime/0024-Expose-full-command-lines-to-other-Win32-processes-b.patch @@ -1,4 +1,4 @@ -From 4dd6aad8634373e09d218628eea91f02840e014a Mon Sep 17 00:00:00 2001 +From 080e2b0f6abe07f4eab5e44bf689f3f48efc7b61 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Aug 2020 12:22:38 +0200 Subject: [PATCH 24/N] Expose full command-lines to other Win32 processes by diff --git a/msys2-runtime/0025-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch b/msys2-runtime/0025-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch index f452f61d7dc..cb02914dfa8 100644 --- a/msys2-runtime/0025-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch +++ b/msys2-runtime/0025-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch @@ -1,4 +1,4 @@ -From 6ef58ed329d4d1b59091471a575a5c0af3ac192d Mon Sep 17 00:00:00 2001 +From 9f45f58388505943f06fff68c8695dd5f17d2a67 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 16 Apr 2018 14:59:39 +0200 Subject: [PATCH 25/N] Add a helper to obtain a function's address in diff --git a/msys2-runtime/0026-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch b/msys2-runtime/0026-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch index b5b07c6b2d4..cb9b24f5b8f 100644 --- a/msys2-runtime/0026-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch +++ b/msys2-runtime/0026-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch @@ -1,4 +1,4 @@ -From 38a8880717c5431c2c4d596dc0aa22c6906059f9 Mon Sep 17 00:00:00 2001 +From f6f7e2c92880e56d0c4b8712630941aa72257f4d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Mar 2015 09:56:28 +0000 Subject: [PATCH 26/N] Emulate GenerateConsoleCtrlEvent() upon Ctrl+C @@ -93,7 +93,7 @@ Signed-off-by: Johannes Schindelin create mode 100644 winsup/cygwin/include/cygwin/exit_process.h diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc -index 18271f5..f6b6255 100644 +index 8590929..469052a 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -29,6 +29,7 @@ details. */ @@ -104,7 +104,7 @@ index 18271f5..f6b6255 100644 /* Define macros for CPU-agnostic register access. The _CX_foo macros are for access into CONTEXT, the _MC_foo ones for access into -@@ -1598,10 +1599,25 @@ exit_sig: +@@ -1605,10 +1606,25 @@ exit_sig: dosig: if (have_execed) { diff --git a/msys2-runtime/0027-kill-kill-Win32-processes-more-gently.patch b/msys2-runtime/0027-kill-kill-Win32-processes-more-gently.patch index 8921fadf85f..5eb25cc9c0e 100644 --- a/msys2-runtime/0027-kill-kill-Win32-processes-more-gently.patch +++ b/msys2-runtime/0027-kill-kill-Win32-processes-more-gently.patch @@ -1,4 +1,4 @@ -From b9d1fadafe592ced300e80ddfa1f6358a46ecdb5 Mon Sep 17 00:00:00 2001 +From 86cd50d151515388c06d5f0e860cf002480d94fd Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Mar 2015 10:01:50 +0000 Subject: [PATCH 27/N] kill: kill Win32 processes more gently @@ -13,7 +13,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc -index fb45e4c..28473d1 100644 +index bcabcd4..31ad57a 100644 --- a/winsup/utils/kill.cc +++ b/winsup/utils/kill.cc @@ -17,6 +17,7 @@ details. */ diff --git a/msys2-runtime/0028-Cygwin-make-option-for-native-inner-link-handling.patch b/msys2-runtime/0028-Cygwin-make-option-for-native-inner-link-handling.patch index 38d6eecdd6c..7d1c93daee7 100644 --- a/msys2-runtime/0028-Cygwin-make-option-for-native-inner-link-handling.patch +++ b/msys2-runtime/0028-Cygwin-make-option-for-native-inner-link-handling.patch @@ -1,4 +1,4 @@ -From 715f6ce8910a7ccfedb90a021ead592ec8e62be7 Mon Sep 17 00:00:00 2001 +From 4b228ef2e491970f967aaed3339ce807c282d73c Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Thu, 22 Jul 2021 11:59:16 -0700 Subject: [PATCH 28/N] Cygwin: make option for native inner link handling. diff --git a/msys2-runtime/0029-docs-skip-building-texinfo-and-PDF-files.patch b/msys2-runtime/0029-docs-skip-building-texinfo-and-PDF-files.patch index 99bb9fabc68..c7ffe4d1174 100644 --- a/msys2-runtime/0029-docs-skip-building-texinfo-and-PDF-files.patch +++ b/msys2-runtime/0029-docs-skip-building-texinfo-and-PDF-files.patch @@ -1,4 +1,4 @@ -From abeeb31b2b49921b01d4ce7cfbac82dfa6c292bb Mon Sep 17 00:00:00 2001 +From 6e0c3b56c7c232ad7a20a2a93fd1679ca58e4a2c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Nov 2021 14:20:07 +0100 Subject: [PATCH 29/N] docs: skip building texinfo and PDF files diff --git a/msys2-runtime/0030-install-libs-depend-on-the-toollibs.patch b/msys2-runtime/0030-install-libs-depend-on-the-toollibs.patch index a3a8e72a357..9a44e03ebce 100644 --- a/msys2-runtime/0030-install-libs-depend-on-the-toollibs.patch +++ b/msys2-runtime/0030-install-libs-depend-on-the-toollibs.patch @@ -1,4 +1,4 @@ -From fbe8ae30a3ea6af5541cf9f412f601bca963aa6f Mon Sep 17 00:00:00 2001 +From ecf50e64ce03f2840dc08605e087c2f3f361c14b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Nov 2021 16:22:57 +0100 Subject: [PATCH 30/N] install-libs: depend on the "toollibs" diff --git a/msys2-runtime/0031-POSIX-ify-the-SHELL-variable.patch b/msys2-runtime/0031-POSIX-ify-the-SHELL-variable.patch index b5bf494b7eb..e7c94d6870e 100644 --- a/msys2-runtime/0031-POSIX-ify-the-SHELL-variable.patch +++ b/msys2-runtime/0031-POSIX-ify-the-SHELL-variable.patch @@ -1,4 +1,4 @@ -From 38abc7cfff7f580c7563b90dc799ae28e6338bf5 Mon Sep 17 00:00:00 2001 +From 8cb4ff2c0ecb196f77686ada7f3c165b7183d380 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Nov 2015 20:03:11 +0100 Subject: [PATCH 31/N] POSIX-ify the SHELL variable diff --git a/msys2-runtime/0032-Handle-ORIGINAL_PATH-just-like-PATH.patch b/msys2-runtime/0032-Handle-ORIGINAL_PATH-just-like-PATH.patch index a8956fbedfa..760b4115a04 100644 --- a/msys2-runtime/0032-Handle-ORIGINAL_PATH-just-like-PATH.patch +++ b/msys2-runtime/0032-Handle-ORIGINAL_PATH-just-like-PATH.patch @@ -1,4 +1,4 @@ -From 9c758e8f9cb30d58e5499eed5154a4266d335be1 Mon Sep 17 00:00:00 2001 +From 1f6020c6bfa115ac641881aadeece5ee40eb02bc Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 21 Mar 2017 13:18:38 +0100 Subject: [PATCH 32/N] Handle ORIGINAL_PATH just like PATH diff --git a/msys2-runtime/0033-uname-allow-setting-the-system-name-to-CYGWIN.patch b/msys2-runtime/0033-uname-allow-setting-the-system-name-to-CYGWIN.patch index 5ffc1a13ae1..452dc2d7835 100644 --- a/msys2-runtime/0033-uname-allow-setting-the-system-name-to-CYGWIN.patch +++ b/msys2-runtime/0033-uname-allow-setting-the-system-name-to-CYGWIN.patch @@ -1,4 +1,4 @@ -From 312f7660cc8f4690f30327994212ec890df09e28 Mon Sep 17 00:00:00 2001 +From 79e3880244c30efecd2221a0bc90d452a62d873e Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 3 Jul 2022 22:39:32 +0200 Subject: [PATCH 33/N] uname: allow setting the system name to CYGWIN diff --git a/msys2-runtime/0034-Pass-environment-variables-with-empty-values.patch b/msys2-runtime/0034-Pass-environment-variables-with-empty-values.patch index b92e3faff6d..e2806abc918 100644 --- a/msys2-runtime/0034-Pass-environment-variables-with-empty-values.patch +++ b/msys2-runtime/0034-Pass-environment-variables-with-empty-values.patch @@ -1,4 +1,4 @@ -From e19af2018e02eb7365c931d63748b2bad021855e Mon Sep 17 00:00:00 2001 +From ef59c45434b5296d18f7aab785ca2db13f1be8d7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 18 Feb 2015 12:32:17 +0000 Subject: [PATCH 34/N] Pass environment variables with empty values diff --git a/msys2-runtime/0035-Optionally-disallow-empty-environment-values-again.patch b/msys2-runtime/0035-Optionally-disallow-empty-environment-values-again.patch index 79996d2620c..67d2aefd523 100644 --- a/msys2-runtime/0035-Optionally-disallow-empty-environment-values-again.patch +++ b/msys2-runtime/0035-Optionally-disallow-empty-environment-values-again.patch @@ -1,4 +1,4 @@ -From 4deb751587f85296e3b0a06f89860ad2e18b8c29 Mon Sep 17 00:00:00 2001 +From c347d6c26b4722c12051ef0d19257323dafbd75b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 6 Sep 2022 10:40:58 +0200 Subject: [PATCH 35/N] Optionally disallow empty environment values again diff --git a/msys2-runtime/0036-build_env-respect-the-MSYS-environment-variable.patch b/msys2-runtime/0036-build_env-respect-the-MSYS-environment-variable.patch index d721bed345e..ccb36940eac 100644 --- a/msys2-runtime/0036-build_env-respect-the-MSYS-environment-variable.patch +++ b/msys2-runtime/0036-build_env-respect-the-MSYS-environment-variable.patch @@ -1,4 +1,4 @@ -From a1f282d18d19df8a864df70b9d05bc4b9d18ce1c Mon Sep 17 00:00:00 2001 +From 210e5f3c4d43efc6f6aa140cb28f3cbaf261593d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 6 Sep 2022 12:18:18 +0200 Subject: [PATCH 36/N] build_env(): respect the `MSYS` environment variable diff --git a/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch b/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch index ccbad0e2fa0..7ce163c4a2c 100644 --- a/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch +++ b/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch @@ -1,4 +1,4 @@ -From d1b382b8d646c8f8cae10ebeb87d6b593df586fd Mon Sep 17 00:00:00 2001 +From bef1e6ba82fb0a7992caeee892721fe4214b64ab Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 17 Dec 2022 20:14:49 +0100 Subject: [PATCH 37/N] Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by diff --git a/msys2-runtime/0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch b/msys2-runtime/0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch index 2a657864f3f..f50d8bc2e21 100644 --- a/msys2-runtime/0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch +++ b/msys2-runtime/0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch @@ -1,4 +1,4 @@ -From e347515e99ad03ef377bd9c255ec1dd4037fbb54 Mon Sep 17 00:00:00 2001 +From 6e10b1bdd96863136dd3c0e1e71b9c7895def917 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 30 Jan 2023 23:22:22 +0100 Subject: [PATCH 38/N] Avoid sharing cygheaps across Cygwin versions @@ -116,10 +116,10 @@ index 0a5c817..351d32d 100644 strace.activate (false); res = NULL; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc -index 99fa3c3..a89f09d 100644 +index 58a9e5a..cf43aa9 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc -@@ -811,7 +811,7 @@ int child_info::retry_count = 0; +@@ -836,7 +836,7 @@ int child_info::retry_count = 0; child_info::child_info (unsigned in_cb, child_info_types chtype, bool need_subproc_ready): msv_count (0), cb (in_cb), intro (PROC_MAGIC_GENERIC), diff --git a/msys2-runtime/0039-uname-report-msys2-runtime-commit-hash-too.patch b/msys2-runtime/0039-uname-report-msys2-runtime-commit-hash-too.patch index 317af977053..fa0b62086fe 100644 --- a/msys2-runtime/0039-uname-report-msys2-runtime-commit-hash-too.patch +++ b/msys2-runtime/0039-uname-report-msys2-runtime-commit-hash-too.patch @@ -1,4 +1,4 @@ -From dd9d970a97430c3b2e287598e07dd06dd3a70ff0 Mon Sep 17 00:00:00 2001 +From f61f7fb71aaa15a8d6ccfc1b08dfca83b4118458 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 21 Feb 2023 16:36:36 +0100 Subject: [PATCH 39/N] uname: report msys2-runtime commit hash, too diff --git a/msys2-runtime/0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch b/msys2-runtime/0040-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch similarity index 92% rename from msys2-runtime/0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch rename to msys2-runtime/0040-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch index 3219adf893d..b605c20a9a7 100644 --- a/msys2-runtime/0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch +++ b/msys2-runtime/0040-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch @@ -1,7 +1,7 @@ -From 6183b8336e29b058b63dcf97ff8214b0355f165a Mon Sep 17 00:00:00 2001 +From debafbf93f8c7099eb9147d40db596af221fed19 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 13 Feb 2024 16:47:51 +0100 -Subject: [PATCH 53/N] Cygwin: find_fast_cwd: don't run assembler checking +Subject: [PATCH 40/N] Cygwin: find_fast_cwd: don't run assembler checking code on ARM64 https://cygwin.com/pipermail/cygwin/2024-February/255397.html @@ -23,10 +23,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index d06f3f0..c3623f9 100644 +index b0c45fa..f8afd4c 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -4851,29 +4851,27 @@ find_fast_cwd_pointer () +@@ -4826,29 +4826,27 @@ find_fast_cwd_pointer () static fcwd_access_t ** find_fast_cwd () { diff --git a/msys2-runtime/0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch b/msys2-runtime/0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch deleted file mode 100644 index 6cffbebdc89..00000000000 --- a/msys2-runtime/0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 2bfb7739dadf6a27f9b4c006adfd69944f3df2f1 Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Sun, 1 Sep 2024 04:31:03 +0900 -Subject: [PATCH 40/N] Cygwin: pipe: Fix a regression that raw_write() slows - down - -After the commit 7f3c22532577, writing to pipe extremely slows down. -This is because cygwait(select_sem, 10, cw_cancel) is called even -when write operation is already completed. With this patch, the -cygwait() is called only if the write operation is not completed. - -Backported-from: 37ab3e0d55 (Cygwin: pipe: Fix a regression that raw_write() slows down, 2024-09-01) -Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256398.html -Fixes: 7f3c22532577 ("Cygwin: pipe: handle signals explicitely in raw_write") -Reported-by: Jim Reisert AD1C -Reviewed-by: Corinna Vinschen -Signed-off-by: Takashi Yano -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/fhandler/pipe.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc -index 5d2fe12..040176e 100644 ---- a/winsup/cygwin/fhandler/pipe.cc -+++ b/winsup/cygwin/fhandler/pipe.cc -@@ -503,8 +503,9 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len) - raise (SIGPIPE); - goto out; - } -- else -- cygwait (select_sem, 10, cw_cancel); -+ /* Break out on completion */ -+ if (waitret == WAIT_OBJECT_0) -+ break; - /* If we got a timeout in the blocking case, and we already - did a short write, we got a signal in the previous loop. */ - if (waitret == WAIT_TIMEOUT && short_write_once) -@@ -512,6 +513,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len) - waitret = WAIT_SIGNALED; - break; - } -+ cygwait (select_sem, 10, cw_cancel); - } - /* Loop in case of blocking write or SA_RESTART */ - while (waitret == WAIT_TIMEOUT || waitret == WAIT_SIGNALED); diff --git a/msys2-runtime/0054-cygthread-suspend-thread-before-terminating.patch b/msys2-runtime/0041-cygthread-suspend-thread-before-terminating.patch similarity index 55% rename from msys2-runtime/0054-cygthread-suspend-thread-before-terminating.patch rename to msys2-runtime/0041-cygthread-suspend-thread-before-terminating.patch index ba222b7945b..bf63c3f7ccd 100644 --- a/msys2-runtime/0054-cygthread-suspend-thread-before-terminating.patch +++ b/msys2-runtime/0041-cygthread-suspend-thread-before-terminating.patch @@ -1,7 +1,7 @@ -From bf47028f802e8eb3dbe95b40b3f99d963a245de9 Mon Sep 17 00:00:00 2001 +From 2c55ca50eeb8532432f51391c2ec28a14fc4e510 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 11 Nov 2024 20:09:49 -0800 -Subject: [PATCH 54/N] cygthread: suspend thread before terminating. +Subject: [PATCH 41/N] cygthread: suspend thread before terminating. This addresses an extremely difficult to debug deadlock when running under emulation on ARM64. @@ -26,16 +26,13 @@ Also, attempt to use `CancelSynchonousIo()` (as seen in `flock.cc`) to avoid the need for `TerminateThread()` altogether. This doesn't always work, however, so was not a complete fix for the deadlock issue. -Cherry picked from commit e09c64ef65 (cygthread: suspend thread before -terminating., 2024-11-11) from msys2/msys2-runtime. - Addresses: https://cygwin.com/pipermail/cygwin-developers/2024-May/012694.html Signed-off-by: Jeremy Drake -Signed-off-by: Johannes Schindelin --- winsup/cygwin/cygthread.cc | 14 ++++++++++++++ - winsup/cygwin/sigproc.cc | 3 ++- - 2 files changed, 16 insertions(+), 1 deletion(-) + winsup/cygwin/pinfo.cc | 10 +++++++--- + winsup/cygwin/sigproc.cc | 12 ++++++++++-- + 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index 54918e7..4f16097 100644 @@ -62,17 +59,58 @@ index 54918e7..4f16097 100644 TerminateThread (h, 0); WaitForSingleObject (h, INFINITE); CloseHandle (h); +diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc +index a5f5d6e..4bb1946 100644 +--- a/winsup/cygwin/pinfo.cc ++++ b/winsup/cygwin/pinfo.cc +@@ -1262,13 +1262,17 @@ proc_waiter (void *arg) + + for (;;) + { +- DWORD nb; ++ DWORD nb, err; + char buf = '\0'; + + if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL) +- && GetLastError () != ERROR_BROKEN_PIPE) ++ && (err = GetLastError ()) != ERROR_BROKEN_PIPE) + { +- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); ++ /* ERROR_OPERATION_ABORTED is expected due to the possibility that ++ CancelSynchronousIo interruped the ReadFile call, so don't output ++ that error */ ++ if (err != ERROR_OPERATION_ABORTED) ++ system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); + break; + } + diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc -index 5c5ff73..d180277 100644 +index cf43aa9..4260f88 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc -@@ -410,7 +410,8 @@ proc_terminate () +@@ -413,7 +413,11 @@ proc_terminate () + to 1 iff it is a Cygwin process. */ if (!have_execed || !have_execed_cygwin) chld_procs[i]->ppid = 1; - if (chld_procs[i].wait_thread) -- chld_procs[i].wait_thread->terminate_thread (); -+ if (!CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle ())) -+ chld_procs[i].wait_thread->terminate_thread (); +- if (chld_procs[i].wait_thread) ++ /* Attempt to exit the wait_thread cleanly via CancelSynchronousIo ++ before falling back to the (explicitly dangerous) cross-thread ++ termination */ ++ if (chld_procs[i].wait_thread ++ && !CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle ())) + chld_procs[i].wait_thread->terminate_thread (); /* Release memory associated with this process unless it is 'myself'. 'myself' is only in the chld_procs table when we've execed. We - reach here when the next process has finished initializing but we +@@ -1199,7 +1203,11 @@ remove_proc (int ci) + { + if (have_execed) + { +- if (_my_tls._ctinfo != chld_procs[ci].wait_thread) ++ /* Attempt to exit the wait_thread cleanly via CancelSynchronousIo ++ before falling back to the (explicitly dangerous) cross-thread ++ termination */ ++ if (_my_tls._ctinfo != chld_procs[ci].wait_thread ++ && !CancelSynchronousIo (chld_procs[ci].wait_thread->thread_handle ())) + chld_procs[ci].wait_thread->terminate_thread (); + } + else if (chld_procs[ci] && chld_procs[ci]->exists ()) diff --git a/msys2-runtime/0042-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch b/msys2-runtime/0042-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch new file mode 100644 index 00000000000..d152b8a71b7 --- /dev/null +++ b/msys2-runtime/0042-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch @@ -0,0 +1,73 @@ +From e5dc132b3fa1c6a06867e73c7f67c81a502e3993 Mon Sep 17 00:00:00 2001 +From: Jeremy Drake +Date: Thu, 21 Nov 2024 22:13:42 -0800 +Subject: [PATCH 42/N] Cygwin: revert use of CancelSyncronousIo on + wait_thread. + +It appears this is causing hangs on native x86_64 in similar scenarios +as the hangs on ARM64, because `CancelSynchronousIo` is returning `TRUE` +but not canceling the `ReadFile` call as expected. + +Addresses: https://github.com/msys2/MSYS2-packages/issues/4340#issuecomment-2491401847 +Fixes: b091b47b9e56 ("cygthread: suspend thread before terminating.") +Signed-off-by: Jeremy Drake +--- + winsup/cygwin/pinfo.cc | 10 +++------- + winsup/cygwin/sigproc.cc | 12 ++---------- + 2 files changed, 5 insertions(+), 17 deletions(-) + +diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc +index 4bb1946..a5f5d6e 100644 +--- a/winsup/cygwin/pinfo.cc ++++ b/winsup/cygwin/pinfo.cc +@@ -1262,17 +1262,13 @@ proc_waiter (void *arg) + + for (;;) + { +- DWORD nb, err; ++ DWORD nb; + char buf = '\0'; + + if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL) +- && (err = GetLastError ()) != ERROR_BROKEN_PIPE) ++ && GetLastError () != ERROR_BROKEN_PIPE) + { +- /* ERROR_OPERATION_ABORTED is expected due to the possibility that +- CancelSynchronousIo interruped the ReadFile call, so don't output +- that error */ +- if (err != ERROR_OPERATION_ABORTED) +- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); ++ system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); + break; + } + +diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc +index 4260f88..cf43aa9 100644 +--- a/winsup/cygwin/sigproc.cc ++++ b/winsup/cygwin/sigproc.cc +@@ -413,11 +413,7 @@ proc_terminate () + to 1 iff it is a Cygwin process. */ + if (!have_execed || !have_execed_cygwin) + chld_procs[i]->ppid = 1; +- /* Attempt to exit the wait_thread cleanly via CancelSynchronousIo +- before falling back to the (explicitly dangerous) cross-thread +- termination */ +- if (chld_procs[i].wait_thread +- && !CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle ())) ++ if (chld_procs[i].wait_thread) + chld_procs[i].wait_thread->terminate_thread (); + /* Release memory associated with this process unless it is 'myself'. + 'myself' is only in the chld_procs table when we've execed. We +@@ -1203,11 +1199,7 @@ remove_proc (int ci) + { + if (have_execed) + { +- /* Attempt to exit the wait_thread cleanly via CancelSynchronousIo +- before falling back to the (explicitly dangerous) cross-thread +- termination */ +- if (_my_tls._ctinfo != chld_procs[ci].wait_thread +- && !CancelSynchronousIo (chld_procs[ci].wait_thread->thread_handle ())) ++ if (_my_tls._ctinfo != chld_procs[ci].wait_thread) + chld_procs[ci].wait_thread->terminate_thread (); + } + else if (chld_procs[ci] && chld_procs[ci]->exists ()) diff --git a/msys2-runtime/0043-Cygwin-cache-IsWow64Process2-host-arch-in-wincap.patch b/msys2-runtime/0043-Cygwin-cache-IsWow64Process2-host-arch-in-wincap.patch new file mode 100644 index 00000000000..9771f33ccb9 --- /dev/null +++ b/msys2-runtime/0043-Cygwin-cache-IsWow64Process2-host-arch-in-wincap.patch @@ -0,0 +1,109 @@ +From 5453f9fab649b5fc02b2d6cdb8411c8fbd0b7409 Mon Sep 17 00:00:00 2001 +From: Jeremy Drake +Date: Wed, 27 Nov 2024 11:22:49 -0800 +Subject: [PATCH 43/N] Cygwin: cache IsWow64Process2 host arch in wincap. + +This was already used in the FAST_CWD check, and could be used in a +couple other places. + +I found the "emulated"/process value returned from the function largely +useless, so I did not cache it. It is useless because, as the docs say, +it is set to IMAGE_FILE_MACHINE_UNKNOWN (0) if the process is not +running under WOW64, but Microsoft also doesn't consider x64-on-ARM64 to +be WOW64, so it is set to 0 regardless if the process is ARM64 or x64. +You can tell the difference via +GetProcessInformation(ProcessMachineTypeInfo), but for the current +process even that's overkill: what we really want to know is the +IMAGE_FILE_MACHINE_* constant for the Cygwin dll itself, which is +conveniently located in memory already, so cache that in wincap also for +easy comparisons. + +Signed-off-by: Jeremy Drake +(cherry picked from commit 46f7bcc1e575826f6d3e4a5770ae61423d9be5a9) +--- + winsup/cygwin/local_includes/wincap.h | 4 ++++ + winsup/cygwin/path.cc | 6 ++---- + winsup/cygwin/wincap.cc | 19 +++++++++++++++++++ + 3 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/winsup/cygwin/local_includes/wincap.h b/winsup/cygwin/local_includes/wincap.h +index c148727..250866f 100644 +--- a/winsup/cygwin/local_includes/wincap.h ++++ b/winsup/cygwin/local_includes/wincap.h +@@ -42,6 +42,8 @@ class wincapc + RTL_OSVERSIONINFOEXW version; + char osnam[40]; + const void *caps; ++ USHORT host_mach; ++ USHORT cygwin_mach; + bool _is_server; + + public: +@@ -61,6 +63,8 @@ public: + { return (size_t) system_info.dwAllocationGranularity; } + const char *osname () const { return osnam; } + const DWORD build_number () const { return version.dwBuildNumber; } ++ const USHORT host_machine () const { return host_mach; } ++ const USHORT cygwin_machine () const { return cygwin_mach; } + + #define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; } + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index f8afd4c..5d2f0a5 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -4826,14 +4826,12 @@ find_fast_cwd_pointer () + static fcwd_access_t ** + find_fast_cwd () + { +- USHORT emulated, hosted; + fcwd_access_t **f_cwd_ptr; + +- /* First check if we're running in WOW64 on ARM64 emulating AMD64. Skip ++ /* First check if we're running on an ARM64 system. Skip + fetching FAST_CWD pointer as long as there's no solution for finding + it on that system. */ +- if (IsWow64Process2 (GetCurrentProcess (), &emulated, &hosted) +- && hosted == IMAGE_FILE_MACHINE_ARM64) ++ if (wincap.host_machine () == IMAGE_FILE_MACHINE_ARM64) + return NULL; + + /* Fetch the pointer but don't set the global fast_cwd_ptr yet. First +diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc +index 30d9c14..deecf8b 100644 +--- a/winsup/cygwin/wincap.cc ++++ b/winsup/cygwin/wincap.cc +@@ -235,9 +235,15 @@ static const wincaps wincap_11 = { + + wincapc wincap __attribute__((section (".cygwin_dll_common"), shared)); + ++extern IMAGE_DOS_HEADER ++__image_base__; ++ + void + wincapc::init () + { ++ PIMAGE_NT_HEADERS ntheader; ++ USHORT emul_mach; ++ + if (caps) + return; // already initialized + +@@ -282,4 +288,17 @@ wincapc::init () + + __small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion, + version.dwMinorVersion); ++ ++ if (!IsWow64Process2 (GetCurrentProcess (), &emul_mach, &host_mach)) ++ { ++ /* If IsWow64Process2 succeeded, it filled in host_mach. Assume the only ++ way it fails for the current process is that we're running on an OS ++ version where it's not implemented yet. As such, the only realistic ++ option for host_mach is AMD64 */ ++ host_mach = IMAGE_FILE_MACHINE_AMD64; ++ } ++ ++ ntheader = (PIMAGE_NT_HEADERS)((LPBYTE) &__image_base__ ++ + __image_base__.e_lfanew); ++ cygwin_mach = ntheader->FileHeader.Machine; + } diff --git a/msys2-runtime/0044-Cygwin-uname-add-host-machine-tag-to-sysname.patch b/msys2-runtime/0044-Cygwin-uname-add-host-machine-tag-to-sysname.patch new file mode 100644 index 00000000000..d4c0f16fdef --- /dev/null +++ b/msys2-runtime/0044-Cygwin-uname-add-host-machine-tag-to-sysname.patch @@ -0,0 +1,51 @@ +From 985e2654b8498dea90f240be8af40f1ddc9bb7a8 Mon Sep 17 00:00:00 2001 +From: Jeremy Drake +Date: Wed, 27 Nov 2024 11:26:50 -0800 +Subject: [PATCH 44/N] Cygwin: uname: add host machine tag to sysname. + +If the Cygwin dll's architecture is different from the host system's +architecture, append an additional tag that indicates the host system +architecture (the Cygwin dll's architecture is already indicated in +machine). + +Signed-off-by: Jeremy Drake +(cherry picked from commit 7923059bff6c120c6fb74b63c7553ea345c0a8f3) +--- + winsup/cygwin/uname.cc | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc +index a978363..ba73edd 100644 +--- a/winsup/cygwin/uname.cc ++++ b/winsup/cygwin/uname.cc +@@ -51,13 +51,27 @@ uname_x (struct utsname *name) + __try + { + char buf[NI_MAXHOST + 1] ATTRIBUTE_NONSTRING; ++ int n; + + memset (name, 0, sizeof (*name)); + /* sysname */ + const char* sysname = get_sysname(); +- __small_sprintf (name->sysname, "%s_%s-%u", +- sysname, +- wincap.osname (), wincap.build_number ()); ++ n = __small_sprintf (name->sysname, "%s_%s-%u", ++ sysname, ++ wincap.osname (), wincap.build_number ()); ++ if (wincap.host_machine () != wincap.cygwin_machine ()) ++ { ++ switch (wincap.host_machine ()) ++ { ++ case IMAGE_FILE_MACHINE_ARM64: ++ n = stpcpy (name->sysname + n, "-ARM64") - name->sysname; ++ break; ++ default: ++ n += __small_sprintf (name->sysname + n, "-%04y", ++ (int) wincap.host_machine ()); ++ break; ++ } ++ } + /* nodename */ + memset (buf, 0, sizeof buf); + cygwin_gethostname (buf, sizeof buf - 1); diff --git a/msys2-runtime/0041-Handle-8-bit-characters-under-LOCALE-C.patch b/msys2-runtime/0045-Handle-8-bit-characters-under-LOCALE-C.patch similarity index 88% rename from msys2-runtime/0041-Handle-8-bit-characters-under-LOCALE-C.patch rename to msys2-runtime/0045-Handle-8-bit-characters-under-LOCALE-C.patch index e6fecc4de95..5f8b8c46ee3 100644 --- a/msys2-runtime/0041-Handle-8-bit-characters-under-LOCALE-C.patch +++ b/msys2-runtime/0045-Handle-8-bit-characters-under-LOCALE-C.patch @@ -1,7 +1,7 @@ -From 3cf583c2418a3a7d80052d32e2579ab6fd586bf2 Mon Sep 17 00:00:00 2001 +From cac55e8ee551009389c14b4d2ba4624a629d7f4d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Feb 2015 13:56:22 +0000 -Subject: [PATCH 41/N] Handle 8-bit characters under LOCALE=C +Subject: [PATCH 45/N] Handle 8-bit characters under LOCALE=C Even when the character set is specified as ASCII, we should handle data outside the 7-bit range gracefully by simply copying it, even if it is diff --git a/msys2-runtime/0042-Mention-the-extremely-useful-small_printf-function.patch b/msys2-runtime/0046-Mention-the-extremely-useful-small_printf-function.patch similarity index 89% rename from msys2-runtime/0042-Mention-the-extremely-useful-small_printf-function.patch rename to msys2-runtime/0046-Mention-the-extremely-useful-small_printf-function.patch index 95f7a9b3a4c..1161473b1e1 100644 --- a/msys2-runtime/0042-Mention-the-extremely-useful-small_printf-function.patch +++ b/msys2-runtime/0046-Mention-the-extremely-useful-small_printf-function.patch @@ -1,7 +1,7 @@ -From 51d19bba89795d970210f9fc8bc0a66db51b0415 Mon Sep 17 00:00:00 2001 +From 6990ce7e94d985ccaf4c1b83de6e612af503e172 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Feb 2015 11:54:47 +0000 -Subject: [PATCH 42/N] Mention the extremely useful small_printf() function +Subject: [PATCH 46/N] Mention the extremely useful small_printf() function It came in real handy while debugging an issue that strace 'fixed'. diff --git a/msys2-runtime/0043-Fixed-path-converting-with-non-ascii-char.patch b/msys2-runtime/0047-Fixed-path-converting-with-non-ascii-char.patch similarity index 89% rename from msys2-runtime/0043-Fixed-path-converting-with-non-ascii-char.patch rename to msys2-runtime/0047-Fixed-path-converting-with-non-ascii-char.patch index 9f628006d3f..50cce1564df 100644 --- a/msys2-runtime/0043-Fixed-path-converting-with-non-ascii-char.patch +++ b/msys2-runtime/0047-Fixed-path-converting-with-non-ascii-char.patch @@ -1,7 +1,7 @@ -From 885c2fa0baa2bb15d50f23b67082e9d6e99a33cc Mon Sep 17 00:00:00 2001 +From 8b2144fadccafcbc790ec71137b72932adda49dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?= Date: Mon, 9 Mar 2015 16:24:43 +0100 -Subject: [PATCH 43/N] Fixed path converting with non ascii char. +Subject: [PATCH 47/N] Fixed path converting with non ascii char. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/msys2-runtime/0044-Allow-native-symlinks-to-non-existing-targets-in-nat.patch b/msys2-runtime/0048-Allow-native-symlinks-to-non-existing-targets-in-nat.patch similarity index 96% rename from msys2-runtime/0044-Allow-native-symlinks-to-non-existing-targets-in-nat.patch rename to msys2-runtime/0048-Allow-native-symlinks-to-non-existing-targets-in-nat.patch index 15a78ca3983..b27d5716dbd 100644 --- a/msys2-runtime/0044-Allow-native-symlinks-to-non-existing-targets-in-nat.patch +++ b/msys2-runtime/0048-Allow-native-symlinks-to-non-existing-targets-in-nat.patch @@ -1,7 +1,7 @@ -From 96143778d49b5514a2d308c48ede28a058ee2f5f Mon Sep 17 00:00:00 2001 +From 64dfcd63798a42eeed61b8028aeaf372472312d0 Mon Sep 17 00:00:00 2001 From: Karsten Blees Date: Wed, 20 May 2015 16:32:52 +0200 -Subject: [PATCH 44/N] Allow native symlinks to non-existing targets in +Subject: [PATCH 48/N] Allow native symlinks to non-existing targets in 'nativestrict' mode Windows native symlinks must match the type of their target (file or @@ -30,7 +30,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index b0c45fa..1e0fa04 100644 +index 5d2f0a5..3623aec 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1865,7 +1865,7 @@ symlink_native (const char *oldpath, path_conv &win32_newpath) diff --git a/msys2-runtime/0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch b/msys2-runtime/0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch deleted file mode 100644 index ba0c902f1d9..00000000000 --- a/msys2-runtime/0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 900a410ab854ee698b3aebe85b799c14398c41c2 Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Sat, 31 Aug 2024 18:32:00 +0900 -Subject: [PATCH 49/N] Cygwin: console: Disable cons_master_thread in - win32-input-mode - -When win32-input-mode (which is supported by Windows Termainal) is -set by "\033[?9001h", cons_master_thread does not work properly and -consumes larger and larger memory space. This is because sending -event by WriteConsoleInput() is translated into the sequence that -is used by win32-input-mode. Due to this behaviour, write-back -of the INPUT_RECORDs does not work as expected. With this patch, -cons_master_thread is disabled on win32-input-mode where the signal -keys such as Ctrl-C, Ctrl-Z etc. never comes. - -Backported-from: 68a14b66ff (Cygwin: console: Disable cons_master_thread in win32-input-mode, 2024-08-31) -Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256380.html -Fixes: ff4440fcf768 ("Cygwin: console: Introduce new thread which handles input signal.") -Reported-by: Adamyg Mob -Signed-off-by: Takashi Yano -(cherry picked from commit 84d77e5918e18170c393407d477140fcf5d3e432) -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/fhandler/console.cc | 8 ++++++-- - winsup/cygwin/local_includes/fhandler.h | 2 ++ - winsup/cygwin/release/3.5.5 | 6 ++++++ - 3 files changed, 14 insertions(+), 2 deletions(-) - create mode 100644 winsup/cygwin/release/3.5.5 - -diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc -index d4c3f10..dc43cd9 100644 ---- a/winsup/cygwin/fhandler/console.cc -+++ b/winsup/cygwin/fhandler/console.cc -@@ -818,6 +818,7 @@ fhandler_console::set_input_mode (tty::cons_mode m, const termios *t, - GetConsoleMode (p->input_handle, &oflags); - DWORD flags = oflags - & (ENABLE_EXTENDED_FLAGS | ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE); -+ con.curr_input_mode = m; - switch (m) - { - case tty::restore: -@@ -867,6 +868,7 @@ fhandler_console::set_output_mode (tty::cons_mode m, const termios *t, - if (con.orig_virtual_terminal_processing_mode) - flags |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - WaitForSingleObject (p->output_mutex, mutex_timeout); -+ con.curr_output_mode = m; - switch (m) - { - case tty::restore: -@@ -1109,12 +1111,12 @@ fhandler_console::bg_check (int sig, bool dontsignal) - /* Setting-up console mode for cygwin app. This is necessary if the - cygwin app and other non-cygwin apps are started simultaneously - in the same process group. */ -- if (sig == SIGTTIN) -+ if (sig == SIGTTIN && con.curr_input_mode != tty::cygwin) - { - set_input_mode (tty::cygwin, &tc ()->ti, get_handle_set ()); - set_disable_master_thread (false, this); - } -- if (sig == SIGTTOU) -+ if (sig == SIGTTOU && con.curr_output_mode != tty::cygwin) - set_output_mode (tty::cygwin, &tc ()->ti, get_handle_set ()); - - return fhandler_termios::bg_check (sig, dontsignal); -@@ -2921,6 +2923,8 @@ fhandler_console::char_command (char c) - } - if (con.args[i] == 1) /* DECCKM */ - con.cursor_key_app_mode = (c == 'h'); -+ if (con.args[i] == 9001) /* win32-input-mode (https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md) */ -+ set_disable_master_thread (c == 'h', this); - } - /* Call fix_tab_position() if screen has been alternated. */ - if (need_fix_tab_position) -diff --git a/winsup/cygwin/local_includes/fhandler.h b/winsup/cygwin/local_includes/fhandler.h -index 3d819f4..10bc9c7 100644 ---- a/winsup/cygwin/local_includes/fhandler.h -+++ b/winsup/cygwin/local_includes/fhandler.h -@@ -2160,6 +2160,8 @@ class dev_console - char *cons_rapoi; - bool cursor_key_app_mode; - bool disable_master_thread; -+ tty::cons_mode curr_input_mode; -+ tty::cons_mode curr_output_mode; - bool master_thread_suspended; - int num_processed; /* Number of input events in the current input buffer - already processed by cons_master_thread(). */ -diff --git a/winsup/cygwin/release/3.5.5 b/winsup/cygwin/release/3.5.5 -new file mode 100644 -index 0000000..a98687c ---- /dev/null -+++ b/winsup/cygwin/release/3.5.5 -@@ -0,0 +1,6 @@ -+Fixes: -+------ -+ -+- Fix undesired behaviour of console master thread in win32-input-mode -+ which is supported by Windows Termainal. -+ Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256380.html diff --git a/msys2-runtime/0045-Make-paths-WCS-MBS-conversion-explicit.patch b/msys2-runtime/0049-Make-paths-WCS-MBS-conversion-explicit.patch similarity index 98% rename from msys2-runtime/0045-Make-paths-WCS-MBS-conversion-explicit.patch rename to msys2-runtime/0049-Make-paths-WCS-MBS-conversion-explicit.patch index 14d426851e9..bc957491e90 100644 --- a/msys2-runtime/0045-Make-paths-WCS-MBS-conversion-explicit.patch +++ b/msys2-runtime/0049-Make-paths-WCS-MBS-conversion-explicit.patch @@ -1,7 +1,7 @@ -From 70b4715d0f4d38e951f01471393b5c3f254363f7 Mon Sep 17 00:00:00 2001 +From e05ee9217c75a5910d111b407f2026e439e67daf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 18 Dec 2015 20:19:57 +0100 -Subject: [PATCH 45/N] Make paths' WCS->MBS conversion explicit +Subject: [PATCH 49/N] Make paths' WCS->MBS conversion explicit * dcrt0.cc (dll_crt0_1), dtable.cc (handle_to_fn), environ.cc (environ_init, getwinenveq, build_env), external.cc @@ -241,10 +241,10 @@ index 33863d8..353375a 100644 ep.version = EXTERNAL_PINFO_VERSION; diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc -index 2cfac6b..5359e13 100644 +index 794c8eb..70b7765 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc -@@ -2409,7 +2409,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, +@@ -2412,7 +2412,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, char *p = stpcpy (file, pc.get_posix ()); if (p[-1] != '/') *p++ = '/'; @@ -253,7 +253,7 @@ index 2cfac6b..5359e13 100644 fname->Buffer, fname->Length / sizeof (WCHAR)); path_conv fpath (file, PC_SYM_NOFOLLOW); if (fpath.issymlink ()) -@@ -2430,7 +2430,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, +@@ -2433,7 +2433,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, } } @@ -456,7 +456,7 @@ index f57465a..57af967 100644 } } diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index b0c45fa..01c7840 100644 +index 5d2f0a5..f89e631 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -621,7 +621,8 @@ path_conv::check (const UNICODE_STRING *src, unsigned opt, @@ -541,7 +541,7 @@ index b0c45fa..01c7840 100644 return -1; what = (what & ~CCP_CONVTYPE_MASK) | CCP_WIN_A_TO_POSIX; from = (const void *) winp; -@@ -5257,9 +5258,9 @@ cwdstuff::get_error_desc () const +@@ -5253,9 +5254,9 @@ cwdstuff::get_error_desc () const void cwdstuff::reset_posix (wchar_t *w_cwd) { @@ -553,7 +553,7 @@ index b0c45fa..01c7840 100644 } char * -@@ -5284,7 +5285,7 @@ cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen) +@@ -5280,7 +5281,7 @@ cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen) if (!need_posix) { tocopy = tp.c_get (); diff --git a/msys2-runtime/0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch b/msys2-runtime/0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch deleted file mode 100644 index 915796a7aba..00000000000 --- a/msys2-runtime/0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8854bb46dbb94ca567430b8340ed12a21e4b8737 Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Sun, 1 Sep 2024 04:31:03 +0900 -Subject: [PATCH 50/N] Cygwin: pipe: Fix a regression that raw_write() slows - down - -After the commit 7f3c22532577, writing to pipe extremely slows down. -This is because cygwait(select_sem, 10, cw_cancel) is called even -when write operation is already completed. With this patch, the -cygwait() is called only if the write operation is not completed. - -Backported-from: 37ab3e0d55 (Cygwin: pipe: Fix a regression that raw_write() slows down, 2024-09-01) -Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256398.html -Fixes: 7f3c22532577 ("Cygwin: pipe: handle signals explicitely in raw_write") -Reported-by: Jim Reisert AD1C -Reviewed-by: Corinna Vinschen -Signed-off-by: Takashi Yano -(cherry picked from commit f78009cb1ccf84cc343cf2441c76196461d87532) -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/release/3.5.5 | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/winsup/cygwin/release/3.5.5 b/winsup/cygwin/release/3.5.5 -index a98687c..904119a 100644 ---- a/winsup/cygwin/release/3.5.5 -+++ b/winsup/cygwin/release/3.5.5 -@@ -4,3 +4,6 @@ Fixes: - - Fix undesired behaviour of console master thread in win32-input-mode - which is supported by Windows Termainal. - Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256380.html -+ -+- Fix a regression in 3.5.4 that writing to pipe extremely slows down. -+ Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256398.html diff --git a/msys2-runtime/0046-Use-MB_CUR_MAX-6-by-default.patch b/msys2-runtime/0050-Use-MB_CUR_MAX-6-by-default.patch similarity index 90% rename from msys2-runtime/0046-Use-MB_CUR_MAX-6-by-default.patch rename to msys2-runtime/0050-Use-MB_CUR_MAX-6-by-default.patch index 5436d7d547f..10c03c6c2d4 100644 --- a/msys2-runtime/0046-Use-MB_CUR_MAX-6-by-default.patch +++ b/msys2-runtime/0050-Use-MB_CUR_MAX-6-by-default.patch @@ -1,7 +1,7 @@ -From 97cefff70c0abe58010c10319e9d4aed6101fdc9 Mon Sep 17 00:00:00 2001 +From 2ff02fd6f3328e48d6ebe6991b5ec282a75f1afe Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 21 Nov 2019 14:21:01 +0100 -Subject: [PATCH 46/N] Use MB_CUR_MAX == 6 by default +Subject: [PATCH 50/N] Use MB_CUR_MAX == 6 by default Internally, Cygwin already uses __utf8_mbtowc(), even if it still claims to use the "ASCII" charset. diff --git a/msys2-runtime/0047-Change-the-default-base-address-for-x86_64.patch b/msys2-runtime/0051-Change-the-default-base-address-for-x86_64.patch similarity index 92% rename from msys2-runtime/0047-Change-the-default-base-address-for-x86_64.patch rename to msys2-runtime/0051-Change-the-default-base-address-for-x86_64.patch index 05563906e39..f40003f08b9 100644 --- a/msys2-runtime/0047-Change-the-default-base-address-for-x86_64.patch +++ b/msys2-runtime/0051-Change-the-default-base-address-for-x86_64.patch @@ -1,7 +1,7 @@ -From 0472dec062c16b8860814c157d13be045fed235f Mon Sep 17 00:00:00 2001 +From e1c6154bd29c01f6d5efee7630c3d5feb70833e1 Mon Sep 17 00:00:00 2001 From: Mikael Larsson <95430516+chirpnot@users.noreply.github.com> Date: Thu, 10 Mar 2022 17:26:42 +0000 -Subject: [PATCH 47/N] Change the default base address for x86_64 +Subject: [PATCH 51/N] Change the default base address for x86_64 This might break things, but it turns out several Windows libraries like to be loaded at 0x180000000. diff --git a/msys2-runtime/0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch b/msys2-runtime/0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch deleted file mode 100644 index 710f1d1ee2a..00000000000 --- a/msys2-runtime/0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 9d0d6e12ecd99082219677a5437b3604e4292077 Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Fri, 6 Sep 2024 14:19:44 +0900 -Subject: [PATCH 51/N] Cygwin: pipe: Restore blocking mode of read pipe on - close()/raw_read() - -If a cygwin app is executed from a non-cygwin app and the cygwin -app exits, the read pipe remains in the non-blocking mode because -of the commit fc691d0246b9. Due to this behaviour, the non-cygwin -app cannot read the pipe correctly after that. Similarly, if a -non-cygwin app is executed from a cygwin app and the non-cygwin -app exits, the read pipe remains in the blocking mode. With this -patch, the blocking mode of the read pipe is stored into a variable -was_blocking_read_pipe on set_pipe_non_blocking() when the cygwin -app starts and restored on close(). In addition, the pipe mode is -set to non-blocking mode in raw_read() if the mode is blocking -mode by referring the variable is_blocking_read_pipe as well. -is_blocking_read_pipe is a member of fhandler_pipe class and is set -by set_pipe_non_blocking(), so if other process sets the pipe mode -to blocking mode, the current process cannot know the pipe is -blocking mode. Therefore, is_blocking_read_pipe is also set on the -signal __SIGNONCYGCHLD, which is sent to the process group when -non-cygwin app is started. - -Backported-from: c7fe29f5cb (Cygwin: pipe: Restore blocking mode of read pipe on close()/raw_read(), 2024-09-06) -Addresses: https://github.com/git-for-windows/git/issues/5115 -Fixes: fc691d0246b9 ("Cygwin: pipe: Make sure to set read pipe non-blocking for cygwin apps."); -Reported-by: isaacag, Johannes Schindelin -Reviewed-by: Corinna Vinschen , Ken Brown -Signed-off-by: Takashi Yano -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/fhandler/pipe.cc | 41 +++++++++++++++++++++++++ - winsup/cygwin/local_includes/fhandler.h | 3 ++ - winsup/cygwin/sigproc.cc | 9 +----- - 3 files changed, 45 insertions(+), 8 deletions(-) - -diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc -index 040176e..8077082 100644 ---- a/winsup/cygwin/fhandler/pipe.cc -+++ b/winsup/cygwin/fhandler/pipe.cc -@@ -54,6 +54,16 @@ fhandler_pipe::set_pipe_non_blocking (bool nonblocking) - NTSTATUS status; - IO_STATUS_BLOCK io; - FILE_PIPE_INFORMATION fpi; -+ bool was_blocking_read_pipe_new = was_blocking_read_pipe; -+ -+ if (get_device () == FH_PIPER && nonblocking && !was_blocking_read_pipe) -+ { -+ status = NtQueryInformationFile (get_handle (), &io, &fpi, sizeof fpi, -+ FilePipeInformation); -+ if (NT_SUCCESS (status)) -+ was_blocking_read_pipe_new = -+ (fpi.CompletionMode == FILE_PIPE_QUEUE_OPERATION); -+ } - - fpi.ReadMode = FILE_PIPE_BYTE_STREAM_MODE; - fpi.CompletionMode = nonblocking ? FILE_PIPE_COMPLETE_OPERATION -@@ -62,6 +72,11 @@ fhandler_pipe::set_pipe_non_blocking (bool nonblocking) - FilePipeInformation); - if (!NT_SUCCESS (status)) - debug_printf ("NtSetInformationFile(FilePipeInformation): %y", status); -+ else -+ { -+ was_blocking_read_pipe = was_blocking_read_pipe_new; -+ is_blocking_read_pipe = !nonblocking; -+ } - } - - int -@@ -95,6 +110,8 @@ fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode, int64_t uniq_id) - even with FILE_SYNCHRONOUS_IO_NONALERT. */ - set_pipe_non_blocking (get_device () == FH_PIPER ? - true : is_nonblocking ()); -+ was_blocking_read_pipe = false; -+ - return 1; - } - -@@ -289,6 +306,9 @@ fhandler_pipe::raw_read (void *ptr, size_t& len) - if (!len) - return; - -+ if (is_blocking_read_pipe) -+ set_pipe_non_blocking (true); -+ - DWORD timeout = is_nonblocking () ? 0 : INFINITE; - DWORD waitret = cygwait (read_mtx, timeout); - switch (waitret) -@@ -721,6 +741,8 @@ fhandler_pipe::close () - CloseHandle (query_hdl); - if (query_hdl_close_req_evt) - CloseHandle (query_hdl_close_req_evt); -+ if (was_blocking_read_pipe) -+ set_pipe_non_blocking (false); - int ret = fhandler_base::close (); - ReleaseMutex (hdl_cnt_mtx); - CloseHandle (hdl_cnt_mtx); -@@ -1377,6 +1399,7 @@ fhandler_pipe::spawn_worker (int fileno_stdin, int fileno_stdout, - { - fhandler_pipe *pipe = (fhandler_pipe *)(fhandler_base *) cfd; - pipe->set_pipe_non_blocking (false); -+ need_send_noncygchld_sig = true; - } - - /* If multiple writers including non-cygwin app exist, the non-cygwin -@@ -1402,3 +1425,21 @@ fhandler_pipe::spawn_worker (int fileno_stdin, int fileno_stdout, - t->kill_pgrp (__SIGNONCYGCHLD); - } - } -+ -+void -+fhandler_pipe::sigproc_worker (void) -+{ -+ cygheap_fdenum cfd (false); -+ while (cfd.next () >= 0) -+ if (cfd->get_dev () == FH_PIPEW) -+ { -+ fhandler_pipe *pipe = (fhandler_pipe *)(fhandler_base *) cfd; -+ if (pipe->need_close_query_hdl ()) -+ pipe->close_query_handle (); -+ } -+ else if (cfd->get_dev () == FH_PIPER) -+ { -+ fhandler_pipe *pipe = (fhandler_pipe *)(fhandler_base *) cfd; -+ pipe->is_blocking_read_pipe = true; -+ } -+} -diff --git a/winsup/cygwin/local_includes/fhandler.h b/winsup/cygwin/local_includes/fhandler.h -index 10bc9c7..0000044 100644 ---- a/winsup/cygwin/local_includes/fhandler.h -+++ b/winsup/cygwin/local_includes/fhandler.h -@@ -1197,6 +1197,8 @@ class fhandler_pipe: public fhandler_pipe_fifo - private: - HANDLE read_mtx; - pid_t popen_pid; -+ bool was_blocking_read_pipe; -+ bool is_blocking_read_pipe; - HANDLE query_hdl; - HANDLE hdl_cnt_mtx; - HANDLE query_hdl_proc; -@@ -1287,6 +1289,7 @@ public: - } - static void spawn_worker (int fileno_stdin, int fileno_stdout, - int fileno_stderr); -+ static void sigproc_worker (void); - }; - - #define CYGWIN_FIFO_PIPE_NAME_LEN 47 -diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc -index a89f09d..5c5ff73 100644 ---- a/winsup/cygwin/sigproc.cc -+++ b/winsup/cygwin/sigproc.cc -@@ -1475,14 +1475,7 @@ wait_sig (VOID *) - } - break; - case __SIGNONCYGCHLD: -- cygheap_fdenum cfd (false); -- while (cfd.next () >= 0) -- if (cfd->get_dev () == FH_PIPEW) -- { -- fhandler_pipe *pipe = (fhandler_pipe *)(fhandler_base *) cfd; -- if (pipe->need_close_query_hdl ()) -- pipe->close_query_handle (); -- } -+ fhandler_pipe::sigproc_worker (); - break; - } - if (clearwait && !have_execed) diff --git a/msys2-runtime/0048-msys2-runtime-restore-fast-path-for-current-user-pri.patch b/msys2-runtime/0052-msys2-runtime-restore-fast-path-for-current-user-pri.patch similarity index 97% rename from msys2-runtime/0048-msys2-runtime-restore-fast-path-for-current-user-pri.patch rename to msys2-runtime/0052-msys2-runtime-restore-fast-path-for-current-user-pri.patch index c604f66e4dc..f15da24a7d0 100644 --- a/msys2-runtime/0048-msys2-runtime-restore-fast-path-for-current-user-pri.patch +++ b/msys2-runtime/0052-msys2-runtime-restore-fast-path-for-current-user-pri.patch @@ -1,7 +1,7 @@ -From f4fb5643004a64c7dbe7148bea064607e70ed80b Mon Sep 17 00:00:00 2001 +From 9ba6664c8b10045fc621e5f86bd1e105cda4f222 Mon Sep 17 00:00:00 2001 From: Richard Glidden Date: Thu, 24 Aug 2023 13:36:10 -0400 -Subject: [PATCH 48/N] msys2-runtime: restore fast path for current user +Subject: [PATCH 52/N] msys2-runtime: restore fast path for current user primary group Commit a5bcfe616c7e removed an optimization that fetches the diff --git a/msys2-runtime/0052-Fix-SSH-hangs.patch b/msys2-runtime/0053-Fix-SSH-hangs.patch similarity index 96% rename from msys2-runtime/0052-Fix-SSH-hangs.patch rename to msys2-runtime/0053-Fix-SSH-hangs.patch index 5e614b52ebb..1054ab19505 100644 --- a/msys2-runtime/0052-Fix-SSH-hangs.patch +++ b/msys2-runtime/0053-Fix-SSH-hangs.patch @@ -1,7 +1,7 @@ -From cbe555e054cefeccd65250bb11dc56f82196301f Mon Sep 17 00:00:00 2001 +From 67bdfc7ab0448278166f94d6fc9c529f6ae796ce Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 10 Oct 2024 19:52:47 +0200 -Subject: [PATCH 52/N] Fix SSH hangs +Subject: [PATCH 53/N] Fix SSH hangs It was reported in https://github.com/git-for-windows/git/issues/5199 that as of v3.5.4, cloning or fetching via SSH is hanging indefinitely. diff --git a/msys2-runtime/0055-fixup-cygthread-suspend-thread-before-terminating.patch b/msys2-runtime/0055-fixup-cygthread-suspend-thread-before-terminating.patch deleted file mode 100644 index 89af49432a2..00000000000 --- a/msys2-runtime/0055-fixup-cygthread-suspend-thread-before-terminating.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 54a725237845135bbb4609e1194366dece79a0e3 Mon Sep 17 00:00:00 2001 -From: Jeremy Drake -Date: Wed, 13 Nov 2024 15:13:04 -0800 -Subject: [PATCH 55/N] fixup! cygthread: suspend thread before terminating. - -Suppress error output if ReadFile on child wait pipe returns -ERROR_OPERATION_ABORTED due to addition of CancelSynchronousIo call. - -Cherry picked from commit eafd9a22bc (fixup! cygthread: suspend thread -before terminating., 2024-11-13) from msys2/msys2-runtime. - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/pinfo.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc -index a5f5d6e..43e0034 100644 ---- a/winsup/cygwin/pinfo.cc -+++ b/winsup/cygwin/pinfo.cc -@@ -1262,13 +1262,14 @@ proc_waiter (void *arg) - - for (;;) - { -- DWORD nb; -+ DWORD nb, err; - char buf = '\0'; - - if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL) -- && GetLastError () != ERROR_BROKEN_PIPE) -+ && (err = GetLastError ()) != ERROR_BROKEN_PIPE) - { -- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); -+ if (err != ERROR_OPERATION_ABORTED) -+ system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); - break; - } - diff --git a/msys2-runtime/0056-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch b/msys2-runtime/0056-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch deleted file mode 100644 index 278193a999c..00000000000 --- a/msys2-runtime/0056-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 395fda678b4448587cabbeab936318459c10f209 Mon Sep 17 00:00:00 2001 -From: Jeremy Drake -Date: Thu, 21 Nov 2024 22:13:42 -0800 -Subject: [PATCH 56/N] Cygwin: revert use of CancelSyncronousIo on - wait_thread. - -It appears this is causing hangs on native x86_64 in similar scenarios -as the hangs on ARM64, because `CancelSynchronousIo` is returning `TRUE` -but not canceling the `ReadFile` call as expected. - -Cherry-picked from msys2/msys2-runtime's 2eb6be14ee (Cygwin: revert use -of CancelSyncronousIo on wait_thread., 2024-11-21). - -Addresses: https://github.com/msys2/MSYS2-packages/issues/4340#issuecomment-2491401847 -Fixes: b091b47b9e56 ("cygthread: suspend thread before terminating.") -Signed-off-by: Jeremy Drake -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/pinfo.cc | 7 +++---- - winsup/cygwin/sigproc.cc | 3 +-- - 2 files changed, 4 insertions(+), 6 deletions(-) - -diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc -index 43e0034..a5f5d6e 100644 ---- a/winsup/cygwin/pinfo.cc -+++ b/winsup/cygwin/pinfo.cc -@@ -1262,14 +1262,13 @@ proc_waiter (void *arg) - - for (;;) - { -- DWORD nb, err; -+ DWORD nb; - char buf = '\0'; - - if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL) -- && (err = GetLastError ()) != ERROR_BROKEN_PIPE) -+ && GetLastError () != ERROR_BROKEN_PIPE) - { -- if (err != ERROR_OPERATION_ABORTED) -- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); -+ system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe); - break; - } - -diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc -index d180277..5c5ff73 100644 ---- a/winsup/cygwin/sigproc.cc -+++ b/winsup/cygwin/sigproc.cc -@@ -410,8 +410,7 @@ proc_terminate () - if (!have_execed || !have_execed_cygwin) - chld_procs[i]->ppid = 1; - if (chld_procs[i].wait_thread) -- if (!CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle ())) -- chld_procs[i].wait_thread->terminate_thread (); -+ chld_procs[i].wait_thread->terminate_thread (); - /* Release memory associated with this process unless it is 'myself'. - 'myself' is only in the chld_procs table when we've execed. We - reach here when the next process has finished initializing but we diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index 0d55b74b790..a6906aa2b90 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -3,8 +3,8 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') -pkgver=3.5.4 -pkgrel=5 +pkgver=3.5.5 +pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('x86_64') url="https://www.cygwin.com/" @@ -66,81 +66,75 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve 0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch 0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch 0039-uname-report-msys2-runtime-commit-hash-too.patch - 0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch - 0041-Handle-8-bit-characters-under-LOCALE-C.patch - 0042-Mention-the-extremely-useful-small_printf-function.patch - 0043-Fixed-path-converting-with-non-ascii-char.patch - 0044-Allow-native-symlinks-to-non-existing-targets-in-nat.patch - 0045-Make-paths-WCS-MBS-conversion-explicit.patch - 0046-Use-MB_CUR_MAX-6-by-default.patch - 0047-Change-the-default-base-address-for-x86_64.patch - 0048-msys2-runtime-restore-fast-path-for-current-user-pri.patch - 0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch - 0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch - 0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch - 0052-Fix-SSH-hangs.patch - 0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch - 0054-cygthread-suspend-thread-before-terminating.patch - 0055-fixup-cygthread-suspend-thread-before-terminating.patch - 0056-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch) -sha256sums=('3812485e2a6ab8360e5b9d566a47b982852ff2b140cea4e332ded19c11c77663' - '827a95d14b6a6c5ec2875c571a38b82d136a845d89e44d7b895c71a9ac4b3be2' - '9f9e1b6b05cbc9a715fe9443740b25171e9c1a276a058e6ba7e4f6eada6872c8' - 'e5b2095e543a5d702cfce6da26cd17a78f40e17620315b1bcc434b94a007ae9b' - 'f13b15dc14aa6ee1dd628a2487564bb484e74ff2f3e4059b9d9d64446a327db1' - '155986f35dfb072fe85993ef184ca029542c1706cf2b29c6483444bd31b13be1' - '87f23592b90efc996a4afa4cf4b74aa6828d62393550b8dca93280880cace5b4' - 'd312eeec44f03b1be90e88fa5172f0c39412b3e89b5886799a956494bc91d9a2' - '83c7d19449c1e39d7d00ae1208ec3ad5c9807b7bdb0471e415f18ade67d5c39e' - 'd77ae7eead224a20e4bf68013e049ca07ecbca63a18d7318d1061162978f3d6b' - 'bae2d10f60e25dca74cd435e43fdc6bf9be47103d7d650c87a2fd6272954329a' - '9db10ecf658cd5f443f61d06e7649ffcd677d7be31b7e6fdf6dfa6268384834f' - '934ccc478f7d8e83b6da6f3b7436e613e169500f40905b5ec11bebc0729135c8' - '17c37645cf7cf4c3518b9135c498379de10820b686f99ffa2203284b024e6974' - '253bc53d1414e5096de6fce89796b89907fa33a779ea95c889bf9b9ce3e17bde' - 'fde2bcc5ca961c7e22a38c85365e46584630d2886966c8c386846572db30146a' - '3568ad0e60a94da91716d3a300a2aded0f15cec964635ee7bec0371af0d7c44c' - '571e5ed60721f42e888b46e02fc503283a7813ac4e957ce962d36970b3f7eca0' - '5a1c306458090293d42ae9ffae7b1d75485b5365e31f5f62a0c548e1c411ccac' - '06367d83f7817f5ca9c494f688f224873fd8c56f90ea3bfb2f500c8649aa6150' - 'ea67073b27f8f78de70a4e1ae4340e2c787115a8670d8140e36df2685e7c35ee' - '699f223b03b36332aebea12984c3770235b66df2902ab3ea177ff1066fd168e3' - 'b00affd0e6df8b9697b1e13695cff3c6db98b484de7038abad6f533580db7e9a' - '158a53bcbdd2f044c197d015bf4fa9b05b2300ea2435794a7527adff2bc277de' - '902c4998dadba3b5a17f031afb9db0fe60feb65a537981921a04734c60bc9910' - '3bceeac2fe9ce7d88324cdc0f9bebe7de120e1d5b909571e606c619bce277689' - 'c546b87225d433f6b312abc4f571a10bd4efbd4138fb11a5477dfe5e6df213c0' - 'b21933657b87ff773b633c8dabb576d55c6aa9f8f42c7ab784f980de767c220d' - '9a9339b069a1c3f45fdd70805bae788e95f0d4fd2fea0ae8f37ae058b1ecfdde' - '785bf87f823025a842466647bdfbd83bade952c007d06f7e68176a186a983ad8' - 'd729c1886bd2249e565ccb8b64f0c31fb71d605715320a76b56aa032e9fa5575' - '471c1a68767b05dafa5e12b23efdbd85123813cfcfef708be4bb6d734ae6b51c' - '33ec577def8ddc9180da824828acc8e201c08d87181f81685c26e0fd163d126e' - '61a411b4747c36fd20d2365eb3d45f53a8eed50b88a22a337e1ab73f8ee54928' - '14a7f6afdc232acaffbc8315543a973118ea205f559e04c6c17de75e9e12d845' - '0c2290d16f120bd64ef2e9824e5ba3af38c59d74008fd4c2028f42ed3bcbb058' - 'e14b90eddb75b56fcf84b8d37044d57eb45c109f08d103ebac160f173a763192' - '5990fbc34e4ac09229383e9a0f3326513a5a9482ebcca929302af0707d96a321' - 'f74cb189aafc9f8bf04cdad02531d9eca524c2dd12672e4e118bfdbb48926110' - '344f108bc9e9ad597e07f1cc8e834e3d1a9fbd9972a1554c1c5de0fce0ae8506' - 'f93578a1150d724a60a7e8eb8491342aeb13f809e2ddb5193d8d126465f665cb' - '41e896036ea67c5d12a712554f4d53949c2dc809bb3545ac6be1fe619848f8af' - '4ad9e540b83f4b71e7e4a6404c3d80d1c5b77edef75a62cda81eb9893b8acd8c' - '5f0acf2e9653f061bb050b08ae2f06cc8ce15a638c9de8079eadbe35514f0a26' - '5502489dbce55e7d267f93d2e571b95c810bdf20a94d70ae0e0783310b0f70bc' - '32f7d58f9544917ce3d40efb27ce58ee1fa6c7075db149a2db7d1e13047078b1' - 'f3d2a214d28219b74414db42210a555bd6cb42146da15f4db533c7d7d36a8a6d' - '41a01da6201460242f7367baa252126b5e3df0b8f1cec040be6c92a1df41ece4' - '6e097d6edb003c7feb578de7a9c26dba6eb5ac96d0176adcaa7aca0fa00ff7ce' - 'ccc574aee2f518ccb70aa65fa85e802d0b3da73c6833c1a8a3d07c91138135db' - '5fb74f788388fcf23b2eab5e74be176c981f5cfcd9f01caf6a9e78cd8fc58e00' - '394229cfa5293e4572dfd7155605343ca7426395429fa47eb38aced11d4f924b' - '590dc0ce9e72a1adf1424c7a4f55bd57d8955eef036776895b3d779d4932d4ce' - '75e22e453011ea15c6cf6b6904c33256530d6f4ba273f03bc6a37d9245064c8c' - '7fe562197a1f3b67b1e794808186c10ff0186b0fcf8d09a8021499b952d04d2c' - '957ea63fbe8e950276dd9deaf9ad3d52bb1558cc6ae71dd741ed3bf14d882499' - '0234fe3a4903fcff8c17a5eff680c357582028f5f794da4e9da68fe843a95ecb' - 'da3e715e6789295d49afb6ef778f03591b710b4b579c3849674898d159f349bd') + 0040-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch + 0041-cygthread-suspend-thread-before-terminating.patch + 0042-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch + 0043-Cygwin-cache-IsWow64Process2-host-arch-in-wincap.patch + 0044-Cygwin-uname-add-host-machine-tag-to-sysname.patch + 0045-Handle-8-bit-characters-under-LOCALE-C.patch + 0046-Mention-the-extremely-useful-small_printf-function.patch + 0047-Fixed-path-converting-with-non-ascii-char.patch + 0048-Allow-native-symlinks-to-non-existing-targets-in-nat.patch + 0049-Make-paths-WCS-MBS-conversion-explicit.patch + 0050-Use-MB_CUR_MAX-6-by-default.patch + 0051-Change-the-default-base-address-for-x86_64.patch + 0052-msys2-runtime-restore-fast-path-for-current-user-pri.patch + 0053-Fix-SSH-hangs.patch) +sha256sums=('b946762515173a45371a88060e9e672a4aaa290541fd6400660bf35a286a375f' + 'f1d65306e84af2e3ebb1a54694739b490eae2d41dc3195ad2d2502ac6dae4219' + '76e37d572d2aba473aab8f5a1984af2084e6069f9195795c71bc45778edbd1eb' + '5c79b09f9337cc8a5f993db6dd1f54df269f8390ab3348a94e5a139a5d060e39' + 'ad84aab9a9f88b5f7510f04b33b77bbe380ce48e29a9a4feb54b485a3def3114' + '89efe4ed3c93ae1508376d33cd775bd4275b2c02c51b754d4f29f6f9bbeeb1c5' + 'ea9df2911864c80cc70ff1c8026b22d47cbabcdcbad82ff072188b0d651eeb34' + 'a5984a95c83c782e02f1db14ff0789c79474a6197d33ecf849fab5dda95e581a' + 'c0172da962a94e5d2f1ba325967a91c5f037cc00f6aeffaeeebec7858931c2a9' + 'cd600a8b45ee7fe14c932f81b27c4e051b1ea8244258bf0172788df863011963' + '1668b401e4ca68257663623fa7de7994b4499b0c183c495a6b07a71c81d4ff64' + '6d03e2d13e2e5b87eb9d58fdcc9b61917da170a5052e1cba048e484f736b8604' + 'e2f2bcb5c3ea0d46e33b4eb938f858e7e302e7d3d45d5bf638a3522db57c3dc1' + '4e24df7714b810c7451a90eb27f8d7c94eeefa42e314019517445f2963672d62' + '77fd82e00ece7cced83494ca92b78b1c2df4fd903f4b5263e2d3bc3de557c03d' + 'ef149a162cdb6cca098640aaae73b270e0df08e016a8f66c5c666d7e69f1495e' + '2a12a835c30ea729830df30e45135ef83476e2fb9cf5ba3969d65a9ba7a901ca' + '0dcff7c8a47d79f6a7b432623475f5cf241221176a58acbc9438c5d0f6dd0640' + '3c8baa45e81b329ac2737dd09861910cd42435b05ae49c2b343c62564c6f1b6d' + 'ead4e40ad7a5efe0ff4f2c0ece682ea8bbc0e5b2013c7c1bbc41c1160a79818d' + '6149aa6901bad4c4b62ebb1b270ca13506491e299d60ae5f327a81882f791a4f' + '3a686b4baae983fed1996109ec86f78091bbd65a3163ffe0a73e3e283004baf7' + 'ffd7319e19839cabe6d048775d258818b82631eeaa62475850220ba63062447a' + '020ef4fd46dc3c48a9c3d7f4914860363d8d1012c27fc935cae0d2ac638cb211' + '3b473683e9f1de616f41542e2e46dbf3212d45a62f1cca34daba6a618d235756' + '91b46b4f1b79024b50e75113089612248336e07733930960fff5e6cddb3bbff0' + '6e4e2e0ed960fd014d11f92a8a4b8ca96bf1a47249f104809fd549b7ee1b7129' + '6c5bdca8f8c3655db90216a13405bf38c4bc504ccf6bc60ab277fc859d99776d' + 'a992b1fb7243c5b3e0cf6a7848dd5d4b6a5fa6bfd85ac13b744a09b812770c1f' + '08540ea1bf7d23cff0d239c99771ab231927576845187f3b55ebbae3abc2e1a4' + 'd163f7e899099964b0c67af7597bc08d4e887813ccba1a08610bbcb06beacda1' + '6c958541e116200d5cc2d407bdabf14825a66d11e80f8937ec4dbdcb7f9bc570' + 'd0b701bf91d8cd70f4e8ef2f753f03668d176ae5b5b41b7304d666d9a4b09cb4' + 'd2be4b5d9449711b1b52fe81aa8b41f71e1071cff19e5db43a6ed9e7cd6b2e19' + '0752d0df9c493be8eabcfb6bd3fd49e3cddb3828b38c3ae828945dcb8681744e' + 'a6660ecb7a7f02a3e23ef0bfef234d477412da54e56446c24db39dc1faf50c88' + 'd499d11b94c71201945915107c2ed55384dae60a5c6284a5bb685798fe58276c' + '08207bdb9af01cffacb859be228dfa9a7574deb26a7d08fcf7e86a0c551db059' + '4ce0b8c8e05d52030a1411f36b5b4075db90d3450380663c4f46ffbc28553b9e' + '7bb4f2d31cc77492c0df7ea16114edefbb8c79e305eae22610c0298759704626' + 'e8f0340048346be4ef0e49f24433087c4ff2eff0aac4803cb42dc85a76ddaf1c' + 'a7dc3d4b8a170338e2fea44b3efb7f9b299d1846edb8f6a6ba9375a6d53e88f1' + 'eac80fb3b54dced1e982c01a755c1914eccd1f8d74b7b88a0af43819ab317a2f' + '29c3412a1c7b0e4e719b64337ba5508b141037884ba96e9bee5f8ea253811aa3' + '7064362256cb558fe443469b5f9988ca927667b7cf13f1c1020aca98e616f900' + 'fb6c38381eb4f36338a5184f79c98e6046c9ff741da37f2f38f4757c8714ca92' + 'ff935aabac6e2f62cae187d6158245987af7e4892d0c5d74766843cff25a43d4' + '821819aa379206d9e076d7b9467b9de22ed7250cc563369d2ad10962b9dc9687' + 'f23feb78db734874c810b91af34cbc16e31506795d6b457b259d3d98187a7ce5' + '74ae329a3ff7b4d80e99443879e8699b6b56a5e251261c017624d99b9fbbf82c' + 'c7f9f6d1c9d23e12eac9e23c0bbaa3af1425863c0343498fa138e75f52de6daf' + '19c2698dc55fc9f17346430aa580b8ae444e679d0839516b597ee72e4c60be94' + 'f1d45c6e5dc5ad094a9ed7c8da0120d3878d750cb484b4dc47fc3952331e0d62' + '0bb8eda3871e4f639b933b5a5cdae089d70b55d9f52a9d5980d3c7ffec51dd17' + '4e8127cea653273e44ef04a565d51a01c3d0e72307ccb6e374a6ff3c1dedd2a5') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -234,23 +228,20 @@ prepare() { 0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch \ 0038-Avoid-sharing-cygheaps-across-Cygwin-versions.patch \ 0039-uname-report-msys2-runtime-commit-hash-too.patch \ - 0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch \ - 0041-Handle-8-bit-characters-under-LOCALE-C.patch \ - 0042-Mention-the-extremely-useful-small_printf-function.patch \ - 0043-Fixed-path-converting-with-non-ascii-char.patch \ - 0044-Allow-native-symlinks-to-non-existing-targets-in-nat.patch \ - 0045-Make-paths-WCS-MBS-conversion-explicit.patch \ - 0046-Use-MB_CUR_MAX-6-by-default.patch \ - 0047-Change-the-default-base-address-for-x86_64.patch \ - 0048-msys2-runtime-restore-fast-path-for-current-user-pri.patch \ - 0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch \ - 0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch \ - 0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch \ - 0052-Fix-SSH-hangs.patch \ - 0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch \ - 0054-cygthread-suspend-thread-before-terminating.patch \ - 0055-fixup-cygthread-suspend-thread-before-terminating.patch \ - 0056-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch + 0040-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch \ + 0041-cygthread-suspend-thread-before-terminating.patch \ + 0042-Cygwin-revert-use-of-CancelSyncronousIo-on-wait_thre.patch \ + 0043-Cygwin-cache-IsWow64Process2-host-arch-in-wincap.patch \ + 0044-Cygwin-uname-add-host-machine-tag-to-sysname.patch \ + 0045-Handle-8-bit-characters-under-LOCALE-C.patch \ + 0046-Mention-the-extremely-useful-small_printf-function.patch \ + 0047-Fixed-path-converting-with-non-ascii-char.patch \ + 0048-Allow-native-symlinks-to-non-existing-targets-in-nat.patch \ + 0049-Make-paths-WCS-MBS-conversion-explicit.patch \ + 0050-Use-MB_CUR_MAX-6-by-default.patch \ + 0051-Change-the-default-base-address-for-x86_64.patch \ + 0052-msys2-runtime-restore-fast-path-for-current-user-pri.patch \ + 0053-Fix-SSH-hangs.patch } build() { diff --git a/msys2-runtime/msys2-runtime.commit b/msys2-runtime/msys2-runtime.commit index c9bb1dcad49..c5a64ab46bf 100644 --- a/msys2-runtime/msys2-runtime.commit +++ b/msys2-runtime/msys2-runtime.commit @@ -1 +1 @@ -395fda678b4448587cabbeab936318459c10f209 +ff2b7c9087029c32fbf1c088ffd7c11f9529103a