[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR impl
From: |
Kent Boortz |
Subject: |
Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations |
Date: |
Mon, 21 Dec 2009 02:17:00 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) |
Hi,
I see where I go wrong now, confirmed by Tim's note "Each file system
object requires a header record which stores basic metadata (pathname,
owner, permissions, etc.) and zero or more records containing any file
data.".
I didn't think about the directories, that if storing
aaaaa/bbbbb/ccccc
this requires three blocks (yes, saw that but didn't think about what
it means to the limitations).
aaaaa/
aaaaa/bbbbb/
aaaaa/bbbbb/ccccc
And with some USTAR readers assuming the "name" field can't be empty,
this makes the limitations much worse than the current GNU tar
implementation of the USTAR standard. I now also understand your
hesitation to make this change the default, as it limits USTAR quite a
bit to be compatible with Solaris TAR and others. On the other hand I
understand your argument that those specifying --format=ustar likely
are after compatibility with legacy USTAR implementations.
So with the restriction that the "name" field is not to be empty, no
component of the path can be more than 100 characters, and a directory
part can't be more than 99 characters excluding the ending slash.
I adjusted my test case to cover the more limited legacy use of the
standard, and added one run with my own patch on GNU tar. My patch is
a bit verbose and likely overdoing it (I'm not working as a developer,
I'm a build guy), but anyway, it is there as a reference and for these
particular tests it makes GNU tar compatible with Sun tar.
There are likely many bugs in my split code, one I know of is that it
will allocate a header even if the function returns NULL. And the
actual split loop is ugly, I hate those add and subtract from the
index.
I also dump the header "name" and "prefix" from the resulting TAR
files into the test log, where it can be seen that GNU tar (even with
your earlier patch) still split in an unfortunate way if trying to be
compatible with Solaris TAR and others. What happens is that the
"name" field sometimes still becomes empty,
kent
TARERR3.gz
Description: Binary data
ustartest
Description: Binary data
gnutar-split.c
Description: Binary data
--
Kent Boortz, Senior Production Engineer
Sun Microsystems Inc., the MySQL team
Office: +46 863 11 363
Mobile: +46 70 279 11 71
- [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/17
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Sergey Poznyakoff, 2009/12/18
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/19
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Tim Kientzle, 2009/12/19
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Sergey Poznyakoff, 2009/12/19
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/19
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Sergey Poznyakoff, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Sergey Poznyakoff, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations,
Kent Boortz <=
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/21
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Tim Kientzle, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/21
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Dr. David Kirkby, 2009/12/19
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Tim Kientzle, 2009/12/20
- Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations, Kent Boortz, 2009/12/20