From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) by sourceware.org (Postfix) with ESMTPS id C99453858D38 for ; Sun, 5 Jul 2020 19:29:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C99453858D38 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 sAK7jrVIvYYpxsAK8jwjym; Sun, 05 Jul 2020 13:29:12 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=DqzYegWWcDvZmABx9bAA:9 a=QEXdDO2ut3YA:10 a=M-L011EgL7cA:10 a=ul9cdbp4aOFLsgKbc677:22 From: Brian Inglis Subject: Re: cygport install infinite loop in src_postinstall under __prep_libtool_modules Reply-To: cygwin-apps@cygwin.com To: cygwin-apps@cygwin.com References: <359290a2-b299-ad90-5083-30789099a3eb@SystematicSw.ab.ca> <9e5761e2-0488-f83d-a43d-57a6e9a5419f@gmail.com> 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: <3051372d-f7a9-d384-61c9-bd9964bd258d@SystematicSw.ab.ca> Date: Sun, 5 Jul 2020 13:29:11 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9e5761e2-0488-f83d-a43d-57a6e9a5419f@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfI2orW8R6NoxuAkjzxxd5crFZUAL4AQfEfxy+5iIqO+0kTjGIgLCSBxS6nkLIm60Q83yB3aGti0fU/mQqBY/K2VYG9lufK3FDKZIUZU8nTufF69Mb63Q McUAc7SrHEul95o/O0Y0+efOyO7p+eJIPzsFcIkGWCDs0ZQJnK+jOxtvn8HGLW163fOptPGitYtNiw== X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, 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-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 19:29:31 -0000 On 2020-07-04 14:06, Marco Atzeri via Cygwin-apps wrote: > On 04.07.2020 21:35, Brian Inglis wrote: >> See attached cygport --debug ...cygport install log. >> >> Running cygport ... install, src_postinstall under __prep_libtool_modules after >> "Fixing libtool modules:" does not find dll in: >> >> $ find wget2-1.99.2-1.x86_64/ -name 'cygwget*' >> wget2-1.99.2-1.x86_64/build/libwget/.libs/cygwget-0.dll >> wget2-1.99.2-1.x86_64/inst/usr/bin/cygwget-0.dll >> >> so it loops on /usr/share/cygport/lib/src_postinst.cygpart:1297ff: >> >> while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != ${D}$(__host_prefix) ] >> do >>     dlname=../${dlname} >> done >> >> until readlink returns root and just keeps on going, possibly because my Cygwin >> home is a symlink to my Windows home, but this approach would have problems with >> any symlinks along the path to the cygport dir, as $D is not similarly resolved. >> >> I can wrap the other path in the condition in $(readlink -f ...) and it works >> normally but this may not be the best approach here. >> Alternatives, suggestions? >> >> In this pre-package there is a check/test program and a DLL - is there another >> package I could use as a template for how to split this into two packages? >> > > I assume you are building under some link structure. > I was hit by long time by it as I was using > > /pub -> /cygdrive/d/cyg_pub > and building in it. > > Two options: > > 1) patch cygport > > I proposed something for that case > https://sourceware.org/pipermail/cygwin-apps/2020-April/039990.html > > 2) mount the directory instead of using links. > I put this in my fstab and removed the link > > d:\cyg_pub /pub  NTFS binary,posix=1,nouser 0 0 Thanks for the feedback and suggestions. You can't mount everywhere you might want to use a symlink. I have a number of topic and src directories cross-linked for convenience. I should be able to cd src and run cygport without issues. [Cygwin directory symlinks have a quirk I don't remember working on any Unix I tried: after cd src, I can operate on ../tgt where tgt may be a physical sibling entry in the same directory as src, so is not limited to be an entry in the logical directory ../ containing the symlink to src.] My working kludge was: /usr/share/cygport/lib/src_postinst.cygpart:1295ff: origdlname=${dlname} while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != $(readlink -f ${D}$(__host_prefix)) ] do dlname=../${dlname} done but it would have lower overhead as: origdlname=${dlname} # do full symlink resolution on both paths compared to avoid issues local dest_prefix=$(readlink -f ${D}$(__host_prefix)) while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != $dest_prefix ] do dlname=../${dlname} done I now think curl would be the best template for this package, as it includes exe, lib, devel, and doc subpackages. -- 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 IEC units and prefixes, physical quantities in SI.]