[MacPorts] #67336: BSD tar can create corrupted archives on Catalina, Big Sur, Monterey, Ventura
MacPorts
noreply at macports.org
Mon Oct 7 14:29:46 UTC 2024
#67336: BSD tar can create corrupted archives on Catalina, Big Sur, Monterey,
Ventura
-------------------------+-------------------------------------------------
Reporter: catap | Owner: (none)
Type: defect | Status: new
Priority: High | Milestone:
Component: base | Version: 2.8.1
Resolution: | Keywords: catalina, bigsur, monterey,
Port: | ventura, sonoma, sequoia
-------------------------+-------------------------------------------------
Comment (by jmroot):
Replying to [comment:38 jmroot]:
> * fsync on the files
> * fcntl F_FULLFSYNC
> * fcntl F_NOCACHE
Well, those don't help, but it seems that cloning the file does. You don't
even have to use the clone, just creating it also fixes the original.
The way libarchive find holes is by using `lseek` with `SEEK_HOLE` and
`SEEK_DATA`, and those are giving wrong results initially, saying that
there is a hole starting at 0 and the first data is at position 6291456
out of 7865736. After cloning, it changes to say that the first hole is at
position 4096 and the first data is at 0.
--
Ticket URL: <https://trac.macports.org/ticket/67336#comment:44>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list