From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) Resent-From: Linda Walsh Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 10 Jan 2012 00:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10471@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132615434824731 (code B ref -1); Tue, 10 Jan 2012 00:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jan 2012 00:12:28 +0000 Received: from localhost ([127.0.0.1]:51472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPKF-0006Qq-S3 for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:12:28 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51408) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPKD-0006Qe-Lt for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:12:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkPJq-0008OG-To for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:12:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:52146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkPJq-0008OC-SJ for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:12:02 -0500 Received: from eggs.gnu.org ([140.186.70.92]:44090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkPJp-00039L-Rg for bug-coreutils@gnu.org; Mon, 09 Jan 2012 19:12:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkPJo-0008Nn-FY for bug-coreutils@gnu.org; Mon, 09 Jan 2012 19:12:01 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:38755 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkPJo-0008Ng-0v for bug-coreutils@gnu.org; Mon, 09 Jan 2012 19:12:00 -0500 Received: from [192.168.3.140] (Athenae [192.168.3.140]) by Ishtar.sc.tlinx.org (8.14.4/8.14.4/SuSE Linux 0.8) with ESMTP id q0A0BujV004593 for ; Mon, 9 Jan 2012 16:11:58 -0800 Message-ID: <4F0B8245.2090207@tlinx.org> Date: Mon, 09 Jan 2012 16:11:49 -0800 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Please do not close this bug... EB doesn't know what he is talking about -- he didn't read the bug. -------- Original Message -------- Subject: BUG: Severe or critical - deletes existing files and leaves nothing. (cp) Date: Mon, 09 Jan 2012 13:19:43 -0800 From: Linda Walsh , To: bug-coreutils@gnu.org CC: cygwin@cygwin.com I was trying to copy a font dir from a unix to a windows machine. Problem is there are duplicates -- where only the case differs... On unix, I've run a 'dedup' in my font dir, that joined any files that were the same so they are hard links to each other. (made sense at the time... ;-) ). windows treats different cased file names as the same. Along comes cp, on cygwin, .. but I don't think this is a cygwin bug, as it's doing what it is supposed to do.. it is cp that is problematic. Note, in the below, I an alias for cp is in effect: alias cp='cp --preserve=mode,timestamps' i.e. by default, I try to preserve 'simple'-permissions, and timestamps. First I tried: /usr/share/fonts> cp -avu //bliss/usr_share/fonts/. . Got: removed `././Adobe (afm) fonts/Symbol.afm' cp: cannot create hard link `././Adobe (afm) fonts/Symbol.afm' to `././Adobe (afm) fonts/symbol.afm': No such file or directory removed `././Adobe (afm) fonts/cmr10.afm' cp: cannot create hard link `././Adobe (afm) fonts/cmr10.afm' to `././Adobe (afm) fonts/CMR10.afm': No such file or directory removed `././Adobe (afm) fonts/cmex10.afm' (and many more... ) It removes an existing file 'Symbol', because because it sees that 'Symbol' is not a hard link to 'symbol'; I specified "-a" to make an exact copy, so it's trying to copy links. But by removing 'Symbol', it removes 'symbol' and THEN can't link to it... thus 'symbol' is gone from the local dir. --- ok, at this point, I would consider it 'my bad, for using cp on windows (it used to work without these issues, not sure what has changed)... Then I tried the less strict: > cp -rvu /usr/share/fonts> cp -rvu //bliss/usr_share/fonts/. . figuring without the "-a" it wouldn't try to force linking, thus no prob... ... well... removed `././OTF/AJensonPro-Bold.otf' cp: cannot create hard link `././OTF/AJensonPro-Bold.otf' to `././OTF/ajensonpro-bold.otf': No such file or directory removed `././OTF/AJensonPro-BoldCapt.otf' cp: cannot create hard link `././OTF/AJensonPro-BoldCapt.otf' to `././OTF/ajensonpro-boldcapt.otf': No such file or directory removed `././OTF/AJensonPro-BoldDisp.otf' ------ ?!!?! Why is it trying to create hard links again? I didn't specify preserve links!?! (i.e. this is a cp BUG...) Well if I could just get it to copy them and not try to link them... so it copies them twice.. at least they get here... so I try the only thing that might not remove files "n": cp -nrvu //bliss/usr_share/fonts/. . and... removed `././Adobe (afm) fonts/cmbx5.afm' cp: cannot create hard link `././Adobe (afm) fonts/cmbx5.afm' to `././Adobe (afm) fonts/CMBX5.afm': No such file or directory removed `././Adobe (afm) fonts/cmbx7.afm' cp: cannot create hard link `././Adobe (afm) fonts/cmbx7.afm' to `././Adobe (afm) fonts/CMBX7.afm': No such file or directory removed `././Adobe (afm) fonts/cmmi10.afm' ... *sigh*... my poor cumberland fonts... so sad! um.... hey, if it shouldn't have removed them on -rvu, it doubly shouldn't have done so on when I told it "-n" (--no-clobber) don't clobber existing files... DOUBLE BUG!.... cygcheck -f /bin/cp coreutils-8.14-1 From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 10 Jan 2012 00:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Linda Walsh Cc: 10471@debbugs.gnu.org Received: via spool by 10471-submit@debbugs.gnu.org id=B10471.132615482328457 (code B ref 10471); Tue, 10 Jan 2012 00:21:01 +0000 Received: (at 10471) by debbugs.gnu.org; 10 Jan 2012 00:20:23 +0000 Received: from localhost ([127.0.0.1]:51477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPRt-0007Ou-V3 for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:20:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40069) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPRp-0007Oh-Lt; Mon, 09 Jan 2012 19:20:20 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0A0Jxih025083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Jan 2012 19:20:00 -0500 Received: from [10.3.113.48] (ovpn-113-48.phx2.redhat.com [10.3.113.48]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0A0JxQ3000429; Mon, 9 Jan 2012 19:19:59 -0500 Message-ID: <4F0B842E.7030105@redhat.com> Date: Mon, 09 Jan 2012 17:19:58 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 References: <4F0B8245.2090207@tlinx.org> In-Reply-To: <4F0B8245.2090207@tlinx.org> X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig307A44811EA8DB0DCE1E7F17" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig307A44811EA8DB0DCE1E7F17 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable forcemerge 10468 10471 thanks On 01/09/2012 05:11 PM, Linda Walsh wrote: > Please do not close this bug... EB doesn't know what he is talking > about -- he didn't read the bug. I did too read your report, but I stand by my position that upstream cp is doing the right things for a case-sensitive system, and that the problems you are encountering is not due to a bug in the algorithm used in cp, but due to a bug in your system configurations in not enabling case-sensitivity, so that your system violated the assumptions made by cp. I further stand by my position that upstream coreutils should not have to change anything; and that if changes are needed in cygwin (and they very well may be needed), that the cygwin list is a more appropriate place to discuss them, since only cygwin is affected by the burden of exposing the POSIX notion of a case-sensitive system when built on top of a case-insensitive setting in windows. We can reopen things if you can demonstrate the same problem without cygwin in the mix. But for now, as long as your recipe for reproducing the problem involves cygwin, then the cygwin list is the better place to discuss it. And no need to create a new bug number - if you will reply to the existing threads instead of starting a new one, you can add to the conversation of a closed bug, including adding new evidence on why the bug might need to be reopened. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig307A44811EA8DB0DCE1E7F17 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPC4QvAAoJEKeha0olJ0Nq5MkH/iEbO/p181gs7vb48bFjk1Ug Fg9w9reoILai0mA1EZCoEhMjUbKUaREZg/ha75nPuv/UM3MtWxktT/4lvfY+M7GS DTjpTDSgBWGEvj6dCEapBtKLr+XPOAL3EedO86AAW8CThZmxGWYKohslE/6PSY1F hT1jd6bTeu/NFTCshLtUO0DwM718VkR3NwUXev4C8kYZetR3okPCpLgyhyCMchsW wh3NOD9lXI/09rTxAvgy5N1Te07iXSAUJV6lEBnp6HldJmKOVUwP8eev2az3PF+5 OMJPHidrLTvAVzWpET6asO6ljZBu5iUanb1T5dMrykhK0pGCQ23YGaixXv6rpEo= =0bjv -----END PGP SIGNATURE----- --------------enig307A44811EA8DB0DCE1E7F17-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 02 00:20:18 2015 Received: (at control) by debbugs.gnu.org; 2 Apr 2015 04:20:18 +0000 Received: from localhost ([127.0.0.1]:42774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdWc5-000495-Sc for submit@debbugs.gnu.org; Thu, 02 Apr 2015 00:20:18 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:37136 helo=Ishtar.hs.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdWc3-00048u-Ir for control@debbugs.gnu.org; Thu, 02 Apr 2015 00:20:16 -0400 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.hs.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id t324K9ei061863 for ; Wed, 1 Apr 2015 21:20:13 -0700 Message-ID: <551CC379.7010403@tlinx.org> Date: Wed, 01 Apr 2015 21:20:09 -0700 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Re: Archived problem report bug#10471 (bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp)) References: <551CAC0D.60007@tlinx.org> <4F0B8245.2090207@tlinx.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) unarchive 10471 thanks ============== From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) References: <4F0B8245.2090207@tlinx.org> In-Reply-To: <4F0B8245.2090207@tlinx.org> Resent-From: "L. A. Walsh" Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 02 Apr 2015 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: 10471@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14279601367509 (code B ref -1); Thu, 02 Apr 2015 07:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Apr 2015 07:35:36 +0000 Received: from localhost ([127.0.0.1]:42840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdZf5-0001x2-Ij for submit@debbugs.gnu.org; Thu, 02 Apr 2015 03:35:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37950) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdZf2-0001wp-LN for submit@debbugs.gnu.org; Thu, 02 Apr 2015 03:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdZev-0004e0-Mc for submit@debbugs.gnu.org; Thu, 02 Apr 2015 03:35:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdZev-0004dw-Ae for submit@debbugs.gnu.org; Thu, 02 Apr 2015 03:35:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdZet-0001kQ-DL for bug-coreutils@gnu.org; Thu, 02 Apr 2015 03:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdZer-0004db-IK for bug-coreutils@gnu.org; Thu, 02 Apr 2015 03:35:23 -0400 Received: from [2601:9:6901:1000:226:b9ff:fe48:71e2] (port=34808 helo=Ishtar.hs.tlinx.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdZer-0004dU-73 for bug-coreutils@gnu.org; Thu, 02 Apr 2015 03:35:21 -0400 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.hs.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id t327ZDrQ069628 for ; Thu, 2 Apr 2015 00:35:17 -0700 Message-ID: <551CF131.9050902@tlinx.org> Date: Thu, 02 Apr 2015 00:35:13 -0700 From: "L. A. Walsh" User-Agent: Thunderbird MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) reopen 10468 thanks ============= Not to stir up problems, but those who do not learn from history are doomed to repeat it. Nothing in this re-opening should be taken personally, but am trying to follow-up on a bug that, I felt, was improperly closed, and that now looks like it may be 'touched' or changed by a new fix to 'mv'. The description in the git-coreutils (not yet released) matches symptoms almost exactly as I described over 3 years ago in 'cp'. Since 'cp', 'ln' and 'mv' are closely related, and since 10468/10471 were still unfixed in coreutils 8.21-7.1.3 (from suse 13.1) as that bug 10468 was still unfixed in 8.21-7.1.3 (from OpenSuse 13.1), on linux w/XFS (as was described in this bug's original follow-up), I was wondering if the changes to 'mv' might also have fixed this (10468/10471) bug. As the comment in the NEWS file made no mention of behavior changes to 'cp' or either of these bug #'s being fixed, it wasn't clear if the new work on 'mv' also fixed the similar (if not identical) problems reported against 'cp'. From the NEWS file in the *current* coreutils git: mv no longer supports moving a file to a hardlink, instead issuing an error. The implementation was susceptible to races in the presence of multiple mv instances, which could result in both hardlinks being deleted. Also on case insensitive file systems like HFS, mv would just remove a hardlinked 'file' if called like `mv file File`. The feature was added in coreutils-5.0.1. Please note, as reported below that this problem was reported in behavior of "cp -au" over 3 years ago and was shut out as being a cygwin-only bug. I told the maintainer (at that time) how to reproduce it on linux & XFS. Last I checked, ~6 months ago, it was still present on linux w/XFS as I'd described). I was told to "trust the coreutils maintainers"(1) in the closing of what I thought was a serious bug" -- even though also said it could be reproduced on linux-only w/XFS (as it was among the 1st with an ignore case option). Nevertheless, the bug was dropped in a crack as I said would happen if the bug was 'closed out' as 'not-a-bug'. I tried to emphasize the increasing impact of this bug as more file systems implemented case-preservation+insensitivity (ZFS and MacOS's FS, can also be added to the group having such an option). (1) -------- Original Message -------- Subject: Re: bug#10471: closed (Severe or critical - deletes existing files and leaves nothing. (cp)) Date: Mon, 09 Jan 2012 20:59:36 -0500 From: Glenn I'm saying you should trust the coreutils maintainers to reach the right decision. Anyway, this mailing list is for technical issues with debbugs.gnu.org. It's not the place to discuss how the various projects that use it choose to do so. ------------------- Given the comment in the NEWS file -- that the behavior change was in 'mv', I'm wondering if this was also fixes the same problem in 'cp' or if that is still in the "closed-in-coreutils-as-a-cygwin-bug" category. Below is the original bug that shows examples of the upper and lower case hard-linked filenames causing mutually assured destruction (with 'cp' both w+w/o preserve-links & update) -- which I thought (and still do think) was worse than the 'mv' case because of the "-u" flag -- which I thought (at that time) meant only update those files that were newer or didn't exist on the target. But it didn't: I had 'Aaa' (v2) on source, and something like 'Aaa' (v1) <=> 'aaa' (v1) on the destination (the ' (v1)'/' (v2)' not being part of the name, but to indicate relative time stamps). It appeared (or one explanation was), that: 1) src(Aaa) removed the linked 'aaa' and 'Aaa' files at dst & copied (Aaa) 2) src then tried to link 'aaa'->'Aaa' on dst, but at link time, both copies at the dst were deleted so we saw msg 'cannot create hard link: ENOENT. Result) -- both copies of the older file deleted on the dst. i There may have been some variations on this, I'm not familiar with the exact algorithm used at the time. I noted, however that in the NEWS file under bug fixes, in the new coreutils that had recently made it to cygwin (release 8.13 (2011-09-08) (...cont...) cp -u -p would fail to preserve one hard link for each up-to-date copy of a src-hard-linked name in the destination tree. I.e., if s/a and s/b are hard-linked and dst/s/a is up to date, "cp -up s dst" would copy s/b to dst/s/b rather than simply linking dst/s/b to dst/s/a. ...and I suggested that this new bug might be related to that. Regardless. It was closed out and fell into the cracks. Now a related bug in 'mv' (which shares much code with cp, I believe), is reported as being 'fixed'... So I'm wondering if the bug I reported was fixed as a result of this, or if it is still there, or what? Original bug response and a response about categorizing this bug as a windows-only bug, being 'impractical' to look at in coreutils and having near zero chance of being fixed via coreutils, attached below. I included it for reference, since I was overruled, at the time by those who thought the bug was *only in cygwin* (even though I did claim in followup discussion that it could also be reproduced on linux w/XFS using its '-n version=ci' mkfs option. It can probably also be reproduced, now, on ZFS and some MacOS FS's that have similar case-treatment options. Cheers -- and still wondering if the 8.13 change was related to this bug and if the new 'mv' behavior change affects this 'cp' bug? -- Linda Walsh -------- Original Message -------- Subject: Re: bug#10468: BUG: Severe or critical - -------- deletes existing files and leaves nothing. (cp) Date: Mon, 09 Jan 2012 14:41:22 -0700 From: Eric Organization: Red Hat To: Linda CC: 10468-debbugs-gnu-org, "cygwin" References: <4F0B59EF.7080204@tlinx.org> tag 10468 notabug thanks On 01/09/2012 02:19 PM, Linda, wrote: > > > I was trying to copy a font dir from a unix to a windows machine. > > Problem is there are duplicates -- where only the case differs... The problem is not in coreutils, but in your operating system's limitations, and in your configuration. Windows (and thus Cygwin) can be put in a mode where it preserves case (and I highly recommend doing so if you want your example to work): http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive Without that setting, there is nothing that coreutils can do on your behalf: the default case-insensitive behavior of Windows violates POSIX, and forcing coreutils to add bloat to work around this violation is rather difficult and unpalatable compared to all other operating systems that already follow POSIX. So I am closing the upstream coreutils bug report. There may be a way to make the cygwin port of coreutils smarter about case-sensitive issues when the Windows setting is case-insensitive, but it would be specific to the cygwin port. Meanwhile, I'm not convinced it is worth slowing down the common case by checking for case clash on all operations, since most users that either avoid case clash or have the registry setting on, just to help out the rare case of a user that has case clash but the registry setting off. You are more than welcome to discuss this further on the cygwin list, and preferably provide patches if you want behavior changed, but again, that would most likely be cygwin-specific and does not need to involve the upstream coreutils list (the cygwin port of coreutils already carries several other patches for dealing with non-POSIX issues that don't need to be ported back upstream, such as how to handle .exe suffixes). > > cp -rvu /usr/share/fonts> cp -rvu //bliss/usr_share/fonts/. . > > figuring without the "-a" it wouldn't try to force linking, thus no > prob... ... well... > removed `././OTF/AJensonPro-Bold.otf' > cp: cannot create hard link `././OTF/AJensonPro-Bold.otf' to > `././OTF/ajensonpro-bold.otf': No such file or directory > removed `././OTF/AJensonPro-BoldCapt.otf' > cp: cannot create hard link `././OTF/AJensonPro-BoldCapt.otf' to > `././OTF/ajensonpro-boldcapt.otf': No such file or directory > removed `././OTF/AJensonPro-BoldDisp.otf' > ------ > ?!!?! Why is it trying to create hard links again? I didn't specify > preserve links!?! > (i.e. this is a cp BUG...) If I understand correctly, your problem stems from the fact that your source location has multiple hard links to the same file but with different case, while your destination can't support two hard links to the same file differing only in case, so there is no sane way to say which of the two spellings should be copied. It's not cp's fault that you are copying from a permissive system to a restrictive one; and while the errors may not be the most friendly, at least they are accurate. -------- Original Message -------- Subject: Re: bug#10468: BUG: Severe or critical - -------- deletes existing files and leaves nothing. (cp) Date: Mon, 09 Jan 2012 17:15:26 -0800 From: Paul Organization: UCLA Computer Science Department To: debbugs-gnu-org, tlinx-org On 01/09/12 17:00, Linda Walsh wrote: > cp is a gnu util, not part of linux, -- you should > demonstrate that it is not a bug in cygwin This is not a practical division of labor. As a general rule, we don't have the resources to deal with Windows ports. I suggest raising this issue with the people who are actually doing the Windows port, whoever they are. If it's a problem with the port, they can fix it themselves without putting further load on us; if not, they'll have a better chance to diagnose and fix the problem than we will (our chance is essentially zero). From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 Apr 2015 04:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: "L. A. Walsh" , 10471@debbugs.gnu.org Received: via spool by 10471-submit@debbugs.gnu.org id=B10471.14280340756447 (code B ref 10471); Fri, 03 Apr 2015 04:08:01 +0000 Received: (at 10471) by debbugs.gnu.org; 3 Apr 2015 04:07:55 +0000 Received: from localhost ([127.0.0.1]:43571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ydste-0001fv-RR for submit@debbugs.gnu.org; Fri, 03 Apr 2015 00:07:55 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:57501) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ydstc-0001fd-2v for 10471@debbugs.gnu.org; Fri, 03 Apr 2015 00:07:52 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 21325A60020; Thu, 2 Apr 2015 21:07:46 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yfazk5YZ2g28; Thu, 2 Apr 2015 21:07:45 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id F3794A6001E; Thu, 2 Apr 2015 21:07:44 -0700 (PDT) Message-ID: <551E1210.3080307@cs.ucla.edu> Date: Thu, 02 Apr 2015 21:07:44 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: <4F0B8245.2090207@tlinx.org> <551CF131.9050902@tlinx.org> In-Reply-To: <551CF131.9050902@tlinx.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) L. A. Walsh wrote: > I was wondering if the changes to 'mv' might also have fixed this > (10468/10471) bug. Haven't a clue. Why don't you try the bleeding-edge version of coreutils and see? Presumably you have the oddball file system in question available, and can easily try it out. (I don't have it, and I don't expect other maintainers to have it either.) From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) Resent-From: "L. A. Walsh" Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 09 Apr 2015 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: Paul Eggert Cc: 10471@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10471@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.142861788128607 (code B ref -1); Thu, 09 Apr 2015 22:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Apr 2015 22:18:01 +0000 Received: from localhost ([127.0.0.1]:51554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgKls-0007RK-8z for submit@debbugs.gnu.org; Thu, 09 Apr 2015 18:18:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41061) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgKlq-0007R6-0w for submit@debbugs.gnu.org; Thu, 09 Apr 2015 18:17:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgKlj-0008LU-Mh for submit@debbugs.gnu.org; Thu, 09 Apr 2015 18:17:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgKlj-0008LQ-KT for submit@debbugs.gnu.org; Thu, 09 Apr 2015 18:17:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgKli-0005eO-HR for bug-coreutils@gnu.org; Thu, 09 Apr 2015 18:17:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgKlf-0008Ki-8d for bug-coreutils@gnu.org; Thu, 09 Apr 2015 18:17:50 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:39725 helo=Ishtar.hs.tlinx.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgKle-0008KE-W5 for bug-coreutils@gnu.org; Thu, 09 Apr 2015 18:17:47 -0400 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.hs.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id t39MHOgN032341; Thu, 9 Apr 2015 15:17:28 -0700 Message-ID: <5526FA74.3060103@tlinx.org> Date: Thu, 09 Apr 2015 15:17:24 -0700 From: "L. A. Walsh" User-Agent: Thunderbird MIME-Version: 1.0 References: <4F0B8245.2090207@tlinx.org> <551CF131.9050902@tlinx.org> <551E1210.3080307@cs.ucla.edu> In-Reply-To: <551E1210.3080307@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Paul Eggert wrote: > L. A. Walsh wrote: >> I was wondering if the changes to 'mv' might also have fixed this >> (10468/10471) bug. > > Haven't a clue. Why don't you try the bleeding-edge version of > coreutils and see? Presumably you have the oddball file system in > question available, and can easily try it out. (I don't have it, and I > don't expect other maintainers to have it either.) ---- How was the bug with 'mv' fixed? -- it mentions duplicating it on on HFS (MacOS) that also has a case insensitive option. Specifically, a "mv file File" (where both were hard linked) the mv operation would result in 'file' being removed. As far as developers not having access to HFS(I seem to remember reading that case insensitivity was the default now on MacOS), Solaris or BSD(ZFS-- don't know its default status), Windows(NTFS - is default), Linux(xfs -- not a default config) -- what OS's do developers work with? Seems like it is reproducible on MacOS, linux, Solaris and Windows -- but was closed out because the claim was such file systems were "oddball" but HFS, NTFS are default FS's, and ZFS and XFS don't seem that rare on Solaris, BSD or linux... In my case, instead of 'mv', it was a 'cp' w/ -a or --preserve-hardlinks that triggered the problem, _including_ in the presence of "-u" (which I thought should have been non-destructive (i.e. not deleting linked files if only 1 of the names on the source was 'newer' (and not hardlinked)). Seems like "race" conditions w/hardlinked files (especially on case-ignoring filesystems) and/or w/update look like they haven't really been strongly thought out. My issue here is that I reported the problem 3 years ago and it got ignored because some thought it was windows+cygwin+NTFS only, (even though at the time I pointed out it could be dupped on linux w/xfs). But the bug still got ignored -- where as now it is being seen on HFS (and can likely be seen on ZFS from what (I've been told). Given the number of file systems and OS's the behavior can be reproduced on -- are you still claiming all of those OS's+FS's are the "oddball case" -- they seem to be growing (i.e. case ins. was added to HFS and ZFS) since I first found the problem on NTFS and claimed it also applied to XFS. I will easily accept that resources are such that it is a low priority (as I said 3 years ago), but it is a bit galling to have removal of needed features from 'rm' taking precedence over data-loss cases. From unknown Sun Jun 22 17:16:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10471: Severe or critical - deletes existing files and leaves nothing. (cp) Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 10 Apr 2015 05:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10471 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: "L. A. Walsh" Cc: 10471@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 10471@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14286453828111 (code B ref -1); Fri, 10 Apr 2015 05:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Apr 2015 05:56:22 +0000 Received: from localhost ([127.0.0.1]:51700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgRvR-00026k-E0 for submit@debbugs.gnu.org; Fri, 10 Apr 2015 01:56:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45027) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgRvP-00026K-PI for submit@debbugs.gnu.org; Fri, 10 Apr 2015 01:56:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgRvJ-0002FO-KL for submit@debbugs.gnu.org; Fri, 10 Apr 2015 01:56:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgRvJ-0002FJ-HL for submit@debbugs.gnu.org; Fri, 10 Apr 2015 01:56:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgRvI-00049R-MM for bug-coreutils@gnu.org; Fri, 10 Apr 2015 01:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgRvE-0002E4-J2 for bug-coreutils@gnu.org; Fri, 10 Apr 2015 01:56:12 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:54327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgRvE-0002Du-D8 for bug-coreutils@gnu.org; Fri, 10 Apr 2015 01:56:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 5F775A60009; Thu, 9 Apr 2015 22:56:07 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GH37dakA8OST; Thu, 9 Apr 2015 22:56:06 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3D981A60007; Thu, 9 Apr 2015 22:56:06 -0700 (PDT) Message-ID: <552765F5.1000408@cs.ucla.edu> Date: Thu, 09 Apr 2015 22:56:05 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 References: <4F0B8245.2090207@tlinx.org> <551CF131.9050902@tlinx.org> <551E1210.3080307@cs.ucla.edu> <5526FA74.3060103@tlinx.org> In-Reply-To: <5526FA74.3060103@tlinx.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) L. A. Walsh wrote: > How was the bug with 'mv' fixed? You should be able to find that out by looking at the Git history. I generally work with ext4 and zfs myself, and I don't observe the bug with any of the file systems I use. I don't know about the other coreutils developers, but I expect that case-insensitive file systems are just as much oddballs for them as they are for me. If the bug bothers you, and if it still exists in the coreutils master version (something that's not at all clear), I urge you to send us a fix for it, as that's most likely going to be the fastest and most reliable way to get the bug fixed.