]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
15 years agoAssert contents for stderr; this might help track a bug that's showing up
Tim Kientzle [Sun, 27 Dec 2009 23:54:52 +0000 (18:54 -0500)] 
Assert contents for stderr; this might help track a bug that's showing up
in the CDash nightly tests.

SVN-Revision: 1780

15 years agoBetter error reporting when a file doesn't exist.
Tim Kientzle [Sun, 27 Dec 2009 23:53:59 +0000 (18:53 -0500)] 
Better error reporting when a file doesn't exist.

SVN-Revision: 1779

15 years agoDon't #define read _read before including io.h.
Tim Kientzle [Sun, 27 Dec 2009 23:51:26 +0000 (18:51 -0500)] 
Don't #define read _read before including io.h.

SVN-Revision: 1778

15 years agoMake this test less sensitive to newline variations; this
Tim Kientzle [Sun, 27 Dec 2009 23:18:08 +0000 (18:18 -0500)] 
Make this test less sensitive to newline variations; this
should fix a test failure seen on Cygwin.

SVN-Revision: 1777

15 years agotar.5 corrections
Tim Kientzle [Sun, 27 Dec 2009 19:58:22 +0000 (14:58 -0500)] 
tar.5 corrections

SVN-Revision: 1776

15 years agoEliminate more warnings on Borland C.
Michihiro NAKAJIMA [Wed, 23 Dec 2009 00:26:44 +0000 (19:26 -0500)] 
Eliminate more warnings on Borland C.

SVN-Revision: 1774

15 years agoFix comparison of ino.
Michihiro NAKAJIMA [Tue, 22 Dec 2009 04:35:59 +0000 (23:35 -0500)] 
Fix comparison of ino.

SVN-Revision: 1773

15 years agoEliminate warnings on Visual Studio 10 W64.
Michihiro NAKAJIMA [Tue, 22 Dec 2009 00:39:58 +0000 (19:39 -0500)] 
Eliminate warnings on Visual Studio 10 W64.
On Win64, the size of 'int' is stil 4 bytes and the size of 'size_t'
is 8 bytes. A conversion from 'size_t' to 'int', causes warning
with compiling.

SVN-Revision: 1772

15 years agoAvoid build failure on Visual Studio 10 W64.
Michihiro NAKAJIMA [Mon, 21 Dec 2009 08:51:19 +0000 (03:51 -0500)] 
Avoid build failure on Visual Studio 10 W64.

SVN-Revision: 1771

15 years agoEliminate the warnings of the conversion of types on Visual Studio.
Michihiro NAKAJIMA [Mon, 21 Dec 2009 06:15:25 +0000 (01:15 -0500)] 
Eliminate the warnings of the conversion of types on Visual Studio.

SVN-Revision: 1770

15 years agoOn Borland C environment, both dirent.h and direct.h are available.
Michihiro NAKAJIMA [Mon, 21 Dec 2009 03:54:28 +0000 (22:54 -0500)] 
On Borland C environment, both dirent.h and direct.h are available.

SVN-Revision: 1769

15 years agoEliminate the warnings which Borland C Compiler complains about unused parameter.
Michihiro NAKAJIMA [Mon, 21 Dec 2009 03:44:11 +0000 (22:44 -0500)] 
Eliminate the warnings which Borland C Compiler complains about unused parameter.

SVN-Revision: 1768

15 years agoEliminate the warnings which Borland C Compiler complains "Unreachable code".
Michihiro NAKAJIMA [Sun, 20 Dec 2009 21:00:47 +0000 (16:00 -0500)] 
Eliminate the warnings which Borland C Compiler complains "Unreachable code".

SVN-Revision: 1767

15 years agoIn libarchive_test, disable the warning which Borland C compiler
Michihiro NAKAJIMA [Sun, 20 Dec 2009 20:50:04 +0000 (15:50 -0500)] 
In libarchive_test, disable the warning which Borland C compiler
complains "constant out of range in comparison".

SVN-Revision: 1766

