* Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files @ 2020-10-02 15:26 vinay Hegde 2020-10-02 15:43 ` Eliot Moss 0 siblings, 1 reply; 8+ messages in thread From: vinay Hegde @ 2020-10-02 15:26 UTC (permalink / raw) To: cygwin Hi Cygwin Team, In Cygwin 3.6, I am facing an issue while using tar.exe for extracting .tar.z file. Issue summary: When I use 'tar.exe' to extract the .tar.z file, it extracts all files including symlinks. But symlink file size will be 0KB & it throws error 'The file cannot be accessed by the system', if I try to open in any Windows editor like notepad or notepad++ Below are the details: - OS: Windows 2019 - Cygwin version installed: 3.6 (tar version: 1.29) - Command used to extract the tar file is: tar -zxvf jre64.tar.Z - 'ls -l' on the extracted directory shows: lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol - As you can see 'ControlPanel' is a symlink file with 0KB (8Bytes) size. This file, I cannot open in any Windows editor. It throws error like ''The file cannot be accessed by the system' - However, I can open this file in vi editor or I can 'cat' this. - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in that, this issue was not there. Symlink file size was 1KB & I could open it with any Windows editor. Please suggest what needs to be done to fix this issue. Regards Vinay Hegde ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-02 15:26 Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files vinay Hegde @ 2020-10-02 15:43 ` Eliot Moss 2020-10-02 16:47 ` vinay Hegde 0 siblings, 1 reply; 8+ messages in thread From: Eliot Moss @ 2020-10-02 15:43 UTC (permalink / raw) To: vinay Hegde, cygwin On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: > Hi Cygwin Team, > In Cygwin 3.6, I am facing an issue while using tar.exe for extracting > .tar.z file. > > Issue summary: > When I use 'tar.exe' to extract the .tar.z file, it extracts all files > including symlinks. But symlink file size will be 0KB & it throws > error 'The file cannot be accessed by the system', if I try to open in > any Windows editor like notepad or notepad++ > > Below are the details: > - OS: Windows 2019 > - Cygwin version installed: 3.6 (tar version: 1.29) > - Command used to extract the tar file is: tar -zxvf jre64.tar.Z > - 'ls -l' on the extracted directory shows: > lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol > -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java > -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws > -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol > > - As you can see 'ControlPanel' is a symlink file with 0KB > (8Bytes) size. This file, I cannot open in any Windows editor. It > throws error like ''The file cannot be accessed by the system' > > - However, I can open this file in vi editor or I can 'cat' this. > > - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in > that, this issue was not there. Symlink file size was 1KB & I could > open it with any Windows editor. > > Please suggest what needs to be done to fix this issue. Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and decide what kind are best for you. Then you'll need to set that up, delete the existing link, and re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. Regards - Eliot Moss ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-02 15:43 ` Eliot Moss @ 2020-10-02 16:47 ` vinay Hegde 2020-10-02 18:14 ` Eliot Moss 2020-10-04 10:28 ` Andrey Repin 0 siblings, 2 replies; 8+ messages in thread From: vinay Hegde @ 2020-10-02 16:47 UTC (permalink / raw) To: moss; +Cc: cygwin Hi Eliot Moss, Thank you very much for the quick response & the information.It really helped. I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working for me. But it creates a shortcut(not the regular file). Hope it won't impact my existing setup. But both 'CYGWIN=winsymlinks:native' (which is default I believe) & 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to understand, In what OS environment/File System 'native' will work? Regards Vinay Hegde On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss <moss@cs.umass.edu> wrote: > > On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: > > Hi Cygwin Team, > > In Cygwin 3.6, I am facing an issue while using tar.exe for extracting > > .tar.z file. > > > > Issue summary: > > When I use 'tar.exe' to extract the .tar.z file, it extracts all files > > including symlinks. But symlink file size will be 0KB & it throws > > error 'The file cannot be accessed by the system', if I try to open in > > any Windows editor like notepad or notepad++ > > > > Below are the details: > > - OS: Windows 2019 > > - Cygwin version installed: 3.6 (tar version: 1.29) > > - Command used to extract the tar file is: tar -zxvf jre64.tar.Z > > - 'ls -l' on the extracted directory shows: > > lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol > > -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java > > -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws > > -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol > > > > - As you can see 'ControlPanel' is a symlink file with 0KB > > (8Bytes) size. This file, I cannot open in any Windows editor. It > > throws error like ''The file cannot be accessed by the system' > > > > - However, I can open this file in vi editor or I can 'cat' this. > > > > - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in > > that, this issue was not there. Symlink file size was 1KB & I could > > open it with any Windows editor. > > > > Please suggest what needs to be done to fix this issue. > > Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood > by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and > decide what kind are best for you. Then you'll need to set that up, delete the existing link, and > re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. > > Regards - Eliot Moss ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-02 16:47 ` vinay Hegde @ 2020-10-02 18:14 ` Eliot Moss 2020-10-04 10:28 ` Andrey Repin 1 sibling, 0 replies; 8+ messages in thread From: Eliot Moss @ 2020-10-02 18:14 UTC (permalink / raw) Cc: cygwin On 10/2/2020 12:47 PM, vinay Hegde wrote: > Hi Eliot Moss, > Thank you very much for the quick response & the information.It really helped. > I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link > file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working > for me. > But it creates a shortcut(not the regular file). Hope it won't impact > my existing setup. > > But both 'CYGWIN=winsymlinks:native' (which is default I believe) & > 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to > understand, In what OS environment/File System 'native' will work? > > Regards > Vinay Hegde I run Windows 10 and that works for me. Of course below, jcontrol should be an actual file, while ControlPanel will be a symlink to it. (That particular name might behave oddly under Windows, because the Control Panel is a built in thing!) Not sure what else to say about the different forms. The lnk form, as I recall, builds a Cygwin-specific thing that Cygwin understands but Windows tools will not - they'll just think its a small ordinary file (its has within it, a few "magic" bytes then the name of the target file). You _want_ a short-cut, right? ControlPanel -> jcontrol _is_ a link. So I admit I am not fully understanding your post. Also, on this list, the custom is to bottom-post (or intersperse) replies, not to top-post. Regards - EM > On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss <moss@cs.umass.edu> wrote: >> >> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >>> Hi Cygwin Team, >>> In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >>> .tar.z file. >>> >>> Issue summary: >>> When I use 'tar.exe' to extract the .tar.z file, it extracts all files >>> including symlinks. But symlink file size will be 0KB & it throws >>> error 'The file cannot be accessed by the system', if I try to open in >>> any Windows editor like notepad or notepad++ >>> >>> Below are the details: >>> - OS: Windows 2019 >>> - Cygwin version installed: 3.6 (tar version: 1.29) >>> - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >>> - 'ls -l' on the extracted directory shows: >>> lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >>> -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >>> -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >>> -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >>> >>> - As you can see 'ControlPanel' is a symlink file with 0KB >>> (8Bytes) size. This file, I cannot open in any Windows editor. It >>> throws error like ''The file cannot be accessed by the system' >>> >>> - However, I can open this file in vi editor or I can 'cat' this. >>> >>> - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >>> that, this issue was not there. Symlink file size was 1KB & I could >>> open it with any Windows editor. >>> >>> Please suggest what needs to be done to fix this issue. >> >> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >> >> Regards - Eliot Moss ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-02 16:47 ` vinay Hegde 2020-10-02 18:14 ` Eliot Moss @ 2020-10-04 10:28 ` Andrey Repin 2020-10-05 15:23 ` Hamish McIntyre-Bhatty 1 sibling, 1 reply; 8+ messages in thread From: Andrey Repin @ 2020-10-04 10:28 UTC (permalink / raw) To: vinay Hegde, cygwin Greetings, vinay Hegde! Please no top-posting in this list. > On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss wrote: >> >> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >> > Hi Cygwin Team, >> > In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >> > .tar.z file. >> > >> > Issue summary: >> > When I use 'tar.exe' to extract the .tar.z file, it extracts all files >> > including symlinks. But symlink file size will be 0KB & it throws >> > error 'The file cannot be accessed by the system', if I try to open in >> > any Windows editor like notepad or notepad++ >> > >> > Below are the details: >> > - OS: Windows 2019 >> > - Cygwin version installed: 3.6 (tar version: 1.29) >> > - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >> > - 'ls -l' on the extracted directory shows: >> > lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >> > -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >> > -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >> > -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >> > >> > - As you can see 'ControlPanel' is a symlink file with 0KB >> > (8Bytes) size. This file, I cannot open in any Windows editor. It >> > throws error like ''The file cannot be accessed by the system' >> > >> > - However, I can open this file in vi editor or I can 'cat' this. >> > >> > - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >> > that, this issue was not there. Symlink file size was 1KB & I could >> > open it with any Windows editor. >> > >> > Please suggest what needs to be done to fix this issue. >> >> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >> > Hi Eliot Moss, > Thank you very much for the quick response & the information.It really helped. > I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link > file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working > for me. > But it creates a shortcut(not the regular file). Hope it won't impact > my existing setup. > But both 'CYGWIN=winsymlinks:native' (which is default I believe) & > 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to > understand, In what OS environment/File System 'native' will work? Given enough permissions, "native" will work everywhere, it will create native symlink, but failing that, it will fall back to creating Cygwin link. LNK is an Explorer shortcut, which would work with many programs outside Cygwin, but not necessarily with your one. See https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks as well as https://cygwin.com/cygwin-ug-net/using-cygwinenv.html -- With best regards, Andrey Repin Sunday, October 4, 2020 7:47:13 Sorry for my terrible english... ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-04 10:28 ` Andrey Repin @ 2020-10-05 15:23 ` Hamish McIntyre-Bhatty 2020-10-05 17:29 ` Brian Inglis 0 siblings, 1 reply; 8+ messages in thread From: Hamish McIntyre-Bhatty @ 2020-10-05 15:23 UTC (permalink / raw) To: cygwin [-- Attachment #1.1.1: Type: text/plain, Size: 3307 bytes --] On 04/10/2020 11:28, Andrey Repin via Cygwin wrote: > Greetings, vinay Hegde! > > Please no top-posting in this list. > >> On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss wrote: >>> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >>>> Hi Cygwin Team, >>>> In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >>>> .tar.z file. >>>> >>>> Issue summary: >>>> When I use 'tar.exe' to extract the .tar.z file, it extracts all files >>>> including symlinks. But symlink file size will be 0KB & it throws >>>> error 'The file cannot be accessed by the system', if I try to open in >>>> any Windows editor like notepad or notepad++ >>>> >>>> Below are the details: >>>> - OS: Windows 2019 >>>> - Cygwin version installed: 3.6 (tar version: 1.29) >>>> - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >>>> - 'ls -l' on the extracted directory shows: >>>> lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >>>> -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >>>> -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >>>> -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >>>> >>>> - As you can see 'ControlPanel' is a symlink file with 0KB >>>> (8Bytes) size. This file, I cannot open in any Windows editor. It >>>> throws error like ''The file cannot be accessed by the system' >>>> >>>> - However, I can open this file in vi editor or I can 'cat' this. >>>> >>>> - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >>>> that, this issue was not there. Symlink file size was 1KB & I could >>>> open it with any Windows editor. >>>> >>>> Please suggest what needs to be done to fix this issue. >>> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >>> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >>> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >>> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >>> >> Hi Eliot Moss, >> Thank you very much for the quick response & the information.It really helped. >> I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link >> file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working >> for me. >> But it creates a shortcut(not the regular file). Hope it won't impact >> my existing setup. >> But both 'CYGWIN=winsymlinks:native' (which is default I believe) & >> 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to >> understand, In what OS environment/File System 'native' will work? > Given enough permissions, "native" will work everywhere, it will create native > symlink, but failing that, it will fall back to creating Cygwin link. > > LNK is an Explorer shortcut, which would work with many programs outside > Cygwin, but not necessarily with your one. > > See https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks as well as > https://cygwin.com/cygwin-ug-net/using-cygwinenv.html Does anyone happen to know if there's a way to automatically regenerate existing symlinks after changing these settings? Hamish [-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --] [-- Type: application/pgp-keys, Size: 3235 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-05 15:23 ` Hamish McIntyre-Bhatty @ 2020-10-05 17:29 ` Brian Inglis 2020-10-07 20:33 ` Hamish McIntyre-Bhatty 0 siblings, 1 reply; 8+ messages in thread From: Brian Inglis @ 2020-10-05 17:29 UTC (permalink / raw) To: cygwin On 2020-10-05 09:23, Hamish McIntyre-Bhatty via Cygwin wrote: > On 04/10/2020 11:28, Andrey Repin via Cygwin wrote: >> Greetings, vinay Hegde! >> >> Please no top-posting in this list. >> >>> On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss wrote: >>>> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >>>>> Hi Cygwin Team, >>>>> In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >>>>> .tar.z file. >>>>> >>>>> Issue summary: >>>>> When I use 'tar.exe' to extract the .tar.z file, it extracts all files >>>>> including symlinks. But symlink file size will be 0KB & it throws >>>>> error 'The file cannot be accessed by the system', if I try to open in >>>>> any Windows editor like notepad or notepad++ >>>>> >>>>> Below are the details: >>>>> - OS: Windows 2019 >>>>> - Cygwin version installed: 3.6 (tar version: 1.29) >>>>> - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >>>>> - 'ls -l' on the extracted directory shows: >>>>> lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >>>>> -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >>>>> -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >>>>> -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >>>>> >>>>> - As you can see 'ControlPanel' is a symlink file with 0KB >>>>> (8Bytes) size. This file, I cannot open in any Windows editor. It >>>>> throws error like ''The file cannot be accessed by the system' >>>>> >>>>> - However, I can open this file in vi editor or I can 'cat' this. >>>>> >>>>> - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >>>>> that, this issue was not there. Symlink file size was 1KB & I could >>>>> open it with any Windows editor. >>>>> >>>>> Please suggest what needs to be done to fix this issue. >>>> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >>>> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >>>> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >>>> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >>>> >>> Hi Eliot Moss, >>> Thank you very much for the quick response & the information.It really helped. >>> I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link >>> file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working >>> for me. >>> But it creates a shortcut(not the regular file). Hope it won't impact >>> my existing setup. >>> But both 'CYGWIN=winsymlinks:native' (which is default I believe) & >>> 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to >>> understand, In what OS environment/File System 'native' will work? >> Given enough permissions, "native" will work everywhere, it will create native >> symlink, but failing that, it will fall back to creating Cygwin link. >> >> LNK is an Explorer shortcut, which would work with many programs outside >> Cygwin, but not necessarily with your one. >> >> See https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks as well as >> https://cygwin.com/cygwin-ug-net/using-cygwinenv.html > > Does anyone happen to know if there's a way to automatically regenerate > existing symlinks after changing these settings? Example: remove the "echo" after checking it will update only the desired links: $ for link in `find . -type l` > do > targ=`readlink $link` > echo ln -fsv $targ $link > done ln -fsv linux-kernel/linux-next/cpufeatures.h ./cpufeatures.h ln -fsv linux-kernel/linux-next/cpufeatures.log ./cpufeatures.log ln -fsv ../../cygwin/newlib-cygwin/winsup/cygwin/fhandler_proc.cc ./cpuinfo/fhandler_proc.cc ln -fsv ../../cygwin/newlib-cygwin/winsup/cygwin/sysconf.cc ./cpuinfo/sysconf.cc ln -fsv ../cygwin/cpuid ./cygwin ln -fsv CPUID_Explorer/CPUID/Debug Static/CPUID.exe ./explorer ln -fsv /lib/gcc/x86_64-pc-cygwin/9.3.0/include/cpuid.h ./gcc/cpuid.h ln -fsv linux-kernel/linux-prev-next.diff ./linux-prev-next.diff ln -fsv linux-kernel/linux-next/scattered.log ./scattered.log -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files 2020-10-05 17:29 ` Brian Inglis @ 2020-10-07 20:33 ` Hamish McIntyre-Bhatty 0 siblings, 0 replies; 8+ messages in thread From: Hamish McIntyre-Bhatty @ 2020-10-07 20:33 UTC (permalink / raw) To: cygwin [-- Attachment #1.1.1: Type: text/plain, Size: 4900 bytes --] On 05/10/2020 18:29, Brian Inglis wrote: > On 2020-10-05 09:23, Hamish McIntyre-Bhatty via Cygwin wrote: >> On 04/10/2020 11:28, Andrey Repin via Cygwin wrote: >>> Greetings, vinay Hegde! >>> >>> Please no top-posting in this list. >>> >>>> On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss wrote: >>>>> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >>>>>> Hi Cygwin Team, >>>>>> In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >>>>>> .tar.z file. >>>>>> >>>>>> Issue summary: >>>>>> When I use 'tar.exe' to extract the .tar.z file, it extracts all files >>>>>> including symlinks. But symlink file size will be 0KB & it throws >>>>>> error 'The file cannot be accessed by the system', if I try to open in >>>>>> any Windows editor like notepad or notepad++ >>>>>> >>>>>> Below are the details: >>>>>> - OS: Windows 2019 >>>>>> - Cygwin version installed: 3.6 (tar version: 1.29) >>>>>> - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >>>>>> - 'ls -l' on the extracted directory shows: >>>>>> lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >>>>>> -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >>>>>> -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >>>>>> -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >>>>>> >>>>>> - As you can see 'ControlPanel' is a symlink file with 0KB >>>>>> (8Bytes) size. This file, I cannot open in any Windows editor. It >>>>>> throws error like ''The file cannot be accessed by the system' >>>>>> >>>>>> - However, I can open this file in vi editor or I can 'cat' this. >>>>>> >>>>>> - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >>>>>> that, this issue was not there. Symlink file size was 1KB & I could >>>>>> open it with any Windows editor. >>>>>> >>>>>> Please suggest what needs to be done to fix this issue. >>>>> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >>>>> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >>>>> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >>>>> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >>>>> >>>> Hi Eliot Moss, >>>> Thank you very much for the quick response & the information.It really helped. >>>> I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link >>>> file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working >>>> for me. >>>> But it creates a shortcut(not the regular file). Hope it won't impact >>>> my existing setup. >>>> But both 'CYGWIN=winsymlinks:native' (which is default I believe) & >>>> 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to >>>> understand, In what OS environment/File System 'native' will work? >>> Given enough permissions, "native" will work everywhere, it will create native >>> symlink, but failing that, it will fall back to creating Cygwin link. >>> >>> LNK is an Explorer shortcut, which would work with many programs outside >>> Cygwin, but not necessarily with your one. >>> >>> See https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks as well as >>> https://cygwin.com/cygwin-ug-net/using-cygwinenv.html >> Does anyone happen to know if there's a way to automatically regenerate >> existing symlinks after changing these settings? > Example: remove the "echo" after checking it will update only the desired links: > > $ for link in `find . -type l` >> do >> targ=`readlink $link` >> echo ln -fsv $targ $link >> done > ln -fsv linux-kernel/linux-next/cpufeatures.h ./cpufeatures.h > ln -fsv linux-kernel/linux-next/cpufeatures.log ./cpufeatures.log > ln -fsv ../../cygwin/newlib-cygwin/winsup/cygwin/fhandler_proc.cc > ./cpuinfo/fhandler_proc.cc > ln -fsv ../../cygwin/newlib-cygwin/winsup/cygwin/sysconf.cc ./cpuinfo/sysconf.cc > ln -fsv ../cygwin/cpuid ./cygwin > ln -fsv CPUID_Explorer/CPUID/Debug Static/CPUID.exe ./explorer > ln -fsv /lib/gcc/x86_64-pc-cygwin/9.3.0/include/cpuid.h ./gcc/cpuid.h > ln -fsv linux-kernel/linux-prev-next.diff ./linux-prev-next.diff > ln -fsv linux-kernel/linux-next/scattered.log ./scattered.log Cheers, worked for me. In my case, I'm bundling Cygwin in an installer package for one of my programs, so I used this trick to regenerate all my Cygwin symlinks as Windows .lnk files (using 32-bit Cygwin to run that on C:\cygwin64 and vice versa). I'm aware that it was probably Not Recommended (TM) to do that so I made backups first. All seems fine so far. I was having problems with the bundles and I figured Cygwin might be using WSL symlinks (my dev VM is running Windows 10), so I thought it was worth a try. Cheers. Hamish [-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --] [-- Type: application/pgp-keys, Size: 3235 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-07 20:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-02 15:26 Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files vinay Hegde 2020-10-02 15:43 ` Eliot Moss 2020-10-02 16:47 ` vinay Hegde 2020-10-02 18:14 ` Eliot Moss 2020-10-04 10:28 ` Andrey Repin 2020-10-05 15:23 ` Hamish McIntyre-Bhatty 2020-10-05 17:29 ` Brian Inglis 2020-10-07 20:33 ` Hamish McIntyre-Bhatty
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).