summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
Commit message (Collapse)AuthorAgeFilesLines
* Fix installworld: /usr/bin/printf isn't available then,kientzle2007-07-071-1/+3
| | | | | | | so use awk's printf for the formatting here instead. Pointy hat: Yours Truly Approved by: re
* Make test suite work with libarchive 1.3.1: Take advantage ofkientzle2007-07-0617-25/+289
| | | | | | | | | | | | | ARCHIVE_VERSION_STAMP to selectively disable tests that don't apply to that version; new "skipping()" function reports skipped tests; modify final summary to report component test failures and skips. Note: I don't currently intend to MFC the test suite itself; anyone interested should just checkout and use this version of the test suite, which should work for any library version. Approved by: re (Ken Smith, blanket)
* New "version stamp" simplifies determining the exact versionkientzle2007-07-064-23/+70
| | | | | | | | 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)
* Fix 'bsdtar -t' on tape drives. Libarchive uses thekientzle2007-06-263-12/+45
| | | | | | | | | | | | | skip() callback to skip over data when reading uncompressed archives. This gets invoked, for example, during tar -t or tar -x with a filename argument. The revised code only calls [lf]seek() on regular files, instead of depending on the kernel to return an error. Thanks to: bde for explaining the implementation of lseek() Thanks to: Daniel O'Connor for testing Approved by: re (Ken Smith) MFC after: 5 days
* Ouch. I partially screwed up the last commit bykientzle2007-06-221-1/+0
| | | | | | | enabling a test that's not ready yet. <sigh> Pointy hat: /me Approved by: re@
* Support for writing the 'newc' cpio format, plus a minimal test harnesskientzle2007-06-227-0/+393
| | | | | | | for the cpio formats. Thanks to: Rudolf Marek Approved by: re@
* Track whether the current read stream supports seek(). For now, wekientzle2007-06-182-0/+22
| | | | | | | assume yes unless seek has previously failed, but I fear I'll have to avoid seeks under other circumstances. (For instance, tape drives on FreeBSD seem to return garbage from lseek().) Also, optimize away zero-byte skips.
* Make 'ar' write test a tad more portable.kientzle2007-06-131-3/+3
|
* Read support for the new GNU tar sparse formats added in gtar 1.15 andkientzle2007-06-133-84/+570
| | | | gtar 1.16.
* Add some options to libarchive_test:kientzle2007-06-131-12/+50
| | | | | -k: like make -k, try to keep going after errors. -q: quiet
* Fix a broken function declaration.kientzle2007-06-131-1/+1
|
* Options spring cleanup:sepotvin2007-06-131-1/+0
| | | | | | | | | | - Add and document the KVM and KVM_SUPPORT options that are needed for the ifmcstats(3) makefile - Garbage collect unused variables - Add missing inclusion of bsd.own.mk where needed Approved by: kan (mentor) Reviewed by: ru
* Don't lose leading '/' for pathnames exactly 101 bytes long.kientzle2007-06-112-8/+25
| | | | Also, update the test harness to exercise this case.
* libarchive 2.2.3kientzle2007-05-2973-1372/+3889
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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.
* Replace "sizeof(struct bucket[cache_size])" withcperciva2007-05-221-4/+4
| | | | | | | | "cache_size * sizeof(struct bucket)". The former is valid in C99 but can confuse earlier compilers, while the latter is a standard idiom which all C compilers understand. Approved by: kientzle
* Don't test for NULL when it is both unnecessary (the pointer is checkedcperciva2007-05-211-1/+1
| | | | | | | | against NULL when it is first allocated) and pointless (we've already dereferenced the pointer several times). Found by: Coverity Prevent(tm) CID: 3204
* Remove pointless code: Don't assign a value to a variable when we'recperciva2007-05-211-1/+0
| | | | | | | | | | | going to overwrite it with a new value a few lines later. Visual inspection of the surrounding code indicates that the code does what it's supposed to do; i.e., the pointless code wasn't supposed to be doing something other than what it was doing. CID: 3323 Found by: Coverity Prevent(tm)
* Don't forget to free a string allocated by strdup where necessary.cperciva2007-05-191-2/+9
| | | | | Found by: Coverity Prevent Coverity ID: CID 3132
* s/@VERSION@/@ARCHIVE_VERSION@/cperciva2007-05-022-3/+3
| | | | | | | This is a no-op as far as FreeBSD is concerned, but makes libarchive more autoconf-friendly. Approved by: kientzle
* Fix a memory leak in the uname/gname lookup cache.kientzle2007-04-201-11/+11
| | | | Thanks to: VMiklos
* In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors whichcperciva2007-04-161-0/+6
| | | | | | | | | | | | | | | | occur on the write side of extracting a file to ARCHIVE_WARN errors when returning them from archive_read_extract. In bsdtar: Use the return code from archive_read_data_into_fd and archive_read_extract to determine whether we should continue trying to extract an archive after one of the entries fails. This commit makes extracting a truncated tarball complain once about the archive being truncated, instead of complaining twice (once when trying to extract an entry, and once when trying to seek to the next entry). Discussed with: kientzle
* Properly cleanup the UID/GID lookup data.kientzle2007-04-151-0/+4
|
* Don't free a NULL pointer.kientzle2007-04-151-1/+2
|
* Clean up a lot of memory leaks in the libarchive test harness.kientzle2007-04-1512-0/+29
|
* Thanks to Colin for catching my mixup. The original problem wasn'tkientzle2007-04-151-3/+8
| | | | suppressing the second error, it was failing to address the first.
* Consolidate numeric limit macros in one place; include themkientzle2007-04-156-49/+44
| | | | only on platforms that need them. FreeBSD doesn't.
* Pass through error message if any operation fails, not just the last one.kientzle2007-04-141-1/+1
|
* Overhaul of 'ar' support:kientzle2007-04-147-228/+235
| | | | | | | | | | | | | | | | | | | * 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.
* Invoke utime(2) properly. (It's only used on platformskientzle2007-04-141-2/+2
| | | | that lack utimes(2).)
* Fix the build by temporarily disabling 'ar' support untilkientzle2007-04-141-1/+0
| | | | I can clean it up.
* Fix the build.kientzle2007-04-142-2/+2
| | | | | | 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.
* Fixes from Joerg Sonnenberger, reviewed by Kai Wang.kientzle2007-04-141-49/+81
|
* Conventionally, tar archives have always included a trailing '/'kientzle2007-04-145-74/+261
| | | | | | | | | | | | | 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.
* Portability: Don't use mkdtemp() when mkdir() will suffice.kientzle2007-04-141-2/+2
| | | | If we can't create the dir, just give up.
* More portability improvements from Martin Koeppe:kientzle2007-04-143-11/+75
| | | | | | conditionally use utime() when utimes() is not available; allow the most common wide-char functions to be replaced when local alternatives are lacking.
* Portability.kientzle2007-04-131-0/+2
|
* Now that libarchive is being built in more environments,kientzle2007-04-122-8/+6
| | | | | | factor out the platform-specific configuration header a bit more cleanly. Suggested by: Joerg Sonnenberger
* Make Lint happier.kientzle2007-04-122-2/+3
|
* Fix build on Solaris.kientzle2007-04-071-1/+1
|
* Enable 'ar' support; hook it up to the build andkientzle2007-04-073-2/+7
| | | | enable it with _read_support_format_all().
* Clarification: Point people to archive_read_data(), whichkientzle2007-04-071-1/+4
| | | | should be used instead of archive_read_data_into_buffer().
* When copying data from one archive to another, only set the errorcperciva2007-04-071-5/+4
| | | | | | message in the reader to the error message from the writer if the error which occurred was in the writer. This avoids error messages of "Empty error message" when extracting truncated archives.
* Move archive_read_data_into_buffer into archive_read.c, simplify itscperciva2007-04-054-55/+23
| | | | | | | | 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
* More corrections from Joerg Sonnenberger.kientzle2007-04-051-3/+3
|
* Style fixes from Joerg Sonnenberger: use correct types,kientzle2007-04-051-5/+7
| | | | spell lint(1) comments correctly.
* From Joerg Sonnenberger: Fix a number of style gaffes,kientzle2007-04-054-26/+35
| | | | including type puns and avoidable casts.
* Wordsmithing.kientzle2007-04-051-12/+9
|
* Parse SCHILY.dev and SCHILY.ino fields. These are ignored when extractingcperciva2007-04-031-0/+4
| | | | | | | files, but used during archive creation. This change unbreaks # tar -cf rcp.tar /bin/rcp # tar -cf rcp-copy.tar @rcp.tar # cmp rcp.tar rcp-copy.tar
* 'ar' format support for libarchive, contributed by Kai Wang.kientzle2007-04-036-0/+1376
|
* Now that there is always a compression-layer skip function available,cperciva2007-04-021-9/+3
| | | | | | | | | skip over the end-of-entry padding instead of reading and discarding it. Considering that tar files normally have a block size of 10kB, this isn't likely to avoid reading any data, but at least it makes the code simpler and clearer.
OpenPOWER on IntegriCloud