Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
849 changes: 0 additions & 849 deletions msys2-runtime/0001-Add-MSYS2-triplet.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3155a8c5f98e97692a6d1dd0047e9ca0dd4c3030 Mon Sep 17 00:00:00 2001
From b662426d796ad9fa7593f17840f49282835fa876 Mon Sep 17 00:00:00 2001
From: Kaleb Barrett <[email protected]>
Date: Sun, 14 Mar 2021 18:58:55 -0500
Subject: [PATCH 02/N] Fix msys library name in import libraries
Subject: [PATCH 01/N] Fix msys library name in import libraries

Cygwin's speclib doesn't handle dashes or dots. However, we are about to
rename the output file name from `cygwin1.dll` to `msys-2.0.dll`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From d9b4e1decb9999a9e1577eafeea8ae337d44924b Mon Sep 17 00:00:00 2001
From 50d9d80db4a6a941a03d99d82afb760c4ab4101f 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:09:17 +0300
Subject: [PATCH 03/N] Rename dll from cygwin to msys
Subject: [PATCH 02/N] Rename dll from cygwin to msys

---
winsup/cygserver/transport_pipes.h | 4 +++
Expand All @@ -16,7 +16,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
winsup/cygwin/dtable.cc | 6 +++++
winsup/cygwin/exceptions.cc | 4 +--
winsup/cygwin/fhandler/pipe.cc | 4 +++
winsup/cygwin/fhandler/pty.cc | 20 ++++++++++++++
winsup/cygwin/fhandler/pty.cc | 26 ++++++++++++++++++
winsup/cygwin/hookapi.cc | 4 +++
winsup/cygwin/include/cygwin/cygwin_dll.h | 10 +++----
winsup/cygwin/include/cygwin/version.h | 8 ++++++
Expand All @@ -38,7 +38,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
winsup/utils/mingw/strace.cc | 9 +++----
winsup/utils/path.cc | 12 ++++-----
winsup/utils/ssp.c | 8 +++---
33 files changed, 174 insertions(+), 72 deletions(-)
33 files changed, 180 insertions(+), 72 deletions(-)

diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h
index e101623..66272bc 100644
Expand All @@ -57,7 +57,7 @@ index e101623..66272bc 100644

/* Named pipes based transport, for security on NT */
diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index d47a1a2..c1f9921 100644
index 383f4f3..981877d 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -37,12 +37,12 @@ newlib_build=$(target_builddir)/newlib
Expand All @@ -78,7 +78,7 @@ index d47a1a2..c1f9921 100644

#
# sources
@@ -587,16 +587,16 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
@@ -589,16 +589,16 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
$(LIBSERVER):
$(MAKE) -C $(cygserver_blddir) libcygserver.a

Expand All @@ -98,7 +98,7 @@ index d47a1a2..c1f9921 100644
# Set PE and export table header timestamps to zero for reproducible builds.
$(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
$(newlib_build)/libm.a $(newlib_build)/libc.a
@@ -605,18 +605,18 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
@@ -607,18 +607,18 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
-Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) \
-Wl,--dynamicbase -static \
$${SOURCE_DATE_EPOCH:+-Wl,--no-insert-timestamp} \
Expand All @@ -120,7 +120,7 @@ index d47a1a2..c1f9921 100644
toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@

$(DEF_FILE): scripts/gendef cygwin.din
@@ -629,13 +629,14 @@ sigfe.s: $(DEF_FILE) tlsoffsets
@@ -631,13 +631,14 @@ sigfe.s: $(DEF_FILE) tlsoffsets

LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES)))
$(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME)
Expand All @@ -136,7 +136,7 @@ index d47a1a2..c1f9921 100644
--exclude='(?i:dll)' \
--exclude='reloc' \
--exclude='^main$$' \
@@ -685,7 +686,7 @@ all-local: $(LIB_NAME) $(SUBLIBS)
@@ -687,7 +688,7 @@ all-local: $(LIB_NAME) $(SUBLIBS)
clean-local:
-rm -f $(BUILT_SOURCES)
-rm -f $(DEF_FILE) sigfe.s
Expand Down Expand Up @@ -223,10 +223,10 @@ index f4c09be..e19b7d3 100644
static int _fmode;

diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index 9b6bb55..2d0bae5 100644
index e06616d..40d99dd 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -147,8 +147,13 @@ collect_basenames (pathfinder::basenamelist & basenames,
@@ -148,8 +148,13 @@ collect_basenames (pathfinder::basenamelist & basenames,
/* If the basename starts with "lib", ... */
if (!strncmp (basename, "lib", 3))
{
Expand Down Expand Up @@ -277,7 +277,7 @@ index 7303f7e..6ccc19a 100644
w32len = cygheap->installation_key.Length / sizeof (WCHAR);
if (w32len
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 876b79e..466abdd 100644
index f79978f..e724e37 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -528,14 +528,14 @@ int exec_prepared_command (PWCHAR command)
Expand All @@ -298,10 +298,10 @@ index 876b79e..466abdd 100644
break;
}
diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc
index e35d523..506dd09 100644
index 2ff5dfa..11ef78c 100644
--- a/winsup/cygwin/fhandler/pipe.cc
+++ b/winsup/cygwin/fhandler/pipe.cc
@@ -790,7 +790,11 @@ fhandler_pipe::close (int flag)
@@ -798,7 +798,11 @@ fhandler_pipe::close (int flag)
return ret;
}

Expand All @@ -314,10 +314,10 @@ index e35d523..506dd09 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 3128b92..0969b2f 100644
index 36fddbb..8154fcc 100644
--- a/winsup/cygwin/fhandler/pty.cc
+++ b/winsup/cygwin/fhandler/pty.cc
@@ -875,7 +875,11 @@ fhandler_pty_slave::open (int flags, mode_t)
@@ -882,7 +882,11 @@ fhandler_pty_slave::open (int flags, mode_t)
pipe_reply repl;
DWORD len;

Expand All @@ -329,7 +329,7 @@ index 3128b92..0969b2f 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,
@@ -1137,7 +1141,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void)
@@ -1144,7 +1148,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void)
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
Expand All @@ -339,9 +339,25 @@ index 3128b92..0969b2f 100644
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_request req = { GET_HANDLES, GetCurrentProcessId () };
pipe_reply repl;
@@ -2024,7 +2032,11 @@ fhandler_pty_master::close (int flag)
@@ -1605,9 +1613,15 @@ fhandler_pty_slave::tcflush (int queue)
if (queue == TCIFLUSH || queue == TCIOFLUSH)
{
char pipe[MAX_PATH];
+#ifdef __MSYS__
+ __small_sprintf (pipe,
+ "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
+ &cygheap->installation_key, get_minor ());
+#else
__small_sprintf (pipe,
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
&cygheap->installation_key, get_minor ());
+#endif
pipe_request req = { FLUSH_INPUT, GetCurrentProcessId () };
pipe_reply repl;
DWORD n;
@@ -2039,7 +2053,11 @@ fhandler_pty_master::close (int flag)
pipe_reply repl;
DWORD len;

Expand All @@ -353,7 +369,7 @@ index 3128b92..0969b2f 100644
&cygheap->installation_key, get_minor ());
acquire_output_mutex (mutex_timeout);
if (master_ctl)
@@ -2930,7 +2942,11 @@ fhandler_pty_master::setup ()
@@ -2950,7 +2968,11 @@ fhandler_pty_master::setup ()

