bsdtar can't handle files >8GB

Tim Kientzle kientzle at freebsd.org
Tue Oct 23 03:37:19 PDT 2007


Josh Carroll wrote:
>>tar: Unrecognized archive format: Inappropriate file type or format
>>tar: Error exit delayed from previous errors.
> 
> Confirmed in RELENG_7 as well. Interestingly enough, if the file
> inside the tarball is nothing but zeros (dd if=/dev/zero ...), I don't
> get this error.  However, it doesn't work either. The resulting file
> is 0 bytes, rather than 10 GB of \0.

Try the attached patch, which I think fixes this
problem.

I need to do some more testing before I commit it,
but your feedback will certainly help.  The failure
here is that libarchive was erroneously interpreting
the large file as having a zero-byte body, then generating
the error above when it tried to read the next header.

This bug crept in when I was working on read support
for GNU tar's new --pax --sparse format.  I need to
test that in the case where a sparse entry has more than
8G of non-hole data.

Tim Kientzle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: archive_tar_largefile.patch
Type: text/x-patch
Size: 1966 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071023/279ca014/archive_tar_largefile.bin


More information about the freebsd-current mailing list