Commit Graph

863 Commits

Author SHA1 Message Date
bcr
66f0f0c4fa s/an struct/a struct
PR:             docs/148660
Submitted by:   Warren Block (wblock at wonkity dot com)
Reviewed by:    Tim Kientzle
Mentored by:    jkois
MFC after:      7 days
2010-07-17 12:53:57 +00:00
uqs
7ad97661e4 mdoc nitpicking: the title argument shall be uppercase 2010-06-11 06:03:47 +00:00
uqs
e644199c18 mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by:	ru
2010-05-19 08:57:53 +00:00
kientzle
f11cb3f4b9 Retry reads that fail with EINTR. This fixes a problem
with bsdtar failing on SIGINT.
2010-05-18 14:11:38 +00:00
delphij
bd4ac448d7 Fix build. 2010-05-17 07:06:54 +00:00
kientzle
02e2e7806f Reorganize slightly in preparation for making lzma and bz2 support conditional. 2010-05-16 20:43:17 +00:00
uqs
1ab3783e1a mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by:	mdocml lint run
Reviewed by:	ru
2010-05-13 12:07:55 +00:00
mm
696cb26078 Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
2010-05-10 15:28:44 +00:00
uqs
4a10ff6f04 Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)
2010-03-02 18:44:08 +00:00
uqs
f41a820b03 Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
uqs
89a7a155da Add missing newline in last line of file.
Uncovered via:	fromcvs vs. svn
Approved by:	ed (co-mentor)
2010-02-16 09:10:21 +00:00
kientzle
dace1f6d74 Don't try to hardlink block or character device nodes that come out
of cpio archives.
2010-01-23 07:57:17 +00:00
kientzle
a90eac212e Use a simpler memory-management strategy for the file objects.
Instead of trying to reference-count them and free them as soon
as they are no longer needed, we now just keep them around and free
them all when we release the archive object.  This fixes a number
of minor memory leaks, especially when reading damaged archives.
2010-01-23 07:55:53 +00:00
kientzle
5d107439de If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
be processed any further) and a suitable error string.
In particular, this improves the error-reporting when cpio -o is
given a nonexistent filename.
2010-01-23 07:54:15 +00:00
kientzle
164ec789c7 Initialize the allocated 'struct zip'. 2010-01-23 07:52:44 +00:00
kientzle
643a6f51c1 Fix a memory leak when a filter fails to initialize. 2010-01-23 07:52:13 +00:00
ed
09818ac28e Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
2010-01-02 09:58:07 +00:00
kientzle
cf3a89cae5 Remove some test files that are no longer used. 2009-12-30 06:37:58 +00:00
kientzle
55e0fdf678 Reserve constants for RPM unwrapper and XAR reader. 2009-12-30 06:28:30 +00:00
kientzle
62d14f706b Libarchive in FreeBSD is now synced up with 2.7.901a from
libarchive.googlecode.com
2009-12-30 06:25:19 +00:00
kientzle
2e55106068 UU decoder. Now that libarchive can recursively taste input streams,
you can do things like this:  tar xvf archive.tar.gz.uu
2009-12-30 06:12:03 +00:00
kientzle
fa94194ff8 A raft of test changes and improvements from the Googlecode repository.
In particular, this includes tests for the new features I've merged
over the last few days.
2009-12-30 05:59:21 +00:00
kientzle
c6d0b4dd8b Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader
from googlecode:
 * Support for zisofs compressed entries
 * Support for relocated deep directories
 * Direct calculation of link counts for accurate nlink values
   even on images that lack Rockridge extensions
 * Faster handling of the internal file lists.
 * Better detection of ISO variants