15 years agoOn Windows, don't use _strdup directly because Borland C
Michihiro NAKAJIMA [Sun, 20 Dec 2009 04:23:05 +0000 (23:23 -0500)] 
On Windows, don't use _strdup directly because Borland C
does not provide _strdup.

SVN-Revision: 1765

15 years ago_chmod is obsolete on the Borland C environment.
Michihiro NAKAJIMA [Fri, 18 Dec 2009 18:15:24 +0000 (13:15 -0500)] 
_chmod is obsolete on the Borland C environment.
Use Win32 API instead of _chmod/_wchmod.

SVN-Revision: 1764

15 years agoEliminate warnings that some function parameters are not used at
Michihiro NAKAJIMA [Fri, 18 Dec 2009 17:11:02 +0000 (12:11 -0500)] 
Eliminate warnings that some function parameters are not used at
libarchive/test/main.c.

SVN-Revision: 1763

15 years agoDon't use _getcwd and _strdup on Borland C Compiler.
Michihiro NAKAJIMA [Fri, 18 Dec 2009 16:55:49 +0000 (11:55 -0500)] 
Don't use _getcwd and _strdup on Borland C Compiler.
This is covering r1757.

SVN-Revision: 1762

15 years agoOn Windows, make sure not to leave empty directories
Michihiro NAKAJIMA [Fri, 18 Dec 2009 16:33:36 +0000 (11:33 -0500)] 
On Windows, make sure not to leave empty directories
when tests are success.

SVN-Revision: 1761

15 years agoDisable two warnings on Borland C Compiler.
Michihiro NAKAJIMA [Thu, 17 Dec 2009 13:29:40 +0000 (08:29 -0500)] 
Disable two warnings on Borland C Compiler.
 - Constant out of range in comparison(W8068).
 - Suspicious pointer arithmetic(W8072).

SVN-Revision: 1760

15 years agoRemove an unneeded pragma that disable signed/unsigned mismatch warning.
Michihiro NAKAJIMA [Thu, 17 Dec 2009 12:59:52 +0000 (07:59 -0500)] 
Remove an unneeded pragma that disable signed/unsigned mismatch warning.

SVN-Revision: 1759

15 years agoAdd IO_REPARSE_TAG_SYMLINK macro if not defined.
Michihiro NAKAJIMA [Thu, 17 Dec 2009 12:17:40 +0000 (07:17 -0500)] 
Add IO_REPARSE_TAG_SYMLINK macro if not defined.
Old Windows SDKs do not provide IO_REPARSE_TAG_SYMLINK.

SVN-Revision: 1758

15 years agoBorland C does not provide _access,_chdir,_getcwd,_strdup and _umask.
Michihiro NAKAJIMA [Thu, 17 Dec 2009 11:54:14 +0000 (06:54 -0500)] 
Borland C does not provide _access,_chdir,_getcwd,_strdup and _umask.

SVN-Revision: 1757

15 years agoFix indents.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 19:40:24 +0000 (14:40 -0500)] 
Fix indents.

SVN-Revision: 1756

15 years agoAvoid segv on linux64. It caused at second calling vfprintf() of vlogprintf()
Michihiro NAKAJIMA [Wed, 16 Dec 2009 19:34:53 +0000 (14:34 -0500)] 
Avoid segv on linux64. It caused at second calling vfprintf() of vlogprintf()
in */test/main.c.
Use a copy of ap for second calling vfprintf().

SVN-Revision: 1755

15 years agobzstream_valid is not presented if bzip2 is not available.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 15:49:45 +0000 (10:49 -0500)] 
bzstream_valid is not presented if bzip2 is not available.

SVN-Revision: 1754

15 years agoAll of invalid_parameter_handler() are used only when HAVE__CrtSetReportMode is defined.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 14:30:32 +0000 (09:30 -0500)] 
All of invalid_parameter_handler() are used only when HAVE__CrtSetReportMode is defined.

SVN-Revision: 1753

15 years agoBorland C++ does not provide sys/utime.h.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 14:12:20 +0000 (09:12 -0500)] 
Borland C++ does not provide sys/utime.h.
Use macro HAVE_SYS_UTIME_H to include sys/utime.h and also
use macro HAVE_UTIME_H to include utime.h.

