FreeBSD tar errors on valid empty tar.gz

Sean Winn sean at gothic.net.au
Thu Jan 10 18:43:04 PST 2008


On 11/01/2008, at 11:47 AM, Chuck Swiger wrote:

> On Jan 10, 2008, at 4:41 PM, Kris Kennaway wrote:
>>> Not that I'm aware of. gtar works but libarchive tar fails on
>>> the file it created.
>>
>> Yes, in 6.2.  What about the report that it works in 6.3?
>
>
> Indeed.  Trying to create a tarball using a non-existent list of  
> files returns an error and generates a 0-byte tgz; as previously  
> shown, BSD tar in 6.3 treats that as an empty archive, which seems  
> reasonable, whereas gtar feeds it to gzip which generates an error:
>
> 20% tar cvzf test.tar.gz --files-from empty
> tar: Couldn't open empty: No such file or directory
> 21% ls -l test.tar.gz
> -rw-r--r--  1 chuck  chuck  0 Jan 10 19:42 test.tar.gz
> 22% tar tvzf test.tar.gz
> 23% gtar tvzf test.tar.gz
> gzip: (stdin): unexpected end of file
> gtar: Child returned status 1
> gtar: Error exit delayed from previous errors
>

Actually, that's slightly different to the problem, in that its  
creating a 0 byte tar file (which was always OK)

However, the 'empty' file is fine in 6.3 as well

13:19 Fri 11-Jan sean at visi [~] tar czf test.tgz --files-from /dev/null
13:19 Fri 11-Jan sean at visi [~] tar tvzf test.tgz
13:19 Fri 11-Jan sean at visi [~] uname -msr
FreeBSD 6.3-RC2 i386
13:19 Fri 11-Jan sean at visi [~] ls -l test.tgz
-rw-r--r--    1 sean     sean           45 Jan 11 13:19 test.tgz


> Regards,
> -- 
> -Chuck
>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable- 
> unsubscribe at freebsd.org"
>



More information about the freebsd-stable mailing list