Tim Kientzle [Mon, 25 May 2009 17:08:00 +0000 (13:08 -0400)]
Update some of the top-level guide files:
* Remove PROJECTS in favor of the WishList in the Wiki
* Clarify INSTALL
* getdate.y no longer exists
* Minor README corrections and edits
Tim Kientzle [Mon, 25 May 2009 05:02:50 +0000 (01:02 -0400)]
Merge r1093 from trunk: Correctly account for
"extra data" field when reading gzip headers.
In particular, this fixes reading gzip files that
have been signed with the OpenBSD "gzsig" program.
Tim Kientzle [Sun, 24 May 2009 23:35:53 +0000 (19:35 -0400)]
Be more careful about text/binary mode.
Libarchive is already pretty careful about using O_BINARY
whenever it opens a file handle internally; this extends
that care to file descriptors that are passed in from clients
by invoking _setmode() explicitly.
The test harness was much less careful about O_BINARY;
this adds those flags to all open() calls and modifies
fopen() calls to use "wb" and "rb" explicitly.
In particular, this should remove the need for clients
to use invoke _set_fmode() at all.
Move hashing function calling into a separate file. Provide the glue
for OpenSSL and libc functions in NetBSD and OpenBSD as well as
simplified configure logic. OpenSSL is now only pulled in if the
platform does not provide all needed hash functions.
Tim Kientzle [Sat, 23 May 2009 17:29:00 +0000 (13:29 -0400)]
Rename a scratch variable. This is used to workaround
a bug with some versions of GCC that don't support
cast-to-void for explicitly ignoring return values.
Tim Kientzle [Fri, 15 May 2009 04:49:23 +0000 (00:49 -0400)]
Add custom _dosmaperr() implementation (copied from
PostgreSQL) and use it instead of the undocumented
Windows CRT function (which isn't available in all versions
of Windows CRT). Rename it to la_dosmaperr() to avoid
any name conflicts with the "standard" one.
Tim Kientzle [Thu, 14 May 2009 23:55:24 +0000 (19:55 -0400)]
Avoid problems because of varying ino_t sizes on different platforms. In particular, Windows uses a 16-bit (?!) ino_t, so we can't just cast the constant here to ino_t. The next API changes should avoid ino_t entirely to prevent problems reading cpio archives on platforms where the native ino_t type isn't big enough.
Tim Kientzle [Sat, 9 May 2009 01:15:17 +0000 (21:15 -0400)]
Building on Ubuntu 9 provoked some complaints about return values
not being used. Some of these are good catches, a few are
annoying. Unfortunately, GCC on this system won't just
allow you to cast the result explicitly to (void) to
shut up the error, so I've had to introduce some gratuitous
extra variables. <sigh>
Tim Kientzle [Fri, 8 May 2009 17:32:08 +0000 (13:32 -0400)]
Fix build on platforms without zlib.h. I need to dig out my old
CRC code and drop it in here to correctly break this dependency,
but these tests are so badly broken right now anyway...
Tim Kientzle [Fri, 8 May 2009 16:57:01 +0000 (12:57 -0400)]
Separate the xattr management for archive_entry into a separate
source file. The only linkage between the xattr routines and
the rest of archive_entry is through public API functions, so
this doesn't expose any internal interfaces and will make it
easier to extend and modify the xattr management in the future.
(In particular, we'll need to add support for looking up specific
xattrs by name in the very near future.)
Tim Kientzle [Fri, 8 May 2009 16:50:46 +0000 (12:50 -0400)]
Fix the CMake build on systems that lack a C++ compiler.
libarchive doesn't need C++, so we should be able to build
on systems that don't have a C++ compiler.
Tim Kientzle [Thu, 7 May 2009 22:55:24 +0000 (18:55 -0400)]
Merge r1068 from trunk: This partially reverts r868, which
broke tar handling of end-of-file when reading from a pipe.
With this change, tar once again flushes input from a pipe
which avoids SIGPIPE getting sent upstream.
Tim Kientzle [Thu, 7 May 2009 22:53:09 +0000 (18:53 -0400)]
The refactoring of r868 changed read_open_filename() to
just use read_open_fd() for the degenerate stdin case.
Unfortunately, there's a critical difference between these
two: read_open_fd() does no special processing on close;
read_open_filename() flushes input pipes on close. As
a result, pipelines such as "gunzip|tar" would cause gunzip
to fail with SIGPIPE. Especially with /bin/csh (which reports
the success of the first program in a pipeline, not the last
as /bin/sh and bash do), this caused some ugly problems.
Thanks to Alexey Shuvaev for reporting this failure and
patiently helping me to track down the cause.
Tim Kientzle [Mon, 27 Apr 2009 18:29:15 +0000 (14:29 -0400)]
Rename test_acl_solaris to test_compat_solaris_tar_acl.
(The former makes it sound like we're testing system-specific
ACL support for Solaris, which isn't implemented yet.)
Tim Kientzle [Mon, 27 Apr 2009 03:42:25 +0000 (23:42 -0400)]
Fix up some issues with POSIX.1e ACLs:
* Edward Napierala sent me an archive from Solaris 10 with Solaris-style
ACLs that libarchive misparsed. Fix the parser.
* Add a test for reading Solaris-format ACLs
* Preserve the order of ACL entries; this is purely cosmetic for now.
* Fix the test_acl_pax test to match the order of the new ACL entries.
* Correctly distinguish Solaris-style POSIX.1e ACLs from Solaris NFSv4 ACLs.
Even if we can't parse the latter, we can at least recognize them and
issue a suitable warning.
TODO: Identify AIX-style ACLs (which should currently be recognized as
malformed Solaris-style ACLs). I doubt libarchive will ever support AIX-style
ACLs, but it can at least recognize and warn about them.
Tim Kientzle [Mon, 20 Apr 2009 21:22:49 +0000 (17:22 -0400)]
Issue 22: --without-openssl skips probing for the hash functions.
Note: This currently also disables use of libmd on systems that have it.
That should probably be separated into a separate control.
Tim Kientzle [Mon, 20 Apr 2009 18:20:44 +0000 (14:20 -0400)]
Issue 21: The output of -tnv here depends on the timezone.
Since there are only two possible results, just compare it to
both and accept a match for either one.
Tim Kientzle [Mon, 20 Apr 2009 06:01:01 +0000 (02:01 -0400)]
Make the file on the reference ISO be considerably larger.
BZip2 compression works really well for long blocks of zero bytes,
so this costs almost nothing.
Tim Kientzle [Sun, 19 Apr 2009 22:50:37 +0000 (18:50 -0400)]
Move UnsupportedCompress() macro into the only file that uses it.
Make test_fuzz a bit more sensitive by actually reading the
body of each entry instead of just skipping it.
Tim Kientzle [Sat, 18 Apr 2009 06:14:20 +0000 (02:14 -0400)]
Fill in descriptions of the new GNU pax sparse handling,
briefly discuss Mac OS X resource fork extension,
explain SunOS 'A' record handling of NFSv4 ACLs,
describe terminator-pruning for extending file size
support, and a bit of minor wordsmithing.
Tim Kientzle [Fri, 17 Apr 2009 07:10:26 +0000 (03:10 -0400)]
Add --lzma and -J options to cpio.
Add tests for these.
Edit the existing compression tests so they correctly
distinguish unsupported options (e.g., we're testing GNU cpio)
from unsupported compression.
Tim Kientzle [Fri, 17 Apr 2009 06:09:28 +0000 (02:09 -0400)]
Audit and fix up the HAVE_* usage:
* bsdtar relies on libarchive to handle ACLs, so the ACL feature tests
in bsdtar are no longer needed
* ditto for extended attribute support
* libarchive now implements set_compression_* functions always; if they
don't work, calling them returns an error. This changes a lot of
bsdtar compression tests from compile time checks for a library
existence to run-time checks for libarchive return values.
In particular, bsdtar should not need to know which libraries
or external programs libarchive might be using.