DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 519Iorf63863162 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 519Iorf63863162 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=kZN1B5ut X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FC1D385843F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1739127052; bh=gySqpAq4jmApzyxywuTsSbDN5Qn6t5vfahdXMn/91GI=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kZN1B5utRdwobjkjN55P5blrxRRjp2DFx5AW8k93qRmsT5Pyb8ouqlcSzG3oDdjl5 k0xEd9c5R8MYs86lqL1fIQVT/tqNIuyPBJmSVITrRjHPYpYsbnNvkGDyKlUvxDs6rc z/xf2UR1k/kvdW2XX2R7a/8wl65ooISVTchgbQ64= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FC8F3858CDA ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3FC8F3858CDA ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739126992; cv=none; b=XnK8iPnH6SHMBeml8yASoDcGmBtQDOUYvBgtgn+2R3xkHWsiF0V5N+BerMj514eQBL6O7/bKPh4ncQlpKtR8H0N52OB7cbLEIq9nNKPEcNt5RxkRrE0F08rrAr61Qy9SzLmP6pKhIHiGJol4SbD2D0hMfOa1I3s+qfCYaBrBWHI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739126992; c=relaxed/simple; bh=iTjRNZ1K1AfQsuVZGuYY5s1SXOzsCgxrI4uVsCcdOWg=; h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature; b=gwE4WlUNoS3wXNUjSAJgF0BDziqB5OnZBvdAz1F27CrehCqXaoSg62JMdGoEms3svvkJbCPMYcNfwud00EFVmF/Nhu8H+W24d1Wb3qwH23yG76I42gyyXLlqOttuYB/8W9+ucLz3LV5scWOyFXZ58V6/0gRgVcBzAn68hve+NEc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3FC8F3858CDA Message-ID: Date: Sun, 9 Feb 2025 11:49:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [maintainer] coreutils-9.0-1: "ln -fs" bug Content-Language: en-CA To: cygwin AT cygwin DOT com References: <7a4548d3-b614-4498-8ad5-50080e708bff AT gmail DOT com> Autocrypt: addr=Brian DOT Inglis AT SystematicSW DOT ab DOT ca; keydata= xjMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePbN LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT7ClgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDM44BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAfCfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software In-Reply-To: <7a4548d3-b614-4498-8ad5-50080e708bff@gmail.com> X-Rspamd-Queue-Id: 7065B20013 X-Rspamd-Server: rspamout07 X-Stat-Signature: teiihiciw49ougutmdcqa8bzpozhjigd X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX19mtZA/34KFE2MpShF9AUGfAmu6Hr+Gpbk= X-HE-Tag: 1739126990-213251 X-HE-Meta: U2FsdGVkX19VqQl+WT/ZD6gY0Ia6Cge3QowRdPdFF5co4wzs8L0NOVnTTGEEJ1ZIpEnnIc8Cx6wzoCiplOWwQj0ze0ZHGxpeDCexpBKhI45jbKNVh/Sew3HepNbVJFfjcdqQ6nLeqzvTJBFjNqLat55p0MU4Qt/TfkLqjJlYRq+SdQcwHaXm/0NtbpU8ZQ/kI9IQNKqniTaDksMzy7UW0lftfLZ2dl3x4em54xSHQnzu6xt+uGTZ7PN1uR5IpUfnks9NkytTXs22WfXcsXt2hoxYx1QoB+mO9up6y+6/7/i+E0PHByq1Gqy0LJqK43r2VCK+rlDrnBrNmJO2BqP0P4GIgGCe7AqX X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brian Inglis via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Brian Inglis Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 519Iorf63863162 On 2025-02-08 22:40, Marco Atzeri via Cygwin wrote: > Noticed today, not sure it is new nor that is Cygwin specific. > > It can create unrequested circular links, to replicate: > > $ cd /tmp > $ mkdir dirA > $ mkdir dirB > $ cd dirA > $ ln -fs /tmp/dirB dirB > $ ls -l > total 0 > lrwxrwxrwx 1 marco marco 9 Feb  9 06:33 dirB -> /tmp/dirB > $ cd dirB > $ ls -l > total 0 > lrwxrwxrwx 1 marco marco 7 Feb  9 06:25 dirB -> ../dirB > > I built nothing in dirB, but now there is inside a circular link to itself. > > It only happens with "ln -fs" not with "ln -s" You are forcing the creation and are allowed to do shoot yourself; also a number of bugs were introduced with coreutils 9 changing to use f...at() directory relative functions, which messed up our patches and forced a reversion. I have created many of these, so when creating symlinks with ln -s, I now try not to use -f, and almost always try to use either -t --target-directory or -T --no-target-directory to specify whether a symlink should added into the directory, or a link to a file or directory should be created, or replaced with -f. I am not seeing anything about this in coreutils issues or change logs; if you can, would you mind checking with coreutils test 9.5; I am working on 9.6 and will recheck there when usable. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut -- Antoine de Saint-Exupéry -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple