Tim Kientzle [Wed, 17 Feb 2010 05:54:50 +0000 (00:54 -0500)]
Modernize this test. Add additional assertions to verify that
archive_position_compressed()
== archive_position_uncompressed()
== number of bytes actually written
when we didn't overflow the buffer. These may not match when
the buffer does overflow because some writes down the pipeline
will fail.
Make a Windows version of __archive_mktemp() in archive_windows.c
and merge __la_mkstemp() and __archive_mktemp() because
__la_mkstemp() was only used by __archive_mktemp().
Tim Kientzle [Mon, 8 Feb 2010 07:18:22 +0000 (02:18 -0500)]
Rename archive_read_finish to archive_read_free and
archive_write_finish to archive_write_free. Update all clients,
tests, and documentation to use the new names exclusively. (Though
I've not yet run a global search-and-replace against the Wiki. I'll
do that shortly.)
I've preserved the old names as aliases, scheduled to be removed with
libarchive 4.x, so there is no immediate impact to existing code from
this change.
Tim Kientzle [Sat, 6 Feb 2010 05:10:13 +0000 (00:10 -0500)]
Guard against out-of-range nanosecond time values and make it easy for
people to make small time adjustments using code such as:
archive_entry_set_ctime(entry,
archive_entry_ctime(entry),
archive_entry_ctime_nsec(entry) + 123456);
Fix test_read_format_cpio_afio failure on the some platform,
on which the size of uid_t is too small to set a over 65535 value.
But this fix will be removed when we use int64_t for uid.
Get a sprase info in GNU PAX formart "1.0" before the process of
reading file data so that we reliably get the sparse info with
archive_entry_sparse_*() functions.
Tim Kientzle [Mon, 1 Feb 2010 05:51:37 +0000 (00:51 -0500)]
First step towards integrating Mac OS "copyfile" extension from Apple.
This part adds probes for the copyfile.h header, and adds a new command-line
option --disable-copyfile, which does nothing on non-MacOS systems.
Tim Kientzle [Mon, 1 Feb 2010 03:52:55 +0000 (22:52 -0500)]
Minor adjustments to the bsdtar.1 man page.
In particular:
* Downplay the "tape" aspect; few people use tar with tape drives any more.
* Document default device a bit more carefully.
* Update supported formats.
* Clarify the history of this implementation.
Tim Kientzle [Mon, 18 Jan 2010 17:55:30 +0000 (12:55 -0500)]
Return proper errors from archive_read_disk_entry_from_file() if
you're asked for information about a non-existent file.
Update cpio to actually use this properly to report errors for
nonexistent files and exit with a delayed error if there were
files that could not be read.
Fix memory leak in ISO reader.
Do not use a reference counter to decide to release a memory
used for struct file_info.
Release all memories of struct file_info at the end instead.
Tim Kientzle [Tue, 5 Jan 2010 16:44:20 +0000 (11:44 -0500)]
Fix a failing tar test: On some systems (certain Linux systems
with security features enabled), the default tar format chooses
to include pax extensions, which confuses the validation logic in
this test.
Tim Kientzle [Sun, 3 Jan 2010 21:25:38 +0000 (16:25 -0500)]
Issue 48: Instead of setting RUNTIME_OUTPUT_DIRECTORY separately for
each component, set CMAKE_RUNTIME_OUTPUT_DIRECTORY once at the
top and let each component inherit that implicitly. This allows
other projects that want to include libarchive to do so a little
more simply.
Tim Kientzle [Sun, 3 Jan 2010 06:02:40 +0000 (01:02 -0500)]
Remove some pre-libarchive-2.0 support, which is no longer necessary.
Prefill the copy buffer just once when we start, instead of refilling
it on every block request. This shaves about 8% off the total running
time of libarchive_test on my system.
Tim Kientzle [Sat, 2 Jan 2010 01:21:05 +0000 (20:21 -0500)]
After initializing a filter, we try to read from it to
verify that it's working (in particular, this gives early
error reporting when external decompression programs are
nonexistent or exit immediately). If this read failed,
we weren't properly cleaning up the just-initialized filter.
Since this is fatal, the easiest fix is to refactor the close()
handler and just release the entire filter chain.
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.