Commit Graph

39 Commits

Author SHA1 Message Date
Tim Kientzle
4d24dc3687 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
Tim Kientzle
7ea8a85dbc Document the new read options interface and the new read_header2() call. 2009-04-17 01:02:12 +00:00
Tim Kientzle
fa07de5eeb MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit more
feedback, but the 2.5 branch is shaping up nicely.)

In addition to many small bug fixes and code improvements:
 * Another iteration of versioning; I think I've got it right now.
 * Portability:  A lot of progress on Windows support (though I'm
   not committing all of the Windows support files to FreeBSD CVS)
 * Explicit tracking of MBS, WCS, and UTF-8 versions of strings
   in archive_entry; the archive_entry routines now correctly return
   NULL only when something is unset, setting NULL properly clears
   string values.  Most charset conversions have been pushed down to
   archive_string.
 * Better handling of charset conversion failure when writing or
   reading UTF-8 headers in pax archives
 * archive_entry_linkify() provides multiple strategies for
   hardlink matching to suit different format expectations
 * More accurate bzip2 format detection
 * Joerg Sonnenberger's extensive improvements to mtree support
 * Rough support for self-extracting ZIP archives.  Not an ideal
   approach, but it works for the archives I've tried.
 * New "sparsify" option in archive_write_disk converts blocks of nulls
   into seeks.
 * Better default behavior for the test harness; it now reports
   all failures by default instead of coredumping at the first one.
2008-05-26 17:00:24 +00:00
Joseph Koshy
c7f03ab040 Use .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.
Correct a typo [a misplaced comma].

Reviewed by:		ru
2008-03-10 14:45:29 +00:00
Tim Kientzle
d2d0f66a30 Fill in a missing 'e'
Thanks to: Kai Wang, for pointing this out
Approved by: re (bmah)
MFC after: 3 days
2007-09-19 16:37:45 +00:00
Tim Kientzle
b48b40f1f8 libarchive 2.2.3
* "compression_program" support uses an external program
  * Portability: no longer uses "struct stat" as a primary
    data interchange structure internally
  * Part of the above: refactor archive_entry to separate
    out copy_stat() and stat() functions
  * More complete tests for archive_entry
  * Finish archive_entry_clone()
  * Isolate major()/minor()/makedev() in archive_entry; remove
    these from everywhere else.
  * Bug fix: properly handle decompression look-ahead at end-of-data
  * Bug fixes to 'ar' support
  * Fix memory leak in ZIP reader
  * Portability: better timegm() emulation in iso9660 reader
  * New write_disk flags to suppress auto dir creation and not
    overwrite newer files (for future cpio front-end)
  * Simplify trailing-'/' fixup when writing tar and pax
  * Test enhancements:  fix various compiler warnings, improve
    portability, add lots of new tests.
  * Documentation: document new functions, first draft of
    libarchive_internals.3

MFC after: 14 days
Thanks to: Joerg Sonnenberger (compression_program)
Thanks to: Kai Wang (ar)
Thanks to: Colin Percival (many small fixes)
Thanks to: Many others who sent me various patches and problem reports.
2007-05-29 01:00:21 +00:00
Tim Kientzle
06d581da80 Clarification: Point people to archive_read_data(), which
should be used instead of archive_read_data_into_buffer().
2007-04-07 05:53:11 +00:00
Colin Percival
ceb38a3142 Move archive_read_data_into_buffer into archive_read.c, simplify its
implementation, and mark it as deprecated.  It will be removed entirely
in libarchive 3.0 (in FreeBSD 8.0?) but there's no reason for anyone to
use it instead of archive_read_data.

Approved by:	kientzle
2007-04-05 15:51:19 +00:00
Tim Kientzle
f81da3e584 libarchive 2.0
* libarchive_test program exercises many of the core features
  * Refactored old "read_extract" into new "archive_write_disk", which
    uses archive_write methods to put entries onto disk.  In particular,
    you can now use archive_write_disk to create objects on disk
    without having an archive available.
  * Pushed some security checks from bsdtar down into libarchive, where
    they can be better optimized.
  * Rearchitected the logic for creating objects on disk to reduce
    the number of system calls.  Several common cases now use a
    minimum number of system calls.
  * Virtualized some internal interfaces to provide a clearer separation
    of read and write handling and make it simpler to override key
    methods.
  * New "empty" format reader.
  * Corrected return types (this ABI breakage required the "2.0" version bump)
  * Many bug fixes.
