On Wed, Feb 29, 2012 at 9:03 PM, Lauri Kasanen <[email protected]> wrote: >> > The attached patch adds support for .txz and .tlzma tar archives. For >> > .txz the proper way would be to add the magic detection >> >> The autodetection should already work, see archival/tar.c: > > Using git master: > > $ ./busybox tar tvf /tmp/test.txz > tar: invalid tar magic > > Renaming the file to .tar.xz lets bb tar read it. > >> I am not convinced .txz and .tlzma extensions are common. >> (In my opinion, existence of .tgz extension was a mistake). > > They exist, and GNU tar handles them, so I think bb tar shouldn't puke > when it sees one. Busybox does handle .tgz and .tbz2, because they have > the magic detection already written (xz magic is marked todo in > archival/libarchive/get_header_tar.c).
I consolidated several copies of autodetection code. One in get_header_tar.c is gone. Now tar recognizes XZ-compressed data using generic setup_unzip_on_fd(). I added a testsuite entry which verifies that. Please try current git. Please also review last ~5 commits, maybe I added a few bugs :( -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
