Tim Kientzle [Sun, 11 Sep 2011 18:29:59 +0000 (14:29 -0400)]
Correctly test the times on the very old files in the sample mtree.
Because time_t varies across platforms (32-bit, 64-bit, signed, and
unsigned), we can't just hard-code the expected value here, but we can
verify the that value returned is the oldest possible time_t value for
this platform.
Fix issue 174.
Correctly handle Windows style full-path names, which are
leading \\.\ or \\?\ or \\?\\UNC\ or \\?\Volume{GUID}\ or C:\,
in archive_write_disk_windows.c.
Check if the platform really supports crypto functions at the mtree writer
even if ARCHIVE_HAS_SHA* macros are defined, since Windows XP and earlier version
do not support some cyrpto functions.
Avoid test_archive_sha384 and test_archive_sha512 failures on Windows XP, which does not
support both SHA384 and SHA512. We can only know that fact when that running time. And so
we should not depend on the compile conditions of crypto functions at our test suite.
Andres Mejia [Mon, 5 Sep 2011 17:09:06 +0000 (13:09 -0400)]
Add support for RAR archives generated from BeOS machines.
I'm assuming RAR archives from BeOS use POSIX file attributes, based on looking
around in the Haiku distribution. I could not find or generate any RAR archives
from a BeOS/Haiku machine.
Andres Mejia [Mon, 5 Sep 2011 16:22:28 +0000 (12:22 -0400)]
Enable support for RAR files generated from MS-DOS and OS/2.
Because file attributes in MS-DOS, OS/2, and Windows are similar, I am assuming
RAR archives generated from these three systems will use the same attributes. I
could not find or generate any test RAR archives for these cases.
Rename lzx_br_read_ahead to lzx_br_read_ahead_0, and also rename
lzx_br_ensure to lzx_br_read_ahead so as to have the same meaning
to other bit readers.
Rename lzh_br_read_ahead, a bit reader macro, to lzh_br_read_ahead_0,
and make a new lzh_br_read_ahead that that assures that there are enough
bits in the cache buffer.
Improve decoding huffman code in both lha and cab reader.
It's about 30% faster than previous version, and a total
extraction time is about 3% faster than previous version.
Migrate message digest functions on Windows into archive_crypto.c and
remove global function names, __la_hash_Init, __la_hash_Update and __la_hash_Final
since those are used only in archive_crypto.c.
Additional fix to issue 168 because the change of r3642 was not sufficient.
- Make sure "CL" entry appear after its "RE" entry which the "CL" entry
should be connected with.
- Give consideration to the case that the top level "RE" entry has already
been exposed outside before its tree.
Colin Percival [Sat, 20 Aug 2011 07:19:41 +0000 (03:19 -0400)]
Fix handling of ~ within the target of a 'tar -s' directive.
According to the man page, "~ is substituted with the match", but prior to
this commit it was substituted with the entire source string up to the end
of the matching region.
-s /o/_~/, prior to this commit: foo -> f_foo
-s /o/_~/, after this commit: foo -> f_oo
Fix issue 168.
Change the mechanism handling a rr_moved directory,
which is Rockridge extension that can exceed the limitation of
a maximum directory depth of ISO 9660.
- Stop reading all entries at a time.
- Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE"
have information to rebuild a full directory tree.
- Tweak some related tests since we use Headsort for re-ordering
entries and it cannot make a steady order when the keies of
the entries are the same.
Colin Percival [Tue, 16 Aug 2011 18:00:20 +0000 (14:00 -0400)]
Fix file flag setting on linux in the event that EXT2_IOC_GETFLAGS fails
the first time we call it and then succeeds a few lines later; prior to
this commit this peculiar scenario would result in 'newflags' being used
uninitialized.
While I'm here, fix spelling ("implicity" -> "implicitly", "occured" ->
"occurred", "SECURE_SYMLINK" -> "SECURE_SYMLINKS"), grammar ("is a
unusable"), and writespace.
Colin Percival [Tue, 16 Aug 2011 05:26:58 +0000 (01:26 -0400)]
memcpy(new_str, NULL, 0) is _technically_ undefined behaviour under C99;
it's hard to imagine this actually being compiled "wrong", but avoid it
anyway.
Improve crc32 in archive_crc32.h for its performance.
A use of expansion code can make crc32 fast about 20% -30%
in any gcc optimization option(-O0,-O1,-O2 and -O3).
Rework the handling of a copy of decode data in the lha reader.
This change improves extraction performance; this version is
10% faster than previous version.
Andres Mejia [Sun, 14 Aug 2011 18:05:06 +0000 (14:05 -0400)]
Fixup bsdcpio_test so it can be called using relative paths to bsdcpio_test.
Now calling ./bsdcpio_test will run all tests, similar to ./libarchive_test.
The size of a symlink file should be zero since it does not have its file data.
Fix related problems that the RAR reader returned ARCHIVE_FAILED
with an error message, "CRC error", when archive_read_data was called
on reading a symlink file.
Fix a memory leak in the rar reader.
- Free mmpd7_contest before Ppmd7_Construct is called.
- Clean up the code calling Ppmd7_Free function to be surely called in any cases.