From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) by sourceware.org (Postfix) with ESMTPS id 38E393857C47 for ; Wed, 26 Aug 2020 20:15:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 38E393857C47 Received: by mail-vs1-xe41.google.com with SMTP id x2so1397925vsp.13 for ; Wed, 26 Aug 2020 13:15:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1wZfXAM7sJ6l3qld5XTjVyCn6yWqgmJISolh5csMfAA=; b=J1EyPIW8G34PGxF3p8VTYmuil7DDrP5RvaLkbVp57/aNBpDRPx/+rRv8V0Lf2P7UrA sCWCjGR9UUNk+hMeolaRjE4/2T3+qq6K++BLHI4KRPIBnitBQFZ64YL+hFoD5KtWJxXj BRlwj1nY2selZkCjFvKbVWiS/OzLNtQoN8DaGGN+IBPfGMiT37CWBM8hhX0l5C8hLOBC +CjW7A8FXvU9wQ10F2fqB1NneTHInqC9X40BTxey7PuMQtMrRIhmIi2NN9pDKiF9qTUh rxm2J2rP7WQKdySphh0o9WAmT9deRPi9tFO04ynuwLARwvzGsWGIiDZG+XVIJLlJfoWj GNxA== X-Gm-Message-State: AOAM531BvgiV2icPviUDDyO62D1a+hPjg29pHp7GBPR+Hf6S4jkGIjK8 8H4kOpl+ELVi2UeMDWHTg+R1PVnhF3ymTCeOoJw= X-Google-Smtp-Source: ABdhPJydd3ODC/kdzVqDd9P/CtJgLCzEmzq1ClUIC1n0TdMyb07UPnwP4D/HAonKcnLmSkuve+PpMwsoZ9JOvbvo5is= X-Received: by 2002:a05:6102:2338:: with SMTP id b24mr9601270vsa.158.1598472929783; Wed, 26 Aug 2020 13:15:29 -0700 (PDT) MIME-Version: 1.0 References: <875z95tg5c.fsf@Rainer.invalid> In-Reply-To: From: Michael Wild Date: Wed, 26 Aug 2020 22:15:11 +0200 Message-ID: Subject: Re: Forcing setup.exe not to create WSL symlinks To: Achim Gratz Cc: The Cygwin Mailing List X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_EXEURI, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 20:15:31 -0000 On Wed, Aug 26, 2020 at 9:06 PM Michael Wild wrote: > > > 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 > I tried snooping into the setup code at https://cygwin.com/git/?p=cygwin-apps/setup.git;a=summary. The word CYGWIN doesn't show up, so I don't assume it checks the variable. I do see code to create links when unpacking archives, but to me it looks like it only does hard-links and the old-style link files. Next I'll try to find where the post-install scripts are called and put in some tracing code to find out what's going on... Michael