8.2-PRERELEASE: bsdtar does not recognise xz -z9 compression

Jeremy Chadwick freebsd at jdc.parodius.com
Thu Dec 23 10:30:48 UTC 2010


On Thu, Dec 23, 2010 at 11:15:17AM +0200, Alex Kozlov wrote:
> Hi, stable
> 
> Can anyone reproduce this?
> 
> $uname
> FreeBSD 8.2-PRERELEASE #0: Thu Dec 23 10:11:09 i386
> $cd /tmp
> $dd if=/dev/random of=junk bs=1024 count=1
> 1+0 records in
> 1+0 records out
> 1024 bytes transferred in 0.000077 secs (13297112 bytes/sec)
> $tar cvf junk.tar junk
> a junk
> $xz -z9ck junk.tar >junk-z9.tar.xz
> $xz -ck junk.tar >junk.tar.xz
> $file junk.tar.xz junk-z9.tar.xz
> junk.tar.xz:    XZ compressed data
> junk-z9.tar.xz: XZ compressed data
> $tar tvf junk.tar.xz
> -rw-r--r--  0 kozlov kozlov  1024 Dec 23 10:52 junk
> $tar tvf junk-z9.tar.xz
> tar: Unrecognized archive format
> tar: Error exit delayed from previous errors.
> $xzcat junk.tar.xz>1
> $xzcat junk-z9.tar.xz>2
> $md5 -r junk.tar 1 2
> d2f8de384f6dc1b3969c76ce7fe6ff00 junk.tar
> d2f8de384f6dc1b3969c76ce7fe6ff00 1
> d2f8de384f6dc1b3969c76ce7fe6ff00 2

I can reproduce this problem on RELENG_8 dated November 27th, with
libarchive.so.5 confirmed to be linked to liblzma.so.5.

The problem happens with any xz compression level 7 or higher.
Verification:

$ for i in {1..9}; do echo "==> Testing compression level $i" ; rm -f junk* ; dd if=/dev/random of=junk bs=1024 count=1 2>/dev/null ; tar cf junk.tar junk ; xz -z$i -ck junk.tar > junk.tar.xz ; file -z junk.tar.xz ; tar tvf junk.tar.xz ; echo ; done
==> Testing compression level 1
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 2
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 3
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 4
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 5
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 6
junk.tar.xz: POSIX tar archive (XZ compressed data)
-rw-------  0 jdc    users    1024 23 Dec 02:30 junk

==> Testing compression level 7
junk.tar.xz: POSIX tar archive (XZ compressed data)
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

==> Testing compression level 8
junk.tar.xz: POSIX tar archive (XZ compressed data)
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

==> Testing compression level 9
junk.tar.xz: POSIX tar archive (XZ compressed data)
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.               PGP 4BD6C0CB |



More information about the freebsd-stable mailing list