Tim Kientzle [Sun, 6 Nov 2011 19:09:58 +0000 (14:09 -0500)]
Issue 190: Fix build when liblzma is installed through MacPorts.
The probe for liblzma finds it in /opt/local, which adds
/opt/local/include to the include search path, which causes
iconv.h to be found there at compile time, which breaks because
libiconv was found in /usr at configure time.
This change causes cmake to prefer /opt/local for everything,
so that libiconv is pulled from /opt/local, and we avoid
the breakage from iconv mismatch.
I have a nasty suspicion that similar problems can happen
with many package systems.
Tim Kientzle [Sat, 5 Nov 2011 23:34:57 +0000 (19:34 -0400)]
Mask SIGPIPE for libarchive test, tar, and cpio.
As reported at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641265
The SIGPIPE occurs when feeding data through a decompression
program; the external program may see an end-of-data marker
and exit before we've finished feeding it all of the data.
(This happens when the data has garbage padding at the end.)
We want to catch and ignore the EPIPE since we can still
read the data coming out of the decompression program.
Tim Kientzle [Sat, 5 Nov 2011 20:12:01 +0000 (16:12 -0400)]
Disable RMD160 checks on Darwin.
Without this, we find RMD160 in OpenSSL but then fail to build because
of deprecation errors.
There are certainly better ways to handle this.
Tim Kientzle [Thu, 3 Nov 2011 05:21:30 +0000 (01:21 -0400)]
Issue #189: Don't rely on dev/ino being zero when they
have not been set. Instead, explicitly track when these
values are set. In particular, this fixes the check
that prevents adding an archive to itself on NetBSD.
Colin Percival [Wed, 2 Nov 2011 21:13:46 +0000 (17:13 -0400)]
Remove test for 'self == NULL' in bzip2_reader_init. It isn't needed,
since the caller is responsible for providing a non-NULL pointer; and
it's meaningless because we've already dereferenced self a few lines
earlier.
Submitted by: Carlo Teubner (via Tarsnap bug bounties)
Tim Kientzle [Wed, 5 Oct 2011 05:01:31 +0000 (01:01 -0400)]
Fix a typo that prevented CommonCrypto (part of libSystem) from being
properly used on Darwin.
Note that Mac OS X 10.7 has deprecated OpenSSL in favor of CommonCrypto.
We still pick up RIPEMD160 from OpenSSL if it's available, which breaks
strict warnings because of the deprecation. This seems unavoidable;
CommonCrypto doesn't seem to support RIPEMD160. To avoid the deprecation
warning on Mac OS X 10.7, disable the OpenSSL checks. That loses
RIPEMD160 support, though.
Fix issue 174; largely merge r3692 from trunk.
Correctly handle Windows style full-path names, which are
leading \\.\ or \\?\ or \\?\\UNC\ or \\?\Volume{GUID}\ or C:\,
in archive_write_disk.c.
Tim Kientzle [Tue, 20 Sep 2011 05:21:22 +0000 (01:21 -0400)]
Issue 185: Include the contributed Zip in the regression test,
include this and another recently added test file to the distribution
described by Makefile.am.
Tim Kientzle [Mon, 19 Sep 2011 04:58:34 +0000 (00:58 -0400)]
Merge r3722 from trunk: Fixes extraction of Zip entries that use
length-at-end without specifying either the compressed or uncompressed
length. In particular, fixes bsdtar extraction of such files.
We cannot get proper an xml output from an earlier version of libxml.
There may be a way to work around it, but right now I cannot find out how to.
I have to, therefore, disable the xar writer if libxlm version is less than 2.7.3,
which version Mac Snow Leopard has.
On Windows, make sure an exit status is initialized in case something error happens
and exit __la_waitpid before we normally invoke GetExitCodeProcess.
Issue 182.
Decide whether ZLIB_WINAPI is needed at configuration time, because there are two types of zlib
on Windows platform: one is built on Visual Studio, which requires ZLIB_WINAPI for use; other is
build on msys, which does not require ZLIB_WINAPI, GnuWin32 project provide such zlib.
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