2009-12-30 05:30:35 +00:00
kientzle
6e9959a0d1 Rationalize the support for cryptographic hashes. 2009-12-29 06:39:07 +00:00
kientzle
3558b2ba52 Essentially eliminate problems with false hardlinks in POSIX cpio
archives by generating synthetic ino values and mapping values
from disk into the new values.
2009-12-29 06:34:23 +00:00
kientzle
4ccc9e75ff Clear extraneous error messages. 2009-12-29 06:27:19 +00:00
kientzle
98c884f078 Zip write support for libarchive.
The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.
2009-12-29 06:15:32 +00:00
kientzle
40c74f9008 If we're linking against liblzma, allow the decompressor to use up to
1<<30 bytes of memory, which is required for some streams.

Also, try to make the taster more discriminating about raw lzma streams.
The detection here is still really weak, though; please use xz instead
of lzma.
2009-12-29 06:06:20 +00:00
kientzle
9f1cacc2a4 Minor style fixes plus a fix for an obscure crash on certain malformed
mtree files.
2009-12-29 05:52:13 +00:00
kientzle
a587aab420 Be a little more skeptical of dev/ino matches when reading cpio files.
This eliminates some false-positives in the hardlink detection logic.
2009-12-29 05:50:34 +00:00
kientzle
b51f9a7986 Style and portability fixes for pax writer. Mostly very routine, except for:
* Use ino64 where appropriate
 * Don't pass atime or nsec to ustar formatter
2009-12-29 05:47:46 +00:00
kientzle
97620eccc8 Style fixes to tar reader:
For portability, prefer int64_t to off_t.
  Improve numeric overflow handling when parsing.
  Fix some variable types.
  Eliminate some unused results.
2009-12-29 05:44:39 +00:00
kientzle
de6816e634 Various style fixes to the 'newc' cpio writer:
* Warn about truncation of ino
 * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation
 * Eliminate some unused variables
2009-12-29 05:41:57 +00:00
kientzle
cbe5f60f48 Various fixes when creating objects on disk:
* Write xattrs last instead of first (required on platforms that use
   system xattrs for security attributes)
 * Better handling of chdir() failures
 * Don't bother trying to shorten files via seek()/write()
 * Fix build on systems that lack link()/symlink()/mknod()
 * Prefer futimens()/utimensat() when they're present
2009-12-29 05:35:40 +00:00
kientzle
25112939de Catch decompression failures earlier. In particular, this gives
immediate feedback if we fail to fork an external decompression program.
2009-12-29 05:30:23 +00:00
kientzle
8471ffeefd Various style and portability fixes, including:
* Enforce option interface can only be used before the archive is opened
 * Correctly handle large skips on platforms with 32-bit off_t
 * Use int64_t instead of off_t