SVN-Revision: 1752

15 years agoIsolate libxml header check
Brad King [Wed, 16 Dec 2009 13:52:05 +0000 (08:52 -0500)] 
Isolate libxml header check

The check HAVE_LIBXML_XMLREADER_H should not use LA_CHECK_INCLUDE_FILE
because it sets CMAKE_REQUIRED_INCLUDES for only the one check.  The
LA_CHECK_INCLUDE_FILE macro accumulates headers that exist for use in
future checks, but including libxml/xmlreader.h breaks later checks
because they do not set CMAKE_REQUIRED_INCLUDES.  Instead we use
CHECK_INCLUDE_FILES directly for this check.

SVN-Revision: 1751

15 years agoCreate ENABLE_OPENSSL CMake option
Brad King [Wed, 16 Dec 2009 13:32:27 +0000 (08:32 -0500)] 
Create ENABLE_OPENSSL CMake option

This option tells libarchive whether to check for OpenSSL and use it.
We enable it by default since we previously did this unconditionally.
This provides the CMake equivalent to the --without-openssl option,
spelled as -DENABLE_OPENSSL=OFF.  See issue #22.

SVN-Revision: 1750

15 years agoAvoid warnings with bcc that are comparing signed and unsigned values.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 13:19:03 +0000 (08:19 -0500)] 
Avoid warnings with bcc that are comparing signed and unsigned values.

SVN-Revision: 1749

15 years agoExplicit unused variables at __archive_check_child().
Michihiro NAKAJIMA [Wed, 16 Dec 2009 13:02:13 +0000 (08:02 -0500)] 
Explicit unused variables at __archive_check_child().

SVN-Revision: 1748

15 years agoEliminate a paramter 'sym' of __link(), which is no longer needed.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:50:38 +0000 (07:50 -0500)] 
Eliminate a paramter 'sym' of __link(), which is no longer needed.

SVN-Revision: 1747

15 years agoCorrect a wide character buffer size of MultiByteToWideChar() in
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:44:48 +0000 (07:44 -0500)] 
Correct a wide character buffer size of MultiByteToWideChar() in
__link().

SVN-Revision: 1746

15 years agoRemove unreachable statement in archive_read_support_format_raw.c
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:28:49 +0000 (07:28 -0500)] 
Remove unreachable statement in archive_read_support_format_raw.c

SVN-Revision: 1745

15 years agoRemove unreachable statement.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:16:49 +0000 (07:16 -0500)] 
Remove unreachable statement.

SVN-Revision: 1744

15 years agoRemove unused variable.
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:13:21 +0000 (07:13 -0500)] 
Remove unused variable.

SVN-Revision: 1743

15 years agoOn Windows, do not define and use WIFSIGNALED because condition of
Michihiro NAKAJIMA [Wed, 16 Dec 2009 12:09:09 +0000 (07:09 -0500)] 
On Windows, do not define and use WIFSIGNALED because condition of
WIFSIGNALED was always false and bcc complained.

SVN-Revision: 1742

15 years agoFix Issue 56: Don't crash when reading an mtree input with "content=."
Tim Kientzle [Wed, 16 Dec 2009 07:10:01 +0000 (02:10 -0500)] 
Fix Issue 56:  Don't crash when reading an mtree input with "content=."

SVN-Revision: 1741

15 years agoEliminate test_write_compress_program failur on Visual Studio 10.
Michihiro NAKAJIMA [Tue, 15 Dec 2009 23:52:54 +0000 (18:52 -0500)] 
Eliminate test_write_compress_program failur on Visual Studio 10.

SVN-Revision: 1740

15 years agoRemove unneeded including windows.h at tar/write.c.
Michihiro NAKAJIMA [Tue, 15 Dec 2009 23:02:06 +0000 (18:02 -0500)] 
Remove unneeded including windows.h at tar/write.c.
It's included through bsdtar_platform.h.

SVN-Revision: 1739

15 years agoAvoid build error on Visual Studio 10.
Michihiro NAKAJIMA [Tue, 15 Dec 2009 22:52:33 +0000 (17:52 -0500)] 
Avoid build error on Visual Studio 10.

