Headers produced by tar task can't be read on BusyBox v1.3.1 which uses the old GNU format ("ustar "). The error message is: tar: invalid number ' 11421' indicating that BusyBox doesn't understand the checksum field. There are also other differences: octal fields are padded with zeros and don't contain a trailing space and devmajor and devminor fields are not filled in at all.
Created attachment 20255 [details] A header from a tarfile produced by BusyBox
Created attachment 20256 [details] A header from a tarfile produced by ant
Created attachment 20257 [details] A proposed patch to Tar.java This is a reverse-engineered compatibility mode to tar task which is activated with an experimental attribute header="oldgnu".
Created attachment 20258 [details] A proposed patch to TarEntry.java
Created attachment 20259 [details] A proposed patch to TarUtils.java
hmmm. It would probably make sense to split this with a a new format value, (format="busybox") rather than a header attribute, as then we'd have to deal with with headers being set for different formats. How well does <untar> handle busybox tar files?
There was an issue with busy box before. http://issues.apache.org/bugzilla/show_bug.cgi?id=40195 I do not know if this is related. I would not think that busybox is the format name to use - the initial description calls it GNU - ustar. Is there a spec for this?
untar as well as Winzip can handle BusyBox tars.
Timo? You mean the <untar> task can handle busybox? Or the untar program? Peter, I did a quick search for busybox+ustar; here's some relevant links http://www.opengroup.org/onlinepubs/009695399/utilities/pax.html#tag_04_100_13_06 http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/docs/tar_pax.txt?rev=17252 .. ustar is a posix format ..incompatiblities between busybox and gnu are known discussion and apparent fix of busybox incompatibilities: http://lists.nongnu.org/archive/html/bug-tar/2004-02/msg00014.html http://lists.debian.org/debian-boot/2004/02/msg01250.html http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872 I'm not sure where those fixes leave us...if recent busybox builds are compatible with gnu/ant files, then I'd be tempted to leave as is. Timo: what happens under busybox 1.5.x?
Sorry, I meant <untar>. I unfortunately don't have any other versions of BusyBox. The version that I have is running in an embedded device, so I'm pretty much stuck with it.
I confirm that this occurs with BusyBox 1.7.1 when the config option CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set. However, if you set CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y, then BusyBox *can* read the Ant 'tar' task-created files. The BusyBox help said that the OLDGNU format is usually not needed, and I think that Ant should stop generating tar files in this obsolete format. But for now, using the config option for "oldgnu" compatibility works around it.
I think Ant's tar task now creates tar archives with less quirks and has been doing so for quite some time. Likely fixed in the 1.8 series of releases.