public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygpath 3.3.4 : incorrect windows to unix path conversions
@ 2022-06-28  7:44 Timothee Besset
  2022-06-28  8:19 ` Andrey Repin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Timothee Besset @ 2022-06-28  7:44 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]

Hello,

We are seeing some odd behavior from cygpath.exe when it is copied and used
outside the normal cygwin installation directory:

PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
/cygdrive/c

After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:

PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
/

(should be /cygdrive/c!)

After copying those same files to C:\tmp\tmp:

PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
/cygdrive/c

It works again!

We bundle a few cygwin pieces (ssh, rsync) in our application and run them
on machines that may not have cygwin installed, this is why we are trying
to use cygpath outside a normal installation directory - see
https://gitlab.steamos.cloud/devkit/steamos-devkit for details.

We are seeing variations of this, on multiple systems (Windows 10, 11, 2016
datacenter). The paths sometimes get partially translated, like this:

  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\': 0 '/cygdrive/e/\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary': 0 '/cygdrive/e/SteamLibrary\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps': 0 '/cygdrive/e/SteamLibrary/steamapps\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps\\common': 0 '/\n'
  DBG:
'E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug\\cygpath.exe
E:\\SteamLibrary\\steamapps\\common\\SteamOSDevkitClient-Debug': 0
'/SteamOSDevkitClient-Debug\n'

We've been using this setup for more than a year and only noticing this
now; I suspect this used to work fine but I couldn't tell you of an older
version that worked for sure.

Cheers,
- TTimo

[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 19139 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Tue Jun 28 08:26:33 2022

Windows 2016 Server Datacenter Ver 10.0 Build 14393 

Running in Terminal Service session

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Python310\Scripts
	C:\Python310
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0
	C:\ProgramData\GooGet
	C:\Program Files\Google\Compute Engine\metadata_scripts
	C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin
	C:\Program Files\PowerShell\7
	C:\Program Files\Google\Compute Engine\sysprep
	C:\ProgramData\chocolatey\bin
	C:\Program Files\Git\cmd
	C:\Users\ttimo\AppData\Local\Microsoft\WindowsApps

Output from C:\cygwin64\bin\id.exe
UID: 197608(ttimo)             GID: 197121(None)
197121(None)                   559(Performance Log Users)
545(Users)                     14(REMOTE INTERACTIVE LOGON)
4(INTERACTIVE)                 11(Authenticated Users)
15(This Organization)          113(Local account)
4095(CurrentSession)           66048(LOCAL)
262154(NTLM Authentication)    401408(Medium Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

USER = 'ttimo'
PWD = '/home/ttimo'
HOME = '/home/ttimo'

USERDOMAIN = 'DEVKIT-CLIENT-W'
ChocolateyToolsLocation = 'C:\tools'
OS = 'Windows_NT'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
PROCESSOR_LEVEL = '6'
PSModulePath = 'C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\PowerShell'
CommonProgramW6432 = 'C:\Program Files\Common Files'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
TZ = 'Atlantic/Reykjavik'
POWERSHELL_DISTRIBUTION_CHANNEL = 'MSI:Windows Server 2016 Datacenter'
HOSTNAME = 'devkit-client-windows-builder'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/etc/skel'
USERNAME = 'ttimo'
ChocolateyInstall = 'C:\ProgramData\chocolatey'
LOGONSERVER = '\\DEVKIT-CLIENT-W'
PROCESSOR_ARCHITECTURE = 'AMD64'
CLIENTNAME = 'PHOENIX'
LOCALAPPDATA = 'C:\Users\ttimo\AppData\Local'
COMPUTERNAME = 'DEVKIT-CLIENT-W'
FPS_BROWSER_APP_PROFILE_STRING = 'Internet Explorer'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Users\ttimo'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW'
SYSTEMROOT = 'C:\Windows'
USERDOMAIN_ROAMINGPROFILE = 'DEVKIT-CLIENT-W'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 79 Stepping 0, GenuineIntel'
TMP = '/tmp'
LC_CTYPE = 'en_US.UTF-8'
TERM_PROGRAM = 'mintty'
TERM_PROGRAM_VERSION = '3.5.3'
PROCESSOR_REVISION = '4f00'
FPS_BROWSER_USER_PROFILE_STRING = 'Default'
PROFILEREAD = 'true'
NUMBER_OF_PROCESSORS = '4'
ProgramW6432 = 'C:\Program Files'
COMSPEC = 'C:\Windows\system32\cmd.exe'
GooGetRoot = 'C:\ProgramData\GooGet'
APPDATA = 'C:\Users\ttimo\AppData\Roaming'
SHELL = '/bin/bash'
TERM = 'xterm'
WINDIR = 'C:\Windows'
ProgramData = 'C:\ProgramData'
SHLVL = '1'
MINTTY_SHORTCUT = '/cygdrive/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Cygwin/Cygwin64 Terminal.lnk'
PRINTER = 'Microsoft Print to PDF'
PROGRAMFILES = 'C:\Program Files'
ALLUSERSPROFILE = 'C:\ProgramData'
TEMP = '/tmp'
SESSIONNAME = 'RDP-Tcp#1'
ProgramFiles(x86) = 'C:\Program Files (x86)'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
HOMEDRIVE = 'C:'
ChocolateyLastPathUpdate = '133008173543021650'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
HOMEPATH = '\Users\ttimo'
ORIGINAL_PATH = '/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/ProgramData/GooGet:/cygdrive/c/Program Files/Google/Compute Engine/metadata_scripts:/cygdrive/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/cygdrive/c/Program Files/PowerShell/7:/cygdrive/c/Program Files/Google/Compute Engine/sysprep:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/Users/ttimo/AppData/Local/Microsoft/WindowsApps'
EXECIGNORE = '*.dll'
_ = '/usr/bin/cygcheck.exe'

HKEY_CURRENT_USER\SOFTWARE\Cygwin
HKEY_CURRENT_USER\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
  3337c95aa1a81d4d = '\??\C:\Users\ttimo'
  94c8f67bfe7d8572 = '\??\C:'
  b233fc249f3ec340 = '\??\C:\tmp_2'
  cdf2d0930822f0ad = '\??\C:\tmp'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64
  User:   Key: e022582115c10879 Path: C:\cygwin64
  User:   Key: 3337c95aa1a81d4d Path: C:\Users\ttimo (ORPHANED)
  User:   Key: 94c8f67bfe7d8572 Path: C: (ORPHANED)
  User:   Key: b233fc249f3ec340 Path: C:\tmp_2 (ORPHANED)
  User:   Key: cdf2d0930822f0ad Path: C:\tmp (ORPHANED)

c:  hd  NTFS    102283Mb  27% CP CS UN PA FC    QU  

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\Windows\system32\certutil.exe
Not Found: clinfo
Found: C:\Windows\system32\comp.exe
Found: C:\Windows\system32\convert.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Not Found: curl
Found: C:\cygwin64\bin\expand.exe
Found: C:\Windows\system32\expand.exe
Warning: C:\cygwin64\bin\expand.exe hides C:\Windows\system32\expand.exe
Found: C:\cygwin64\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\Windows\system32\find.exe
Found: C:\Windows\system32\ftp.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\hostname.exe
Found: C:\Windows\system32\hostname.exe
Warning: C:\cygwin64\bin\hostname.exe hides C:\Windows\system32\hostname.exe
Found: C:\cygwin64\bin\kill.exe
Found: C:\Windows\system32\klist.exe
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Not Found: make
Found: C:\cygwin64\bin\mv.exe
Found: C:\Windows\system32\nslookup.exe
Not Found: patch
Not Found: perl
Found: C:\Windows\system32\replace.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\Windows\system32\shutdown.exe
Found: C:\cygwin64\bin\sort.exe
Found: C:\Windows\system32\sort.exe
Warning: C:\cygwin64\bin\sort.exe hides C:\Windows\system32\sort.exe
Found: C:\cygwin64\bin\ssh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\timeout.exe
Found: C:\Windows\system32\timeout.exe
Warning: C:\cygwin64\bin\timeout.exe hides C:\Windows\system32\timeout.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim
Found: C:\cygwin64\bin\whoami.exe
Found: C:\Windows\system32\whoami.exe
Warning: C:\cygwin64\bin\whoami.exe hides C:\Windows\system32\whoami.exe

   39k 2016/09/19 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2016-09-19 02:13
   19k 2018/12/20 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2018-12-20 09:48
  254k 2020/03/31 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2020-03-28 06:22
   66k 2019/07/21 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2019-07-22 00:05
   13k 2019/01/02 C:\cygwin64\bin\cygcom_err-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcom_err-2.dll" v0.0 ts=2019-01-02 02:39
  193k 2021/05/20 C:\cygwin64\bin\cygcrypt-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypt-2.dll" v0.0 ts=2021-05-20 09:38
 2491k 2022/02/05 C:\cygwin64\bin\cygcrypto-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.1.dll" v0.0 ts=2022-02-05 10:48
  154k 2013/10/20 C:\cygwin64\bin\cygedit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygedit-0.dll" v0.0 ts=2013-10-20 21:56
  353k 2020/03/31 C:\cygwin64\bin\cygfdisk-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfdisk-1.dll" v0.0 ts=2020-03-28 06:23
   27k 2015/11/17 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-11-17 22:14
  211k 2022/01/20 C:\cygwin64\bin\cygfido2-1.dll - os=4.0 img=1.10 sys=5.2
                  "cygfido2-1.dll" v0.0 ts=2022-01-20 19:37
   56k 2019/07/28 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2019-07-28 17:33
   74k 2021/08/22 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2021-08-22 09:49
   49k 2019/07/10 C:\cygwin64\bin\cyggdbm-6.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-6.dll" v0.0 ts=2019-07-10 14:53
  582k 2021/08/21 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2021-08-21 19:11
  274k 2018/03/16 C:\cygwin64\bin\cyggssapi_krb5-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyggssapi_krb5-2.dll" v0.0 ts=2018-03-16 03:38
   36k 2021/08/31 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2021-08-31 07:54
 1007k 2020/07/13 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2020-07-13 13:57
   42k 2021/07/29 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2021-07-29 03:40
  192k 2018/03/16 C:\cygwin64\bin\cygk5crypto-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygk5crypto-3.dll" v0.0 ts=2018-03-16 03:37
  754k 2018/03/16 C:\cygwin64\bin\cygkrb5-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5-3.dll" v0.0 ts=2018-03-16 03:37
   37k 2018/03/16 C:\cygwin64\bin\cygkrb5support-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5support-0.dll" v0.0 ts=2018-03-16 03:36
   73k 2017/06/19 C:\cygwin64\bin\cyglz4-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyglz4-1.dll" v0.0 ts=2017-06-19 15:40
  147k 2022/03/06 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2022-03-06 18:26
  157k 2022/01/12 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2022-01-12 09:43
  212k 2022/02/10 C:\cygwin64\bin\cygman-2-10-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-10-1.dll" v0.0 ts=2022-02-10 18:15
   24k 2022/02/10 C:\cygwin64\bin\cygmandb-2-10-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmandb-2-10-1.dll" v0.0 ts=2022-02-10 18:15
   28k 2019/07/28 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2019-07-28 17:32
 2663k 2021/08/21 C:\cygwin64\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-6.dll" v0.0 ts=2021-08-21 19:01
  301k 2019/07/28 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2019-07-28 17:30
 1020k 2020/03/27 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2020-03-27 22:30
   14k 2019/07/28 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2019-07-28 17:32
  497k 2021/06/20 C:\cygwin64\bin\cygpcre-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre-1.dll" v0.0 ts=2021-06-20 12:53
  601k 2021/11/01 C:\cygwin64\bin\cygpcre2-8-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre2-8-0.dll" v0.0 ts=2021-11-01 17:58
   42k 2020/12/27 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2020-12-27 14:15
   42k 2020/12/31 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2020-12-31 12:16
  254k 2021/08/31 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2021-08-31 07:54
   11k 2015/07/17 C:\cygwin64\bin\cygsigsegv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygsigsegv-2.dll" v0.0 ts=2015-07-17 22:35
  156k 2020/03/31 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2020-03-28 06:22
  511k 2022/02/05 C:\cygwin64\bin\cygssl-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.1.dll" v0.0 ts=2022-02-05 10:49
 1869k 2021/08/22 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2021-08-22 10:08
   68k 2019/07/29 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2019-07-29 03:12
   57k 2019/07/28 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2019-07-28 17:31
   27k 2020/03/31 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2020-03-28 06:22
   37k 2020/09/06 C:\cygwin64\bin\cygxxhash-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygxxhash-0.dll" v0.0 ts=2020-09-07 00:04
   83k 2017/03/03 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2017-03-03 21:42
  624k 2022/01/22 C:\cygwin64\bin\cygzstd-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygzstd-1.dll" v0.0 ts=2022-01-22 17:21
 3472k 2022/01/31 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=2022-01-31 19:35
    Cygwin DLL version info:
        DLL version: 3.3.4
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 341
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


No Cygwin services found.


Cygwin Package Information
Last downloaded files to: C:\cygwin64
Last downloaded files from: https://mirrors.kernel.org/sourceware/cygwin/

Package              Version                         Status
_autorebase          001091-1                        OK
alternatives         1.3.30c-10                      OK
base-cygwin          3.8-1                           OK
base-files           4.3-3                           OK
bash                 4.4.12-3                        OK
bzip2                1.0.8-1                         OK
ca-certificates      2021.2.52-1                     OK
coreutils            8.26-2                          OK
crypto-policies      20190218-1                      OK
csih                 0.9.11-1                        OK
cygrunsrv            1.62-1                          OK
cygutils             1.4.17-1                        OK
cygwin               3.3.4-2                         OK
dash                 0.5.11.5-1                      OK
diffutils            3.8-1                           OK
editrights           1.03-1                          OK
file                 5.41-2                          OK
findutils            4.9.0-1                         OK
gawk                 5.1.1-1                         OK
getent               2.18.90-4                       OK
grep                 3.7-2                           OK
groff                1.22.4-1                        OK
gzip                 1.11-1                          OK
hostname             3.13-1                          OK
info                 6.8-2                           OK
ipc-utils            1.0-2                           OK
less                 590-1                           OK
libargp              20110921-3                      OK
libattr1             2.4.48-2                        OK
libblkid1            2.33.1-2                        OK
libbz2_1             1.0.8-1                         OK
libcom_err2          1.44.5-1                        OK
libcrypt2            4.4.20-1                        OK
libedit0             20130712-1                      OK
libfdisk1            2.33.1-2                        OK
libffi6              3.2.1-2                         OK
libfido2             1.10.0-1                        OK
libgcc1              11.2.0-1                        OK
libgdbm6             1.18.1-1                        OK
libgmp10             6.2.1-2                         OK
libgssapi_krb5_2     1.15.2-2                        OK
libiconv2            1.16-2                          OK
libintl8             0.21-1                          OK
libk5crypto3         1.15.2-2                        OK
libkrb5_3            1.15.2-2                        OK
libkrb5support0      1.15.2-2                        OK
liblz4_1             1.7.5-1                         OK
liblzma5             5.2.5-1                         OK
libmpfr6             4.1.0-2                         OK
libncursesw10        6.1-1.20190727                  OK
libp11-kit0          0.23.20-1                       OK
libpcre1             8.45-1                          OK
libpcre2_8_0         10.39-1                         OK
libpipeline1         1.5.3-1                         OK
libpopt-common       1.18-1                          OK
libpopt0             1.18-1                          OK
libreadline7         8.1-2                           OK
libsigsegv2          2.10-2                          OK
libsmartcols1        2.33.1-2                        OK
libssl1.1            1.1.1m-1                        OK
libstdc++6           11.2.0-1                        OK
libtasn1_6           4.14-1                          OK
libuuid1             2.33.1-2                        OK
libxxhash0           0.8.0-1                         OK
libzstd1             1.5.2-1                         OK
login                1.13-1                          OK
man-db               2.10.1-1                        OK
mintty               3.5.3-1                         OK
ncurses              6.1-1.20190727                  OK
openssh              8.9p1-1                         OK
openssl              1.1.1m-1                        OK
p11-kit              0.23.20-1                       OK
p11-kit-trust        0.23.20-1                       OK
rebase               4.5.0-1                         OK
rsync                3.2.3+20200903+git9f9240b-4     OK
run                  1.3.4-2                         OK
sed                  4.8-1                           OK
tar                  1.34-1                          OK
terminfo             6.1-1.20190727                  OK
terminfo-extra       6.1-1.20190727                  OK
tzcode               2021e-1                         OK
tzdata               2021e-1                         OK
util-linux           2.33.1-2                        OK
vim-minimal          8.2.4372-1                      OK
which                2.20-2                          OK
xz                   5.2.5-1                         OK
zlib0                1.2.11-1                        OK
zstd                 1.5.2-1                         OK
Use -h to see help about each section

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygpath 3.3.4 : incorrect windows to unix path conversions
  2022-06-28  7:44 cygpath 3.3.4 : incorrect windows to unix path conversions Timothee Besset
@ 2022-06-28  8:19 ` Andrey Repin
  2022-07-18 15:22   ` Timothee Besset
  2022-06-28  9:24 ` Takashi Yano
  2022-06-28 14:48 ` Doug Henderson
  2 siblings, 1 reply; 5+ messages in thread
From: Andrey Repin @ 2022-06-28  8:19 UTC (permalink / raw)
  To: Timothee Besset, cygwin

Greetings, Timothee Besset!

> Hello,

> We are seeing some odd behavior from cygpath.exe when it is copied and used
> outside the normal cygwin installation directory:

> PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
> /cygdrive/c

To begin with, "C:" means "current working directory on drive 'C:'". Not "root
directory of 'C:'".
The behavior of cygpath is incorrect in this case.

> After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:

Both must be in '…/bin' directory, this is user error.

> PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
> /

> (should be /cygdrive/c!)

No? See above.

> After copying those same files to C:\tmp\tmp:

> PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
> /cygdrive/c

> It works again!

By coincidence. (And no.)

> We bundle a few cygwin pieces (ssh, rsync) in our application and run them
> on machines that may not have cygwin installed, this is why we are trying
> to use cygpath outside a normal installation directory - see
> https://gitlab.steamos.cloud/devkit/steamos-devkit for details.

See above, cygwin tools' layout must follow FHS, or you will see all sorts of
issues.
That aside, you could always use /proc/cygdrive/ root for manual path conversion.

> We've been using this setup for more than a year and only noticing this
> now; I suspect this used to work fine but I couldn't tell you of an older
> version that worked for sure.

Um, no.


-- 
With best regards,
Andrey Repin
Tuesday, June 28, 2022 11:14:52

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygpath 3.3.4 : incorrect windows to unix path conversions
  2022-06-28  7:44 cygpath 3.3.4 : incorrect windows to unix path conversions Timothee Besset
  2022-06-28  8:19 ` Andrey Repin