SVN-Revision: 1738

15 years agoDon't check whether bsdxml is available or not.
Michihiro NAKAJIMA [Mon, 14 Dec 2009 11:50:47 +0000 (06:50 -0500)] 
Don't check whether bsdxml is available or not.
The bsdxml is intended for use in FreeBSD base system.

SVN-Revision: 1737

15 years agoRefactor the release-building scripts just a bit:
Tim Kientzle [Mon, 14 Dec 2009 02:54:07 +0000 (21:54 -0500)] 
Refactor the release-building scripts just a bit:
 * bump-version.sh actually bumps the 'version' value
 * clean.sh attempts to clean the local directory as thoroughly as possible
 * autogen.sh runs clean.sh, edits the current version value into
   configure.ac, archive.h, and archive_entry.h, re-runs autoconf/automake/etc,
   and does a ./configure && make distcheck to verify the distribution on the
   local system.

SVN-Revision: 1736

15 years agoWe no longer use %jd or %lld from the system printf, so
Tim Kientzle [Sun, 13 Dec 2009 23:53:17 +0000 (18:53 -0500)] 
We no longer use %jd or %lld from the system printf, so
we don't need to test for them.

SVN-Revision: 1735

15 years agoCorrect the spelling of RIPEMD160.
Tim Kientzle [Sun, 13 Dec 2009 23:42:48 +0000 (18:42 -0500)] 
Correct the spelling of RIPEMD160.

SVN-Revision: 1734

