Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 3.5.4 #225

Merged
merged 44 commits into from
Aug 27, 2024
Merged

Update to 3.5.4 #225

merged 44 commits into from
Aug 27, 2024

Conversation

lazka
Copy link
Member

@lazka lazka commented Aug 25, 2024

changelog: https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/release/3.5.4

git range-diff cygwin-3.5.3..msys2-3.5.3 cygwin-3.5.4..wip/msys2-3.5.4

 1:  50e235f7a0 =  1:  51380ec75b Add MSYS2 triplet
 2:  e5ae236775 =  2:  a116f41845 Fix msys library name in import libraries
 3:  d1cb51f644 !  3:  f858c02bdb Rename dll from cygwin to msys
    @@ Metadata
      ## Commit message ##
         Rename dll from cygwin to msys
     
    - ## winsup/Makefile.am ##
    -@@
    - 
    - # This makefile requires GNU make.
    - 
    --cygdocdir = $(datarootdir)/doc/Cygwin
    -+cygdocdir = $(datarootdir)/doc/Msys
    - 
    - cygdoc_DATA = \
    - 	CYGWIN_LICENSE \
    -
    - ## winsup/cygserver/Makefile.am ##
    -@@ winsup/cygserver/Makefile.am: libcygserver_a_SOURCES = \
    - 
    - libcygserver_a_CXXFLAGS = $(cygserver_flags)
    - 
    --cygdocdir = $(datarootdir)/doc/Cygwin
    -+cygdocdir = $(datarootdir)/doc/Msys
    - 
    - install-data-local:
    - 	@$(MKDIR_P) $(DESTDIR)$(cygdocdir)
    -
      ## winsup/cygserver/transport_pipes.h ##
     @@ winsup/cygserver/transport_pipes.h: details. */
      #ifndef _TRANSPORT_PIPES_H
    @@ winsup/cygwin/crt0.c: details. */
        /* These are never actually called.  They are just here to force the inclusion
           of things like -lbinmode.  */
     
    - ## winsup/cygwin/cygthread.cc ##
    -@@ winsup/cygwin/cygthread.cc: new (size_t)
    -       }
    - 
    - #ifdef DEBUGGING
    --  if (!getenv ("CYGWIN_FREERANGE_NOCHECK"))
    -+  if (!getenv ("MSYS_FREERANGE_NOCHECK"))
    -     api_fatal ("overflowed cygwin thread pool");
    -   else
    -     thread_printf ("overflowed cygwin thread pool");
    -
      ## winsup/cygwin/cygwin.din ##
     @@
     -LIBRARY "cygwin1.dll" BASE=0x180040000
    @@ winsup/cygwin/cygwin.sc.in
      #endif
     
      ## winsup/cygwin/dcrt0.cc ##
    -@@ winsup/cygwin/dcrt0.cc: check_sanity_and_sync (per_process *p)
    - 
    -   /* magic_biscuit must be SIZEOF_PER_PROCESS.  */
    -   if (p->magic_biscuit != SIZEOF_PER_PROCESS)
    --    api_fatal ("Incompatible cygwin .dll -- incompatible per_process info %u != %u",
    -+    api_fatal ("Incompatible msys .dll -- incompatible per_process info %u != %u",
    - 	       p->magic_biscuit, SIZEOF_PER_PROCESS);
    - 
    -   /* Complain if incompatible API changes made */
    -   if (p->api_major > cygwin_version.api_major)
    --    api_fatal ("cygwin DLL and APP are out of sync -- API version mismatch %u > %u",
    -+    api_fatal ("msys DLL and APP are out of sync -- API version mismatch %u > %u",
    - 	       p->api_major, cygwin_version.api_major);
    - }
    - 
    -@@ winsup/cygwin/dcrt0.cc: break_here ()
    - static void
    - initial_env ()
    - {
    --  if (GetEnvironmentVariableA ("CYGWIN_TESTING", NULL, 0))
    -+  if (GetEnvironmentVariableA ("MSYS_TESTING", NULL, 0))
    -     _cygwin_testing = 1;
    - 
    - #ifdef DEBUGGING
    -   char buf[PATH_MAX];
    --  if (GetEnvironmentVariableA ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
    -+  if (GetEnvironmentVariableA ("MSYS_DEBUG", buf, sizeof (buf) - 1))
    -     {
    -       char buf1[PATH_MAX];
    -       GetModuleFileName (NULL, buf1, PATH_MAX);
     @@ winsup/cygwin/dcrt0.cc: dll_crt0 (per_process *uptr)
         See winsup/testsuite/cygload for an example of how to use cygwin1.dll
         from MSVC and non-cygwin MinGW applications.  */
    @@ winsup/cygwin/dcrt0.cc: dll_crt0 (per_process *uptr)
      {
        static int _fmode;
      
    -@@ winsup/cygwin/dcrt0.cc: multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve
    -       return;
    -     }
    - 
    --  if (GetEnvironmentVariableA ("CYGWIN_MISMATCH_OK", NULL, 0))
    -+  if (GetEnvironmentVariableA ("MSYS_MISMATCH_OK", NULL, 0))
    -     return;
    - 
    -   if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version)
    -@@ winsup/cygwin/dcrt0.cc: are unable to find another cygwin DLL.",
    - void
    - cygbench (const char *s)
    - {
    --  if (GetEnvironmentVariableA ("CYGWIN_BENCH", NULL, 0))
    -+  if (GetEnvironmentVariableA ("MSYS_BENCH", NULL, 0))
    -     small_printf ("%05u ***** %s : %10d\n", GetCurrentProcessId (), s, strace.microseconds ());
    - }
    - #endif
     
      ## winsup/cygwin/dlfcn.cc ##
     @@ winsup/cygwin/dlfcn.cc: collect_basenames (pathfinder::basenamelist & basenames,
    @@ winsup/cygwin/fhandler/pty.cc: fhandler_pty_slave::transfer_input (tty::xfer_dir
            pipe_request req = { GetCurrentProcessId () };
            pipe_reply repl;
     
    - ## winsup/cygwin/fork.cc ##
    -@@ winsup/cygwin/fork.cc: frok::child (volatile char * volatile here)
    -   char buf[80];
    -   /* This is useful for debugging fork problems.  Use gdb to attach to
    -      the pid reported here. */
    --  if (GetEnvironmentVariableA ("CYGWIN_FORK_SLEEP", buf, sizeof (buf)))
    -+  if (GetEnvironmentVariableA ("MSYS_FORK_SLEEP", buf, sizeof (buf)))
    -     {
    -       small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ());
    -       Sleep (atoi (buf));
    -
      ## winsup/cygwin/hookapi.cc ##
     @@ winsup/cygwin/hookapi.cc: hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h)
        for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
    @@ winsup/cygwin/local_includes/cygserver_setpwd.h: details. */
      #ifndef __INSIDE_CYGWIN__
      class transport_layer_base;
     
    - ## winsup/cygwin/pinfo.cc ##
    -@@ winsup/cygwin/pinfo.cc: pinfo::maybe_set_exit_code_from_windows ()
    -       GetExitCodeProcess (hProcess, &x);
    -       set_exit_code (x);
    -     }
    --  sigproc_printf ("pid %d, exit value - old %y, windows %y, cygwin %y",
    -+  sigproc_printf ("pid %d, exit value - old %y, windows %y, MSYS %y",
    - 		  self->pid, oexitcode, x, self->exitcode);
    - }
    - 
    -
    - ## winsup/cygwin/pseudo-reloc.cc ##
    -@@ winsup/cygwin/pseudo-reloc.cc: __report_error (const char *msg, ...)
    -   char buf[128];
    -   char *posix_module = NULL;
    -   static const char UNKNOWN_MODULE[] = "<unknown module>: ";
    --  static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
    -+  static const char CYGWIN_FAILURE_MSG[] = "MSYS runtime failure: ";
    -   HANDLE errh = GetStdHandle (STD_ERROR_HANDLE);
    -   va_list args;
    - 
    -
      ## winsup/cygwin/scripts/mkvers.sh ##
     @@ winsup/cygwin/scripts/mkvers.sh: dir=$(echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%')
      ) | while read var; do
    @@ winsup/cygwin/winver.rc: BEGIN
            VALUE "APIVersion", CYGWIN_API_VERSION
            VALUE "SharedMemoryVersion", STRINGIFY(CYGWIN_VERSION_SHARED_DATA)
     
    - ## winsup/testsuite/cygrun.c ##
    -@@ winsup/testsuite/cygrun.c: main (int argc, char **argv)
    -       exit (1);
    -     }
    - 
    --  SetEnvironmentVariable ("CYGWIN_TESTING", "1");
    -+  SetEnvironmentVariable ("MSYS_TESTING", "1");
    - 
    -   memset (&sa, 0, sizeof (sa));
    -   memset (&pi, 0, sizeof (pi));
    -
      ## winsup/testsuite/winsup.api/cygload.cc ##
     @@
      		     save for errors.
    @@ winsup/testsuite/winsup.api/cygload.cc
      #include "cygload.h"
      #include <iostream>
     @@ winsup/testsuite/winsup.api/cygload.cc: cygwin::connector::connector (const char *dll)
    -   if ((_library = LoadLibrary (dll)) == NULL)
    -     throw windows_error ("LoadLibrary", dll);
      
    --  *out << "Initializing cygwin..." << endl;
    -+  *out << "Initializing msys..." << endl;
    +   *out << "Initializing cygwin..." << endl;
      
     -  // This calls dcrt0.cc:cygwin_dll_init(), which calls dll_crt0_1(),
     +  // This calls dcrt0.cc:msys_dll_init(), which calls dll_crt0_1(),
    @@ winsup/utils/mingw/cygcheck.cc: struct ImpDirectory
      static void
      cygwin_info (HANDLE h)
      {
    -   char *buf, *bufend, *buf_start = NULL;
    --  const char *hello = "    Cygwin DLL version info:\n";
    -+  const char *hello = "    Msys DLL version info:\n";
    -   DWORD size = GetFileSize (h, NULL);
    -   DWORD n;
    - 
     @@ winsup/utils/mingw/cygcheck.cc: cygwin_info (HANDLE h)
        while (buf < bufend)
          if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL)
    @@ winsup/utils/mingw/cygcheck.cc: scan_registry (RegInfo * prev, HKEY hKey, char *
            cygwin = 1;
      
        DWORD num_subkeys, max_subkey_len, num_values;
    -@@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo_services ()
    - 
    -   /* inform the user if nothing found */
    -   if (no_services)
    --    puts ("No Cygwin services found.\n");
    -+    puts ("No Msys services found.\n");
    - }
    - 
    - enum handle_reg_t
     @@ winsup/utils/mingw/cygcheck.cc: handle_reg_installation (handle_reg_t what)
    -   HKEY key;
    - 
    -   if (what == PRINT_KEY)
    --    printf ("Cygwin installations found in the registry:\n");
    -+    printf ("Msys installations found in the registry:\n");
    +     printf ("Cygwin installations found in the registry:\n");
        for (int i = 0; i < 2; ++i)
          if (RegOpenKeyEx (i ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
     -		      "SOFTWARE\\Cygwin\\Installations", 0,
    @@ winsup/utils/mingw/cygcheck.cc: handle_reg_installation (handle_reg_t what)
      	      if (what == PRINT_KEY)
      		printf ("%s\n", access (path, F_OK) ? " (ORPHANED)" : "");
      	      else if (access (path, F_OK))
    -@@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
    -       _wputenv (comspec);
    -     }
    - 
    --  printf ("\nCygwin Configuration Diagnostics\n");
    -+  printf ("\nMsys Configuration Diagnostics\n");
    -   time (&now);
    -   printf ("Current System Time: %s\n", ctime (&now));
    - 
    -@@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
    - 
    - 
    -   if (givehelp)
    --    printf ("Here's some environment variables that may affect cygwin:\n");
    -+    printf ("Here's some environment variables that may affect msys:\n");
    -   for (i = 0; environ[i]; i++)
    -     {
    -       char *eq = strchr (environ[i], '=');
     @@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
        if (registry)
          {
    @@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
            scan_registry (0, HKEY_CURRENT_USER,
      		     (char *) "HKEY_CURRENT_USER", 0, false);
            scan_registry (0, HKEY_LOCAL_MACHINE,
    -@@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
    -   printf ("\n");
    - 
    -   if (givehelp)
    --    printf ("Looking for various Cygwin DLLs...  (-v gives version info)\n");
    -+    printf ("Looking for various Msys DLLs...  (-v gives version info)\n");
    -   int cygwin_dll_count = 0;
    -   char cygdll_path[32768];
    -   for (pathlike *pth = paths; pth->dir; pth++)
     @@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
      	  wcstombs (f, ffinfo.cFileName, sizeof f);
      	  if (strcasecmp (f + strlen (f) - 4, ".dll") == 0)
    @@ winsup/utils/mingw/cygcheck.cc: dump_sysinfo ()
      
        dump_dodgy_apps (verbose);
      
    -@@ winsup/utils/mingw/cygcheck.cc: static char opts[] = "cdnsrvkfliephV";
    - static void
    - print_version ()
    - {
    --  printf ("cygcheck (cygwin) %d.%d.%d\n"
    --	  "System Checker for Cygwin\n"
    -+  printf ("cygcheck (msys) %d.%d.%d\n"
    -+	  "System Checker for Msys\n"
    - 	  "Copyright (C) 1998 - %s Cygwin Authors\n"
    - 	  "This is free software; see the source for copying conditions.  "
    - 	  "There is NO\n"
     @@ winsup/utils/mingw/cygcheck.cc: load_cygwin (int& argc, char **&argv)
      {
        HMODULE h;
    @@ winsup/utils/mingw/strace.cc: create_child (char **argv)
        _putenv (newenv);
        ret = CreateProcess (0, one_line.buf,	/* command line */
      		       NULL,	/* Security */
    -@@ winsup/utils/mingw/strace.cc: dotoggle (pid_t pid)
    -   child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid);
    -   if (!child_pid)
    -     {
    --      warn (0, "no such cygwin pid - %d", pid);
    -+      warn (0, "no such msys pid - %d", pid);
    -       child_pid = pid;
    -     }
    -   if (cygwin_internal (CW_STRACE_TOGGLE, child_pid))
     
      ## winsup/utils/path.cc ##
     @@ winsup/utils/path.cc: read_mounts ()
 4:  c3aa2124ec =  4:  b084abe0ec Add functionality for converting UNIX paths in arguments and environment variables to Windows form for native Win32 applications.
 5:  ed83b2cc2e =  5:  cbacf21a49 Add functionality for changing OS name via MSYSTEM environment variables.
 6:  6a937ecb5c =  6:  c0adae6e38 - Move root to /usr. - Change sorting mount points. - By default mount without ACLs. - Can read /etc/fstab with short mount point format.
 7:  45c5946a16 =  7:  aa6e313b9a Instead of creating Cygwin symlinks, use deep copy by default
 8:  474f787a2d =  8:  55cc41353d Automatically rewrite TERM=msys to TERM=cygwin
 9:  916afdca1a =  9:  e7d9d442ce Do not convert environment for strace
10:  4df3f8921c = 10:  a1e28fb96a strace.cc: Don't set MSYS=noglob
11:  1ddc4cd699 = 11:  5c3c66a4ec Add debugging for strace make_command_line
12:  271294ce2a = 12:  a4cdbece43 strace --quiet: be *really* quiet
13:  7c2d94dc53 = 13:  7e52ffd3ba path_conv: special-case root directory to have trailing slash
14:  5d4fff4e1d = 14:  6417ed9cd1 When converting to a Unix path, avoid double trailing slashes
15:  1a60554fae = 15:  b314cf5603 msys2_path_conv: pass PC_NOFULL to path_conv
16:  9b6d2a32d5 = 16:  68a1399052 path-conversion: Introduce ability to switch off conversion.
17:  92ce9c20c8 = 17:  097d4c1973 dcrt0.cc: Untangle allow_glob from winshell
18:  fc188165cb ! 18:  9b7dbd7af9 dcrt0.cc (globify): Don't quote literal strings differently when dos_spec
    @@ Commit message
     
      ## winsup/cygwin/dcrt0.cc ##
     @@ winsup/cygwin/dcrt0.cc: globify (char *word, char **&argv, int &argc, int &argvlen)
    - 	char quote = *s;
      	while (*++s && *s != quote)
      	  {
    + 	    mbstate_t mbs = { 0 };
     +	    /* This used to be:
      	    if (dos_spec || *s != '\\')
     -	      /* nothing */;
    @@ winsup/cygwin/dcrt0.cc: globify (char *word, char **&argv, int &argc, int &argvl
     +	    if (*s == '\\' && (s[1] == quote || s[1] == '\\'))
     +	      s++;
      	    *p++ = '\\';
    - 	    size_t cnt = isascii (*s) ? 1 : mbtowc (NULL, s, MB_CUR_MAX);
    + 	    size_t cnt = isascii (*s) ? 1 : mbrtowi (NULL, s, MB_CUR_MAX, &mbs);
      	    if (cnt <= 1 || cnt == (size_t)-1)
19:  619f25935b = 19:  edba1e9a5b Add debugging for build_argv
20:  60f6b7e1c2 = 20:  607001f33d environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL
21:  a4f1634cbf = 21:  4b69189569 Fix native symbolic link spawn passing wrong arg0
22:  1af273a76a = 22:  245f16540b Introduce the `enable_pcon` value for `MSYS`
23:  81d7c6b3a4 = 23:  7462e30c92 popen: call /usr/bin/sh instead of /bin/sh
24:  19f03046bc = 24:  37dd55bf4d Disable the 'cygwin' GitHub workflow
25:  d3462982ce = 25:  41778dfe0f CI: add a GHA for doing a basic build test
26:  3e22c46ed1 = 26:  5b7e798c8e CI: fix the build with gcc 13
27:  9c3163984b = 27:  293731b071 Set up a GitHub Action to keep in sync with Cygwin
28:  5925d0638e = 28:  15ae7aa902 Expose full command-lines to other Win32 processes by default
29:  d5a888d235 = 29:  ab240c56d0 Add a helper to obtain a function's address in kernel32.dll
30:  86874b54d2 = 30:  ed62ffe5a9 Emulate GenerateConsoleCtrlEvent() upon Ctrl+C
31:  16e0f643d8 = 31:  79f03e1f50 kill: kill Win32 processes more gently
32:  216a27d7c8 = 32:  f14b38953e Cygwin: make option for native inner link handling.
33:  b2ac8b0a3f = 33:  be6f3f0de4 docs: skip building texinfo and PDF files
34:  dea0da4990 = 34:  eb5833fe48 install-libs: depend on the "toollibs"
35:  b332ee59f4 = 35:  f384af0be9 POSIX-ify the SHELL variable
36:  379c6917bd = 36:  50cd806fd1 Handle ORIGINAL_PATH just like PATH
37:  b2e2b5669b = 37:  5e28622a1a uname: allow setting the system name to CYGWIN
38:  ba2bf4662e = 38:  dacdc1ad16 Pass environment variables with empty values
39:  6594dacd37 = 39:  8c8e8e90cd Optionally disallow empty environment values again
40:  cdd9e8df37 = 40:  310c9bcfe4 build_env(): respect the `MSYS` environment variable
41:  ae4c9c303f = 41:  9d03af780a Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by default"
42:  abcb3c6c0f <  -:  ---------- proc: fix `error: the address of ‘iso15924’ will never be NULL`
43:  3f5eb36d40 = 42:  773b5d9065 CI: set -Wno-error=maybe-uninitialized
44:  28d69fba26 <  -:  ---------- Cygwin: disable high-entropy VA for ldh
45:  317fc51b3a = 43:  3255d4e481 Avoid sharing cygheaps across Cygwin versions
46:  0ea583b9cb = 44:  952a99fc73 uname: report msys2-runtime commit hash, too
47:  38020a7e0e <  -:  ---------- fixup! Rename dll from cygwin to msys
48:  445e3ed14f <  -:  ---------- fixup! Rename dll from cygwin to msys
49:  7484c55948 <  -:  ---------- fixup! Rename dll from cygwin to msys

Actions taken:

Alexpux and others added 4 commits August 25, 2024 13:40
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`.

Let's preemptively fix up all the import libraries that would link
against `msys_2_0.dll` to correctly link against `msys-2.0.dll` instead.
…ent variables to Windows form for native Win32 applications.
@lazka lazka marked this pull request as ready for review August 25, 2024 13:49
Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good except for a very minor nit.

winsup/cygwin/environ.cc Outdated Show resolved Hide resolved
Alexpux and others added 22 commits August 27, 2024 17:00
…t without ACLs. - Can read /etc/fstab with short mount point format.
The new `winsymlinks` mode `deepcopy` (which is made the default) lets
calls to `symlink()` create (deep) copies of the source file/directory.

This is necessary because unlike Cygwin, MSYS2 does not try to be its
own little ecosystem that lives its life separate from regular Win32
programs: the latter have _no idea_ about Cygwin-emulated symbolic links
(i.e. system files whose contents start with `!<symlink>\xff\xfe` and
the remainder consists of the NUL-terminated, UTF-16LE-encoded symlink
target).

To support Cygwin-style symlinks, the new mode `sysfile` is introduced.

Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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
TERM=msys as if the user had not specified TERM at all and wanted us to
use our preferred TERM value.
Strace is a Windows program so MSYS2 will convert all arguments and environment vars and that makes debugging msys2 software with strace very tricky.
Commit message for this code was:

* strace.cc (create_child): Set CYGWIN=noglob when starting new process so that

  Cygwin will leave already-parsed the command line alonw."

I can see no reason for it and it badly breaks the ability to use
strace.exe to investigate calling a Cygwin program from a Windows
program, for example:
strace mingw32-make.exe
.. where mingw32-make.exe finds sh.exe and uses it as the shell.
The reason it badly breaks this use-case is because dcrt0.cc depends
on globbing to happen to parse commandlines from Windows programs;
irrespective of whether they contain any glob patterns or not.

See quoted () comment:
"This must have been run from a Windows shell, so preserve
 quotes for globify to play with later."
The biggest problem with strace spitting out `create_child: ...` despite
being asked to be real quiet is that its output can very well interfere
with scripts' operations.

For example, when running any of Git for Windows' shell scripts with
`GIT_STRACE_COMMANDS=/path/to/logfile` (which is sadly an often needed
debugging technique while trying to address the many MSYS2 issues Git for
Windows faces), any time the output of any command is redirected into a
variable, it will include that `create_child: ...` line, wreaking havoc
with Git's expectations.

So let's just really be quiet when we're asked to be quiet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When converting `/c/` to `C:\`, the trailing slash is actually really
necessary, as `C:` is not an absolute path.

We must be very careful to do this only for root directories, though. If
we kept the trailing slash also for, say, `/y/directory/`, we would run
into the following issue: On FAT file systems, the normalized path is
used to fake inode numbers. As a result, `Y:\directory\` and
`Y:\directory` have different inode numbers!!!

This would result in very non-obvious symptoms. Back when we were too
careless about keeping the trailing slash, it was reported to the Git
for Windows project that the `find` and `rm` commands can error out on
FAT file systems with very confusing "No such file or directory" errors,
for no good reason.

During the original investigation, Vasil Minkov pointed out in
git-for-windows/git#1497 (comment),
that this bug had been fixed in Cygwin as early as 1997... and the bug
was unfortunately reintroduced into early MSYS2 versions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When calling `cygpath -u C:/msys64/` in an MSYS2 setup that was
installed into `C:/msys64/`, the result should be `/`, not `//`.

Let's ensure that we do not append another trailing slash if the
converted path already ends in a slash.

This fixes #112

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In theory this doesn't make a difference because posix_to_win32_path()
is only called with rooted/absolute paths, but as pointed out in
#103 PC_NOFULL will preserve
the trailing slash of unix paths (for some reason).

See "cygpath -m /bin/" (preserved) vs "cygpath -am /bin/" (dropped)

One use case where we need to trailing slashes to be preserved is the GCC build
system:
https://github.com/gcc-mirror/gcc/blob/6d82e0fea5f988e829912a/gcc/Makefile.in#L2314

The Makefile appends a slash to the prefixes and the C code doing relocation will
treat the path as a directory if there is a trailing slash. See
msys2/MINGW-packages#14173 for details.

With this change all our MSYS2 path_conv tests pass again.
When calling windows native apps from MSYS2, the runtime tries to
convert commandline arguments by a specific set of rules. This idea was
inherited from the MSys/MinGW project (which is now seemingly stale, yet
must be credited with championing this useful feature, see MinGW wiki
https://web.archive.org/web/20201112005258/http://www.mingw.org/wiki/Posix_path_conversion).

If the user does not want that behavior on a big scale, e.g. inside a
Bash script, with the changes introduced in this commit, the user can
now set the the environment variable `MSYS_NO_PATHCONV` when calling
native windows commands.

This is a feature that has been introduced in Git for Windows via
git-for-windows/msys2-runtime#11 and it predates
support for the `MSYS2_ENV_CONV_EXCL` and `MSYS2_ARG_CONV_EXCL`
environment variables in the MSYS2 runtime; Many users find the
simplicity of `MSYS_NO_PATHCONV` appealing.

So let's teach MSYS2 proper this simple trick that still allows using
the sophisticated `MSYS2_*_CONV_EXCL` facilities but also offers a
convenient catch-all "just don't convert anything" knob.

Signed-off-by: 마누엘 <nalla@hamal.uberspace.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Otherwise if globbing is allowed and we get called from a
Windows program, build_argv thinks we've been called from
a Cygwin program.
…spec

Reverts 25ba8f3. I can't figure out what
the intention was. I'm sure I'll find out soon enough when everything breaks.

This change means that input of:
  '"C:/test.exe SOME_VAR=\"literal quotes\""'

becomes:
  'C:/test.exe SOME_VAR="literal quotes"'

instead of:
  'C:/test.exe SOME_VAR=\literal quotes\'

.. which is at least consistent with the result for:
  '"no_drive_or_colon SOME_VAR=\"literal quotes\""'

The old result of course resulted in the quoted string being split into
two arguments at the space which is clearly not intended.

I *guess* backslashes in dos paths may have been the issue here?
If so I don't care since we should not use them, ever, esp. not at
the expense of sensible forward-slash-containing input.
Works very much like MSYS2_ARG_CONV_EXCL. In fact it uses the same
function, arg_heuristic_with_exclusions (). Also refactors parsing
the env. variables to use new function, string_split_delimited ().

The env. that is searched through is the merged (POSIX + Windows)
one. It remains to be seen if this should be made an option or not.

This feature was prompted because the R language (Windows exe) calls
bash to run configure.win, which then calls back into R to read its
config variables (LOCAL_SOFT) and when this happens, msys2-runtime
converts R_ARCH from "/x64" to an absolute Windows path and appends
it to another absolute path, R_HOME, forming an invalid path.
It is simply the negation of `disable_pcon`, i.e. `MSYS=enable_pcon` is
equivalent to `MSYS=nodisable_pcon` (the former is slightly more
intuitive than the latter) and likewise `MSYS=noenable_pcon` is
equivalent to `MSYS=disable_pcon` (here, the latter is definitely more
intuitive than the former).

This is needed because we just demoted the pseudo console feature to be
opt-in instead of opt-out, and it would be awkward to recommend to users
to use "nodisable_pcon"... "nodisable" is not even a verb.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We mount /usr/bin to /bin, but in a chroot this is broken and we
have no /bin, so try to use the real path.

chroot is used by pacman to run install scripts when called with --root
and this broke programs in install scripts calling popen()
(install-info from texinfo for example)

There are more paths hardcoded to /bin in cygwin which might also be broken
in this scenario, so this maybe should be extended to all of them.
It does not work at all. For example, `rpm -E %fedora` says that there
should be version 33 of rpmsphere at
https://github.com/rpmsphere/noarch/tree/master/r, but there is only
version 32.

Another thing that is broken: Cygwin now assumes that a recent
mingw-w64-headers version is available, but Fedora apparently only
offers v7.0.0, which is definitely too old to accommodate for the
expectation of cygwin/cygwin@c1f7c4d1b6d7.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Build with --disable-dependency-tracking because we only build once
and this saves 3-4 minutes in CI.
dscho and others added 18 commits August 27, 2024 17:00
This will help us by automating an otherwise tedious task.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In the Cygwin project, it was decided that the command-line of Cygwin
processes, as shown in the output of `wmic process list`, would suffer
from being truncated to 32k (and is transmitted to the child process via
a different mechanism, anyway), and therefore only the absolute path of
the executable is shown by default.

Users who would like to see the full command-line (even if it is
truncated) are expected to set `CYGWIN=wincmdln` (or, in MSYS2's case,
`MSYS=wincmdln`).

Seeing as MSYS2 tries to integrate much better with the surrounding
Win32 ecosystem than Cygwin, it makes sense to turn this on by default.

Users who wish to suppress it can still set `MSYS=nowincmdln`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In particular, we are interested in the address of the CtrlRoutine
and the ExitProcess functions. Since kernel32.dll is loaded first thing,
the addresses will be the same for all processes (matching the
CPU architecture, of course).

This will help us with emulating SIGINT properly (by not sending signals
to *all* processes attached to the same Console, as
GenerateConsoleCtrlEvent() would do).

Co-authored-by: Naveen M K <naveen@syrusdark.website>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch is heavily inspired by the Git for Windows' strategy in
handling Ctrl+C.

When a process is terminated via TerminateProcess(), it has no chance to
do anything in the way of cleaning up. This is particularly noticeable
when a lengthy Git for Windows process tries to update Git's index file
and leaves behind an index.lock file. Git's idea is to remove the stale
index.lock file in that case, using the signal and atexit handlers
available in Linux. But those signal handlers never run.

Note: this is not an issue for MSYS2 processes because MSYS2 emulates
Unix' signal system accurately, both for the process sending the kill
signal and the process receiving it. Win32 processes do not have such a
signal handler, though, instead MSYS2 shuts them down via
`TerminateProcess()`.

For a while, Git for Windows tried to use a gentler method, described in
the Dr Dobb's article "A Safer Alternative to TerminateProcess()" by
Andrew Tucker (July 1, 1999),
http://www.drdobbs.com/a-safer-alternative-to-terminateprocess/184416547

Essentially, we injected a new thread into the running process that does
nothing else than running the ExitProcess() function.

However, this was still not in line with the way CMD handles Ctrl+C: it
gives processes a chance to do something upon Ctrl+C by calling
SetConsoleCtrlHandler(), and ExitProcess() simply never calls that
handler.

So for a while we tried to handle SIGINT/SIGTERM by attaching to the
console of the command to interrupt, and generating the very same event
as CMD does via GenerateConsoleCtrlEvent().

This method *still* was not correct, though, as it would interrupt
*every* process attached to that Console, not just the process (and its
children) that we wanted to signal. A symptom was that hitting Ctrl+C
while `git log` was shown in the pager would interrupt *the pager*.

The method we settled on is to emulate what GenerateConsoleCtrlEvent()
does, but on a process by process basis: inject a remote thread and call
the (private) function kernel32!CtrlRoutine.

To obtain said function's address, we use the dbghelp API to generate a
stack trace from a handler configured via SetConsoleCtrlHandler() and
triggered via GenerateConsoleCtrlEvent(). To avoid killing each and all
processes attached to the same Console as the MSYS2 runtime, we modify
the cygwin-console-helper to optionally print the address of
kernel32!CtrlRoutine to stdout, and then spawn it with a new Console.

Note that this also opens the door to handling 32-bit process from a
64-bit MSYS2 runtime and vice versa, by letting the MSYS2 runtime look
for the cygwin-console-helper.exe of the "other architecture" in a
specific place (we choose /usr/libexec/, as it seems to be the
convention for helper .exe files that are not intended for public
consumption).

The 32-bit helper implicitly links to libgcc_s_dw2.dll and
libwinpthread-1.dll, so to avoid cluttering /usr/libexec/, we look for
the helped of the "other" architecture in the corresponding mingw32/ or
mingw64/ subdirectory.

Among other bugs, this strategy to handle Ctrl+C fixes the MSYS2 side of
the bug where interrupting `git clone https://...` would send the
spawned-off `git remote-https` process into the background instead of
interrupting it, i.e. the clone would continue and its progress would be
reported mercilessly to the console window without the user being able
to do anything about it (short of firing up the task manager and killing
the appropriate task manually).

Note that this special-handling is only necessary when *MSYS2* handles
the Ctrl+C event, e.g. when interrupting a process started from within
MinTTY or any other non-cmd-based terminal emulator. If the process was
started from within `cmd.exe`'s terminal window, child processes are
already killed appropriately upon Ctrl+C, by `cmd.exe` itself.

Also, we can't trust the processes to end it's subprocesses upon receiving
Ctrl+C. For example, `pip.exe` from `python-pip` doesn't kill the python
it lauches (it tries to but fails), and I noticed that in cmd it kills python
also correctly, which mean we should kill all the process using
`exit_process_tree`.

Co-authored-by: Naveen M K <naveen@syrusdark.website>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This change is the equivalent to the change to the Ctrl+C handling we
just made.

Co-authored-by: Naveen M K <naveen@syrusdark.website>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This code has been causing issues with SUBST and mapped network drives,
so add an option (defaulted to on) which can be used to disable it where
needed.  MSYS=nonativeinnerlinks
The MSYS2 packages lack the infrastructure to build those.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Before symlinking libg.a, we need the symlink source `libmsys-2.0.a`: in
MSYS2, we copy by default (if we were creating Unix-style symlinks, the
target would not have to exist before symlinking, but when copying we do
need the source _right away_).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When calling a non-MSys2 binary, all of the environment is converted from
POSIX to Win32, including the SHELL environment variable. In Git for
Windows, for example, `SHELL=/usr/bin/bash` is converted to
`SHELL=C:\Program Files\Git\usr\bin\bash.exe` when calling the `git.exe`
binary. This is appropriate because non-MSys2 binaries would not handle
POSIX paths correctly.

Under certain circumstances, however, `git.exe` calls an *MSys2* binary in
turn, such as `git config --edit` calling `vim.exe` unless Git is
configured to use another editor specifically.

Now, when this "improved vi" calls shell commands, it uses that $SHELL
variable *without quoting*, resulting in a nasty error:

	C:\Program: No such file or directory

Many other programs behave in the same manner, assuming that $SHELL does
not contain spaces and hence needs no quoting, unfortunately including
some of Git's own scripts.

Therefore let's make sure that $SHELL gets "posified" again when entering
MSys2 programs.

Earlier attempts by Git for Windows contributors claimed that adding
`SHELL` to the `conv_envvars` array does not have the intended effect.
These reports just missed that the `conv_start_chars` array (which makes
the code more performant) needs to be adjusted, too.

Note that we set the `immediate` flag to `true` so that the environment
variable is set immediately by the MSys2 runtime, i.e. not only spawned
processes will see the POSIX-ified `SHELL` variable, but the MSys2 runtime
*itself*, too.

This fixes git-for-windows/git#542,
git-for-windows/git#498, and
git-for-windows/git#468.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MSYS2 recently introduced that hack where the ORIGINAL_PATH variable is
set to the original PATH value in /etc/profile, unless previously set.
In Git for Windows' default mode, that ORIGINAL_PATH value is the used
to define the PATH variable explicitly.

So far so good.

The problem: when calling from inside an MSYS2 process (such as Bash) a
MINGW executable (such as git.exe) that then calls another MSYS2
executable (such as bash.exe), that latter call will try to re-convert
ORIGINAL_PATH after the previous call converted ORIGINAL_PATH from POSIX
to Windows paths. And this conversion may very well fail, e.g. when the
path list contains mixed semicolons and colons.

So let's just *force* the MSYS2 runtime to handle ORIGINAL_PATH in the
same way as the PATH variable (which conversion works, as we know).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We are currently trying to move our cygwin build environment closer
to cygwin and some autotools/bash based build systems call "uname -s"
to figure out the OS and in many cases only handle the cygwin case, so
we have to patch them.

With this instead of patching we can set MSYSTEM=CYGWIN and change
uname output that way.

The next step would be to always output CYGWIN in an msys env by default,
but for now this allows us to get rid of all the patches without
affecting users.
There is a difference between an empty value and an unset environment
variable. We should not confuse both; If the user wants to unset an
environment variable, they can certainly do so (unsetenv(3), or in the
shell: 'unset ABC').

This fixes Git's t3301-notes.sh, which overrides environment variables
with empty values.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We just disabled the code that skips environment variables whose values
are empty.

However, this code was introduced a long time ago into Cygwin in
d6b1ac7 (* environ.cc (build_env): Don't put an empty environment
variable into the environment.  Optimize use of "len". * errno.cc
(ERROR_MORE_DATA): Translate to EMSGSIZE rather than EAGAIN.,
2006-09-07), seemingly without any complaints.

Meaning: There might very well be use cases out there where it makes
sense to skip empty-valued environment variables.

Therefore, it seems like a good idea to have a "knob" to turn it back
on. With this commit, we introduce such a knob: by setting
`noemptyenvvalues` the `MSYS` variable (or appending it if that variable
is already set), users can tell the MSYS2 runtime to behave just like in
the olden times.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With this commit, you can call

	MSYS=noemptyenvvalues my-command

and it does what is expected: to pass no empty-valued environment
variables to `my-command`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
After the update of msys2-w32api from v11.0.1 to current master (and soon to be v12)
we get: winsup/cygwin/exceptions.cc:1736:33: error: '<anonymous>' may be used uninitialized [-Werror=maybe-uninitialized]

Ignore it like the rest.

Fixes #214
It frequently leads to problems when trying, say, to call from MSYS2's
Bash into Cygwin's or Git for Windows', merely because sharing that data
is pretty finicky.

For example, using the MSYS2' Bash using the MSYS2 runtime version that
is current at time of writing, trying to call Cygwin's programs fails
in manners like this:

    $ /c/cygwin64/bin/uname -r
      0 [main] uname (9540) child_copy: cygheap read copy failed, 0x800000000..0x800010BE0, done 0, windows pid 9540, Win32 error 6
    680 [main] uname 880 C:\cygwin64\bin\uname.exe: *** fatal error - couldn't create signal pipe, Win32 error 5

with the rather misleading exit code 127 (a code which is reserved to
indicate that a command was not found).

Let's just treat the MSYS2 runtime and the Cygwin runtime as completely
incompatible with one another, by virtue of using a different
magic constant than merely `CHILD_INFO_MAGIC`.

By using the msys2-runtime commit to modify that magic constant, we can
even spawn programs using a different MSYS2 runtime (such as Git for
Windows') because the commit serves as the tell-tale whether two MSYS2
runtime versions are compatible with each other. To support building in
the MSYS2-packages repository (where we do not check out the
`msys2-runtime` but instead check out Cygwin and apply patches on top),
let's accept a hard-coded commit hash as `./configure` option.

One consequence is that spawned MSYS processes using a different MSYS2
runtime will not be visible as such to the parent process, i.e. they
cannot share any resources such as pseudo terminals. But that's okay,
they are simply treated as if they were regular Win32 programs.

Note: We have to use a very rare form of encoding the brackets in the
`expr` calls: quadrigraphs (for a thorough explanation, see
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Quadrigraphs.html#Quadrigraphs).
This is necessary because it is apparently impossible to encode brackets
in `configure.ac` files otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Having just Cygwin's version in the output of `uname` is not helpful, as
both MSYS2 as well as Git for Windows release intermediate versions of
the MSYS2 runtime much more often than Cygwin runtime versions are
released.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Collaborator

dscho commented Aug 27, 2024

I force-pushed after rebasing.

Range-diff
  • 1: cbacf21 ! 1: f160385 Add functionality for changing OS name via MSYSTEM environment variables.

    @@ winsup/cygwin/environ.cc: win32env_to_cygenv (PWCHAR rawenv, bool posify)
            if (*eq && posify)
              posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf);
            debug_printf ("%p: %s", envp[i], envp[i]);
    -@@ winsup/cygwin/environ.cc: struct spenv
    - static NO_COPY spenv spenvs[] =
    - {
    - #ifdef DEBUGGING
    --  {NL ("CYGWIN_DEBUG="), false, true, NULL},
    -+  {NL ("MSYS_DEBUG="), false, true, NULL},
    - #endif
    -   {NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive},
    +@@ winsup/cygwin/environ.cc: static NO_COPY spenv spenvs[] =
        {NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath},
        {NL ("LOGONSERVER="), false, false, &cygheap_user::env_logsrv},
        {NL ("PATH="), false, true, NULL},
  • 2: c0adae6 = 2: 6393488 - Move root to /usr. - Change sorting mount points. - By default mount without ACLs. - Can read /etc/fstab with short mount point format.

  • 3: aa6e313 = 3: 06ea20e Instead of creating Cygwin symlinks, use deep copy by default

  • 4: 55cc413 = 4: 222fd37 Automatically rewrite TERM=msys to TERM=cygwin

  • 5: e7d9d44 = 5: 41e8ada Do not convert environment for strace

  • 6: a1e28fb = 6: 766e55c strace.cc: Don't set MSYS=noglob

  • 7: 5c3c66a = 7: 4f01c3f Add debugging for strace make_command_line

  • 8: a4cdbec = 8: d43f1ee strace --quiet: be really quiet

  • 9: 7e52ffd = 9: 0053f7b path_conv: special-case root directory to have trailing slash

  • 10: 6417ed9 = 10: 1e8a891 When converting to a Unix path, avoid double trailing slashes

  • 11: b314cf5 = 11: 673065d msys2_path_conv: pass PC_NOFULL to path_conv

  • 12: 68a1399 = 12: e1db148 path-conversion: Introduce ability to switch off conversion.

  • 13: 097d4c1 = 13: f6e516d dcrt0.cc: Untangle allow_glob from winshell

  • 14: 9b7dbd7 = 14: 1059fbb dcrt0.cc (globify): Don't quote literal strings differently when dos_spec

  • 15: edba1e9 = 15: f8da08f Add debugging for build_argv

  • 16: 607001f = 16: 03d6fe1 environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL

  • 17: 4b69189 = 17: 90d66ee Fix native symbolic link spawn passing wrong arg0

  • 18: 245f165 = 18: 7b84fed Introduce the enable_pcon value for MSYS

  • 19: 7462e30 = 19: 6f87e23 popen: call /usr/bin/sh instead of /bin/sh

  • 20: 37dd55b = 20: df7a56e Disable the 'cygwin' GitHub workflow

  • 21: 41778df = 21: cf56ccd CI: add a GHA for doing a basic build test

  • 22: 5b7e798 = 22: 083c245 CI: fix the build with gcc 13

  • 23: 293731b = 23: 91f46df Set up a GitHub Action to keep in sync with Cygwin

  • 24: 15ae7aa = 24: 4dd6aad Expose full command-lines to other Win32 processes by default

  • 25: ab240c5 = 25: 6ef58ed Add a helper to obtain a function's address in kernel32.dll

  • 26: ed62ffe = 26: 38a8880 Emulate GenerateConsoleCtrlEvent() upon Ctrl+C

  • 27: 79f03e1 = 27: b9d1fad kill: kill Win32 processes more gently

  • 28: f14b389 = 28: 715f6ce Cygwin: make option for native inner link handling.

  • 29: be6f3f0 = 29: abeeb31 docs: skip building texinfo and PDF files

  • 30: eb5833f = 30: fbe8ae3 install-libs: depend on the "toollibs"

  • 31: f384af0 = 31: 38abc7c POSIX-ify the SHELL variable

  • 32: 50cd806 = 32: 9c758e8 Handle ORIGINAL_PATH just like PATH

  • 33: 5e28622 = 33: 312f766 uname: allow setting the system name to CYGWIN

  • 34: dacdc1a = 34: e19af20 Pass environment variables with empty values

  • 35: 8c8e8e9 = 35: 4deb751 Optionally disallow empty environment values again

  • 36: 310c9bc = 36: a1f282d build_env(): respect the MSYS environment variable

  • 37: 9d03af7 = 37: d1b382b Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by default"

  • 38: 773b5d9 = 38: 997f6f3 CI: set -Wno-error=maybe-uninitialized

  • 39: 3255d4e = 39: e347515 Avoid sharing cygheaps across Cygwin versions

  • 40: 952a99f = 40: dd9d970 uname: report msys2-runtime commit hash, too

  • 41: 9b4cf29 < -: ---------- fixup! Add functionality for changing OS name via MSYSTEM environment variables.

@lazka
Copy link
Member Author

lazka commented Aug 27, 2024

sure, looks good, thanks.

I'm confused why git rebase dropped that hunk.. there was no conflict.

@lazka
Copy link
Member Author

lazka commented Aug 27, 2024

double checked, and everything else is there at least.

@dscho
Copy link
Collaborator

dscho commented Aug 27, 2024

I'm confused why git rebase dropped that hunk.. there was no conflict.

@lazka Aha! I looked a little bit more closely, and the original change to drop renaming CYGWIN_DEBUG to MSYS_DEBUG is in 38020a7, which is marked as a fixup! of d1cb51f.

However, in that commit, the CYGWIN_DEBUG variable was not renamed to MSYS_DEBUG, at least not in winsup/cygwin/environ.cc (but in winsup/cygwin/dcrt0.cc). That was done two patches later, in ed83b2c.

So when the auto-squash tried to fix up the replayed d1cb51f by dropping that hunk, Git realized that the pre-image already had CYGWIN_DEBUG and basically thought: hey, this is great, the change was already applied, good, nothing to be done, let's continue. But two patches later, that symbol was renamed to MSYS_DEBUG and that's how we ended up here.

@dscho dscho merged commit dd9d970 into msys2-3.5.4 Aug 27, 2024
2 checks passed
@dscho dscho deleted the wip/msys2-3.5.4 branch August 27, 2024 16:59
@lazka
Copy link
Member Author

lazka commented Aug 27, 2024

Oh, good catch. I kinda would have expected git to complain there somehow, either when doing the wrong fixup or when dropping it later. I need to be more careful next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants