Hi, when I compress (xz) folder with just one small file /mnt/card #tar -cJv -f /akpkg.tar.xz akpkg/* akpkg/sys.conf and then try to decompress, I get this error /mnt/card # tar -t -f /akpkg.tar.xz tar: no gzip/bzip2/xz magic /mnt/card # tar -tJ -f /akpkg.tar.xz tar: corrupted data tar: short read With gzip or pure tar it works fine. Compressed on PC (tar (GNU tar) 1.27.1) and decompressed on busybox works too. /mnt/card # busybox BusyBox v1.22.1 (2014-04-14 14:39:49 CEST) multi-call binary. /mnt/card # uname -a Linux vyroba 3.17.4_cpm9g25 #6 PREEMPT Thu Nov 27 11:06:21 CET 2014 armv5tejl GNU/Linux
Please attach the file which you are trying to compress, and the resulting tar.xz.
Created attachment 5786 [details] xz archive
Created attachment 5792 [details] archived file
(In reply to comment #2) > Created attachment 5786 [details] > xz archive The attached file is not a compressed file. It is an uncompressed tar file. despite its .xz extension
The bug is that creation op was only handling gzip/bzip2. Fixed in git now. Thanks!
(In reply to comment #5) > The bug is that creation op was only handling gzip/bzip2. Fixed in git now. > Thanks! This patch not work, file is zero size: /mnt/card # tar -cJv -f /akpkg.tar.xz akpkg akpkg/ akpkg/sys.conf BusyBox v1.23.0.git (2014-12-12 08:37:33 CET) multi-call binary. Usage: xz -d [-cf] [FILE]... Decompress FILE (or stdin) -d Decompress -c Write to stdout -f Force /mnt/card # ls -l / total 0 -rw-r--r-- 1 root root 0 Dec 12 09:13 akpkg.tar.xz
You need to have a xz compressor installed for that to work. Busybox's "xz" applet only has a decompressor: it will refuse to work without -d option.
(In reply to comment #7) > You need to have a xz compressor installed for that to work. > Busybox's "xz" applet only has a decompressor: it will refuse to work without > -d option. Now it works. Thanks