msys2-runtime: update patches

the PR was pushed upstream
This commit is contained in:
Christoph Reiter 2022-12-09 16:26:15 +01:00
parent e66d795758
commit d2980fe8b6
2 changed files with 45 additions and 8 deletions

View File

@ -0,0 +1,38 @@
From 68060d237a33743ce94c6c74a39475acfcfaa965 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 20 Nov 2022 13:57:36 +0100
Subject: [PATCH 45/N] msys2_path_conv: pass PC_NOFULL to path_conv
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
https://github.com/msys2/msys2-runtime/pull/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
https://github.com/msys2/MINGW-packages/issues/14173 for details.
With this change all our MSYS2 path_conv tests pass again.
---
winsup/cygwin/msys2_path_conv.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc
index 2d401ca..b8f280b 100644
--- a/winsup/cygwin/msys2_path_conv.cc
+++ b/winsup/cygwin/msys2_path_conv.cc
@@ -622,7 +622,7 @@ void posix_to_win32_path(const char* from, const char* to, char** dst, const cha
strncpy(one_path, from, to-from);
one_path[to-from] = '\0';
- path_conv conv (one_path, 0);
+ path_conv conv (one_path, PC_NOFULL);
if (conv.error)
{
set_errno(conv.error);

View File

@ -4,7 +4,7 @@
pkgbase=msys2-runtime pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel') pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.3.6 pkgver=3.3.6
pkgrel=5 pkgrel=6
pkgdesc="Cygwin POSIX emulation engine" pkgdesc="Cygwin POSIX emulation engine"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="https://www.cygwin.com/" url="https://www.cygwin.com/"
@ -25,7 +25,6 @@ makedepends=('cocom'
# re zipman: https://github.com/msys2/MSYS2-packages/pull/2687#issuecomment-965714874 # re zipman: https://github.com/msys2/MSYS2-packages/pull/2687#issuecomment-965714874
options=('!zipman') options=('!zipman')
source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-${pkgver//./_}-release source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-${pkgver//./_}-release
https://patch-diff.githubusercontent.com/raw/msys2/msys2-runtime/pull/117.patch
0001-Add-MSYS2-triplet.patch 0001-Add-MSYS2-triplet.patch
0002-Fix-msys-library-name-in-import-libraries.patch 0002-Fix-msys-library-name-in-import-libraries.patch
0003-Rename-dll-from-cygwin-to-msys.patch 0003-Rename-dll-from-cygwin-to-msys.patch
@ -69,9 +68,9 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
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 0042-ci-avoid-using-Node.js-12-Actions.patch
0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch 0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch
0044-amend-Special-case-for-converting-root-directory-to-.patch) 0044-amend-Special-case-for-converting-root-directory-to-.patch
0045-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch)
sha256sums=('SKIP' sha256sums=('SKIP'
'77a4cb681404750c518cec37cdc7b332a663b6106fc54df7cf102d945aa903d3'
'c375315e58181ee5589b7966101aa095de3f864a579c3c3f0f0683595d4e428d' 'c375315e58181ee5589b7966101aa095de3f864a579c3c3f0f0683595d4e428d'
'01ea2b131cf5a3b27fdbc458019eac14e45a36782ce3ce33e62328eefcd2d02e' '01ea2b131cf5a3b27fdbc458019eac14e45a36782ce3ce33e62328eefcd2d02e'
'475ddea4d86605ab097f98ec764951a9d647ea3100dea0e1620f57044ea4a114' '475ddea4d86605ab097f98ec764951a9d647ea3100dea0e1620f57044ea4a114'
@ -115,7 +114,8 @@ sha256sums=('SKIP'
'd5f6913d0d1439973a3687b3ef8948b6859ec302c0f810e9343c7e44f9146176' 'd5f6913d0d1439973a3687b3ef8948b6859ec302c0f810e9343c7e44f9146176'
'65af62e9ca7870930b5d2b673f8eadfe3ce72c9672b8554790bd7dc65c0039dd' '65af62e9ca7870930b5d2b673f8eadfe3ce72c9672b8554790bd7dc65c0039dd'
'6d062c34feca04b5dbd38273f8bb7d270947a368ade550fdfc8b11f0daa1a17c' '6d062c34feca04b5dbd38273f8bb7d270947a368ade550fdfc8b11f0daa1a17c'
'0454442f2ad3312df83ec86bf872b5ad0bc1c014ed13dad1fbac7dd8e8de8f7a') '0454442f2ad3312df83ec86bf872b5ad0bc1c014ed13dad1fbac7dd8e8de8f7a'
'61276aec4c9b7132487fd1d91e6c5991a24909f24a6de0312f62f1f99608e9c0')
# Helper macros to help make tasks easier # # Helper macros to help make tasks easier #
apply_patch_with_msg() { apply_patch_with_msg() {
@ -196,9 +196,8 @@ prepare() {
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 \ 0042-ci-avoid-using-Node.js-12-Actions.patch \
0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch \ 0043-When-converting-to-a-Unix-path-avoid-double-trailing.patch \
0044-amend-Special-case-for-converting-root-directory-to-.patch 0044-amend-Special-case-for-converting-root-directory-to-.patch \
0045-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch
git apply "${srcdir}/117.patch"
} }
build() { build() {