summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_write_set_format_ar.c
Commit message (Collapse)AuthorAgeFilesLines
* Add hook routine archive_write_ar_finish() which writes the 'ar'kaiw2008-01-311-1/+19
| | | | | | | | | | | | | | | | | | | global header if nothing else has been written before the closing of the archive. This will change the behaviour when creating archives without members, i.e., instead of generating a 0-size archive file, an archive with just the global header (8 bytes in total) will be created and it is indeed a valid archive by the definition of libarchive, thus subsequent operation on this archive will be accepted. This especially solves the failure caused by following sequence: (several ports do) % ar cru libfoo.a # without specifying obj files % ranlib libfoo.a Reviewed by: kientzle, jkoshy Approved by: kientzle Approved by: jkoshy (mentor) Reported by: erwin MFC after: 1 month
* Update libarchive to 2.4.10. This includes a number of improvementskientzle2007-12-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* libarchive 2.2.3kientzle2007-05-291-66/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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.
* Overhaul of 'ar' support:kientzle2007-04-141-2/+2
| | | | | | | | | | | | | | | | | | | * 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.
* 'ar' format support for libarchive, contributed by Kai Wang.kientzle2007-04-031-0/+492
OpenPOWER on IntegriCloud