Skip to content

Msys2 3.6.9 patches reorder#337

Open
lygstate wants to merge 9 commits intomsys2:msys2-3.6.9from
lygstate:msys2-3.6.9-patches-reorder
Open

Msys2 3.6.9 patches reorder#337
lygstate wants to merge 9 commits intomsys2:msys2-3.6.9from
lygstate:msys2-3.6.9-patches-reorder

Conversation

@lygstate
Copy link
Copy Markdown

Redo the following commits into new patches, so the changes are grouped properly and can be upstreamed when possible:

  • "Add functionality for changing OS name via MSYSTEM environment variables."

  • "uname: allow setting the system name to CYGWIN"

  • "Rename dll from cygwin to msys"

  • "strace.cc: Don't set MSYS=noglob"

In response to #334 (comment)

Currently these four commits are changes things scattered.

  • "Add functionality for changing OS name via MSYSTEM environment variables."
    contains work changing OS name via MSYSTEM environment and Add support for MSYS environment variable instead of CYGWIN
  • "uname: allow setting the system name to CYGWIN"
    can be squash into "Add functionality for changing OS name via MSYSTEM environment variables."
  • "Rename dll from cygwin to msys"
    contains work "Add support for MSYS environment variable instead of CYGWIN", "strace.cc: Don't set MSYS=noglob"
    "Rename dll from cygwin to msys", "Convert to use msys'style named pipe".
  • "strace.cc: Don't set MSYS=noglob"
    The changes is scattered into "Rename dll from cygwin to msys", redo it so that it's not depends on "Rename dll from cygwin to msys"

So split them properly so the changes be more clear and minimal

lygstate and others added 9 commits April 27, 2026 19:28
…les.

allow setting the system name to CYGWIN

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.
Changes of winsup/cygwin/environ.cc is split from "Add functionality for changing OS name via MSYSTEM environment variables."
Changes of winsup/cygwin/exceptions.cc, winsup/utils/mingw/cygcheck.cc is split from "Rename dll from cygwin to msys"

known_env_vars is sorted, update it
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."
This is split from "Rename dll from cygwin to msys"
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.

2 participants