[Toybox] tar x broken with (some) sparse files
enh
enh at google.com
Tue Sep 10 14:13:34 PDT 2019
haven't had time to investigate yet, but the the .tar.bz2 file at
https://android.googlesource.com/platform/system/update_engine/+/refs/heads/master/sample_images/
is interpreted differently by GNU tar and toybox tar. here's tvf:
$ tar tvf sample_images.tar.bz2
-rw-r----- ahassani/eng 1048576 2017-09-28 10:36 disk_ext2_1k.img
-rw-r----- ahassani/eng 4194304 2017-09-28 10:36 disk_ext2_4k.img
-rw-r----- ahassani/eng 4194304 2017-09-28 10:36 disk_ext2_4k_empty.img
-rw-r----- ahassani/eng 4194304 2017-09-28 10:37 disk_ext2_unittest.img
-rw-r----- ahassani/eng 4096 2017-09-28 10:37 disk_sqfs_empty.img
-rw-r----- ahassani/eng 4096 2017-09-28 10:37 disk_sqfs_default.img
$ toybox tar tvf sample_images.tar.bz2
-rw-r----- ahassani/eng 41472 2017-09-28 10:36 disk_ext2_1k.img
-rw-r----- ahassani/eng 41472 2017-09-28 10:36 disk_ext2_4k.img
-rw-r----- ahassani/eng 13312 2017-09-28 10:36 disk_ext2_4k_empty.img
-rw-r----- ahassani/eng 20992 2017-09-28 10:37 disk_ext2_unittest.img
-rw-r----- ahassani/eng 4096 2017-09-28 10:37 disk_sqfs_empty.img
-rw-r----- ahassani/eng 4096 2017-09-28 10:37 disk_sqfs_default.img
and here's xvf (toybox only this time, since GNU tar is consistent):
-rw-r----- 1 enh primarygroup 1048064 2017-09-28 10:36 disk_ext2_1k.img
-rw-r----- 1 enh primarygroup 2130432 2017-09-28 10:36 disk_ext2_4k.img
-rw-r----- 1 enh primarygroup 164352 2017-09-28 10:36 disk_ext2_4k_empty.img
-rw-r----- 1 enh primarygroup 2114048 2017-09-28 10:37 disk_ext2_unittest.img
-rw-r----- 1 enh primarygroup 4096 2017-09-28 10:37 disk_sqfs_default.img
-rw-r----- 1 enh primarygroup 4096 2017-09-28 10:37 disk_sqfs_empty.img
md5sum says that the last two files are actually correct, but
(obviously) the first four aren't even the right length. (and
interestingly, toybox tar tvf and toybox tar xvf disagree about the
lengths, even though they're _both_ wrong :-) )
that's all i have for now, but i thought i'd pass it on anyway...
More information about the Toybox
mailing list