@ 2022-06-28  9:24 ` Takashi Yano
  2022-06-28 14:48 ` Doug Henderson
  2 siblings, 0 replies; 5+ messages in thread
From: Takashi Yano @ 2022-06-28  9:24 UTC (permalink / raw)
  To: cygwin

On Tue, 28 Jun 2022 09:44:56 +0200
Timothee Besset wrote:
> We are seeing some odd behavior from cygpath.exe when it is copied and used
> outside the normal cygwin installation directory:
> 
> PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
> /cygdrive/c
> 
> After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:
> 
> PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
> /
> 
> (should be /cygdrive/c!)

Both / and /cygdrive/c are correct in this case.
The root directory for cygwin is the parent directory of the
directory where cygwin1.dll is located.

If cygwin1.dll is located in c:\tmp, the root directory for
cygwin is c:\. Therefore, / is correct answer for cygpath -u 'c:\'.

This is the same with the fact that
c:\cygwin64\bin\cygpath.exe -u "c:\cygwin64"
returns / rather than /cygdrive/c/cygwin64.

> After copying those same files to C:\tmp\tmp:
> 
> PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
> /cygdrive/c

In this case, the root directory for cygwin is c:\tmp.
Therefore, c:\ is outside of the cygwin directories.
So, cygpath -u 'c:\' returns /cygdrive/c.


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygpath 3.3.4 : incorrect windows to unix path conversions
  2022-06-28  7:44 cygpath 3.3.4 : incorrect windows to unix path conversions Timothee Besset
  2022-06-28  8:19 ` Andrey Repin
  2022-06-28  9:24 ` Takashi Yano
