| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
archiver for Fourth Edition through Sixth Edition Unix; it was
replaced by tar in Seventh Edition. (First Edition through
Third Edition used "tap.")
Unfortunately, tp was not so very standard; there were a
few different variants. The code here attempts to support
what I believe were the most common variants.
tp support is not yet enabled by archive_read_support_format_all(),
as I'm not yet entirely comfortable with the detection
heuristics. People interested in experimenting can
add archive_read_support_format_tp() just after any calls
to archive_read_support_format_all() in bsdtar to see how
well this works.
TODO: tp format is roughly similar in structure to dump/restore
archive formats used by many systems. It should be possible
to generalize this code to handle many dump/restore variants.
Format detection heuristics are going to be rough, though.
Thanks to: Warren Toomey, whose very basic tp extraction programs
and documentation made this possible.
Notes:
svn path=/head/; revision=154444
|
| |
|
|
| |
Notes:
svn path=/head/; revision=152285
|
| |
|
|
|
|
|
|
|
| |
expr and printf are not available during installworld, so
use /bin/sh arithmetic expansion instead of expr and simply
give up on vanity formatting. ;-)
Notes:
svn path=/head/; revision=151332
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
systems (or on FreeBSD systems when using ports).
2) Overhaul the versioning logic. In particular,
SHLIB_MAJOR number is now computed as "major+minor",
which ensures library versions are the same for
the FreeBSD build system and the portable
libtool/autoconf/automake build system.
Notes:
svn path=/head/; revision=151275
|
| |
|
|
|
|
|
|
|
|
| |
Also fixes a memory leak reported by Andrew Turner.
PR: bin/83476
Thanks to: Dan Lukes, Andrew Turner
Notes:
svn path=/head/; revision=150407
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(wchar_t is defined in stddef.h, and only two files need more than that.)
Portability: Since the wchar requirements are really quite modest,
it's easy to define basic replacements for wcslen, wcscmp, wcscpy,
etc, for use on systems that lack <wchar.h>. In particular, this allows
libarchive to be used on older OpenBSD systems.
Notes:
svn path=/head/; revision=149964
|
| |
|
|
|
|
|
|
|
|
| |
been bumped since RELENG_5.
Reviewed by: ru
Approved by: re (not needed for commit check but in principle...)
Notes:
svn path=/head/; revision=148297
|
| |
|
|
|
|
|
|
| |
available, stub out flags restore on platforms that don't support it,
update autoconf to probe for fchflags and lchflags support.
Notes:
svn path=/head/; revision=146980
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and restoring the metadata. In particular, the metadata-restore
functions now all accept a file descriptor and a pathname. If the
file descriptor is set and the platform supports the appropriate
syscall, restore the metadata through the file descriptor. Otherwise,
restore it through the pathname. This is complicated by varying
syscall support (FreeBSD has an fchmod(2) but no fchflags(2), for
example) and because non-file entries don't have an fd to use in
restoring attributes (for example, mknod(2) doesn't return a file
handle).
MFC after: 14 days
Notes:
svn path=/head/; revision=146471
|
| |
|
|
|
|
|
| |
Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
Notes:
svn path=/head/; revision=145455
|
| |
|
|
|
|
|
| |
Thanks to: Juergen Lock
Notes:
svn path=/head/; revision=145203
|
| |
|
|
| |
Notes:
svn path=/head/; revision=144267
|
| |
|
|
|
|
|
|
| |
testing, I've archived and restored dir trees with ~1MB pathnames.
Most formats, of course, have much smaller limits.
Notes:
svn path=/head/; revision=143484
|
| |
|
|
|
|
|
|
|
| |
occurred with large read-ahead requests. This only affected
formats that incorrectly make large requests (ZIP did this until
recently) or with block sizes over 32k.
Notes:
svn path=/head/; revision=141850
|
| |
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=140790
|
| |
|
|
|
|
|
|
|
|
| |
expand and clarify the description of the client
callback functions and how they should handle errors.
Thanks to: Antony Dovgal
Notes:
svn path=/head/; revision=139913
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to be able to extract a TOC and extract files from
the couple of ISO images I've tested it with.
Treat this as experimental proof-of-concept code for the
moment. There are still a bunch of debug messages (there
are a few oddities in ISO9660 that I haven't yet figured
out how to handle), a lot of bugs to be addressed (this
code leaks memory very badly), and a lot of missing features (no
Rockridge support, in particular). I'd appreciate
feedback from anyone who understands ISO9660 format
better than I do. ;-)
Suggested by: Robert Watson
Notes:
svn path=/head/; revision=139565
|
| |
|
|
|
|
|
|
|
| |
* Update Version
* Add a missing MLINK
* Fix 'distfile' target so it works from a clean checkout
Notes:
svn path=/head/; revision=137240
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137237
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137235
|
| |
|
|
|
|
|
| |
Discussed with: kientzle
Notes:
svn path=/head/; revision=136403
|
| |
|
|
|
|
|
|
|
|
|
| |
.h files. This simplifies the Makefile here a bit and makes it behave
better in a couple of situations. While I'm here, clean up some comments
and try to improve the organization a bit.
Thanks to: Ruslan Ermilov (The Marvelous Makefile Guru)
Notes:
svn path=/head/; revision=134587
|
| |
|
|
|
|
|
|
|
|
| |
simple errx() function.
Improve behavior when bzlib/zlib are missing by detecting and
issuing an error message on attempts to read gzip/bzip2 compressed
archives.
Notes:
svn path=/head/; revision=133710
|
| |
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=133277
|
| |
|
|
|
|
|
| |
is used on systems that lack C99 headers (such as FreeBSD 4).
Notes:
svn path=/head/; revision=133257
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is present for FreeBSD. If you "make distfile" on FreeBSD, you will
soon have a tar.gz file suitable for deploying to other systems
(complete with the expected "configure" script, etc). This latter
relies (at least for now) on the GNU auto??? tools. (I like autoconf
okay, but someday I hope to write a custom Makefile.in and dispense
with automake, which is somewhat odious.)
As part of this, I've cleaned up some of the conditional
compilation options, added make-foo to construct archive.h dynamically
(it now contains some version constants), and added some useful
informational files.
Notes:
svn path=/head/; revision=133244
|
| |
|
|
|
|
|
|
|
| |
"Makefile," so I'm moving all the FreeBSD build machinery to
"Makefile.freebsd", with the default "Makefile" containing a single
include.
Notes:
svn path=/head/; revision=132971
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the regular ustar header that are overridden by the pax
extended attributes. As a result, it makes perfect sense to
use numeric extensions in the regular ustar header so that readers
that don't understand pax extensions but do understand some other
extensions can still get useful information out of it.
This is especially important for filesizes, as the failure to
read a file size correctly can get the reader out of sync.
This commit introduces a "non-strict" option into the internal
function to format a ustar header. In non-strict mode, the formatter
will use longer octal values (overwriting terminators) or binary
("base-256") values as needed to ensure that large file sizes,
negative mtimes, etc, have the correct values stored in the regular
ustar header.
Notes:
svn path=/head/; revision=132647
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132614
|
| |
|
|
|
|
|
|
|
|
|
|
| |
archive_entry.
Update the Makefile MLINKS and manpage to bring it up-to-date with
the current status of archive_entry. At least the manpage actually
lists all of the functions now, even if it doesn't really yet explain
them all.
Notes:
svn path=/head/; revision=131211
|
| |
|
|
| |
Notes:
svn path=/head/; revision=129991
|
| |
|
|
|
|
|
|
| |
Also, add it to archive_read_support_compression_all()
so that typical clients get it pulled in by default.
Notes:
svn path=/head/; revision=129791
|
| |
|
|
| |
Notes:
svn path=/head/; revision=129215
|
| |
|
|
| |
Notes:
svn path=/head/; revision=129172
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
archive formats supported by libarchive, with some information about
the relative strengths and weaknesses of each format and notes about
issues with libarchive's support for those formats.
This page should make it unnecessary to list all of the libarchive
formats in the manpage of each program that uses libarchive.
Such programs can simply refer to libarchive-formats(5).
Notes:
svn path=/head/; revision=128701
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new fflags support in archive_entry supports Linux and FreeBSD
file flags and is a bit more gracious about unrecognized flag names
than strtofflags(3). This involves some minor API breakage.
The default tar format ("restricted pax") now enables pax extensions
when archiving files that have flags. In particular, copying dir
heirarchies with 'bsdtar cf - -C src . | bsdtar xpf - -C dest' now
preserves file flags. (Note the "p" on extract!)
While I'm here, fill in some additional explanation in the
archive_entry.3 manpage, fill in some missing MLINKS, mark some
overlooked internal functions 'static', and make a few minor style
fixes.
Notes:
svn path=/head/; revision=128669
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
try to set ACLs even if fflag restore fails, first cut at reading
Solaris tar ACLs
Code improvement: merge gnu tar read support into main tar reader;
this eliminates a lot of duplicate code and generalizes the tar
reader to handle formats with GNU-like extensions.
Style: Makefile cleanup, eliminate 'dmalloc' references, remove 'tartype'
from archive_entry (this makes archive_entry more format-agnostic)
Thanks to: David Magda for providing Solaris tar test files
Notes:
svn path=/head/; revision=128148
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=127912
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Disabled shared-library building, as some API breakage is
still likely. (I didn't realize it was turned on by default.) If
you have an existing /usr/lib/libarchive.so.2, I recommend deleting it.
* Pax interchange format now correctly stores and reads UTF8
for extended attributes. In particular, pax format can portably
handle arbitrarily long pathnames containing arbitrary characters.
* Library compiles cleanly at -O2, -O3, and WARNS=6 on all
FreeBSD-CURRENT platforms.
* Minor portability improvements inspired by Juergen Lock
and Greg Lewis. (Less reliance on stdint.h, isolating of
various portability-challenged constructs.)
* archive_entry transparently converts multi-byte <-> wide character
strings, allowing clients and format handlers to deal with either
one, as appropriate.
* Support for reading 'L' and 'K' entries in standard tar archives
for star compatibility.
* Recognize (but don't yet handle) ACL entries from Solaris tar.
* Pushed format-specific data for format readers down into
format-specific storage and out of library-global storage. This
should make it easier to maintain individual formats without mucking
with the core library management.
* Documentation updates to track the above changes.
* Updates to tar.5 to correct a few mistakes and add some additional
information about GNU tar and Solaris tar formats.
Notes:
* The basic 'tar' reader is getting more general; there's not much
point in keeping the 'gnutar' reader separate. Merging the two
would lose a bunch of duplicate code.
* The libc ACL support is looking increasingly inadequate for my needs
here. I might need to assemble some fairly significant code for
parsing and building ACLs. <sigh>
Notes:
svn path=/head/; revision=127212
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Portability: Thanks to Juergen Lock, libarchive now compiles cleanly
on Linux. Along the way, I cleaned up a lot of error return codes and
reorganized some code to simplify conditional compilation of certain
sections.
Bug fixes:
* pax format now actually stores filenames that are 101-154
characters long.
* pax format now allows newline characters in extended attributes
(this fixes a long-standing bug in ACL handling)
* mtime/atime are now restored for directories
* directory list is now sorted prior to fix-up to permit
correct restore of non-writable dir heirarchies
Notes:
svn path=/head/; revision=126782
|
| |
|
|
|
|
|
|
|
|
| |
Unfortunately, the stock zlib.h is not:
line 885: 'err' parameter shadows global 'err' definition from <err.h>
Back the WARNS level down to 3 to accomodate borked zlib.h.
Notes:
svn path=/head/; revision=125726
|
|
|
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.
Notes:
svn path=/head/; revision=125635
|