aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge r990,r1044 from libarchive.googlecode.com:Tim Kientzle2009-04-271-0/+1
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=191594
* Rely on OpenSSL bits only if we're building a system with OpenSSL.Tim Kientzle2009-04-181-0/+6
| | | | | | | | Also, adjust the MD5 calls to rely on libmd instead of libcrypto, so we keep MD5 support even in the !OpenSSL case. Notes: svn path=/head/; revision=191241
* Merge new xz/lzma support from libarchive.googlecode.com.Tim Kientzle2009-04-171-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=191172
* Merge from libarchive.googlecode.com r756,r761:Tim Kientzle2009-04-121-0/+11
| | | | | | | Document the new archive_read_disk API. Notes: svn path=/head/; revision=190957
* Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590Tim Kientzle2009-03-061-0/+3
| | | | | | | | | | | | | | | | | | from libarchive.googlecode.com: Add a new "archive_read_disk" API that provides the important service of reading metadata from the disk. In particular, this will make it possible to remove all knowledge of extended attributes, ACLs, etc, from clients such as bsdtar and bsdcpio. Closely related, this API also provides pluggable uid->uname and gid->gname lookup and caching services similar to the uname->uid and gname->gid services provided by archive_write_disk. Remember this is also required for correct ACL management. Documentation is still pending... Notes: svn path=/head/; revision=189429
* New mtree writer, thanks to Joerg Sonnenberger.Tim Kientzle2008-08-311-0/+1
| | | | | | | Obtained from: Joerg Sonnenberger Notes: svn path=/head/; revision=182517
* Remove the stillborn attempt to cleanup tests as well as the build dir.Tim Kientzle2008-08-241-4/+0
| | | | Notes: svn path=/head/; revision=182101
* Fail copying path/.. only if SECURE_NODOTDOT was specified.Tim Kientzle2008-08-241-0/+4
| | | | | | | | | | Since we already warn for any '..' elements in that case, the extra "lastdotdot" tracking turns out to be unnecessary. PR: bin/124924 Notes: svn path=/head/; revision=182097
* archive.h is no longer constructed from archive.h.in,Tim Kientzle2008-06-151-9/+1
| | | | | | | | so we can rename it and drop some no-longer-necessary build magic from the Makefile. Notes: svn path=/head/; revision=179790
* MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit moreTim Kientzle2008-05-261-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=179321
* Add MLINK for archive_write_close.Kai Wang2008-03-211-0/+1
| | | | | | | Approved by: jkoshy(mentor), kientzle Notes: svn path=/head/; revision=177473
* New public functions archive_entry_copy_link() and archive_entry_copy_link_w()Tim Kientzle2008-03-141-0/+2
| | | | | | | | override the currently set link value, whether that's a hardlink or a symlink. Plus documentation update and tests. Notes: svn path=/head/; revision=177191
* Support for writing 'compress' format, thanks to Joerg Sonnenberger.Tim Kientzle2008-03-141-0/+1
| | | | Notes: svn path=/head/; revision=177183
* Track version # from the portable release.Tim Kientzle2008-01-231-1/+1
| | | | Notes: svn path=/head/; revision=175592
* The mtree.5 file has been moved to src/usr.sbin/mtree.Tim Kientzle2008-01-011-1/+0
| | | | Notes: svn path=/head/; revision=175031
* Update libarchive to 2.4.10. This includes a number of improvementsTim Kientzle2007-12-301-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | that I've been working on but put off committing until after the RELENG_7 branch, including: * New manpages: cpio.5 mtree.5 * New archive_entry_strmode() * New archive_entry_link_resolver() * New read support: mtree format * Internal API change: read format auction only runs once * Running the auction only once allowed simplifying a lot of bid logic. * Cpio robustness: search for next header after a sync error * Support device nodes on ISO9660 images * Eliminate a lot of unnecessary copies for uncompressed archives * Corrected handling of new GNU --sparse --posix formats * Correctly handle a zero-byte write to a compressed archive * Fixed memory leaks Many of these improvements were motivated by the upcoming bsdcpio front-end. There have also been extensive improvements to the libarchive_test test harness, which I'll commit separately. Notes: svn path=/head/; revision=174991
* Add archive_entry_copy_gname() and archive_entry_copy_uname()Tim Kientzle2007-07-151-0/+2
| | | | | | | | | | functions. Approved by: re (bmah) MFC after: 3 days Notes: svn path=/head/; revision=171459
* Correct multiple security issues in how libarchive handles corruptColin Percival2007-07-121-1/+1
| | | | | | | | | | | tar archives, including a potentially exploitable buffer overflow. Approved by: re (kensmith, security blanket) Reviewed by: kientzle Security: FreeBSD-SA-07:05.libarchive Notes: svn path=/head/; revision=171402
* Fix installworld: /usr/bin/printf isn't available then,Tim Kientzle2007-07-071-1/+3
| | | | | | | | | | so use awk's printf for the formatting here instead. Pointy hat: Yours Truly Approved by: re Notes: svn path=/head/; revision=171294
* New "version stamp" simplifies determining the exact versionTim Kientzle2007-07-061-7/+11
| | | | | | | | | | | of libarchive being used. I've been taking advantage of this with a recent round of updates to libarchive_test so that it can test older and newer versions of the library. Approved by: re (Ken Smith) Notes: svn path=/head/; revision=171279
* Support for writing the 'newc' cpio format, plus a minimal test harnessTim Kientzle2007-06-221-0/+1
| | | | | | | | | | for the cpio formats. Thanks to: Rudolf Marek Approved by: re@ Notes: svn path=/head/; revision=170984
* libarchive 2.2.3Tim Kientzle2007-05-291-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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. Notes: svn path=/head/; revision=170079
* s/@VERSION@/@ARCHIVE_VERSION@/Colin Percival2007-05-021-1/+1
| | | | | | | | | | This is a no-op as far as FreeBSD is concerned, but makes libarchive more autoconf-friendly. Approved by: kientzle Notes: svn path=/head/; revision=169201
* Consolidate numeric limit macros in one place; include themTim Kientzle2007-04-151-1/+1
| | | | | | | only on platforms that need them. FreeBSD doesn't. Notes: svn path=/head/; revision=168743
* Overhaul of 'ar' support:Tim Kientzle2007-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | * use "AR_GNU" as the format name instead of AR_SVR4 (it's what everyone is going to call it anyway) * Simplify numeric parsing to unsigned (none of the numeric values should ever be negative); don't run off end of numeric fields. * Finish parsing the common header fields before the next I/O request (which might dump the contents) * Be smarter about format guessing and trimming filenames. * Most of the magic values are only used in one place, so just inline them. * Many more comments. * Be smarter about handling damaged entries; return something reasonable. * Call it a "filename table" instead of a "string table" * Update tests. Enable selection of 'ar', 'arbsd', and 'argnu' formats by name (this allows bsdtar to create ar format archives). The 'ar' writer still needs some work; it should reject entries that aren't regular files and should probably also strip leading paths from filenames. Notes: svn path=/head/; revision=168740
* Fix the build by temporarily disabling 'ar' support untilTim Kientzle2007-04-141-1/+0
| | | | | | | I can clean it up. Notes: svn path=/head/; revision=168730
* Fix the build.Tim Kientzle2007-04-141-1/+1
| | | | | | | | | N.B. 'ar' format support is broken right now, it's not passing tests. If I can't find the problem soon, I'll back out the last commit. Notes: svn path=/head/; revision=168708
* Conventionally, tar archives have always included a trailing '/'Tim Kientzle2007-04-141-1/+1
| | | | | | | | | | | | | | | | for directories. bsdtar used to add this, but that recently got lost somehow. So now I'm adding it back in libarchive. The only odd part of doing this in libarchive: Adding a directory to a tar archive and then reading it back again can yield a different name. Add a test case to exercise some boundary conditions with tar filenames and ensure that trailing slashes are added to dir names only as necessary. Thanks to: Oliver Lehmann for bringing this regression to my attention. Notes: svn path=/head/; revision=168706
* Now that libarchive is being built in more environments,Tim Kientzle2007-04-121-1/+2
| | | | | | | | | factor out the platform-specific configuration header a bit more cleanly. Suggested by: Joerg Sonnenberger Notes: svn path=/head/; revision=168648
* Enable 'ar' support; hook it up to the build andTim Kientzle2007-04-071-1/+3
| | | | | | | enable it with _read_support_format_all(). Notes: svn path=/head/; revision=168453
* Move archive_read_data_into_buffer into archive_read.c, simplify itsColin Percival2007-04-051-1/+0
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=168388
* Notice when mkdir() fails.Tim Kientzle2007-03-241-1/+1
| | | | | | | | | | | Don't change permissions on an existing dir unless _EXTRACT_PERM is requested. In particular, bsdtar -x should not edit mode of existing dirs now; bsdtar -xp will. Notes: svn path=/head/; revision=167863
* When ARCHIVE_EXTRACT_UNLINK is requested:Tim Kientzle2007-03-131-1/+1
| | | | | | | | | | | * Only try to remove the existing item if we're not restoring a directory. * If unlink fails, try rmdir next. This should fix the broken --unlink option in bsdtar. Thanks again to: Kris Kennaway, for beating up bsdtar on pointyhat. Notes: svn path=/head/; revision=167499
* Libarchive 2.0.23:Tim Kientzle2007-03-111-1/+1
| | | | | | | | | | | | | | | * The ACL formatter was mis-formatting entries which had a user/group ID but no name. Make the parser tolerant of these, so that old archives can be correctly restored; fix the formatter to generate correct entries. * Fix overwrite detection by introducing a new "FAILED" return code that indicates the current entry cannot be continued but the archive as a whole is still sound. * Header cleanup: Remove some unused headers, add some that are required with new Linux systems. Notes: svn path=/head/; revision=167449
* libarchive 2.0Tim Kientzle2007-03-031-2/+16
| | | | | | | | | | | | | | | | | | | | | | * 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. Notes: svn path=/head/; revision=167186
* Add support for a new archive format "empty" that reads empty files.Tim Kientzle2007-02-011-0/+1
| | | | Notes: svn path=/head/; revision=166387
* Bump the libarchive version number, correct the shell hackery to breakTim Kientzle2006-11-261-5/+6
| | | | | | | the full version down into major/minor values. Notes: svn path=/head/; revision=164630
* Write-blocking cleanup, largely thanks to Colin Percival (cperciva@).Tim Kientzle2006-11-261-1/+3
| | | | | | | | | | | | | | | | | | | | | * 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 Notes: svn path=/head/; revision=164628
* Unbreak libarchive on arm. Two parts of libarchive relied on aTim Kientzle2006-11-261-5/+0
| | | | | | | | | | | | | | | | | | traditional shortcut of defining on-disk layouts using structures of character arrays. Unfortunately, as recently discussed on cvs-all@, this usage is not actually sanctioned by the standards and specifically fails on GCC/arm (unless your data structures happen to be "naturally aligned"). The new code defines offsets/sizes for data fields and accesses them using explicit pointer arithmetic, instead of casting to a structure and accessing structure fields. In particular, the new code is now clean with WARNS=6 on arm. MFC after: 14 days Notes: svn path=/head/; revision=164609
* Connect four new files to the build.Tim Kientzle2006-11-241-1/+9
| | | | | | | PR: bin/86742 Notes: svn path=/head/; revision=164589
* Officially rename archive_{read,write}_open_file() toTim Kientzle2006-11-201-2/+4
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=164448
* Eliminate documentation references to a non-existent function.Tim Kientzle2006-11-061-1/+0
| | | | Notes: svn path=/head/; revision=164014
* Computing SHLIB_MAJOR is not a good idea. It's really a FreeBSDTim Kientzle2006-11-061-6/+3
| | | | | | | | | system value that has no real relation to the libarchive version. (Except, of course, that any ABI breakage will force both to be incremented.) Notes: svn path=/head/; revision=164013
* Some minor corrections:Tim Kientzle2006-09-051-0/+4
| | | | | | | | | | * 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 Notes: svn path=/head/; revision=162028
* Simplify some of the wide-character handling, inspiredTim Kientzle2006-05-011-1/+1
| | | | | | | | | | in part by OpenBSD's not-quite-standard-compliant standard libraries. (No loss of functionality, just minor recoding to not rely on certain "standard" facilities that weren't actually needed.) Notes: svn path=/head/; revision=158203
* POSIX.1e-style Extended Attribute supportTim Kientzle2006-03-211-1/+1
| | | | | | | | | | | | | | This commit implements storing/reading POSIX.1e-style extended attribute information in "pax" format archives. An outline of the storage format is in the tar.5 manpage. The archive_read_extract() function has code to restore those archives to disk for Linux; FreeBSD implementation is forthcoming. Many thanks to Jaakko Heinonen for finding flaws in earlier proposals and doing the bulk of the coding in this work. Notes: svn path=/head/; revision=156961
* The idea of supporting 'tp' was a fun one, but it isTim Kientzle2006-03-111-1/+0
| | | | | | | | really not worth the effort to develop and maintain support for a format that hasn't been used for 30 years. ;-/ Notes: svn path=/head/; revision=156584
* Remove configure.ac.in and reorganize a few other things. This isTim Kientzle2006-03-081-91/+27
| | | | | | | | part of a program to remove the non-FreeBSD autoconf/automake build system for libarchive from the FreeBSD source tree. Notes: svn path=/head/; revision=156417
* Fix an aliasing error in the new TP support and reenable it in the build.Tim Kientzle2006-01-261-0/+1
| | | | Notes: svn path=/head/; revision=154847
* Disable "tp" support until I figure out why it's breaking the build. <sigh>Tim Kientzle2006-01-181-1/+0
| | | | Notes: svn path=/head/; revision=154501