2007-03-03 07:37:37 +00:00
Tim Kientzle
a9490c597b Add support for a new archive format "empty" that reads empty files. 2007-02-01 06:18:17 +00:00
Tim Kientzle
63165a380d Fix the copyright notice; it was always intended to be
a vanilla 2-clause BSD license, but somehow some confusing
extra verbage get copied from somewhere.

Also, update the copyright dates to 2007 for all of the files.

Prompted by: several questions about what those extra words really mean
2007-01-09 08:05:56 +00:00
Colin Percival
a0b84e7498 Change the client skipper API to use off_t instead of size_t/ssize_t; but
wrap this within #if/#else/#endif so that it will only take effect once
ARCHIVE_API_VERSION is increased (which should happen on HEAD some time
between now and when RELENG_7 is branched).
2007-01-05 10:48:18 +00:00
Tim Kientzle
dc46be1cbf Write-blocking cleanup, largely thanks to Colin Percival (cperciva@).
* If write block size is zero, don't block at all.
     This supports the unusual requirement of applications
     that need "no-delay" writes.
   * Expose _write_finish_entry() to give such applications more
     control over write boundaries.  (Normal applications do not
     need this, as entries are completed automatically.)
   * Correct the type of write callbacks; this is a minor API
     change that does not affect the ABI.
   * Correct the error handling in _write_next_header() around
     completing the previous entry.
   * Correct the documentation for block-size markers:  Remove
     docs for the long-defunct _read_set_block_size(); document
     all of the write block size manipulators.

MFC after: 14 days
2006-11-26 19:00:50 +00:00
Tim Kientzle
73a2505465 Document the new _open_FILE() and _open_memory() interfaces.
PR: bin/86742
2006-11-24 05:34:23 +00:00
Tim Kientzle
af6513d3ea Officially rename archive_{read,write}_open_file() to
archive_{read,write}_open_filename():
   * Update Makefile to build the files using the new name.
   * Update docs to document the new names, mentioning the
old ones as "deprecated synonyms."
   * The old filenames will be reconnected to the build soon;
I'll soon recyce those files for a slightly different purpose.
2006-11-20 16:48:04 +00:00
Tim Kientzle
c12a9d810e Some minor corrections:
* Expose functions for setting the "skip file" dev/ino information
  * Expose functions for setting/querying the block size on reads
  * Correctly propagate errors out of archive_read_close/archive_write_close
  * Update manpage with information about new functions
2006-09-05 05:59:46 +00:00
Ruslan Ermilov
de599f05ea Fix prototypes. 2005-11-24 10:06:05 +00:00
Tim Kientzle
818898d384 Correct the documentation for archive_read_data_into_buffer()
Thanks to: Marcus Alves Grando
PR: docs/85854
MFC after: 7 days
2005-09-20 17:48:57 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Tim Kientzle
21805f33bf Correct return values in myopen() and myclose() in Example code.
Bug: docs/79318
Thanks to: Derek Tattersall
MFC after: 7 days
2005-05-21 19:38:19 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Tim Kientzle
c56f8b32c1 Update the format descriptions to include ISO9660 and ZIP support.
Also remove some unnecessary blank lines from archive_read.3.
2005-02-12 23:09:44 +00:00
Tim Kientzle
5958ff08bd Basic support for ZIP archives.
Only supports "deflate" and "none" compression for now.

