Merge pull request #2421 from lazka/runtime-uname-again
msys2-runtime: bring back the uname change lost in the last rebase
This commit is contained in:
@@ -2709,5 +2709,5 @@ index eb2a870..3bf9d9f 100755
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ index b900960..617a9c2 100755
|
||||
my ($file, $member, $symbol) = m%^([^:]*):([^:]*(?=:))?.* T (.*)%o;
|
||||
next if !defined($symbol) || $symbol =~ $exclude_regex;
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -1453,5 +1453,5 @@ index b96ad40..8ba5b9e 100644
|
||||
}
|
||||
if (cygwin_internal (CW_STRACE_TOGGLE, child_pid))
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -1096,5 +1096,5 @@ index e3a65f8..1aeec8d 100644
|
||||
{
|
||||
for (int i = calloced; i < argc; i++)
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -187,5 +187,5 @@ index 3502166..28bcd63 100644
|
||||
/* Add a hint to the sysname, that we're running under WOW64. This might
|
||||
give an early clue if somebody encounters problems. */
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -397,5 +397,5 @@ index c0a0f61..4c94d83 100644
|
||||
free (gecos);
|
||||
if (home)
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -232,5 +232,5 @@ index 4db7b24..70c9793 100644
|
||||
buf = tp.t_get ();
|
||||
cp = stpcpy (buf, SYMLINK_COOKIE);
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ index 0e60f30..f942ba9 100644
|
||||
else if (*newp == 'M' && strncmp (newp, "MSYS=", 5) == 0)
|
||||
parse_options (newp + 5);
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ index 53ddc60..a04f613 100644
|
||||
{
|
||||
set_errno (E2BIG);
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -54,5 +54,5 @@ index 70c9793..a9bf8ec 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -76,5 +76,5 @@ index b851727..c2da0cb 100644
|
||||
|
||||
/* Convert argv[0] to posix rules if it's currently blatantly
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -56,5 +56,5 @@ index c2da0cb..7ac8bf0 100644
|
||||
size_t cnt = isascii (*s) ? 1 : mbtowc (NULL, s, MB_CUR_MAX);
|
||||
if (cnt <= 1 || cnt == (size_t)-1)
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -68,5 +68,5 @@ index 8ba5b9e..e7ac668 100644
|
||||
NULL, /* Security */
|
||||
NULL, /* thread */
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -21,5 +21,5 @@ index 7ac8bf0..4683972 100644
|
||||
while (*cmd)
|
||||
{
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -20,5 +20,5 @@ index e7ac668..2fe3cac 100644
|
||||
SetConsoleCtrlHandler (NULL, 0);
|
||||
/* Commit message for this code was:
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -172,5 +172,5 @@ index a04f613..3e048bb 100644
|
||||
|
||||
/* Check if we have been called from exec{lv}p or spawn{lv}p and mask
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -21,5 +21,5 @@ index 3e048bb..c6bfcb1 100644
|
||||
|
||||
if (buf.isdir ())
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -22,5 +22,5 @@ index 613a019..61c2808 100644
|
||||
LoadDLLfunc (VirtualAlloc2, 28, kernelbase)
|
||||
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -36,5 +36,5 @@ index 2fe3cac..25f8f6b 100644
|
||||
SetConsoleCtrlHandler (NULL, 0);
|
||||
/* Commit message for this code was:
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -50,5 +50,5 @@ index 019af4f..275e950 100644
|
||||
bool NO_COPY in_forkee;
|
||||
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -53,5 +53,5 @@ index 34a951a..6a54ed4 100644
|
||||
*k->setting.x &= ~k->values[istrue].i;
|
||||
if (istrue || (eq && strtol (eq, NULL, 0)))
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ index fd8090b..1eadb71 100644
|
||||
|
||||
/* Reinstate the close-on-exec state */
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -40,5 +40,5 @@ index 0000000..c7ed476
|
||||
+ make -j8
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ index c7ed476..ede8d53 100644
|
||||
+ name: install
|
||||
+ path: _dest/
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -39,5 +39,5 @@ index 0000000..defcdf8
|
||||
+ run: |
|
||||
+ git push https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ index 4c5595d..561d1ac 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -52,5 +52,5 @@ index a52b6ac..de05270 100644
|
||||
|
||||
<listitem>
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ index cdad8e6..3e1e9e6 100644
|
||||
jobs:
|
||||
fedora-build:
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -64,5 +64,5 @@ index c6bfcb1..6c580d7 100644
|
||||
|
||||
/* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround
|
||||
--
|
||||
2.31.0
|
||||
2.31.1
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 0eee28b4ad46bcf4ed60d6bb612dc1e477b639b1 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Mon, 22 Mar 2021 08:10:23 +0100
|
||||
Subject: [PATCH 30/N] uname: limit sysname to "MSYS" or "MINGW"
|
||||
|
||||
uname just included the content of the MSYSTEM env var as sysname
|
||||
which leads to problems in case build tools use it detect a mingw build
|
||||
and MSYSTEM is something like UCRT or CLANG.
|
||||
|
||||
To work around that, in case MSYSTEM is not set, empty, or not MSYS, then
|
||||
we just output a hardcoded "MINGW".
|
||||
|
||||
And because various scripts hardcode checks for MINGW32/MINGW64 we return MINGW64,
|
||||
unless there is a "32" in MSYSTEM, in which case we return MINGW32.
|
||||
---
|
||||
winsup/cygwin/uname.cc | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
|
||||
index 28bcd63..daed73f 100644
|
||||
--- a/winsup/cygwin/uname.cc
|
||||
+++ b/winsup/cygwin/uname.cc
|
||||
@@ -37,9 +37,11 @@ uname_x (struct utsname *name)
|
||||
memset (name, 0, sizeof (*name));
|
||||
/* sysname */
|
||||
char* msystem = getenv("MSYSTEM");
|
||||
- const char *msystem_msys = "MSYS";
|
||||
+ const char* msystem_sysname = "MSYS";
|
||||
+ if (msystem != NULL && *msystem && strcmp(msystem, "MSYS") != 0)
|
||||
+ msystem_sysname = (strstr(msystem, "32") != NULL) ? "MINGW32" : "MINGW64";;
|
||||
__small_sprintf (name->sysname, "%s_%s-%u%s",
|
||||
- msystem ? msystem : msystem_msys,
|
||||
+ msystem_sysname,
|
||||
wincap.osname (), wincap.build_number (),
|
||||
wincap.is_wow64 () ? "-WOW64" : "");
|
||||
/* nodename */
|
||||
@@ -103,8 +105,10 @@ uname (struct utsname *in_name)
|
||||
memset (name, 0, sizeof (*name));
|
||||
#ifdef __MSYS__
|
||||
char* msystem = getenv("MSYSTEM");
|
||||
- const char *msystem_msys = "MSYS";
|
||||
- __small_sprintf (name->sysname, "%s_%s", msystem ? msystem : msystem_msys, wincap.osname ());
|
||||
+ const char* msystem_sysname = "MSYS";
|
||||
+ if (msystem != NULL && *msystem && strcmp(msystem, "MSYS") != 0)
|
||||
+ msystem_sysname = (strstr(msystem, "32") != NULL) ? "MINGW32" : "MINGW64";
|
||||
+ __small_sprintf (name->sysname, "%s_%s", msystem_sysname, wincap.osname ());
|
||||
#else
|
||||
__small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
|
||||
#endif
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgbase=msys2-runtime
|
||||
pkgname=('msys2-runtime' 'msys2-runtime-devel')
|
||||
pkgver=3.2.0
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Cygwin POSIX emulation engine"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://www.cygwin.com/"
|
||||
@@ -51,37 +51,39 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
|
||||
0026-recursiveCopy-Always-close-the-used-handle-with-Find.patch
|
||||
0027-Expose-full-command-lines-to-other-Win32-processes-b.patch
|
||||
0028-Disable-the-cygwin-GitHub-workflow.patch
|
||||
0029-Do-not-show-Error-dialogs-by-default.patch)
|
||||
0029-Do-not-show-Error-dialogs-by-default.patch
|
||||
0030-uname-limit-sysname-to-MSYS-or-MINGW.patch)
|
||||
sha256sums=('SKIP'
|
||||
'd6032bec7df8503d87a011083154b24a8a261bfd704c8199dca5fa6c87908b60'
|
||||
'2b829e772918a238124c06606dfb3789635f7dadd83c0fe1b7f0cff4f530d3eb'
|
||||
'bd4451be3c2ec3df3c0d3308313e4dc0a6895981f18ab2f1b1cd73e5bda9e6dd'
|
||||
'842141328b1a16517511e417cd98e28ab43d4fe0fc1fa7251a56d15e86fc64e0'
|
||||
'a6db29bf709ef28b1ce44ded23c4a6901cd649e41358c10fecf6d974ca9c371d'
|
||||
'1b4dd53e627986d91f4beda2c6411d0c5ea8e2b9bcb6239e1ff867740ca01a88'
|
||||
'7acefc1cf93abb5fac85060e223863b4127d3a8ec54986ef556452ede9e2f319'
|
||||
'552acb9f54aeddacaca23906ec7a6b46513626206ee0eab3e1fd8d3b7724b406'
|
||||
'998290705dbe939cc356d41bafdb58254b0161a1fcace327523514041c5fd066'
|
||||
'3091768d449b0a41772acafdf0a1b506274bf2d4466c08c517f012383baa18ad'
|
||||
'5db993cc238350d5b30830ecb03a9860ce335483cbd32d8c79affb1cf03efffb'
|
||||
'1b99a2333cd94b4e5095b373ca88e327645d68f9835fd04eb684c6913645f70a'
|
||||
'af369d29de42147828f9d960b6017024f4c9c62794723c860b81e79a29c962b2'
|
||||
'a855f924837e60433d39e84d4ae5befea1b2c6bbb8d3bf7c442184aaae4e1a1c'
|
||||
'6f8b902c611de300ada5ff1a80948e771e3bb435d7fb0db5f9f4962d91cd39cd'
|
||||
'793ff55e80f6c41c87e2f0661e1d91e56eb89c13e42e6fb7650c58dfc5dde244'
|
||||
'2563740da37e04b4deaff20e3e968b90d673e5bc6140c33132982d5201bfe568'
|
||||
'3fec9f8cf42784be57de2cee2d1fccb3d25724fc5f3e46bbc20a3ebf7a7bcc38'
|
||||
'58f5a43bb23f092c904615bf9e41156e5f2ad79371a2eab92777a1fa0c95e56c'
|
||||
'022aabfd75ee57d4f815ffce016bb41ec6719bdfb5f639dd3332302283b5b344'
|
||||
'8574a0d81d74b18377f240d0233aeac6335dc885b45f0a313dc3fb3ba9dff118'
|
||||
'23d5563185cfeb16424afff6b4098ffe442c2ce345101194a1fb4dfd999169c6'
|
||||
'9bd64e1ad2546982353f912a587df51bf1684013736e73bfc0f24669bdbeda8f'
|
||||
'7bf28c668c49d862a624af76a3b549829c3024d0fb9798667474487a7127786d'
|
||||
'364dbb9032aece79003badcd068c489c3222acb4e7e4360db48d34a25145bdde'
|
||||
'c1cb2706e4ad0bd162151153f1c087e03e6c19f40611abcfa31e2c409b35102d'
|
||||
'a302207244650d7230d63c5afc065a4d1eba2c14effe3e9c4fe9ec31b9faa789'
|
||||
'892db0bbefb70ed962f46642974a77560a0e8829b09e2e2924ee0fe7d8c51a89'
|
||||
'7e31db8bf617d8588c4ff42b2a8cc5377c73479ece06d01ad9141c8d718ff22d')
|
||||
'605f3f31dcca983fad2659f2d8f3531217e3f133757b40b0977e6a17c406c147'
|
||||
'5d120d24ce55ef08bf459781610e32c4a8e5e0eac73971a60e80590c6432d940'
|
||||
'06edd4fef57a3a77c0542dbabedb4f35cf0e64fccb5edaeb2dbd5ab305a5e001'
|
||||
'1a28f4fd164215332b081e405def363af157b1abc91b0d98550dccbf84a9b682'
|
||||
'7698d6afc29103701cc213caaa0eaab429f791bbd8595ad82fe1c0416ac807d6'
|
||||
'f022cee7fe1fc4149fb02b95256fe86e12361cfb5e66040eac9dbf7f162e4a4f'
|
||||
'7d17457c9b3a7a8a3cc8d5e313d56f013ad899e6756f3816c575ee31b2bc299e'
|
||||
'ce0dc0502fdce4cad50a71fcc27c175dac193603c2dc4c8a701f43ffa63d39a6'
|
||||
'e08513c22a68e627324ce942f6cac3980f42a972e3c119da0b0a03d728a0701e'
|
||||
'21f2592d3fa4b836eee8b2a01a84b069442e99af4181d5298e147d461c81468a'
|
||||
'786126329d6bcd1e2cd6ca8a118049784e3db033e80566fde8341729701d4da9'
|
||||
'47d566113baf08c56a8a7f4d516e5ce817d7936cb1b796032b30c65acce39dda'
|
||||
'04eddbcddb02c8026dde666b7388cd1871fdeb9072ff36b6270c101fb3cebb88'
|
||||
'314ab067f049c48de232e518539752404aca6980faf4e3a6f26679a64f1eac51'
|
||||
'a6028b372da7ef8010788b5c22e66096c2c968b6a0bf944b90fbdd9e8c0d354e'
|
||||
'7d24ae6654b8dce1d1c641c239e84d3c518c564c1dcbca46a7a03c75771ca634'
|
||||
'e9de713a0996ed18a5d1c3dce8b2d905375b715e3e8945ba354206d61dc43f09'
|
||||
'3d0822b9c68968d7db2f6750cca0619ff4eedba3b8b9b784d5848f6d041a960b'
|
||||
'c9252d30813a080a7f124c383c941be97535abd31babc55e17b33f666678f140'
|
||||
'65b665e16b096ea1a7476a8fcd83a3287f9427cbe781f52dc6a2a186afc165b3'
|
||||
'81bab02c5930d01e813cb295099bdc8a10e84e1a38dabae3e99eb9b5ec50d401'
|
||||
'c4831a348e83c30d17af54a637558986e50b34bb49be063d32df850a4e23a580'
|
||||
'ab99f9903b5a8d785e0a7e0a6cc15f1de79d7d9b2bbff513e05c5b524bec845e'
|
||||
'de6e6f9e8a94eccf016617a4925a04a4c18ba5cfd3acdfc3f26325963b111e56'
|
||||
'4853cdfd022e6f6b58d564e24e16094b916ab5646cefab3192d90807b6775bc2'
|
||||
'a6b342c1a58ac83004c10933a58b5533a3d157d2d3336ac2019183d7e6c87d65'
|
||||
'6a2dffa890ea1694a76333388bfcdb5bcc67d3a431e70064342002662909d366'
|
||||
'd18402a2c75e099a9cafd0ce7eba01476728c825812d4516ebc240e3c494fe4e'
|
||||
'969ace2675ebec747d0ccfe2540210ebac9974973b8b93325aecb53351514b76'
|
||||
'301422428472f693ad3a659b1279c969d5457eaab77be4dc0a389b2f5c5b6a55')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
@@ -147,7 +149,8 @@ prepare() {
|
||||
0026-recursiveCopy-Always-close-the-used-handle-with-Find.patch \
|
||||
0027-Expose-full-command-lines-to-other-Win32-processes-b.patch \
|
||||
0028-Disable-the-cygwin-GitHub-workflow.patch \
|
||||
0029-Do-not-show-Error-dialogs-by-default.patch
|
||||
0029-Do-not-show-Error-dialogs-by-default.patch \
|
||||
0030-uname-limit-sysname-to-MSYS-or-MINGW.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user