2009-12-29 05:28:28 +00:00
kientzle
7bdc19612b 64-bit ino support and discourage bad use of this header. 2009-12-29 05:20:12 +00:00
kientzle
e86a477412 Portability. 2009-12-28 06:59:35 +00:00
kientzle
1a725d203e Remove some dead assignments, fix some declarations. 2009-12-28 03:33:05 +00:00
kientzle
36429d6a27 Clarify an example so Linux folks won't keep getting confused by this point. 2009-12-28 03:31:29 +00:00
kientzle
751833b2d3 Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r. 2009-12-28 03:30:31 +00:00
kientzle
749f336c04 Fix some unused variables and dead assignments. 2009-12-28 03:28:21 +00:00
kientzle
2533f9e873 Remove an unused variable and an unreachable statement. 2009-12-28 03:25:33 +00:00
kientzle
8ae7c78a5f Fix line endings. 2009-12-28 03:24:56 +00:00
kientzle
49d75536f6 Discourage external use of this header. 2009-12-28 03:20:54 +00:00
kientzle
77b3bad2c6 Remove unused variable. 2009-12-28 03:14:30 +00:00
kientzle
6bd6257279 O_BINARY for Windows. 2009-12-28 03:13:49 +00:00
kientzle
21be9a3355 Handle Zip CRC validation for uncompressed Zip archives even on
platforms that lack zlib.
2009-12-28 03:11:36 +00:00
kientzle
c3c58ccb3c Include limits.h; remove unused variable. 2009-12-28 03:06:27 +00:00
kientzle
9a47973065 Use ino64 interface. 2009-12-28 03:05:31 +00:00
kientzle
4fa2e480dc Use new ino64 interface. 2009-12-28 03:03:00 +00:00
kientzle
b1d1d36a22 New archive_file_count() utility. 2009-12-28 02:58:14 +00:00
kientzle
cd7df27c58 Portability fixes. 2009-12-28 02:45:56 +00:00
kientzle
5b4a30a490 Various portability fixes, plus:
* New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates
2009-12-28 02:41:27 +00:00
kientzle
a591c39057 Remove an unused variable and an unnecessary increment. 2009-12-28 02:33:22 +00:00
kientzle
d9802a8c44 Eliminate an unused assignment. 2009-12-28 02:29:21 +00:00
kientzle
0ce60e8858 Portability: Set the file descriptor to binary mode on Win32 2009-12-28 02:28:44 +00:00
kientzle
110ffdeb53 Discourage outside use of this internal header. 2009-12-28 02:26:06 +00:00
kientzle
8b011c5d8a Remove dead assignment. 2009-12-28 02:22:41 +00:00
kientzle
49f605d812 Portability:
* some non-FreeBSD platforms do actually define __FBSDID() in sys/cdefs.h
 * Borland C <sigh>
2009-12-28 02:22:04 +00:00
kientzle
5796104304 Portability: terminate abnormally via abort() instead of segfault,
watch the return value from write(), and avoid signed arithmetic on
unsigned values.
2009-12-28 02:20:23 +00:00
kientzle
0e3650b26a Allow more formats to be active at a time; discourage outside use. 2009-12-28 02:18:55 +00:00
kientzle
d2acaa3902 Enforce this as an internal-only header. 2009-12-28 02:18:26 +00:00
kientzle
ac6b305380 Discourage people from using this header outside of libarchive. 2009-12-28 02:17:53 +00:00
kientzle
c28b62ef5f Compatibility: I found some more compilers that don't like 'inline' keyword.
Protection:  Discourage people from using this header outside libarchive.
2009-12-28 02:17:15 +00:00
kientzle
55a923f0e8 Sync with googlecode some changes that have no impact on FreeBSD. 2009-12-28 02:14:09 +00:00
kientzle
c947d50aa1 Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r
and a minor style fix for the hash function.
2009-12-28 02:09:57 +00:00
kientzle
9de6e5e034 Catch certain gzip failures at close time. 2009-12-28 02:05:28 +00:00
kientzle
2c11cde23a Remove a dead assignment. 2009-12-28 02:04:42 +00:00
kientzle
9901fb459e Remove some unused variables and dead assignments. 2009-12-28 02:03:54 +00:00
kientzle
2a6c4953df Update the hard-coded configuration for libarchive. 2009-12-28 02:01:42 +00:00
kientzle
4b77c8c24b Update format manpages for libarchive. 2009-12-28 01:50:23 +00:00
kientzle
4cc001f60b Merge two cpio fixes from libarchive.googlecode.com:
1) Avoid an infinite loop in the header resync for certain malformed
    archives.
 2) Don't try to match hardlinks if the nlinks count is < 2.   This
    reduces the likelihood of a false hardlink match due to ino truncation.

MFC after:	7 days
2009-12-10 06:42:28 +00:00
kientzle
081d756b8d Fiz /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
MFC after: 7 days
2009-09-08 05:02:41 +00:00
kientzle
aefa5719c9 Update tests to match r195873, which corrected how hardlinked files
on iso9660 images were returned.  While I'm poking around, update
some comments around this area to try to clarify what's going on and
what still remains to be improved.
2009-09-08 04:52:12 +00:00
kientzle
90b1d6b5da The parser for Rockridge symlinks tended to insert
extra slashes at the beginning of absolute targets.