Also, add a few clarifications to the archive_read.3 manpage as
requested by William Dean DeVries.
2005-01-25 06:07:28 +00:00
Tim Kientzle
972d9bed42 Bring some file descriptions in line with reality.
Also, add some hints to help people understand which
functions are most appropriate for typical uses.
2005-01-12 05:56:49 +00:00
Ruslan Ermilov
2d82ac3110 Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
Tim Kientzle
f731478646 libarchive does much more than just tar ;-) 2005-01-10 05:11:15 +00:00
Tim Kientzle
09cad9b550 Documentation improvements. In particular,
expand and clarify the description of the client
callback functions and how they should handle errors.

Thanks to: Antony Dovgal
2005-01-08 19:51:04 +00:00
Tim Kientzle
67afe2c071 Correctly document the order of arguments
to archive_read_open and archive_write_open.

Thanks to: Antony Dovgal
2005-01-08 18:32:49 +00:00
Tim Kientzle
91ce8f27d8 Split archive_{read,write}_finish into separate "close" (finish the archive
and close it) and "finish" (destroy the object) functions.   For backwards
compat and simplicity, have "finish" invoke "close" transparently if needed.
This allows clients to close the archive and check end-of-operation
statistics before destroying the object.
2004-08-07 19:22:50 +00:00
Ruslan Ermilov
284fcee0c0 Fixed cross-references in SEE ALSO.
Emininated double space and hard sentence breaks.
2004-07-04 21:15:37 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Tim Kientzle
1393f9061e Read gtar-style sparse archives.
This change also pointed out one API deficiency: the
archive_read_data_into_XXX functions were originally defined to return
the total bytes read.  This is, of course, ambiguous when dealing with
non-contiguous files.  Change it to just return a status value.
2004-06-27 01:15:31 +00:00
Tim Kientzle
071a23c2d6 Correct some spelling errors. 2004-06-08 00:23:27 +00:00
Tim Kientzle
e250dd4fad Refactor read_data:
* New read_data_block is both sparse-file aware and uses zero-copy semantics
 * Push read_data_block down into specific formats (opens door to
   various encoded entry bodies, such as zip or gtar -S)
 * Reimplement read_data, read_data_skip, read_data_into_fd in terms
   of new read_data_block.
 * Update documentation
It's unfortunate that I couldn't just call the new interface
archive_read_data, but didn't want to upset the API that much.
2004-06-02 08:14:43 +00:00
Tim Kientzle
2023cfd41b Document support for reading .Z compressed archives.
Correct a few other minor nits.
2004-05-27 04:21:52 +00:00
Tim Kientzle
199984b3b2 Add hook for a client-provided progress callback to be invoked
during lengthy extract operations.
2004-05-13 06:01:14 +00:00
Tim Kientzle
71b44796d9 Overhauled ACL support. This makes us compatible
with 'star' ACL handling, though there's still a
bit more work needed in this area.

Added 'write_open_fd' and 'read_open_fd' to simplify, e.g.,
tar's u and r modes.  Eliminated old 'write_open_file_position'
as a bad idea.  (It required closing/reopening files to
do updates, which led to unpleasant implications.)

Various other minor fixes, API tweaks, etc.
2004-04-05 21:12:29 +00:00
Tim Kientzle
bca59216f7 Add ARCHIVE_EXTRACT_UNLINK option to permit clients to
control how archive_extract handles pre-existing files.
(Not implemented yet, but documented.)
2004-03-06 01:05:32 +00:00
Tim Kientzle
2710e4d1ef Initial import of libarchive.
What it is:
   A library for reading and writing various streaming archive
   formats, especially tar and cpio.  Being a library, it should
   be easy to incorporate into pkg_* tools, sysinstall, and any
   other place that needs to read or write such archives.

Features:
  * Full automatic detection of both compression and archive format.
  * Extensible internal architecture to make it easy to add new formats.
  * Support for "pax interchange format," a new POSIX-standard tar format
    that eliminates essentially all of the restrictions of historic formats.
  * BSD license

Thanks to: jkh for pushing me to start this work, gordon for
  encouraging me to commit it, bde for answering endless style
  questions, and many others for feedback and encouragement.

Status: Pretty good overall, though there are still a few rough edges and
  the library could always use more testing.  Feedback eagerly solicited.
2004-02-09 23:22:54 +00:00