Cygwin setup writing incorrect symlinks for native

David Allsopp David.Allsopp@cl.cam.ac.uk
Thu Jan 6 16:45:18 GMT 2022


Jon Turney wrote:
> On 06/01/2022 10:46, David Allsopp wrote:
> > Running Cygwin setup 2.912 with --symlink-type native (or
> > CYGWIN=winsymlinks:native) is not correctly translating all symlinks.
> > A default install has these faulty ones:
> >
> > /etc/pki/tls/cert.pem ->
> > \??\/etc\pki\ca-trust\extracted\pem\tls-ca-bundle.pem
> > /etc/pki/tls/certs/ca-bundle.crt ->
> > \??\/etc\pki\ca-trust\extracted\pem\tls-ca-bundle.pem
> > /etc/pki/tls/certs/ca-bundle.trust.crt ->
> > \??\/etc\pki\ca-trust\extracted\openssl\ca-bundle.trust.crt
> > /etc/ssl/certs -> \??\/etc\pki\tls\certs /lib/security/cacerts ->
> > \??\/etc\pki\ca-trust\extracted\java\cacerts
> > /usr/share/doc/groff-1.22.4/pdf/mom-pdf.pdf ->
> > \??\/usr\share\doc\groff-1.22.4\examples\mom\mom-pdf.pdf
> 
> 
> Thanks for reporting this.
> 
> Yes, it seems this is messed up where the target of the symlink is an
> absolute path.
> 
> I've uploaded setup 2.913 with an attempted fix.
> 
>    https://cygwin.com/setup/setup-2.913.x86_64.exe
>    https://cygwin.com/setup/setup-2.913.x86.exe
> 
> Please try that (you'll have to reinstall the effected packages), and see
> if it improves things for you?

Thank you! This fixes it for the Cygwin side, although the symlinks are still technically not right from the Windows side. They're still showing up prefixed \??\.

It's an age since I mucked around with those functions - IIRC the API function for writing them adds the \??\ itself and doesn't expect it to have been supplied? However, when you read the reparse point you have to remember to remove it yourself because who needs consistency :o)

C:\cygwin64>dir /s | findstr ??
01/06/2022  04:30 PM    <SYMLINK>      cert.pem [\??\C:\cygwin64\etc\pki\ca-trust\extracted\pem\tls-ca-bundle.pem]
01/06/2022  04:30 PM    <SYMLINK>      ca-bundle.crt [\??\C:\cygwin64\etc\pki\ca-trust\extracted\pem\tls-ca-bundle.pem]
01/06/2022  04:30 PM    <SYMLINK>      ca-bundle.trust.crt [\??\C:\cygwin64\etc\pki\ca-trust\extracted\openssl\ca-bundle.trust.crt]
01/06/2022  04:30 PM    <SYMLINKD>     certs [\??\C:\cygwin64\etc\pki\tls\certs]
01/06/2022  04:30 PM    <SYMLINK>      cacerts [\??\C:\cygwin64\etc\pki\ca-trust\extracted\java\cacerts]
01/06/2022  04:30 PM    <SYMLINK>      mom-pdf.pdf [\??\C:\cygwin64\usr\share\doc\groff-1.22.4\examples\mom\mom-pdf.pdf]

All best,


David


More information about the Cygwin mailing list