/* Create master control pipe which allows the master to duplicate
the pty pipe handles to processes which deserve it. */
Expand All @@ -365,7 +381,7 @@ index 3128b92..0969b2f 100644
&cygheap->installation_key, unit);
master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX
| FILE_FLAG_FIRST_PIPE_INSTANCE,
@@ -3819,7 +3835,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
@@ -3840,7 +3862,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
Expand All @@ -375,7 +391,7 @@ index 3128b92..0969b2f 100644
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, ttyp->get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_request req = { GET_HANDLES, GetCurrentProcessId () };
pipe_reply repl;
diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
index ee2edba..9f31a71 100644
Expand Down Expand Up @@ -436,7 +452,7 @@ index 1e4cf98..b77598b 100644
} \
} \
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 961a98c..aafb811 100644
index 89c1e1f..b85e8c3 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -510,7 +510,11 @@ details. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 02128e4ad21c12aba2edbc183518f9de44750f47 Mon Sep 17 00:00:00 2001
From f95036ca2c8c6275eb073914b6ceb80f99800c9a 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:17:46 +0300
Subject: [PATCH 04/N] Add functionality for converting UNIX paths in
Subject: [PATCH 03/N] Add functionality for converting UNIX paths in
arguments and environment variables to Windows form for native Win32
applications.

Expand All @@ -22,10 +22,10 @@ Subject: [PATCH 04/N] Add functionality for converting UNIX paths in
create mode 100644 winsup/cygwin/msys2_path_conv.h

diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index c1f9921..f3662b9 100644
index 981877d..54ae637 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -312,6 +312,7 @@ DLL_FILES= \
@@ -314,6 +314,7 @@ DLL_FILES= \
miscfuncs.cc \
mktemp.cc \
msg.cc \
Expand Down Expand Up @@ -999,7 +999,7 @@ index 0000000..67d85ec
+#endif /* end of include guard: PATH_CONV_H_DB4IQBH3 */
+
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 42919a7..cb01afc 100644
index ed08398..8ef347c 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -66,6 +66,7 @@
Expand All @@ -1010,7 +1010,7 @@ index 42919a7..cb01afc 100644
#undef basename

suffix_info stat_suffixes[] =
@@ -3884,6 +3885,74 @@ fchdir (int fd)
@@ -3895,6 +3896,74 @@ fchdir (int fd)
return res;
}

Expand Down Expand Up @@ -1086,7 +1086,7 @@ index 42919a7..cb01afc 100644

/* Cover functions to the path conversion routines.
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index ef175e7..33a947d 100644
index cb58b6e..3ff2187 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -286,6 +286,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From f5641c9f116e711014cce0b034c46577e76fdc50 Mon Sep 17 00:00:00 2001
From 10bdfe7d2cde9d14411e141ed9837c1904c57496 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:29:01 +0300
Subject: [PATCH 05/N] Add functionality for changing OS name via MSYSTEM
Subject: [PATCH 04/N] Add functionality for changing OS name via MSYSTEM
environment variables.

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 834af426d590c5eafa5a31454bb3e96d1b66bd06 Mon Sep 17 00:00:00 2001
From 8b9860bde46b2d516d942fdd58b49eab4b9bedc0 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:45:06 +0300
Subject: [PATCH 06/N] - Move root to /usr. - Change sorting mount points. -
Subject: [PATCH 05/N] - Move root to /usr. - Change sorting mount points. -
By default mount without ACLs. - Can read /etc/fstab with short mount point
format.

Expand Down Expand Up @@ -35,7 +35,7 @@ index 163b475..15e9a34 100644
public:
void init (bool);
diff --git a/winsup/cygwin/mm/cygheap.cc b/winsup/cygwin/mm/cygheap.cc
index 4cc8517..c4f15d5 100644
index 3388864..5409a6b 100644
--- a/winsup/cygwin/mm/cygheap.cc
+++ b/winsup/cygwin/mm/cygheap.cc
@@ -220,14 +220,22 @@ init_cygheap::init_installation_root ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From a7a80da72303405b0932f8c1529ea22b5ea511cd Mon Sep 17 00:00:00 2001
From 242443bf1f2cfabbcb0ea5202f1b5f7d196fd24c 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:47:21 +0300
Subject: [PATCH 07/N] Instead of creating Cygwin symlinks, use deep copy by
Subject: [PATCH 06/N] Instead of creating Cygwin symlinks, use deep copy by
default

The new `winsymlinks` mode `deepcopy` (which is made the default) lets
Expand Down Expand Up @@ -62,7 +62,7 @@ index d8e058f..b7e0e21 100644
bool winjitdebug = false;

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index cb01afc..a3e4de2 100644
index 8ef347c..aae10fe 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1722,6 +1722,173 @@ conv_path_list (const char *src, char *dst, size_t size,
Expand Down Expand Up @@ -239,7 +239,7 @@ index cb01afc..a3e4de2 100644
/* Create a symlink from FROMPATH to TOPATH. */

