Improve handling of Rockridge extensions' rr_moved directory and
following sub directories.
Add corresponding test.
Unfortunately, some tests need tweaks due to difference of ordering of
hardlink files(which have the same offset); it's characteristic of heap.
Split a part of reading subdirectories from
archive_read_format_iso9660_read_header function.
This is preparation of support RRIP "CL" and "RE" extensions
for proper handling of "rr_moved" directory.
Fix a bug; reading extensions recorded by SUSP CE extension
did not work and sometimes stole file contents.
Add test for this case.
libarchive 2.7.* have had these following bugs.
1. When length of symlink name is longer than about 70,
it cannot get modify/access times recorded by "TF" extension
and maybe next file is stolen a part of its contents by
that process.
2. When length of file name is longer than about 80,
it cannot get modify/access times recorded by "TF" extension
and maybe it's stolen a part of its contents by that process.
3. When length of file name is longer than about 100,
it cannot get file mode, user id and group id recorded by "PX"
extension and as above.
4. When length of file name is longer than about 142,
it gets wrong file name(shorter name) and as above.
Condition of stealing file contents:
if file->offset - iso9660->current_position < file->ce_size
in next_entry_seek function, that process consumed file contents
of which were data of extensions.
That process read wrong data whether that process consumed file
contents or not.
RRIP "RR" extension is obsolete; it appeared only early version of
RRIP standard. Do not use it for seenRockridge flag. Use other
RRIP extensions instead.
The 5th parameter of RRIP "PX" extension is not inode.
RRIP Standrd says that parameter, FILE SERIAL NUMBER, shall have the same
meaning as and may be used for the st_ino field of POSIX:5.6.1.
It can treat as inode but not value of inode of directories or files.
According to SUSP Stnadrd, SUSP "SP" extension must be recorded
in the root directory entry, so it has to be checked only once
and then disable all SUSP processing if not found.
Split a test mixed Joliet and Rock Ridge from test_read_format_isojoliet_bz2.c
and fix script that describes how to make test data for that test.
Remove test_read_format_isojolietrr_bz2.iso.bz2.uu which was wrong data;
access time of hardlinke file wasn't changed by touch command.
Add new test data test_read_format_isojoliet_rr.iso.bz2.uu instead.
Improve mixed Joliet and Rock Ridge extentions.
We can get uid,gid and other attributes which is recorded by Rock Ridge
extentions whether Joliet extentions recorded or not.
Fix reading the root directory; it did not read Rock Ridge extentions
of the one.
Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes)
from 64 UCS2 characters(103 bytes). mkisofs can record that longer
Joliet names by their option -joliet-long.
Tim Kientzle [Thu, 1 Oct 2009 03:49:04 +0000 (23:49 -0400)]
Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix.
This does not (yet) implement the policies regarding path separators
that were recently hashed out on the libarchive-discuss mailing list.
Old mkisofs made wrong "SL" System User Entries of RRIP for
symbolic files.
New test iso image is made by latest mkisofs that bug is fixed.
Keep previous test data and Its test code because we need
to check that libarchive can handle that wrong iso images.
Tim Kientzle [Sat, 26 Sep 2009 18:02:14 +0000 (14:02 -0400)]
Rework how filenames get generated so I can spend less time
counting characters to try to make sense of failures.
Putting the sample filenames in a generated array removes a lot
of confusing code from the validation logic.
Tim Kientzle [Thu, 24 Sep 2009 15:16:11 +0000 (11:16 -0400)]
New Windows-only support to populate an archive entry from
a BY_HANDLE_FILE_INFORMATION structure (which is really
the Windows version of "struct stat").
Tim Kientzle [Thu, 24 Sep 2009 15:11:32 +0000 (11:11 -0400)]
Fix tar archiving of hardlinks on Windows: tree.c uses
Windows stat() call which doesn't actually provide
link count or inode values. Passing this data down into
libarchive (to avoid redundant stat() calls) meant that
hardlink detection simply failed on Windows. Until
I can work up something better, this simply avoids passing
stat() data from tree down into libarchive on Windows.
This allows libarchive to do the GetFileInfoByHandle
which provides useful information.
Tim Kientzle [Thu, 24 Sep 2009 15:06:56 +0000 (11:06 -0400)]
Use int64_t for storing inode values internally.
This fixes some hardlink-detection issues on Windows: NTFS uses 64-bit inode values, but Windows ino_t is only 16 bits.
Tim Kientzle [Mon, 14 Sep 2009 04:38:40 +0000 (00:38 -0400)]
Various fixes to symlink-related tests:
* canSymlink() is no longer hardwired to always return false
* cpio/test/test_gcpio_compat now has symlink-free test archives
for use on platforms that lack symlink support
* several other tests have slightly finer-grained avoidance of
checks that rely on symlink support
Tim Kientzle [Sat, 12 Sep 2009 18:08:48 +0000 (14:08 -0400)]
Merge cpio test refactorings into tar and libarchive test harnesses,
apply a few minor reorgs to further reduce diffs among the test
harnesses, update a bunch of tests to match the harness changes,
update some comments, rewrite the gzip/gunzip platform probes to the
new "canFoo()" style, sprinkle a few new symlink support checks. This
hasn't been tested on Windows yet, but should chip away a few more
test failures there.
Tim Kientzle [Sat, 12 Sep 2009 05:24:28 +0000 (01:24 -0400)]
Refactor hardlink/symlink support in test harness: we now have
assertIsHardlink() and assertIsNotHardlink(). On the symlink side,
I've added a run-time platform probe canSymlink() that tests the
local platform the first time it is called and remembers the result.
As an experiment, refactor test_basic.c to omit symlinks from the
tests if the current platform lacks symlink support.
Tim Kientzle [Fri, 11 Sep 2009 05:28:37 +0000 (01:28 -0400)]
Real hardlink detection on Windows (yes, Windows stat() really does seem to be that broken!). Also, expose the core hardlink test as a non-assertion so we can assert it false.
In particular, this fixes test_option_l on Windows.