[MacPorts] #67336: BSD tar can create corrupted archives on Catalina, Big Sur, Monterey, Ventura

MacPorts noreply at macports.org
Fri Oct 4 19:07:08 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 ryandesign):

 To reiterate: The files are correct on disk. For a time after the file is
 created, the disk cache erroneously tells anyone who asks that the file
 contains holes where it does not contain holes anymore. BSD tar uses this
 information to skip those areas of the file when archiving, so the file is
 corrupted at the time of archiving; nothing can be done at extract time to
 recover the missing information. BSD tar has no option to tell it not to
 do this until version 3.6.0 and even macOS 15 does not yet include a
 version that new. GNU tar can also do this and experiences the same
 problem if told to do so but does not do so by default. Clearing the disk
 cache works around the problem but can only be done as root.

 I didn't know about tcllib's tar module. The [https://wiki.tcl-
 lang.org/page/Tcllib+tar page I found about it] doesn't say much. If it
 can create archives that do not attempt to represent files sparsely, then
 using it instead of the system's tar to create archives would work around
 the problem.

-- 
Ticket URL: <https://trac.macports.org/ticket/67336#comment:37>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list