Thanks to Jung-uk Kim for pointing this out to me.

Approved by:	re (kib)
2009-07-26 18:11:44 +00:00
kientzle
a8dfa34a4d Libarchive recognizes hardlinked files on ISO images,
but returned them incorrectly, causing tar to actually
erase the resulting file while trying to restore the
link.  This one-line fix corrects the hardlink descriptions
to avoid this problem.

Thanks to Jung-uk Kim for pointing this out.

Approved by:	re (kib)
2009-07-25 18:11:55 +00:00
kensmith
9c2c634ee9 Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
kientzle
19f69f425d Fix "tar --options=iso9660:joliet" and other uses
of format-specific options.
2009-06-20 06:02:21 +00:00
kientzle
52e9bd2d6b Include libmd and libcrypto in DPADD 2009-05-30 17:26:55 +00:00
kientzle
5c79b23a33 Link libarchive against -lmd and -lcrypto.
Thanks to Ed Schouten for the clue.
2009-05-30 07:08:16 +00:00
kientzle
040089ea08 Include the 2 byte length field for the optional "extra data"
field when computing the length of the gzip header.

Thanks to Dag-Erling for pointing me to the OpenSSH tarballs,
which are the first files I've seen that actually used this field.
2009-05-23 04:31:05 +00:00
kientzle
bf0fcf9072 Eliminate duplicate error messages from "tar c".
Reported by:	pav@
2009-05-13 00:04:08 +00:00
kientzle
360e38ed6b Partially revert r191171, which went too far in trying
to eliminate some duplicated code.  In particular,
archive_read_open_filename() has different close
handling than archive_read_open_fd(), so delegating
the former to the latter in the degenerate case
(a NULL filename is treated as stdin) broke reading
from pipelines.  In particular, this fixes occasional
port failures that were seen when using "gunzip | tar"
pipelines under /bin/csh.

Thanks to Alexey Shuvaev for reporting this failure and
patiently helping me to track down the cause.
2009-05-07 23:01:03 +00:00
kientzle
cbe0dc1453 Document the liblzma support.
Unfortunately, liblzma itself is GPLed, so unlikely to become part of
the FreeBSD base system.
However, the core lzma compression/decompression code is public
domain, so it should be feasible for someone to create a compatible
library without the GPL strings.
2009-04-27 22:39:43 +00:00
kientzle
07fcd69a1a Symlink some additional man page entries. 2009-04-27 20:23:22 +00:00
kientzle
21847f984f Merge r991 from libarchive.googlecode.com: Various updates
to archive_read.3 manpage, including documentation for the
new "raw" handler.
2009-04-27 20:13:13 +00:00
kientzle
9d6bfffd74 Merge r990,r1044 from libarchive.googlecode.com:
read_support_format_raw() allows people to exploit libarchive's
automatic decompression support by simply stubbing out the
archive format handler.
The raw handler is not enabled by support_format_all(), of course.
It bids 1 on any non-empty input and always returns a single
entry named "data" with no properties set.
2009-04-27 20:09:05 +00:00
kientzle
7a3f45569d Merge r1061,r1062,r1063 from libarchive.googlecode.com:
Fix reading big-endian binary cpio archives, and add a test.
While I'm here, add a note about Solaris ACL extension for cpio,
which should be relatively straightforward to support.