extern "C" int
@@ -2034,6 +2201,84 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath)
@@ -2045,6 +2212,84 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath)
return 0;
}

Expand Down Expand Up @@ -324,7 +324,7 @@ index cb01afc..a3e4de2 100644
int
symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
{
@@ -2101,6 +2346,13 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
@@ -2112,6 +2357,13 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
case WSYM_nfs:
res = symlink_nfs (oldpath, win32_newpath);
__leave;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From f671632ea5f1d8a5776afc19c6f55c5cb04574e0 Mon Sep 17 00:00:00 2001
From 9e313a6cf7e8b875ed612d561a3e94b586d179b4 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:48:54 +0300
Subject: [PATCH 08/N] Automatically rewrite TERM=msys to TERM=cygwin
Subject: [PATCH 07/N] Automatically rewrite TERM=msys to TERM=cygwin

With MSys1, it was necessary to set the TERM variable to "msys". To
allow for a smooth transition from MSys1 to MSys2, let's simply handle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
From 8f58dba7794555fe5fcdaaeb4c799031d475340b Mon Sep 17 00:00:00 2001
From 3f325c89dc11e09091758cd82134f15383dc31de 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?= <[email protected]>
Date: Sun, 14 Apr 2019 21:50:55 +0300
Subject: [PATCH 09/N] Do not convert environment for strace
Subject: [PATCH 08/N] Do not convert environment for strace

Strace is a Windows program so MSYS2 will convert all arguments and environment vars and that makes debugging msys2 software with strace very tricky.
---
winsup/cygwin/spawn.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 33a947d..8586ca1 100644
index 3ff2187..8525285 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -539,11 +539,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 055c3f431668f208cfbc35bd56c34e8ec7910f72 Mon Sep 17 00:00:00 2001
From c657f7cda50bea6902f89849b4be128deec67c03 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <[email protected]>
Date: Sun, 23 Aug 2015 20:47:30 +0100
Subject: [PATCH 10/N] strace.cc: Don't set MSYS=noglob
Subject: [PATCH 09/N] strace.cc: Don't set MSYS=noglob

Commit message for this code was:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a83678048ab5d4b27c6b5fd0813f6c8dc41afce6 Mon Sep 17 00:00:00 2001
From 1cd647fe8360636f707702f6e8f9e9b9f3c8fc9b Mon Sep 17 00:00:00 2001
From: Ray Donnelly <[email protected]>
Date: Fri, 21 Aug 2015 09:52:47 +0100
Subject: [PATCH 11/N] Add debugging for strace make_command_line
Subject: [PATCH 10/N] Add debugging for strace make_command_line

---
winsup/utils/mingw/strace.cc | 1 +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 16e335f3fd875d2481bcfbcaa56a7021381d4b72 Mon Sep 17 00:00:00 2001
From 0dc024e84c382293c00665b7f8a278a3e6b3b03b Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <[email protected]>
Date: Wed, 17 May 2017 18:13:32 +0200
Subject: [PATCH 12/N] strace --quiet: be *really* quiet
Subject: [PATCH 11/N] strace --quiet: be *really* quiet

The biggest problem with strace spitting out `create_child: ...` despite
being asked to be real quiet is that its output can very well interfere
Expand Down
Loading