@ 2022-06-28 14:48 ` Doug Henderson
  2 siblings, 0 replies; 5+ messages in thread
From: Doug Henderson @ 2022-06-28 14:48 UTC (permalink / raw)
  To: cygwin

On Tue, Jun 28, 2022 at 1:46 AM Timothee Besset <ttimo@ttimo.net> wrote:
>
> Hello,
>
> We are seeing some odd behavior from cygpath.exe when it is copied and used
> outside the normal cygwin installation directory:
>

Don't do this if you just need to convert Linux style file paths to
windows file paths.

Use the cygpath.exe from MSYS2 by installing it and adding its bin
directory to your windows path.

This does not require the cygwin1.dll, and is designed to interoperate
well with windows.

If you need to interact with the cygwin environment from powershell,
start powershell from the bash prompt so PS is embedded in the cygwin
environment. Then all the mounts expected by cygwin programs are
established, so when you run cygwin programs from PS, they run in the
env they expect.


HTH
Doug

-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygpath 3.3.4 : incorrect windows to unix path conversions
  2022-06-28  8:19 ` Andrey Repin
@ 2022-07-18 15:22   ` Timothee Besset
  0 siblings, 0 replies; 5+ messages in thread
From: Timothee Besset @ 2022-07-18 15:22 UTC (permalink / raw)
  To: cygwin

Hello,

Thank you for the information, this helped me formulate a solution.

Best,
- TTimo

On Tue, Jun 28, 2022 at 10:20 AM Andrey Repin <anrdaemon@yandex.ru> wrote:

> Greetings, Timothee Besset!
>
> > Hello,
>
> > We are seeing some odd behavior from cygpath.exe when it is copied and
> used
> > outside the normal cygwin installation directory:
>
> > PS C:\Users\ttimo> C:\cygwin64\bin\cygpath.exe -a -u "C:"
> > /cygdrive/c
>
> To begin with, "C:" means "current working directory on drive 'C:'". Not
> "root
> directory of 'C:'".
> The behavior of cygpath is incorrect in this case.
>
> > After copying cygpath.exe and cygwin1.dll to a blank C:\tmp:
>
> Both must be in '…/bin' directory, this is user error.
>
> > PS C:\Users\ttimo> C:\tmp\cygpath.exe -a -u "C:"
> > /
>
> > (should be /cygdrive/c!)
>
> No? See above.
>
> > After copying those same files to C:\tmp\tmp:
>
> > PS C:\Users\ttimo> C:\tmp\tmp\cygpath.exe -a -u "C:"
> > /cygdrive/c
>
> > It works again!
>
> By coincidence. (And no.)
>
> > We bundle a few cygwin pieces (ssh, rsync) in our application and run
> them
> > on machines that may not have cygwin installed, this is why we are trying
> > to use cygpath outside a normal installation directory - see
> > https://gitlab.steamos.cloud/devkit/steamos-devkit for details.
>
> See above, cygwin tools' layout must follow FHS, or you will see all sorts
> of
> issues.
> That aside, you could always use /proc/cygdrive/ root for manual path
> conversion.
>
> > We've been using this setup for more than a year and only noticing this
> > now; I suspect this used to work fine but I couldn't tell you of an older
> > version that worked for sure.
>
> Um, no.
>
>
> --
> With best regards,
> Andrey Repin
> Tuesday, June 28, 2022 11:14:52
>
> Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-18 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  7:44 cygpath 3.3.4 : incorrect windows to unix path conversions Timothee Besset
2022-06-28  8:19 ` Andrey Repin
2022-07-18 15:22   ` Timothee Besset
2022-06-28  9:24 ` Takashi Yano
2022-06-28 14:48 ` Doug Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).