From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by sourceware.org (Postfix) with ESMTPS id E68263857C7E for ; Mon, 5 Oct 2020 17:29:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E68263857C7E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca Received: from [192.168.1.104] ([24.64.172.44]) by shaw.ca with ESMTP id PUITkYjCZs3D6PUIUkSOeX; Mon, 05 Oct 2020 11:29:14 -0600 X-Authority-Analysis: v=2.4 cv=bZHV7MDB c=1 sm=1 tr=0 ts=5f7b57ea a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=ejknC5xS72zp2OFXFO8A:9 a=QEXdDO2ut3YA:10 a=Lz48L_9qCwoA:10 a=pwUoXiQdmvIA:10 a=sRI3_1zDfAgwuvI8zelB:22 Reply-To: cygwin@cygwin.com Subject: Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files To: cygwin@cygwin.com References: <1379483951.20201004132801@yandex.ru> From: Brian Inglis Autocrypt: addr=Brian.Inglis@SystematicSw.ab.ca; prefer-encrypt=mutual; keydata= mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software Message-ID: Date: Mon, 5 Oct 2020 11:29:13 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfIgNHv5pWfFIQvU8of3NEasVkVRhiR7vSk3PQinc2o12Yq6KLuiZJhvL4iQhIVbX35WrWwFF7knZYUPL5Ndl7LDPTmB7E4GHARXMXaY/aiHzU6iBM2g4 bNoSgzW/FT/VYhmK2rZKf02fd0HUc4jDnA4fLUilpkmp3ARrridURmswa07vwZ+6WgLOGsg4R97a+B5wsG7knzzt0oHGoKic1fM= X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 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: Mon, 05 Oct 2020 17:29:17 -0000 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.]