Thanks to: Edward Napierala, who sent me a big-endian cpio archive
from a Solaris system he's been playing with.
Pointy hat: me
2009-04-27 19:30:09 +00:00
kientzle
afb10f1ced Merge r1034 from libarchive.googlecode.com:
Put a much larger file on the reference ISO for this test.
2009-04-27 19:23:53 +00:00
kientzle
ce69be627f Merge r1058 from libarchive.googlecode.com: Require that each
test source file has exactly one DEFINE_TEST().
2009-04-27 19:20:25 +00:00
kientzle
da7d877bb1 ino_t varies across platforms; casting (int) here avoids
various pointless complaints.
2009-04-27 19:14:43 +00:00
kientzle
2d15a97dfa Merge r1032 from libarchive.googlecode.com:
Make test_fuzz a bit more sensitive by actually reading the body
of each entry instead of skipping it.
While I'm here, move the "UnsupportedCompress" macro into the
only file that still uses it.
2009-04-27 18:55:22 +00:00
kientzle
f5c80120f0 Merge r1054,r1060 from libarchive.googlecode.com:
* assertEqualMem() now takes void * arguments
 * Be a little smarter about what we hexdump when assertEqualMem() fails
2009-04-27 18:39:55 +00:00
kientzle
1b3570dae1 Merge r1021 from libarchive.googlecode.com:
If we know it's a socket, say so.
2009-04-27 18:35:03 +00:00
kientzle
379ce7aa2e Merge r1052,r1055 from libarchive.googlecode.com:
Clear the error flag on entry to a few more API functions.
2009-04-27 18:33:08 +00:00
kientzle
8958ccc8b0 Merge r1053,r1055,r1056,r1057,r1065 from libarchive.googlecode.com:
* Fix parsing of POSIX.1e ACLs from Solaris tar archives
 * Test the above
 * Preserve the order of POSIX.1e ACL entries
 * Update tests whose results depended on the order of ACL entries
 * Identify NFSv4 ACLs in Solaris tar archives and warn that
   they're not yet supported. (In particular, don't try to parse
   them as POSIX.1e ACLs.)

Thanks to: Edward Napierala sent me some Solaris 10 tar archives to test
2009-04-27 18:27:54 +00:00
kientzle
fd252e7b25 Merge r988,r1064 from libarchive.googlecode.com:
* Split whiny skip function to create a new best-effort skip_lenient()
 * Correctly increment the top-level file position only for the top filter
 * Simulate skip by reading against the current filter, not the top filter

The latter two bugs aren't currently visible because no existing
filter delegates skip operations.
2009-04-27 17:42:02 +00:00
kientzle
59019e8516 Reading an mtree file is supposed to provide
access to the file data (if the file exists on
disk).  This was broken for the first regular
file; fix it and add a test so it won't break again.

In particular, this fixes the following idiom for creating
a tar archive in which every file is owned by root:

tar cf - --format=mtree . 	\
    | sed -e 's/uname=[a-z]*/uname=root/' -e 's/uid=[0-9]*/uid=0/' \
    | tar cf - @-
