GNU bug report logs - #51857
cross-filesystem copying broken on macOS with coreutils >= 9.0

Previous Next

Package: coreutils;

Reported by: Sudhip Nashi <sudhipnashi <at> icloud.com>

Date: Mon, 15 Nov 2021 05:02:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sudhip Nashi <sudhipnashi <at> icloud.com>
Cc: 51857 <at> debbugs.gnu.org, Gnulib bugs <bug-gnulib <at> gnu.org>, Cameron Katri <me <at> cameronkatri.com>, Pádraig Brady <P <at> draigbrady.com>
Subject: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0
Date: Mon, 15 Nov 2021 23:31:11 -0800
[Message part 1 (text/plain, inline)]
On 11/15/21 19:14, Sudhip Nashi wrote:
> lseek(0x3, 0x0, 0x3)		 = -1 Err#6

Oh my, it appears lseek (fd, 0, SEEK_HOLE) is failing with errno == 
ENXIO when the file has no holes, even though the Darwin man page 
clearly states that lseek should return the file size in that case (see 
<https://github.com/apple/darwin-xnu/blob/main/bsd/man/man2/lseek.2>). 
So, not only does macOS lseek disagree with all other implementations, 
it even disagrees with the Darwin documentation.

To work around this macOS problem I installed the attached further patch 
into Gnulib and propagated it into coreutils. Please try the latest 
coreutils version on Savannah, or you can simply run configure+make from 
the tarball that is temporarily at:

https://web.cs.ucla.edu/~eggert/coreutils-9.0.28-6d0f0.tar.gz
[0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.