msys2-runtime: sync with msys2/msys2-runtime
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
66f9f80220
commit
9c4a88596b
39
msys2-runtime/0042-ci-avoid-using-Node.js-12-Actions.patch
Normal file
39
msys2-runtime/0042-ci-avoid-using-Node.js-12-Actions.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 205042e70b50cdd688b3891cca53c90859597df6 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Tue, 8 Nov 2022 17:05:57 +0100
|
||||
Subject: [PATCH 42/N] ci: avoid using Node.js 12 Actions
|
||||
|
||||
As mentioned in
|
||||
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
|
||||
GitHub workflows should avoid using Actions that use Node.js 12 and
|
||||
instead upgrade to versions of those Actions that use Node.js 16.
|
||||
|
||||
So let's do that.
|
||||
|
||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
---
|
||||
.github/workflows/build.yaml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
|
||||
index 4e1d498..5069dbd 100644
|
||||
--- a/.github/workflows/build.yaml
|
||||
+++ b/.github/workflows/build.yaml
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- uses: actions/checkout@v2
|
||||
+ uses: actions/checkout@v3
|
||||
|
||||
- name: setup-msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
make DESTDIR="$(pwd)"/_dest install
|
||||
|
||||
- name: Upload
|
||||
- uses: actions/upload-artifact@v2
|
||||
+ uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: install
|
||||
path: _dest/
|
||||
@ -0,0 +1,33 @@
|
||||
From 1a46b7d8d3d3359db09a81f063711e4523aedb68 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Tue, 8 Nov 2022 16:24:20 +0100
|
||||
Subject: [PATCH 43/N] When converting to a Unix path, avoid double trailing
|
||||
slashes
|
||||
|
||||
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 https://github.com/msys2/msys2-runtime/issues/112
|
||||
|
||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
---
|
||||
winsup/cygwin/mount.cc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
|
||||
index 22d7b31..cbc3100 100644
|
||||
--- a/winsup/cygwin/mount.cc
|
||||
+++ b/winsup/cygwin/mount.cc
|
||||
@@ -923,6 +923,9 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
|
||||
nextchar = 1;
|
||||
|
||||
int addslash = nextchar > 0 ? 1 : 0;
|
||||
+ /* avoid appending a slash if the result already has a trailing slash */
|
||||
+ if (append_slash && mi.posix_pathlen && mi.posix_path[mi.posix_pathlen-1] == '/')
|
||||
+ append_slash = addslash = 0;
|
||||
if ((mi.posix_pathlen + (pathbuflen - mi.native_pathlen) + addslash) >= NT_MAX_PATH)
|
||||
return ENAMETOOLONG;
|
||||
strcpy (posix_path, mi.posix_path);
|
||||
@ -0,0 +1,64 @@
|
||||
From 358b4547f7c159ca544a24938aca350b3aac84dd Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
||||
Date: Tue, 20 Sep 2022 21:47:34 +0200
|
||||
Subject: [PATCH 44/N] amend! Special case for converting root directory to
|
||||
have training slash
|
||||
|
||||
path_conv: special-case root directory to have trailing slash
|
||||
|
||||
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
|
||||
https://github.com/git-for-windows/git/issues/1497#issuecomment-372665870,
|
||||
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>
|
||||
---
|
||||
winsup/cygwin/path.cc | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
|
||||
index 9a3ad7a..e191b9e 100644
|
||||
--- a/winsup/cygwin/path.cc
|
||||
+++ b/winsup/cygwin/path.cc
|
||||
@@ -1254,17 +1254,17 @@ path_conv::check (const char *src, unsigned opt,
|
||||
cfree (wide_path);
|
||||
wide_path = NULL;
|
||||
}
|
||||
- }
|
||||
|
||||
- if (need_directory)
|
||||
- {
|
||||
- size_t n = strlen (this->path);
|
||||
- /* Do not add trailing \ to UNC device names like \\.\a: */
|
||||
- if (this->path[n - 1] != '\\' &&
|
||||
- (strncmp (this->path, "\\\\.\\", 4) != 0))
|
||||
+ if (need_directory)
|
||||
{
|
||||
- this->modifiable_path ()[n] = '\\';
|
||||
- this->modifiable_path ()[n + 1] = '\0';
|
||||
+ size_t n = strlen (this->path);
|
||||
+ /* Do not add trailing \ to UNC device names like \\.\a: */
|
||||
+ if (this->path[n - 1] != '\\' &&
|
||||
+ (strncmp (this->path, "\\\\.\\", 4) != 0))
|
||||
+ {
|
||||
+ this->modifiable_path ()[n] = '\\';
|
||||
+ this->modifiable_path ()[n + 1] = '\0';
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
pkgbase=msys2-runtime
|
||||
pkgname=('msys2-runtime' 'msys2-runtime-devel')
|
||||
pkgver=3.3.6
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Cygwin POSIX emulation engine"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://www.cygwin.com/"
|
||||
@ -65,7 +65,10 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
|
||||
0038-Pass-environment-variables-with-empty-values.patch
|
||||
0039-Optionally-disallow-empty-environment-values-again.patch
|
||||
0040-build_env-respect-the-MSYS-environment-variable.patch
|
||||
0041-Cygwin-pty-Fix-Bad-address-error-when-running-cmd.ex.patch)
|
||||
0041-Cygwin-pty-Fix-Bad-address-error-when-running-cmd.ex.patch
|
||||
0042-ci-avoid-using-Node.js-12-Actions.patch
|
||||
0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch
|
||||
0044-amend-Special-case-for-converting-root-directory-to-.patch)
|
||||
sha256sums=('SKIP'
|
||||
'c375315e58181ee5589b7966101aa095de3f864a579c3c3f0f0683595d4e428d'
|
||||
'01ea2b131cf5a3b27fdbc458019eac14e45a36782ce3ce33e62328eefcd2d02e'
|
||||
@ -107,7 +110,10 @@ sha256sums=('SKIP'
|
||||
'30a3f2c7fba69aa9942f18f98c4289a8d89d6a6187f84a57895dbaa65f54d30e'
|
||||
'fcf8caa3cab42f0ea228b8e3213238ce2354f13dea27289c6899b0a209ffd204'
|
||||
'0e5ba38fa125822330b1842d487aee78126bf7ea503eb1fe970440cf1504f25f'
|
||||
'd5f6913d0d1439973a3687b3ef8948b6859ec302c0f810e9343c7e44f9146176')
|
||||
'd5f6913d0d1439973a3687b3ef8948b6859ec302c0f810e9343c7e44f9146176'
|
||||
'65af62e9ca7870930b5d2b673f8eadfe3ce72c9672b8554790bd7dc65c0039dd'
|
||||
'6d062c34feca04b5dbd38273f8bb7d270947a368ade550fdfc8b11f0daa1a17c'
|
||||
'0454442f2ad3312df83ec86bf872b5ad0bc1c014ed13dad1fbac7dd8e8de8f7a')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
@ -185,7 +191,10 @@ prepare() {
|
||||
0038-Pass-environment-variables-with-empty-values.patch \
|
||||
0039-Optionally-disallow-empty-environment-values-again.patch \
|
||||
0040-build_env-respect-the-MSYS-environment-variable.patch \
|
||||
0041-Cygwin-pty-Fix-Bad-address-error-when-running-cmd.ex.patch
|
||||
0041-Cygwin-pty-Fix-Bad-address-error-when-running-cmd.ex.patch \
|
||||
0042-ci-avoid-using-Node.js-12-Actions.patch \
|
||||
0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch \
|
||||
0044-amend-Special-case-for-converting-root-directory-to-.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user