On Tue, Sep 22, 2009 at 11:55:54PM -0400, Peter Renzland wrote: >On 09 Sep 20, at 19:31 , Denys Vlasenko wrote: >On Sunday 20 September 2009 23:51, Peter Renzland wrote: >>>It appears ironic that Snow Leopard, "The World's most advanced OS", >>>has switched to the POSIX tar format, which according to BusyBox >>>terminology requires "OLDGNU_COMPATIBILITY". >> >>I do not think that POSIX says that there must be trailing space in >>those fields. > >It appears that POSIX did say that there *may* be terminating spaces >(or NULL characters). >From the NetBSD manual page for tar(5): > > POSIX requires numeric fields to be zero-padded in > the front, and allows them to be terminated with either space or >NUL > characters. > >>It's more likely that whoever was implementing tar >>for Snow Leopard just "reused" code from some oldish tar >>which was creating such fields, without much thinking why >>this old code does that, and whether it makes sense >>to continue to do that. > >Since there is no longer a current POSIX tar standard, perhaps it >might make sense to create a Busybox term:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/tar.h.html and http://www.opengroup.org/onlinepubs/9699919799/utilities/pax.html >From the latter: ---8<--- Each field within the header logical record is contiguous; that is, there is no padding used. Each character on the archive medium shall be stored contiguously. The fields magic, uname, and gname are character strings each terminated by a NUL character. The fields name, linkname, and prefix are NUL-terminated character strings except when all characters in the array contain non-NUL characters including the last character. The version field is two octets containing the characters "00" (zero-zero). The typeflag contains a single character. All other fields are leading zero-filled octal numbers using digits from the ISO/IEC 646:1991 standard IRV. Each numeric field is terminated by one or more <space> or NUL characters. ---8<--- > >"NEW APPLE COMPATIBILITY" which is equivalent to "OLDGNU COMPATIBILITY". _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
