Forcing setup.exe not to create WSL symlinks
Michael Wild
themiwi@gmail.com
Wed Aug 26 19:06:12 GMT 2020
On Wed, Aug 26, 2020 at 8:31 PM Achim Gratz wrote:
> Michael Wild via Cygwin writes:
> > Is there a way to disable WSL symlinks when installing Cygwin with
> > setup.exe? Problem is that Docker on Windows apparently doesn't support
> > them (see https://github.com/moby/moby/issues/41058). I would like to
> use a
> > custom Docker image for GitHub Actions to reproducibly build my packages
> > but am failing to build the base image because of this.
>
> That description is not very clear. If the symlinks are created during
> postinstall, then they should obey the value of CYGWIN environment that
> is in effect at that time. If so, then the behaviour should start
> appearing with cygwin-3.1.5, which is the first release that has the
> code supporting these (and makes them the default). I'm not aware that
> the behaviour of setup.exe has changed in that respect recently, but I
> haven't checked thoroughly.
>
>
> Regards,
> Achim.
>
>
In order to reproduce, run the following commands on Windows:
> docker run --name setup -it
mcr.microsoft.com/windows/servercore:10.0.17763.1397-amd64
Once inside the container, run:
> powershell
PS> $env:CYGWIN=winsymlinks:lnk
PS> mkdir \tmp
PS> cd \tmp
PS> Invoke-WebRequest -Uri https://www.cygwin.com/setup-x86_64.exe -OutFile
setup-x86_64.exe
PS> .\setup-x86_64.exe -W -n -q -R C:\Cygwin64 -s
http://mirrors.kernel.org/sourceware/cygwin/ -P default
PS> Wait-Process -Name setup-x86_64
PS> fsutil reparsePoint query C:\cygwin64\dev\fd
The last command will output something like:
Reparse Tag Value : 0xa000001d
Tag value: Microsoft
Tag value: Name Surrogate
Reparse Data Length: 0x00000011
Reparse Data:
0000: 02 00 00 00 2f 70 72 6f 63 2f 73 65 6c 66 2f 66 ..../proc/self/f
0010: 64
So, the CYGWIN variable got ignored.
If you want, you can try to run a Cygwin shell:
PS> C:\Cygwin64\bin\bash.exe --login -i
For me this works fine. Then, exit the container and try to commit it:
PS> exit
> exit
> docker commit setup cygwin:latest
The last command then errors out with:
Error response from daemon: re-exec error: exit status 1: output:
time="2020-08-26T21:00:55+02:00" level=error msg="hcsshim::ImportLayer -
failed failed in Win32: The system cannot find th
e path specified. (0x3)" error="hcsshim::ImportLayer - failed failed in
Win32: The system cannot find the path specified. (0x3)"
importFolderPath="C:\\ProgramData\\Docker\\tmp\\hcs00092524
3"
path="\\\\?\\C:\\ProgramData\\Docker\\windowsfilter\\c31ac616438460478e6cc6e5526ee664e620ba4479da433bcabb6d2a76880ef4"
hcsshim::ImportLayer - failed failed in Win32: The system cannot find the
path specified. (0x3)
Does this help diagnosing the problem?
Kind regards
Michael
More information about the Cygwin
mailing list