msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.31k stars 1.23k forks source link

p11-kit does not seem to support paths with spaces #22438

Open DeepChirp opened 3 weeks ago

DeepChirp commented 3 weeks ago

Description / Steps to reproduce the issue

  1. Install msys2 to C:\Program Files\msys64.
  2. Excute pacman -S mingw-w64-ucrt-x86_64-ca-certificates.

Expected behavior

No error occuers.

Actual behavior

p11-kit: 'Files/msys64/ucrt64/bin/trust.exe' is not a valid command. See 'Program --help'
p11-kit: couldn't run trust tool: No error

Verification

Windows Version

MSYS_NT-10.0-26100

MINGW environments affected

Are you willing to submit a PR?

No response

Biswa96 commented 3 weeks ago

The install steps mention not to install in paths with spaces https://www.msys2.org/

DeepChirp commented 3 weeks ago

The install steps mention not to install in paths with spaces https://www.msys2.org/

I think it's better to notice user in the installer.

vmi commented 3 weeks ago

Hi,

p11-kit uses "_spawnv" to launch trust.exe, but I found that "_spawnv" has a bug in handling whitespace characters.

The 3rd argument of "_spawnv" seems to be passed to the command as a single string, even if it is separated by an array. If you enclose them in double quotes, they are treated as a single argument. However, if argv[0] is enclosed in double quotes and passed to the 2nd argument of "_spawnv", an error occurs.

Details are available at "https://github.com/vmi/mingw-spawnv-bug".

hjrb commented 5 days ago

This should be fixed. Many companies have a policy that installing executables outside of c:\Program Files is prohibited.

hjrb commented 5 days ago

The install steps mention not to install in paths with spaces https://www.msys2.org/

I think it's better to notice user in the installer.

I think it is better to finally fix something that is broken for years.