15 years agoA few Cmake build improvements from Issue 48:
Tim Kientzle [Sun, 13 Dec 2009 23:30:00 +0000 (18:30 -0500)] 
A few Cmake build improvements from Issue 48:
 * Use the path holding the current file to make the build/cmake/*.cmake
   files more independent
 * Use CMAKE_CURRENT_SOURCE_DIR in the top-level CMakeLists.txt to locate
   the macro files and the version file.

SVN-Revision: 1733

15 years agoRegression test for Issue 51: Verify that interpolating an empty mtree
Tim Kientzle [Sun, 13 Dec 2009 20:07:45 +0000 (15:07 -0500)] 
Regression test for Issue 51: Verify that interpolating an empty mtree
archive doesn't generate a bogus error message.

SVN-Revision: 1732

15 years agoMore explanation of bad arguments.
Tim Kientzle [Sun, 13 Dec 2009 19:27:41 +0000 (14:27 -0500)] 
More explanation of bad arguments.

SVN-Revision: 1731

15 years agor1729 was wrong. Revert it and use a better approach.
Tim Kientzle [Sun, 13 Dec 2009 19:08:45 +0000 (14:08 -0500)] 
r1729 was wrong.  Revert it and use a better approach.

SVN-Revision: 1730

15 years agoWork around Borland C's broken _open() implementation.
Tim Kientzle [Sun, 13 Dec 2009 00:07:42 +0000 (19:07 -0500)] 
Work around Borland C's broken _open() implementation.

SVN-Revision: 1729

15 years agoNot all Windows environments have sys/utime.h, so obey the configure check.
Tim Kientzle [Sun, 13 Dec 2009 00:00:52 +0000 (19:00 -0500)] 
Not all Windows environments have sys/utime.h, so obey the configure check.

SVN-Revision: 1728

15 years agoCpio "odc" format limits the ino value to 18 bits. Previously, we
Tim Kientzle [Sat, 12 Dec 2009 23:40:49 +0000 (18:40 -0500)] 
Cpio "odc" format limits the ino value to 18 bits.  Previously, we
simply truncated larger values, which can lead to false collisions and
false hardlink detection, especially on filesystems such as NTFS that
use 64-bit ino values.  Because of the risk, we must issue a warning
in this case, and the warnings have been creating problems for the
bsdcpio test suite.

In order to avoid this problem, map the incoming ino values to new ino
values.  This allows us to store up to 256k distinct files without
risk of false hardlinks.  The only drawback to this approach is the risk
of losing hardlinks when appending to existing archives.

SVN-Revision: 1727

15 years agoExplicitly test for sigaction() rather than
Tim Kientzle [Sat, 12 Dec 2009 20:56:08 +0000 (15:56 -0500)] 
Explicitly test for sigaction() rather than
treating the existence of SIGINFO and SIGUSR1 as sufficient
evidence of sigaction() support.

SVN-Revision: 1726

15 years agoEliminate unneeded initialization.
Michihiro NAKAJIMA [Tue, 8 Dec 2009 11:24:30 +0000 (06:24 -0500)] 
Eliminate unneeded initialization.

SVN-Revision: 1720

15 years agoReduce loop count of connecting hardlinked files.
Michihiro NAKAJIMA [Tue, 8 Dec 2009 11:12:44 +0000 (06:12 -0500)] 
Reduce loop count of connecting hardlinked files.

SVN-Revision: 1719

15 years agoReduce the likelihood of false hardlinks by ignoring entries with
Tim Kientzle [Tue, 8 Dec 2009 06:18:24 +0000 (01:18 -0500)] 
Reduce the likelihood of false hardlinks by ignoring entries with
nlinks <= 1 when comparing dev/ino values.  This seems to address Issue 54.

SVN-Revision: 1718

15 years agoMerge libarchive 2.7
Brad King [Mon, 7 Dec 2009 00:19:28 +0000 (19:19 -0500)] 
Merge libarchive 2.7

This commit was manufactured during conversion from SVN
to merge the libarchive 2.7 branch.

15 years agoRemove -Werror for production release.
Tim Kientzle [Mon, 7 Dec 2009 00:19:28 +0000 (19:19 -0500)] 
Remove -Werror for production release.

SVN-Revision: 1717

15 years agoCorrect some printf format strings, per Issue 52.
Tim Kientzle [Mon, 7 Dec 2009 00:15:41 +0000 (19:15 -0500)] 
Correct some printf format strings, per Issue 52.

SVN-Revision: 1716

15 years agoFix empty error message reported in Issue 51.
Tim Kientzle [Mon, 7 Dec 2009 00:11:21 +0000 (19:11 -0500)] 
Fix empty error message reported in Issue 51.

SVN-Revision: 1715

15 years agoStyle: Break some long lines.
Tim Kientzle [Sun, 6 Dec 2009 23:52:35 +0000 (18:52 -0500)] 
Style:  Break some long lines.
Also, restructure the index number handling to include a truncation
check.

SVN-Revision: 1714

15 years agoFreeBSD has bsdxml.h
Tim Kientzle [Sun, 6 Dec 2009 23:41:37 +0000 (18:41 -0500)] 
FreeBSD has bsdxml.h

SVN-Revision: 1713

15 years agoExplain the index number validation here.
Tim Kientzle [Sun, 6 Dec 2009 23:41:11 +0000 (18:41 -0500)] 
Explain the index number validation here.

SVN-Revision: 1712

15 years agoEliminate a warning with liblzmadec.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 18:02:49 +0000 (13:02 -0500)] 
Eliminate a warning with liblzmadec.

SVN-Revision: 1711

15 years agoFix typo.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 17:50:04 +0000 (12:50 -0500)] 
Fix typo.

SVN-Revision: 1710

15 years agoRemove unneeded initialization.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 16:21:28 +0000 (11:21 -0500)] 
Remove unneeded initialization.

SVN-Revision: 1709

15 years agoProperly cleanup hardlinked list.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 16:13:31 +0000 (11:13 -0500)] 
Properly cleanup hardlinked list.

SVN-Revision: 1708

15 years agoDo not try finding hardlinked files which are resolved.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 16:00:34 +0000 (11:00 -0500)] 
Do not try finding hardlinked files which are resolved.

SVN-Revision: 1707

15 years agoAdd check of the number of the nlink to an xar test.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 10:15:58 +0000 (05:15 -0500)] 
Add check of the number of the nlink to an xar test.

SVN-Revision: 1706

15 years agoFix several warnings with strict compiling flags.
Michihiro NAKAJIMA [Sun, 6 Dec 2009 10:07:00 +0000 (05:07 -0500)] 
Fix several warnings with strict compiling flags.

Pointed out by Tim Kientzle

SVN-Revision: 1705

15 years agoFurther refine the index number checks for cpio and extend
Tim Kientzle [Sun, 6 Dec 2009 07:36:55 +0000 (02:36 -0500)] 
Further refine the index number checks for cpio and extend
them to newc as well.
This is in preparation for work to generate synthetic index
numbers when writing cpio formats, in order to avoid truncation
problems.

SVN-Revision: 1704

15 years ago1) Empty cpio test uses assertEqualMem() for better error reporting.
Tim Kientzle [Sun, 6 Dec 2009 07:30:32 +0000 (02:30 -0500)] 
1) Empty cpio test uses assertEqualMem() for better error reporting.
2) cpio_odc test permits synthetic ino values:
   * Zero input values must get written as zero
   * Matching non-zero values must get written as matching non-zero values
   * Non-matching non-zero values must get written as non-matching non-zero values

SVN-Revision: 1703

15 years agoIf we're using xml2-config to link libxml2, use it to get
Tim Kientzle [Sat, 5 Dec 2009 19:11:13 +0000 (14:11 -0500)] 
If we're using xml2-config to link libxml2, use it to get
the library requirements as well as cflags.

SVN-Revision: 1700

15 years agoAdd support for xar reader.
Michihiro NAKAJIMA [Fri, 4 Dec 2009 18:01:26 +0000 (13:01 -0500)] 
Add support for xar reader.

SVN-Revision: 1699

15 years agoWhen creationg a hash, a persisted private key is unneeded.
Michihiro NAKAJIMA [Fri, 4 Dec 2009 06:50:32 +0000 (01:50 -0500)] 
When creationg a hash, a persisted private key is unneeded.
This patch avoids a possibility that calling CryptAcquireContext()
cause an accss error.
see also http://support.microsoft.com/kb/238187/en-us/

SVN-Revision: 1698

15 years agoProperly use hash functions on Windows.
Michihiro NAKAJIMA [Thu, 3 Dec 2009 13:51:27 +0000 (08:51 -0500)] 
Properly use hash functions on Windows.

SVN-Revision: 1697

15 years agoCALG_SHA256, CALG_SHA384 and CALG_SHA512 are wrong name.
Michihiro NAKAJIMA [Thu, 3 Dec 2009 12:58:29 +0000 (07:58 -0500)] 
CALG_SHA256, CALG_SHA384 and CALG_SHA512 are wrong name.
Use CALG_SHA_256, CALG_SHA_384 and CALG_SHA_512 instead.

SVN-Revision: 1696

15 years agoRevert previous change of tar/tree.c
Michihiro NAKAJIMA [Thu, 3 Dec 2009 12:39:52 +0000 (07:39 -0500)] 
Revert previous change of tar/tree.c
It's my local hack.

SVN-Revision: 1695

15 years agoAdd archive_hash.h into libarchive/CMakefile.txt
Michihiro NAKAJIMA [Thu, 3 Dec 2009 12:34:11 +0000 (07:34 -0500)] 
Add archive_hash.h into libarchive/CMakefile.txt

SVN-Revision: 1694

15 years agoRemove AC_HEADER_STDC from the autoconf configuration, as
Tim Kientzle [Wed, 2 Dec 2009 08:11:33 +0000 (03:11 -0500)] 
Remove AC_HEADER_STDC from the autoconf configuration, as
it's not actually used anywhere.

Thanks to Brad King for finding this and fixing it in the Cmake build.

SVN-Revision: 1693

15 years agoRemove STDC_HEADERS check from non-autoconf builds
Brad King [Tue, 1 Dec 2009 16:08:04 +0000 (11:08 -0500)] 
Remove STDC_HEADERS check from non-autoconf builds

This autoconf check is used only within its configure tests and is not
used in libarchive source code.  The CMake configuration test used a
try_run(), which prevents cross-compiling without manual specification
of the result.  Since the result of the test is not used anyway we
simply remove it.

SVN-Revision: 1692

15 years agoSupport openssl without SHA-2 hash functions
Brad King [Mon, 30 Nov 2009 15:19:45 +0000 (10:19 -0500)] 
Support openssl without SHA-2 hash functions

Previously we assumed that <openssl/sha.h> provides all the SHA-2 hash
functions if it exists.  Some OpenSSL installations do not, so we need
to test for them at configuration time.  Currently we perform the tests
only for CMake builds.  We preserve the old behavior for the autotools
build by hard-coding availability, and leave a TODO comment for someone
to actually add the checks.

SVN-Revision: 1691

15 years agoFix hash function config tests with CMake
Brad King [Mon, 30 Nov 2009 15:19:36 +0000 (10:19 -0500)] 
Fix hash function config tests with CMake

The commit "Improve portability of MD5/SHA* headers and functions" added
both autotools and CMake detection of MD5, RMD, and SHA* hash functions.
The commit "Move hashing function calling into a separate file" rewrote
the autotools logic and changed the source to use different config
macros but did not update the CMake logic.  This commit updates the
CMake configuration tests to produce the result macros the code expects.

SVN-Revision: 1690

15 years agoSeveral fixes to Windows handling in tree.c:
Tim Kientzle [Mon, 30 Nov 2009 00:46:08 +0000 (19:46 -0500)] 
Several fixes to Windows handling in tree.c:
 * Convert \ to / on entry; this allows us to remove duplicate '/' and '\' checks from a couple of places
 * Rework tree_append() to make it clearer that buff != NULL by the time we get to anything interesting (found by Clang)
 * After appending initial path, set the path length so it doesn't get overwritten

SVN-Revision: 1688

15 years agoFuzz test the rpm unwrapper.
Tim Kientzle [Sun, 29 Nov 2009 23:11:06 +0000 (18:11 -0500)] 
Fuzz test the rpm unwrapper.

SVN-Revision: 1687

15 years agoThe fuzz tester uncovered an infinite loop in the recovery code that
Tim Kientzle [Sun, 29 Nov 2009 23:09:46 +0000 (18:09 -0500)] 
The fuzz tester uncovered an infinite loop in the recovery code that
searches forward for the next undamaged cpio header.  This occurred
when the number of bytes returned by the next read operation happened
to be exactly the size of a cpio header.  In this case, an off-by-one
error caused this code to decide that it didn't have enough bytes to
examine and then to loop around and ask for the exact same bytes again.

SVN-Revision: 1686

15 years agoCast away a compiler warning.
Tim Kientzle [Sun, 29 Nov 2009 23:05:31 +0000 (18:05 -0500)] 
Cast away a compiler warning.

SVN-Revision: 1685

15 years agoFix an embarrassing typo that prevented the display of the expected file contents...
Tim Kientzle [Sun, 29 Nov 2009 20:37:43 +0000 (15:37 -0500)] 
Fix an embarrassing typo that prevented the display of the expected file contents when a file was unexpectedly empty.

SVN-Revision: 1684

15 years agoAdjust this test to verify the convention that tar always stores filenames with ...
Tim Kientzle [Sun, 29 Nov 2009 20:36:32 +0000 (15:36 -0500)] 
Adjust this test to verify the convention that tar always stores filenames with '/' path separators, even on Windows.

SVN-Revision: 1683

15 years agor1679 provides a way to gracefully handle the failure to decompress single ZISOFS...
Tim Kientzle [Sun, 29 Nov 2009 20:35:13 +0000 (15:35 -0500)] 
r1679 provides a way to gracefully handle the failure to decompress single ZISOFS entries; use that to suppress test failures in environments that lack zlib.

SVN-Revision: 1682

15 years ago"Fix" this test on Win32 by suppressing tests of error handling that relies on proper...
Tim Kientzle [Sun, 29 Nov 2009 20:33:21 +0000 (15:33 -0500)] 
"Fix" this test on Win32 by suppressing tests of error handling that relies on proper error detection within archive_entry_update_pathname_utf8().

The core problem here is that Windows has several different APIs for character-set conversion.  These tests rely on the POSIX-standard setlocale() to set the default character set for this process in order to then force character-conversion failures and verify the error-handling.  But the Win32 APIs don't obey setlocale() so this fails.  Indeed, I've found no way to programmatically override the CP_ACP code page for just the current process:  I considered using CP_THREAD_ACP instead but it seems to be broken (or at least there are a lot of bloggers claiming it should never be used).  It doesn't help that Windows documentation confuses "code page" with "language" (SetCurrentLocale() accepts a language code but the documentation claims it sets the code page while offering no insight into how language codes get mapped to code pages---remember that Japanese and Chinese are supported by several code pages).  I've gleaned from various blogs that the default code page cannot be set to UTF-8 in any case due to some bad assumptions deep in Win32's character-conversion routines (this implies, of course, that there is a way to set the default code page, which I've not been able to find).  From this, it appears that it's simply not possible to do the kind of testing I want to do here; if someone knows otherwise, please let me know.

SVN-Revision: 1681

15 years agoSuppress some "unused return value" warnings from clang.
Tim Kientzle [Sun, 29 Nov 2009 20:17:10 +0000 (15:17 -0500)] 
Suppress some "unused return value" warnings from clang.

SVN-Revision: 1680

15 years agoFailure to decompress a single entry is not a FATAL problem (the entire archive is...
Tim Kientzle [Sun, 29 Nov 2009 20:16:17 +0000 (15:16 -0500)] 
Failure to decompress a single entry is not a FATAL problem (the entire archive is not dead), it's merely a FAILED problem (this entry is dead, but the rest of the archive may be readable).

SVN-Revision: 1679

15 years agoIf we don't have any way to decompress a test archive (neither library nor command...
Tim Kientzle [Sun, 29 Nov 2009 20:14:52 +0000 (15:14 -0500)] 
If we don't have any way to decompress a test archive (neither library nor command-line util), just skip it.

SVN-Revision: 1678

15 years agoAdd RPM filter.
Michihiro NAKAJIMA [Mon, 23 Nov 2009 08:40:03 +0000 (03:40 -0500)] 
Add RPM filter.

SVN-Revision: 1677

15 years agoUse the standard abort() function to terminate the program if there's
Tim Kientzle [Thu, 19 Nov 2009 07:18:09 +0000 (02:18 -0500)] 
Use the standard abort() function to terminate the program if there's
a fatal API violation by a libarchive client.

SVN-Revision: 1675

15 years agoClang static analysis found an error return that was being
Tim Kientzle [Thu, 19 Nov 2009 07:15:10 +0000 (02:15 -0500)] 
Clang static analysis found an error return that was being
ignored.  If copying data from an archive into a file on disk
fails with a fatal read error, exit with an error, since we
can't progress if the archive is broken.  If it fails writing
to the file on disk, arrange for cpio to exit with an error.
Rename 'copy_data' to 'extract_data' to make it clearer that
it's only used when extracting data to disk.

Thanks to Michihiro NAKAJIMA for performing the analysis and fixing
most of the issues found.

SVN-Revision: 1674

15 years agoUse _CrtSetReportMode only where available
Brad King [Wed, 18 Nov 2009 14:15:28 +0000 (09:15 -0500)] 
Use _CrtSetReportMode only where available

We test for this function in <crtdbg.h> at CMake configuration time and
store the result as a HAVE__CrtSetReportMode configuration macro.  We
need not perform the test for an autotools build because it supports no
platform that provides the function and the macro will be undefined.

SVN-Revision: 1673

15 years agoUse ADD_TEST_28 macro to fix tests with the VS IDE
Brad King [Wed, 18 Nov 2009 14:14:18 +0000 (09:14 -0500)] 
Use ADD_TEST_28 macro to fix tests with the VS IDE

This macro simplifies creation of tests that refer to executables built
in the project.  We can pass executables as arguments to a test using a
CMake 2.8 "generator expression" of the form "$<TARGET_FILE:myexe>".
The macro translates the arguments into something CMake 2.6 understands.

This change also fixes the tests so that they run correctly in build
trees created for multi-configuration build tools like the VS IDE.
These tools place executables in a per-configuration subdirectory so
references to executables in test arguments must use a test-time
substitution.  The ADD_TEST_28 macro handles this automatically.

SVN-Revision: 1672