Tim Kientzle
bfe2732de8
LZW bugfix: when we hit end-of-file, return an invalid code.
2009-04-17 00:58:44 +00:00
Tim Kientzle
bf89aeae5e
Minor fix: some platforms require both inttypes.h and stdint.h.
2009-04-17 00:57:11 +00:00
Tim Kientzle
06f39cd345
Implement command-line fallbacks for gzip and bzip2 decompression as well.
...
Not an issue for FreeBSD, since the base system has the necessary libraries.
Since all decompressors are always available now, we can unconditionally
enable them in archive_read_support_compression_all().
2009-04-17 00:55:52 +00:00
Tim Kientzle
c9f05bc8a1
Merge new xz/lzma support from libarchive.googlecode.com.
...
Since FreeBSD doesn't have liblzma in the base system, the
read side will always fall back to the unxz/unlzma commands for now.
(Which will in turn fail if those commands are not currently
installed.) The write side does not yet have a fallback, so
that will just fail.
2009-04-17 00:54:35 +00:00
Tim Kientzle
a9ba4adfa5
Don't use the open callback, which is deprecated (because it's
...
never necessary). Also, simplify just a tad by delegating
to read_open_fd() when we know the file descriptor, instead
of duplicating that logic.
2009-04-17 00:50:00 +00:00
Tim Kientzle
1787611dd1
Accept empty options, add a new read_next_header2() which is more
...
efficient for some uses.
2009-04-17 00:47:16 +00:00
Tim Kientzle
9a81c0ba38
Properly clone and free the recently-added "sourcepath" field.
2009-04-17 00:45:47 +00:00
Tim Kientzle
5f8af33b11
Use thread-safe getgrnam_r() and getpwnam_r(); dynamically size
...
the buffer used by this.
2009-04-17 00:44:47 +00:00
Tim Kientzle
946733c26e
Fix a minor memory leak.
2009-04-17 00:44:03 +00:00
Tim Kientzle
8952729381
Merge from libarchive.googlecode.com: Numerous fixes to the
...
write options handling, including documentation.
2009-04-17 00:42:45 +00:00
Tim Kientzle
625683944d
Merge from libarchive.googlecode.com: If we're
...
given an empty filename, just invoke write_open_fd()
instead of re-implementing the code to use stdout.
2009-04-17 00:39:35 +00:00
Tim Kientzle
73beb0d530
Re-enable backing up extended attributes, as the ZFS bug this
...
triggered seems to have been fixed by John Baldwin's commit
r189967.
2009-04-13 18:56:53 +00:00
Tim Kientzle
cc2a51aaf7
Merge from libarchive.googlecode.com r791, r879, r884, r948: Various
...
fixes to read_support_compression_program. In particular, failure of
the external program is detected a lot earlier, which gives much more
reasonable error handling.
2009-04-12 05:47:23 +00:00
Tim Kientzle
056e26b45e
Thanks to Christoph Mallon for pointing out the dead variable here.
...
Also, rework this a little to make the logic excruciatingly clear.
2009-04-12 05:38:35 +00:00
Tim Kientzle
e2421f7667
Merge from libarchive.googlecode.com: Mostly a bunch of
...
corrections to the Windows support to reconcile differences
between Visual Studio and Cygwin. Includes parts of
revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886.
Of particular note, r886 overhauled the UTF-8/Unicode conversions to
work correctly regardless of whether the local system uses 16-bit
or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t
use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision
also added a preference for wcrtomb() (which is thread-safe) on
platforms that support it.
2009-04-12 05:33:34 +00:00
Tim Kientzle
e1089c1e0c
Merge from libarchive.googlecode.com r756,r761:
...
Document the new archive_read_disk API.
2009-04-12 05:04:02 +00:00
Tim Kientzle
f8c35626c4
Merge from libarchive.googlecode.com:
...
r751: Change __archive_strncat() to use a void * source, which reduces
the amount of casting needed to use this with "char", "signed char"
and "unsigned char".
r752: Use additions instead of multiplications when growing buffer;
faster and less chance of overflow.
2009-04-12 04:59:11 +00:00
Tim Kientzle
0da7a22640
Merge r881 from libarchive.googlecode.com: The "empty" format
...
should not be recognized if there is a read error.
2009-04-12 04:45:40 +00:00
Tim Kientzle
4ef9925138
Temporary hack to unbreak user/group lookups;
...
use a larger buffer for getpwuid_r/getgrgid_r.
This needs to be dynamically sized.
2009-04-04 20:08:08 +00:00
Tim Kientzle
351ae75265
Hack: *Temporarily* disable reading extended attributes from disk, as
...
it seems to be badly broken on ZFS.
2009-03-11 05:11:57 +00:00
Tim Kientzle
3882931590
Set version to 2.6.901a to indicate this now matches
...
libarchive.googlecode.com r745. (Except for the lzma/xz support,
which needs a little more attention before it can be merged.)
2009-03-08 04:32:38 +00:00
Tim Kientzle
9e4f5968dc
Merge a bunch of changes through r722 from libarchive.googlecode.com:
...
mtree writer now supports a variety of checksum keys; it also provides
option hooks to set what keys get written.
2009-03-08 04:20:19 +00:00
Tim Kientzle
9d875e6973
Merge r718 from libarchive.googlecode.com: Some additional
...
tests of restoring files to disk with unusual characters, specifically
to exercise Windows issues.
2009-03-07 07:23:04 +00:00
Tim Kientzle
6d8acef62f
Fix spelling.
2009-03-07 07:19:25 +00:00
Tim Kientzle
0d9e6eaf1a
Merge r348 from libarchive.googlecode.com: Suppress testing invalid
...
conversions if there aren't any. In particular, Cygwin's "C" locale
has no invalid inputs for wctomb().
2009-03-07 03:41:29 +00:00
Tim Kientzle
419eb469bc
Merge r596,r690 from libarchive.googlecode.com: Minor style and compile
...
warning fixes for test_read_pax_truncated.c.
2009-03-07 03:34:34 +00:00
Tim Kientzle
71938b80a7
Merge r335,653,676 from libarchive.googlecode.com: Instead of
...
conditioning tests on HAVE_ZLIB, etc, just ask libarchive for the
service and handle the failure coming back from libarchive. This
gives us better test coverage of common client usage where clients
simply try to use libarchive services and handle the errors coming
back instead of trying to second-guess which libarchive services are
compiled in.
2009-03-07 03:30:35 +00:00
Tim Kientzle
144552f37d
Merge r280,281,496,595,675,712 from libarchive.googlecode.com: Various
...
test improvements, including some work on Windows compatibility and an
extra check to verify that no test leaves open file descriptors
around.
2009-03-07 03:16:16 +00:00
Tim Kientzle
fe8c58805a
Merge r540 from libarchive.googlecode.com: Interix doesn't have inttypes.h
...
either. <sigh>
2009-03-07 03:04:06 +00:00
Tim Kientzle
c2a577bb0d
Merge r723 from libarchive.googlecode.com: Don't try to restore
...
owner or SUID bits on Windows; just ignore them.
2009-03-07 03:00:44 +00:00
Tim Kientzle
21bbe086cb
Merge r511,r513,r607 from libarchive.googlecode.com: Mtree reader
...
tweaks: Support nanosecond timestamps, handle attributes broken
across multiple lines.
2009-03-07 02:58:15 +00:00
Tim Kientzle
cd22d2cc9e
Merge r585,r669 from libarchive.googlecode.com: If zlib is unavailable,
...
use external "gunzip" instead. With this in place, we can unconditionally
enable gzip read support.
2009-03-07 02:51:18 +00:00
Tim Kientzle
de01c3b1eb
Merge r550,584,587,609,647,674 from libarchive.googlecode.com:
...
Refactor the read_compression_program to add two new abilities:
* Public API: You can now include a signature string when you
register a program; the program will run only on input that
matches the signature string.
* Internal API: You can use the init() function to instantiate
an external program as part of a filter pipeline. This
can be used for graceful fallback (if zlib is unavailable, use
external gzip instead) and to use external programs with
bidders that are more sophisticated than a static signature check.
2009-03-07 02:47:04 +00:00
Tim Kientzle
4f7d8a29e1
Merge r591 from libarchive.googlecode.com: signed/unsigned fixes.
2009-03-07 02:29:43 +00:00
Tim Kientzle
cdad0e17a1
Merge r558,567,569,571,581,582,583,598 from libarchive.googlecode.com:
...
Support Joliet extensions. This currently ignores Rockridge extensions
if both exist on the same disk unless the '!joliet' option is provided.
e.g.: tar -xvf example.iso --options '!joliet'
Thanks to: Andreas Henriksson
2009-03-07 02:24:32 +00:00
Tim Kientzle
5e9641ba0a
Merge r658 from libarchive.googlecode.com: Only flush and close the
...
file if it was actually opened. Test for this case.
2009-03-07 02:09:21 +00:00
Tim Kientzle
3381df89e8
Merge r714,r715 from libarchive.googlecode.com: Fix Debian bug #516577 .
...
Don't crash if client does not provide a skip function. Extend one
of the test cases to use archive_read_open2() with only a read callback.
2009-03-07 01:21:46 +00:00
Tim Kientzle
83829cd8ea
Merge r608 from libarchive.googlecode.com: Clear a newly-allocated
...
bidder object.
2009-03-07 01:18:30 +00:00
Tim Kientzle
98768f0df8
Merge r564,r566 from libarchive.googlecode.com: Fix segfault when
...
specifying an option and the current format doesn't have an
options handler.
2009-03-07 01:17:13 +00:00
Tim Kientzle
071b9e6dc9
Merge the rest of r453 from libarchive.googlecode.com: Test using
...
libarchive APIs to read extended attributes from disk on FreeBSD.
2009-03-07 01:12:01 +00:00
Tim Kientzle
e54dbd0167
Minor whitespace adjustment to reduce diffs with libarchive.googlecode.com.
2009-03-07 01:08:16 +00:00
Tim Kientzle
eee9002fb2
Merge r552,r559 from libarchive.googlecode.com: Support high-resolution
...
timestamps on Tru64, AIX, and GNU Hurd. Thanks to Björn Jacke.
2009-03-07 00:52:02 +00:00
Tim Kientzle
4797bb9435
Merge r283,r529 from libarchive.googlecode.com: Fix ext2_fs.h includes
...
for Linux.
2009-03-07 00:36:50 +00:00
Tim Kientzle
14289cd993
Merge r659 from libarchive.googlecode.com: Correctly report "none"
...
as the compression name when no other read filter bid. Add some
assertions to various tests to verify that read filters are properly
setting the textual name as well as the compression code.
2009-03-07 00:25:33 +00:00
Tim Kientzle
b7baebb91a
Merge r668 from libarchive.googlecode.com: Style correction to the
...
'ar' reader: Don't redefine 'isdigit' and don't create a macro that's
only used once.
2009-03-06 06:14:44 +00:00
Tim Kientzle
f7c755c1db
Merge r541,r542 from libarchive.googlecode.com: Two sign mismatches
...
in the Zip reader.
2009-03-06 06:13:25 +00:00
Tim Kientzle
634fb9dd48
Merge r491,493,500,507,510,530,543 from libarchive.googlecode.com:
...
This implements the new generic options framework that provides a way
to override format- and compression-specific parameters.
2009-03-06 05:58:56 +00:00
Tim Kientzle
ce54c7c56a
Merge r448 from libarchive.googlecode.com: Suppress testing write_disk
...
failures on Windows for now. Someday this will be revisited.
2009-03-06 05:40:09 +00:00
Tim Kientzle
4bf1b0bdfa
Merge r403,702,721 from libarchive.googlecode.com: Handle odd
...
pathnames on Windows by mapping '\\' to '/' and converting
illegal characters to '_'.
2009-03-06 05:38:53 +00:00
Tim Kientzle
af176e930c
Merge r505 from libarchive.googlecode.com: Fix %ju support. Simplify
...
the code here a bit by making the int formatting functions static to
archive_string_sprintf.c, which is the only place this has ever been
used.
2009-03-06 05:14:55 +00:00