aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for "tp" format. tp was the standard systemTim Kientzle2006-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add missing shared library interdependencies.Ruslan Ermilov2005-11-101-0/+2
| | | | Notes: svn path=/head/; revision=152285
* Fix installworld breakage. <sigh>Tim Kientzle2005-10-141-2/+2
| | | | | | | | | 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
* 1) Use GNU libtool to build shared libraries on non-FreeBSDTim Kientzle2005-10-131-21/+65
| | | | | | | | | | | | | 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
* Add a lot of error checks, based on the patches provided by Dan Lukes.Tim Kientzle2005-09-211-1/+1
| | | | | | | | | | Also fixes a memory leak reported by Andrew Turner. PR: bin/83476 Thanks to: Dan Lukes, Andrew Turner Notes: svn path=/head/; revision=150407
* Style issue: Don't include <wchar.h> where it is not actually needed.Tim Kientzle2005-09-101-1/+1
| | | | | | | | | | | | (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
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | 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
* Minor clean up for flags restoration: Use fchflags/lchflags whenTim Kientzle2005-06-041-1/+1
| | | | | | | | 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
* Start to address the race issue between restoring a file's contentsTim Kientzle2005-05-211-1/+1
| | | | | | | | | | | | | | | | | 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
* Fix broken ACL configuration on FreeBSD 4 and Linux.Tim Kientzle2005-04-231-2/+3
| | | | | | | Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing Notes: svn path=/head/; revision=145455
* Update "make distfile" to use newest automake/autoconf from ports.Tim Kientzle2005-04-171-2/+2
| | | | | | | Thanks to: Juergen Lock Notes: svn path=/head/; revision=145203
* Clean up the support for extracting very long pathnames.Tim Kientzle2005-03-291-1/+1
| | | | Notes: svn path=/head/; revision=144267
* Support extracting entries with pathnames longer than PATH_MAX. InTim Kientzle2005-03-131-1/+1
| | | | | | | | 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
* Fix a buffer overflow in the "none" decompression handler thatTim Kientzle2005-02-131-1/+1
| | | | | | | | | 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
* Basic support for ZIP archives.Tim Kientzle2005-01-251-1/+3
| | | | | | | | | | 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
* Documentation improvements. In particular,Tim Kientzle2005-01-081-0/+1
| | | | | | | | | | 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
* First cut support for extracting from ISO9660 disk images.Tim Kientzle2005-01-021-1/+2
| | | | | | | | | | | | | | | | | | | 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
* Makefile tweaks:Tim Kientzle2004-11-051-2/+3
| | | | | | | | | * Update Version * Add a missing MLINK * Fix 'distfile' target so it works from a clean checkout Notes: svn path=/head/; revision=137240
* Revert 1.24: Brain glitch. <sigh>Tim Kientzle2004-11-051-1/+1
| | | | Notes: svn path=/head/; revision=137237
* archive.h gets built in ${.OBJDIR}Tim Kientzle2004-11-051-1/+1
| | | | Notes: svn path=/head/; revision=137235
* Build as a shared lib again.David E. O'Brien2004-10-111-4/+0
| | | | | | | Discussed with: kientzle Notes: svn path=/head/; revision=136403
* Per Ruslan, bsd.lib.mk already has support for dynamically-generatedTim Kientzle2004-09-011-17/+11
| | | | | | | | | | | .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
* Eliminate reliance on non-portable <err.h> by implementing a veryTim Kientzle2004-08-141-1/+1
| | | | | | | | | | 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
* Split archive_{read,write}_finish into separate "close" (finish the archiveTim Kientzle2004-08-071-4/+5
| | | | | | | | | | 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
* Fix the calculation of the most negative int64_t value, whichTim Kientzle2004-08-071-2/+2
| | | | | | | is used on systems that lack C99 headers (such as FreeBSD 4). Notes: svn path=/head/; revision=133257
* libarchive now has two complete build systems. The usual "Makefile"Tim Kientzle2004-08-071-1/+217
| | | | | | | | | | | | | | | | | 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
* For the "portable" distribution, the configure script will overwriteTim Kientzle2004-08-011-159/+1
| | | | | | | | | "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
* When writing "pax" format, readers are supposed to ignore fieldsTim Kientzle2004-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Define the PACKAGE_NAME and PACKAGE_VERSION macros.Tim Kientzle2004-07-241-0/+3
| | | | Notes: svn path=/head/; revision=132614
* Add two new convenience functions to query the uid/gid from anTim Kientzle2004-06-271-4/+21
| | | | | | | | | | | | 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
* Add MLINKS for new API functions.Tim Kientzle2004-06-021-2/+3
| | | | Notes: svn path=/head/; revision=129991
* Connect libarchive decompress support to the build.Tim Kientzle2004-05-271-1/+3
| | | | | | | | 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
* Use WARNS?=3 for these in the arm case for now, due to toolchain issues.Olivier Houchard2004-05-141-0/+4
| | | | Notes: svn path=/head/; revision=129215
* Add MLINK for newly-added archive_read_extract_set_progress_callback(3).Tim Kientzle2004-05-131-0/+1
| | | | Notes: svn path=/head/; revision=129172
* Add the libarchive-formats.5 manpage. This summarizes the variousTim Kientzle2004-04-281-0/+1
| | | | | | | | | | | | | 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
* Update file flag handling.Tim Kientzle2004-04-261-1/+13
| | | | | | | | | | | | | | | | | | | 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
* More work on ACLs: fix error in archive_entry's ACL parsing code,Tim Kientzle2004-04-121-83/+72
| | | | | | | | | | | | | | | | | 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
* Overhauled ACL support. This makes us compatibleTim Kientzle2004-04-051-5/+8
| | | | | | | | | | | | | | | 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
* Many fixes:Tim Kientzle2004-03-191-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Many fixes.Tim Kientzle2004-03-091-5/+5
| | | | | | | | | | | | | | | | | | | 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
* libarchive itself is now completely clean at WARNS=10 on all architectures.Tim Kientzle2004-02-121-1/+3
| | | | | | | | | | 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
* Initial import of libarchive.Tim Kientzle2004-02-091-0/+119
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