From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112666 invoked by alias); 25 Oct 2017 20:36:28 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 112653 invoked by uid 89); 25 Oct 2017 20:36:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:ESMTPA, HContent-Transfer-Encoding:8bit X-HELO: out4-smtp.messagingengine.com Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Oct 2017 20:36:25 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B1D0B223FF for ; Wed, 25 Oct 2017 16:36:23 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 25 Oct 2017 16:36:23 -0400 X-ME-Sender: Received: from [192.168.1.102] (host86-179-113-201.range86-179.btcentralplus.com [86.179.113.201]) by mail.messagingengine.com (Postfix) with ESMTPA id 5612B7F91E for ; Wed, 25 Oct 2017 16:36:23 -0400 (EDT) Subject: Re: setup and colons in filenames To: cygwin-apps@cygwin.com References: <20171025201650.GJ22429@calimero.vinschen.de> From: Jon Turney Message-ID: <4317ea35-5b64-1485-c970-210eac051a0f@dronecode.org.uk> Date: Wed, 25 Oct 2017 20:36:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171025201650.GJ22429@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2017-10/txt/msg00126.txt.bz2 On 25/10/2017 21:16, Corinna Vinschen wrote: > On Oct 25 20:23, Jon Turney wrote: >> On 25/10/2017 16:50, Ken Brown wrote: >>> This is a followup to the thread started here: >>> >>>   https://cygwin.com/ml/cygwin-patches/2017-q4/msg00012.html >>> >>> Currently setup's parse_filename is not correctly parsing filenames in >>> /etc/setup/installed.db that contain colons, as explained in the above >>> thread.  It would be easy to fix this by just ripping out the 'base' >>> function, except for the fact that parse_filename is called by >>> ScanFindVisitor::visitFile. >> >> Since older setup cannot correctly parse an installed.db containing >> filenames like that, we should probably bump the installed.db version at the >> same time as fixing this. >> >>> I don't know enough about WIN32_FIND_DATA to know whether the call to >>> 'base' is needed for that use of parse_filename.  If so, is it safe to >>> skip all colons in that setting, since we're dealing with Win32 >>> filenames and they don't see the colons in Cygwin filenames? >> >> Yeah, that's about as far as I got before giving up... >> >>> Do we need two versions of parse_filename, one that calls base and one >>> that doesn't? >> >> This might be the easiest solution :) >> >> The other concern I had was if the filenames for the package archives stored >> in the download cache end up containing a ':', which I thought wasn't >> allowed in windows filenames? > > Colons in Cygwin filenames will have 0xf03a value in WIN32. The code to > transpose special chars into the private use area at 0xf0XY is in setup, > but I'm not sure if setup is really working correctly with archives > containing a colon. I think the package archives are stored using native Windows filenames, not cygwin filenames (i.e. file:// paths rather than cygfile:// paths), because the "Local Package Directory" is not necessarily under the cygwin root, so I'm not sure that transformation applies.