2009-04-26 18:57:50 +00:00
kientzle
46f05636f6 Various improvements to the tar.5 manpage, including
descriptions of the GNU tar "posix-style" sparse format,
clarification of the Solaris tar ACL storage,
and a few comments about Mac OS X tar's resource storage.
2009-04-26 18:46:40 +00:00
kientzle
b61442ef84 Exit with ARCHIVE_FATAL if the ISO image is truncated. 2009-04-26 18:43:49 +00:00
kientzle
7cd5382c58 Remove an unused variable.
Thanks to:	Christoph Mallon
2009-04-26 18:24:14 +00:00
kientzle
caeeb07250 Rely on OpenSSL bits only if we're building a system with OpenSSL.
Also, adjust the MD5 calls to rely on libmd instead of libcrypto,
so we keep MD5 support even in the !OpenSSL case.
2009-04-18 06:06:47 +00:00
kientzle
b5849a1a1f Correct and update the manpage to include
more details about some of the formats and
to briefly describe the mtree writing capability.
2009-04-18 03:47:29 +00:00
kientzle
c88488a33c Disabling the crypto bits should quiet tinderbox while I
track down the library dependencies that are screwing up the /rescue build.
2009-04-17 07:28:49 +00:00
kientzle
3b75ab9db9 Publicize a handful of new functions and bump the version number
to indicate that this is synchronized with the recent libarchive 2.7.0
release.
2009-04-17 01:07:37 +00:00
kientzle
621fee72b3 Merge lots of test suite updates from libarchive.googlecode.com. 2009-04-17 01:06:31 +00:00
kientzle
68cb951cd0 FreeBSD has a lot of crypto functions used by the recent mtree writer updates. 2009-04-17 01:04:23 +00:00
kientzle
6a280329f3 Ensure that the option setters return OK (option used) even
for options that don't change the list of keywords.
2009-04-17 01:03:52 +00:00
kientzle
a0fd30c500 Fix a memory leak: Release the current list of /set keywords
even when we exit on an error.
2009-04-17 01:02:56 +00:00
kientzle
d64af012dd Document the new read options interface and the new read_header2() call. 2009-04-17 01:02:12 +00:00
kientzle
4fc369c955 Dynamically size the buffer we pass to getgrgid_r() and getpwuid_r().
Keep the buffer in the cache object so we don't have to keep doing this.
2009-04-17 01:01:15 +00:00
kientzle
89890db5f1 Don't match an empty file on a read error. 2009-04-17 01:00:11 +00:00
kientzle
14086ec084 When pulling metadata from disk, lookup the user and group name at the same time. 2009-04-17 00:59:34 +00:00
kientzle
10afcc1c3d LZW bugfix: when we hit end-of-file, return an invalid code. 2009-04-17 00:58:44 +00:00
kientzle
1823f67ce5 Minor fix: some platforms require both inttypes.h and stdint.h. 2009-04-17 00:57:11 +00:00
kientzle
881237337e 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
kientzle
f0cc6d2f97 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
kientzle
ef74aa99b9 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
kientzle
5387456c70 Accept empty options, add a new read_next_header2() which is more
efficient for some uses.
2009-04-17 00:47:16 +00:00
kientzle
a3b67d5802 Properly clone and free the recently-added "sourcepath" field. 2009-04-17 00:45:47 +00:00
kientzle
fecbf2a696 Use thread-safe getgrnam_r() and getpwnam_r(); dynamically size
the buffer used by this.
2009-04-17 00:44:47 +00:00
kientzle
1b0a8e451a Fix a minor memory leak. 2009-04-17 00:44:03 +00:00
kientzle
e0de5527ea Merge from libarchive.googlecode.com: Numerous fixes to the
write options handling, including documentation.
2009-04-17 00:42:45 +00:00
kientzle
e5db25af25 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
kientzle
dfd11f0658 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
kientzle
f4376efe43 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
kientzle
9ad1176240 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
kientzle
fc11fa5eb3 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
kientzle
67650d3061 Merge from libarchive.googlecode.com r756,r761:
Document the new archive_read_disk API.
2009-04-12 05:04:02 +00:00
kientzle
9838f0384d 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
kientzle
f3675e5a86 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
kientzle
340b6be8ec 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
kientzle
6b98ad97fb 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
kientzle
d8942ed61f 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
kientzle
8aaf316fdd 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
kientzle
75dde6e038 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
kientzle
028251f74a Fix spelling. 2009-03-07 07:19:25 +00:00
kientzle
71a038a8db 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
kientzle
4ea9b12e92 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
kientzle
1fb91ed696 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
kientzle
6cf3aa0ad2 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
kientzle
d830a61934 Merge r540 from libarchive.googlecode.com: Interix doesn't have inttypes.h
either.  <sigh>
2009-03-07 03:04:06 +00:00
kientzle
4c7dead147 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
kientzle
1047af1f55 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
kientzle
d60e57a219 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
kientzle
de0aeab80c 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
kientzle
f2d3c8136f Merge r591 from libarchive.googlecode.com: signed/unsigned fixes. 2009-03-07 02:29:43 +00:00
kientzle
c62420e1f0 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
kientzle
d7e906ff7d 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