From nobody Thu Mar 09 09:57:44 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PXPkl2KhSz3wTNh for ; Thu, 9 Mar 2023 09:58:07 +0000 (UTC) (envelope-from gray@nxg.name) Received: from mx2.mythic-beasts.com (mx2.mythic-beasts.com [IPv6:2a00:1098:0:82:1000:0:2:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PXPkl0dt8z4cZF for ; Thu, 9 Mar 2023 09:58:07 +0000 (UTC) (envelope-from gray@nxg.name) Authentication-Results: mx1.freebsd.org; none Received: by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1paD2C-00E7XH-2I; Thu, 09 Mar 2023 09:58:04 +0000 From: Norman Gray To: Matthias Apitz Cc: "Steve O'Hara-Smith" , questions@freebsd.org Subject: Re: problem while moving HOME from FreeBSD to MacOS with bsdtar Date: Thu, 09 Mar 2023 09:57:44 +0000 X-Mailer: MailMate (1.14r5818) Message-ID: <955293F5-2223-48E4-AF7B-FEB63D7FEE13@nxg.name> In-Reply-To: <20230309084125.GA9@sh4-5.1blu.de> References: <20230309081835.afddc78d57a7f25b8f92b9aa@sohara.org> <20230309084125.GA9@sh4-5.1blu.de> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BlackCat-Spam-Score: 0 X-Spam-Status: No, score=-0.1 X-Rspamd-Queue-Id: 4PXPkl0dt8z4cZF X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:44684, ipnet:2a00:1098::/32, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Matthias, hello. On 9 Mar 2023, at 8:41, Matthias Apitz wrote: >> You seem to have the default case insensitive filesystem setup on >> MacOS, you can change it - more details here: >> >> https://support.apple.com/en-ie/guide/disk-utility/dsku19ed921c/mac > > I don't think, that this is the case: As Steve says, APFS is by default set to be case-preserving but case-inse= nsitive (that is, if you create a file 'Homework', it'll always be report= ed with that case, but it's deemed to be the same directory entry as 'HOM= EWORK') If I look at the (APFS) filesystem which contains my $HOME, % diskutil info /dev/disk3s1s1 | grep Personality File System Personality: APFS and a separate filesystem which I've created as case-sensitive (for Nix):= % diskutil info /dev/disk3s8 | grep Personality File System Personality: Case-sensitive APFS > APITZM-1MBPOH:~ apitzm$ touch Homework HOMEWORK Here, you're simply touching the same file twice. > APITZM-1MBPOH:~ apitzm$ ls -l Homework HOMEWORK > -rw-r--r-- 1 apitzm OCLC\Domain Users 0 9 M=C3=A4r 09:37 HOMEWORK > -rw-r--r-- 1 apitzm OCLC\Domain Users 0 9 M=C3=A4r 09:37 Homework Here, you're simply listing the same file twice, and if you add the -i op= tion, you'll see (as Peter Holm points out) that they are in fact the sam= e file. You mention, though, that > APITZM-1MBPOH:~ apitzm$ ls -ld guru/Mail guru/mail > -rw-r--r-- 1 apitzm OCLC\Domain Users 4016 9 Nov 12:36 guru/Mail > -rw-r--r-- 1 apitzm OCLC\Domain Users 4016 9 Nov 12:36 guru/mail > > but that guru/Mail was created as a plain file, why it is in the tar ar= chive a directory. Odd: I can't reproduce that % tar tvf ../t.tar -rw-r--r-- 0 norman wheel 6 9 Mar 09:22 mail drwxr-xr-x 0 norman wheel 0 9 Mar 09:22 Mail/ -rw-r--r-- 0 norman wheel 6 9 Mar 09:22 Mail/hello % tar xf ../t.tar % ls -F Mail/ % rm -Rf Mail % tar tvf ../t2.tar drwxr-xr-x 0 norman wheel 0 9 Mar 09:22 Mail/ -rw-r--r-- 0 norman wheel 6 9 Mar 09:22 Mail/hello -rw-r--r-- 0 norman wheel 6 9 Mar 09:22 mail % tar xf ../t2.tar mail: Can't replace existing directory with non-directory tar: Error exit delayed from previous errors. % ls -F Mail/ % macos% tar --version bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 So, it's expected that you can't have a file 'mail' and a directory 'Mail= ' together, but it's not clear how you've managed to end up with a file '= mail' and no directory. I'm slightly surprised that the first tar xf abo= ve didn't result in an error, and apparently silently replaced file 'mail= ' with directory 'Mail'. Perhaps this is a bsdtar version issue? The t.tar and t2.tar were created on FreeBSD, with freebsd% tar --version bsdtar 3.6.0 - libarchive 3.6.0 zlib/1.2.12 liblzma/5.2.5 bz2lib/1.0.8 li= bzstd/1.4.8 Best wishes, Norman -- = Norman Gray : https://nxg.me.uk