259065 |
07-Dec-2013 |
gjb |
- Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1
[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
255893 |
26-Sep-2013 |
delphij |
Temporarily disable iconv for non-shared library builds. The dynamic loading of conversation table is not yet compatible with static builds.
Approved by: re (gjb)
|
248616 |
22-Mar-2013 |
mm |
MFV r248590,248594: Update libarchive to 3.1.2
Some of new features: - support for lrzip and grzip compression - support for writing tar v7 format - b64encode and uuencode filters - support for __MACOSX directory in Zip archives - support for lzop compresion (external utility)
|
245854 |
23-Jan-2013 |
brooks |
Remove several MLINKS that were listed twice.
|
238909 |
30-Jul-2012 |
mm |
Backport NFSv4 ACL fix from libarchive master branch.
Source: https://github.com/libarchive/libarchive/commit/f67370d5
Obtained from: libarchive (master branch)
|
238883 |
29-Jul-2012 |
mm |
Catch up config_freebsd.h with libarchive 3.0.4
|
238856 |
28-Jul-2012 |
mm |
Update libarchive to 3.0.4
|
233352 |
23-Mar-2012 |
dim |
Silence alignment warnings from clang in libarchive's ppmd code (which is actually third-party code). Clang even warns about alignment issues on x86, and the warnings are not needed there.
|
232153 |
25-Feb-2012 |
mm |
Update libarchive to 3.0.3
Some of new features: - New readers: RAR, LHA/LZH, CAB reader, 7-Zip - New writers: ISO9660, XAR - Improvements to many formats, especially including ISO9660 and Zip - Stackable write filters to write, e.g., tar.gz.uu in a single pass - Exploit seekable input; new "seekable" Zip reader can exploit the Zip Central Directory when it's available; the old "streamable" Zip reader is still fully supported for cases where seeking is not possible.
Full release notes available at: https://github.com/libarchive/libarchive/wiki/ReleaseNotes
|
228797 |
22-Dec-2011 |
mm |
Use contrib sources for building libarchive, tar and cpio. Make "make test" fully operational.
MFC after: 2 weeks
|
228748 |
20-Dec-2011 |
mm |
Sync libarchive with vendor branch release/2.8:
3730: Fix issue 174 (Windows path names, not relevant for FreeBSD)
3734: Merge r1989: archive_clear_error should set errno to 0.
3735: Merge r3247 from trunk: Clear errors before returning from archive_read_support_format_all()
3799: Check the position before dereferencing the pointer. This avoids dereferencing one byte past the end of a string
3824: Merge r3823 from trunk for issue 199 (hang in iso9660 reading)
Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks
|
228745 |
20-Dec-2011 |
mm |
Update libarchive, tar and cpio to version 2.8.5
The following additional vendor revisions are applied:
Revision 3740: Use archive_clear_error() to clear the error markers.
Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks
|
228744 |
20-Dec-2011 |
mm |
Merge vendor revision 3723: Fixes extraction of Zip entries that use length-at-end without specifying either the compressed or uncompressed length. In particular, fixes bsdtar extraction of such files.
Obtained from: http://code.google.com/p/libarchive Reported by: Patrick Lamaiziere <patfbsd@davenulle.org> (freebsd-stable@) MFC after: 1 week
|
226643 |
22-Oct-2011 |
kientzle |
Fix Buildworld WITHOUT_OPENSSL.
PR: kern/160922 MFC after: 3 days
|
226638 |
22-Oct-2011 |
kientzle |
Correct the spelling of getgrgid and getpwuid in the man page.
MFC after: 3 days
|
225525 |
13-Sep-2011 |
kientzle |
Fix cpio on ARM.
PR: bin/160430 Submitted by: Ian Lepore Approved by: re (Kostik Belousov) MFC after: 7 days
|
225329 |
02-Sep-2011 |
mm |
Import additional bugfix for reading and extracting makefs-created ISO images with tar.
Vendor revision 3648 (merge of 3647): Additional fix to issue 168 because the change of r3642 was not sufficient. - Make sure "CL" entry appear after its "RE" entry which the "CL" entry should be connected with. - Give consideration to the case that the top level "RE" entry has already been exposed outside before its tree.
Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3648) MFC after: 3 days
|
225167 |
25-Aug-2011 |
mm |
Import bugfix for reading and extracting of FreeBSD ISO images with tar.
Upstream revision 3645 (merge of 3642): Change the mechanism handling a rr_moved directory, which is Rockridge extension that can exceed the limitation of a maximum directory depth of ISO 9660. - Stop reading all entries at a time. - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE" have information to rebuild a full directory tree. - Tweak some related tests since we use Headsort for re-ordering entries and it cannot make a steady order when the keies of the entries are the same.
http://code.google.com/p/libarchive/issues/detail?id=168
Reviewed by: kientzle Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3645) MFC after: 3 days
|
224700 |
07-Aug-2011 |
mm |
Merge revision 3554 from libarchive's release/2.8 branch:
Partial merge of 2431 from trunk: Retry writes on EINTR. This should fix the SIGINT handler in bsdtar. Note: The rest of r2431 can't be merged, since it interacts with a big write-side rearchitecture.
PR: bin/149409 Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
|
224691 |
07-Aug-2011 |
mm |
Add compatibility for ISO images created with unfixed makefs that violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD. This allows tar to read FreeBSD distribution ISO images created with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).
In addition, merge following important bugfixes from libarchive's release/2.8 branch:
Revision 2812: Merge 2811 from trunk: Don't try to verify that compression-level=0 produces larger results than the default compression, since this isn't true for all versions of liblzma.
Revision 2817: Merge 2814 from trunk: Fix Issue 121 (mtree parser error) http://code.google.com/p/libarchive/issues/detail?id=121
Revision 2820: Fix issue 119. Change the file location check that a file location does not exceed volume block. New one is that a file content does not exceed volume block(end of an ISO image). It is better than previous check even if the issue did not happen.
While reading an ISO image generated by an older version of mkisofs utility, a file location indicates the end the ISO image if its file size is zero and it is the last file of all files of the ISO image, so it is possible that the location value is the same as the number of the total block of the ISO image.
http://code.google.com/p/libarchive/issues/detail?id=119
Revision 2955: Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when the open has failed and we're trying to write Zip format.
http://code.google.com/p/libarchive/issues/detail?id=134
Revision 2958: Followup on Issue 134: 1) Port test_open_failure to libarchive 2.8 branch to test the problem reported in Issue 134. This test also shows that archive_read_open() sometimes fails to report open errors correctly. 2) Fix the bug in archive_read.c 3) Comment out the tests that close functions are invoked promptly when open fails; that's fully fixed in libarchive 3.0, but I don't think it's worth fixing here.
Revision 3484: Use uintmax_t with %ju
Revision 3487: Fix issue 163. Correctly allocate enough memory for a input buffer saved.
http://code.google.com/p/libarchive/issues/detail?id=163
Revision 3542: Merge 2516, 2536 from trunk: Allow path table offset values of 0 and 18, which are used by some ISO writers.
Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
|
224152 |
17-Jul-2011 |
mm |
- Update libarchive to 2.8.4 - Add support for extracting xar and rpm archives - Add libarchive_fe subdir (common code for tar and cpio)
Approved by: kientzle MFC after: 2 weeks
|
221472 |
05-May-2011 |
obrien |
libarchive is mixing libmd and libcrypto -- correct to use one or the other. [mixing the two can be quite bad -- they define the same context structures, but with differing structure members (and sizes)]
Update the hash function support comments, and update config_freebsd.h to match.
Approved by: kientzle
|
216258 |
07-Dec-2010 |
kientzle |
Don't write data into an empty "file."
In particular, this check avoids a warning when extracting directory entries from certain GNU tar archives that store directory contents.
MFC after: 3 days
|
214905 |
07-Nov-2010 |
kientzle |
If the Zip reader doesn't see a PK signature block because there's inter-entry garbage, just scan forward to find the next one. This allows us to handle a lot of Zip archives that have been modified in-place.
Thanks to: Gleb Kurtsou for sending me a sample archive
|
214867 |
06-Nov-2010 |
uqs |
Fix manpage markup.
|
214822 |
05-Nov-2010 |
kientzle |
Clarify the naming: Methods that free an object should be called "free". Retain the old "finish" names to preserve source compatibility for now.
|
213573 |
08-Oct-2010 |
uqs |
mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
|
210825 |
03-Aug-2010 |
joel |
Fix typo.
|
210191 |
17-Jul-2010 |
bcr |
s/an struct/a struct
PR: docs/148660 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: Tim Kientzle Mentored by: jkois MFC after: 7 days
|
209031 |
11-Jun-2010 |
uqs |
mdoc nitpicking: the title argument shall be uppercase
|
208291 |
19-May-2010 |
uqs |
mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by: ru
|
208263 |
18-May-2010 |
kientzle |
Retry reads that fail with EINTR. This fixes a problem with bsdtar failing on SIGINT.
|
208184 |
17-May-2010 |
delphij |
Fix build.
|
208169 |
16-May-2010 |
kientzle |
Reorganize slightly in preparation for making lzma and bz2 support conditional.
|
208027 |
13-May-2010 |
uqs |
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the bottom of the manpages and order them consistently.
GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them.
Found by: mdocml lint run Reviewed by: ru
|
207849 |
10-May-2010 |
mm |
Enable liblzma support in libarchive Adjust dependencies for programs using libarchive Add xz and linkage against liblzma to rescue system
Approved by: kientzle, delphij (mentor) MFC after: 2 weeks
|
204596 |
02-Mar-2010 |
uqs |
Remove redundant WARNS?=6 overrides and inherit the WARNS setting from the toplevel directory.
This does not change any WARNS level and survives a make universe.
Approved by: ed (co-mentor)
|
204111 |
20-Feb-2010 |
uqs |
Fix common misspelling of hierarchy
Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)
|
203952 |
16-Feb-2010 |
uqs |
Add missing newline in last line of file.
Uncovered via: fromcvs vs. svn Approved by: ed (co-mentor)
|
202873 |
23-Jan-2010 |
kientzle |
Don't try to hardlink block or character device nodes that come out of cpio archives.
|
202872 |
23-Jan-2010 |
kientzle |
Use a simpler memory-management strategy for the file objects. Instead of trying to reference-count them and free them as soon as they are no longer needed, we now just keep them around and free them all when we release the archive object. This fixes a number of minor memory leaks, especially when reading damaged archives.
|
202871 |
23-Jan-2010 |
kientzle |
If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't be processed any further) and a suitable error string. In particular, this improves the error-reporting when cpio -o is given a nonexistent filename.
|
202869 |
23-Jan-2010 |
kientzle |
Initialize the allocated 'struct zip'.
|
202868 |
23-Jan-2010 |
kientzle |
Fix a memory leak when a filter fails to initialize.
|
201381 |
02-Jan-2010 |
ed |
Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
|
201253 |
30-Dec-2009 |
kientzle |
Remove some test files that are no longer used.
|
201250 |
30-Dec-2009 |
kientzle |
Reserve constants for RPM unwrapper and XAR reader.
|
201249 |
30-Dec-2009 |
kientzle |
Libarchive in FreeBSD is now synced up with 2.7.901a from libarchive.googlecode.com
|
201248 |
30-Dec-2009 |
kientzle |
UU decoder. Now that libarchive can recursively taste input streams, you can do things like this: tar xvf archive.tar.gz.uu
|
201247 |
30-Dec-2009 |
kientzle |
A raft of test changes and improvements from the Googlecode repository. In particular, this includes tests for the new features I've merged over the last few days.
|
201246 |
30-Dec-2009 |
kientzle |
Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader from googlecode: * Support for zisofs compressed entries * Support for relocated deep directories * Direct calculation of link counts for accurate nlink values even on images that lack Rockridge extensions * Faster handling of the internal file lists. * Better detection of ISO variants
|
201171 |
29-Dec-2009 |
kientzle |
Rationalize the support for cryptographic hashes.
|
201170 |
29-Dec-2009 |
kientzle |
Essentially eliminate problems with false hardlinks in POSIX cpio archives by generating synthetic ino values and mapping values from disk into the new values.
|
201169 |
29-Dec-2009 |
kientzle |
Clear extraneous error messages.
|
201168 |
29-Dec-2009 |
kientzle |
Zip write support for libarchive.
The initial implementation was developed by Anselm Strauss as part of Google Summer of Code 2008, then completed by Joerg Sonnenberger.
|
201167 |
29-Dec-2009 |
kientzle |
If we're linking against liblzma, allow the decompressor to use up to 1<<30 bytes of memory, which is required for some streams.
Also, try to make the taster more discriminating about raw lzma streams. The detection here is still really weak, though; please use xz instead of lzma.
|
201165 |
29-Dec-2009 |
kientzle |
Minor style fixes plus a fix for an obscure crash on certain malformed mtree files.
|
201163 |
29-Dec-2009 |
kientzle |
Be a little more skeptical of dev/ino matches when reading cpio files. This eliminates some false-positives in the hardlink detection logic.
|
201162 |
29-Dec-2009 |
kientzle |
Style and portability fixes for pax writer. Mostly very routine, except for: * Use ino64 where appropriate * Don't pass atime or nsec to ustar formatter
|
201161 |
29-Dec-2009 |
kientzle |
Style fixes to tar reader: For portability, prefer int64_t to off_t. Improve numeric overflow handling when parsing. Fix some variable types. Eliminate some unused results.
|
201160 |
29-Dec-2009 |
kientzle |
Various style fixes to the 'newc' cpio writer: * Warn about truncation of ino * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation * Eliminate some unused variables
|
201159 |
29-Dec-2009 |
kientzle |
Various fixes when creating objects on disk: * Write xattrs last instead of first (required on platforms that use system xattrs for security attributes) * Better handling of chdir() failures * Don't bother trying to shorten files via seek()/write() * Fix build on systems that lack link()/symlink()/mknod() * Prefer futimens()/utimensat() when they're present
|
201157 |
29-Dec-2009 |
kientzle |
Catch decompression failures earlier. In particular, this gives immediate feedback if we fail to fork an external decompression program.
|
201156 |
29-Dec-2009 |
kientzle |
Various style and portability fixes, including: * Enforce option interface can only be used before the archive is opened * Correctly handle large skips on platforms with 32-bit off_t * Use int64_t instead of off_t
|
201155 |
29-Dec-2009 |
kientzle |
64-bit ino support and discourage bad use of this header.
|
201112 |
28-Dec-2009 |
kientzle |
Portability.
|
201111 |
28-Dec-2009 |
kientzle |
Remove some dead assignments, fix some declarations.
|
201110 |
28-Dec-2009 |
kientzle |
Clarify an example so Linux folks won't keep getting confused by this point.
|
201109 |
28-Dec-2009 |
kientzle |
Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r.
|
201108 |
28-Dec-2009 |
kientzle |
Fix some unused variables and dead assignments.
|
201107 |
28-Dec-2009 |
kientzle |
Remove an unused variable and an unreachable statement.
|
201106 |
28-Dec-2009 |
kientzle |
Fix line endings.
|
201105 |
28-Dec-2009 |
kientzle |
Discourage external use of this header.
|
201104 |
28-Dec-2009 |
kientzle |
Remove unused variable.
|
201103 |
28-Dec-2009 |
kientzle |
O_BINARY for Windows.
|
201102 |
28-Dec-2009 |
kientzle |
Handle Zip CRC validation for uncompressed Zip archives even on platforms that lack zlib.
|
201101 |
28-Dec-2009 |
kientzle |
Include limits.h; remove unused variable.
|
201100 |
28-Dec-2009 |
kientzle |
Use ino64 interface.
|
201099 |
28-Dec-2009 |
kientzle |
Use new ino64 interface.
|
201098 |
28-Dec-2009 |
kientzle |
New archive_file_count() utility.
|
201097 |
28-Dec-2009 |
kientzle |
Portability fixes.
|
201096 |
28-Dec-2009 |
kientzle |
Various portability fixes, plus: * New "ino64" field. * New UTF8 interfaces for hardlink/symlink updates
|
201095 |
28-Dec-2009 |
kientzle |
Remove an unused variable and an unnecessary increment.
|
201094 |
28-Dec-2009 |
kientzle |
Eliminate an unused assignment.
|
201093 |
28-Dec-2009 |
kientzle |
Portability: Set the file descriptor to binary mode on Win32
|
201092 |
28-Dec-2009 |
kientzle |
Discourage outside use of this internal header.
|
201091 |
28-Dec-2009 |
kientzle |
Remove dead assignment.
|
201090 |
28-Dec-2009 |
kientzle |
Portability: * some non-FreeBSD platforms do actually define __FBSDID() in sys/cdefs.h * Borland C <sigh>
|
201089 |
28-Dec-2009 |
kientzle |
Portability: terminate abnormally via abort() instead of segfault, watch the return value from write(), and avoid signed arithmetic on unsigned values.
|
201088 |
28-Dec-2009 |
kientzle |
Allow more formats to be active at a time; discourage outside use.
|
201087 |
28-Dec-2009 |
kientzle |
Enforce this as an internal-only header.
|
201086 |
28-Dec-2009 |
kientzle |
Discourage people from using this header outside of libarchive.
|
201085 |
28-Dec-2009 |
kientzle |
Compatibility: I found some more compilers that don't like 'inline' keyword. Protection: Discourage people from using this header outside libarchive.
|
201084 |
28-Dec-2009 |
kientzle |
Sync with googlecode some changes that have no impact on FreeBSD.
|
201083 |
28-Dec-2009 |
kientzle |
Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r and a minor style fix for the hash function.
|
201082 |
28-Dec-2009 |
kientzle |
Catch certain gzip failures at close time.
|
201081 |
28-Dec-2009 |
kientzle |
Remove a dead assignment.
|
201080 |
28-Dec-2009 |
kientzle |
Remove some unused variables and dead assignments.
|
201079 |
28-Dec-2009 |
kientzle |
Update the hard-coded configuration for libarchive.
|
201077 |
28-Dec-2009 |
kientzle |
Update format manpages for libarchive.
|
200351 |
10-Dec-2009 |
kientzle |
Merge two cpio fixes from libarchive.googlecode.com: 1) Avoid an infinite loop in the header resync for certain malformed archives. 2) Don't try to match hardlinks if the nlinks count is < 2. This reduces the likelihood of a false hardlink match due to ino truncation.
MFC after: 7 days
|
196962 |
08-Sep-2009 |
kientzle |
Fiz /usr/bin/unzip: A bug deep in libarchive's read-ahead logic (incorrect handling of zero-length reads before the copy buffer is allocated) is masked by the iso9660 taster. Tar and cpio both enable that taster so were protected from the bug; unzip is susceptible.
This both fixes the bug and updates the test harness to exercise this case.
Submitted by: Ed Schouten diagnosed the bug and drafted a patch MFC after: 7 days
|
196961 |
08-Sep-2009 |
kientzle |
Update tests to match r195873, which corrected how hardlinked files on iso9660 images were returned. While I'm poking around, update some comments around this area to try to clarify what's going on and what still remains to be improved.
|
195895 |
26-Jul-2009 |
kientzle |
The parser for Rockridge symlinks tended to insert extra slashes at the beginning of absolute targets.
Thanks to Jung-uk Kim for pointing this out to me.
Approved by: re (kib)
|
195873 |
25-Jul-2009 |
kientzle |
Libarchive recognizes hardlinked files on ISO images, but returned them incorrectly, causing tar to actually erase the resulting file while trying to restore the link. This one-line fix corrects the hardlink descriptions to avoid this problem.
Thanks to Jung-uk Kim for pointing this out.
Approved by: re (kib)
|
195767 |
19-Jul-2009 |
kensmith |
Bump the version of all non-symbol-versioned shared libraries in preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.
Reviewed by: kib Approved by: re (rwatson)
|
194525 |
20-Jun-2009 |
kientzle |
Fix "tar --options=iso9660:joliet" and other uses of format-specific options.
|
193101 |
30-May-2009 |
kientzle |
Include libmd and libcrypto in DPADD
|
193083 |
30-May-2009 |
kientzle |
Link libarchive against -lmd and -lcrypto.
Thanks to Ed Schouten for the clue.
|
192623 |
23-May-2009 |
kientzle |
Include the 2 byte length field for the optional "extra data" field when computing the length of the gzip header.
Thanks to Dag-Erling for pointing me to the OpenSSH tarballs, which are the first files I've seen that actually used this field.
|
192031 |
13-May-2009 |
kientzle |
Eliminate duplicate error messages from "tar c".
Reported by: pav@
|
191904 |
07-May-2009 |
kientzle |
Partially revert r191171, which went too far in trying to eliminate some duplicated code. In particular, archive_read_open_filename() has different close handling than archive_read_open_fd(), so delegating the former to the latter in the degenerate case (a NULL filename is treated as stdin) broke reading from pipelines. In particular, this fixes occasional port failures that were seen when using "gunzip | tar" pipelines under /bin/csh.
Thanks to Alexey Shuvaev for reporting this failure and patiently helping me to track down the cause.
|
191604 |
27-Apr-2009 |
kientzle |
Document the liblzma support. Unfortunately, liblzma itself is GPLed, so unlikely to become part of the FreeBSD base system. However, the core lzma compression/decompression code is public domain, so it should be feasible for someone to create a compatible library without the GPL strings.
|
191597 |
27-Apr-2009 |
kientzle |
Symlink some additional man page entries.
|
191595 |
27-Apr-2009 |
kientzle |
Merge r991 from libarchive.googlecode.com: Various updates to archive_read.3 manpage, including documentation for the new "raw" handler.
|
191594 |
27-Apr-2009 |
kientzle |
Merge r990,r1044 from libarchive.googlecode.com: 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.
|
191592 |
27-Apr-2009 |
kientzle |
Merge r1061,r1062,r1063 from libarchive.googlecode.com: Fix reading big-endian binary cpio archives, and add a test. While I'm here, add a note about Solaris ACL extension for cpio, which should be relatively straightforward to support.
Thanks to: Edward Napierala, who sent me a big-endian cpio archive from a Solaris system he's been playing with. Pointy hat: me
|
191591 |
27-Apr-2009 |
kientzle |
Merge r1034 from libarchive.googlecode.com: Put a much larger file on the reference ISO for this test.
|
191590 |
27-Apr-2009 |
kientzle |
Merge r1058 from libarchive.googlecode.com: Require that each test source file has exactly one DEFINE_TEST().
|
191586 |
27-Apr-2009 |
kientzle |
ino_t varies across platforms; casting (int) here avoids various pointless complaints.
|
191584 |
27-Apr-2009 |
kientzle |
Merge r1032 from libarchive.googlecode.com: Make test_fuzz a bit more sensitive by actually reading the body of each entry instead of skipping it. While I'm here, move the "UnsupportedCompress" macro into the only file that still uses it.
|
191581 |
27-Apr-2009 |
kientzle |
Merge r1054,r1060 from libarchive.googlecode.com: * assertEqualMem() now takes void * arguments * Be a little smarter about what we hexdump when assertEqualMem() fails
|
191579 |
27-Apr-2009 |
kientzle |
Merge r1021 from libarchive.googlecode.com: If we know it's a socket, say so.
|
191578 |
27-Apr-2009 |
kientzle |
Merge r1052,r1055 from libarchive.googlecode.com: Clear the error flag on entry to a few more API functions.
|
191576 |
27-Apr-2009 |
kientzle |
Merge r1053,r1055,r1056,r1057,r1065 from libarchive.googlecode.com: * Fix parsing of POSIX.1e ACLs from Solaris tar archives * Test the above * Preserve the order of POSIX.1e ACL entries * Update tests whose results depended on the order of ACL entries * Identify NFSv4 ACLs in Solaris tar archives and warn that they're not yet supported. (In particular, don't try to parse them as POSIX.1e ACLs.)
Thanks to: Edward Napierala sent me some Solaris 10 tar archives to test
|
191572 |
27-Apr-2009 |
kientzle |
Merge r988,r1064 from libarchive.googlecode.com: * Split whiny skip function to create a new best-effort skip_lenient() * Correctly increment the top-level file position only for the top filter * Simulate skip by reading against the current filter, not the top filter
The latter two bugs aren't currently visible because no existing filter delegates skip operations.
|
191527 |
26-Apr-2009 |
kientzle |
Reading an mtree file is supposed to provide access to the file data (if the file exists on disk). This was broken for the first regular file; fix it and add a test so it won't break again.
In particular, this fixes the following idiom for creating a tar archive in which every file is owned by root:
tar cf - --format=mtree . \ | sed -e 's/uname=[a-z]*/uname=root/' -e 's/uid=[0-9]*/uid=0/' \ | tar cf - @-
|
191526 |
26-Apr-2009 |
kientzle |
Various improvements to the tar.5 manpage, including descriptions of the GNU tar "posix-style" sparse format, clarification of the Solaris tar ACL storage, and a few comments about Mac OS X tar's resource storage.
|
191525 |
26-Apr-2009 |
kientzle |
Exit with ARCHIVE_FATAL if the ISO image is truncated.
|
191524 |
26-Apr-2009 |
kientzle |
Remove an unused variable.
Thanks to: Christoph Mallon
|
191241 |
18-Apr-2009 |
kientzle |
Rely on OpenSSL bits only if we're building a system with OpenSSL. Also, adjust the MD5 calls to rely on libmd instead of libcrypto, so we keep MD5 support even in the !OpenSSL case.
|
191235 |
18-Apr-2009 |
kientzle |
Correct and update the manpage to include more details about some of the formats and to briefly describe the mtree writing capability.
|
191196 |
17-Apr-2009 |
kientzle |
Disabling the crypto bits should quiet tinderbox while I track down the library dependencies that are screwing up the /rescue build.
|
191184 |
17-Apr-2009 |
kientzle |
Publicize a handful of new functions and bump the version number to indicate that this is synchronized with the recent libarchive 2.7.0 release.
|
191183 |
17-Apr-2009 |
kientzle |
Merge lots of test suite updates from libarchive.googlecode.com.
|
191182 |
17-Apr-2009 |
kientzle |
FreeBSD has a lot of crypto functions used by the recent mtree writer updates.
|
191181 |
17-Apr-2009 |
kientzle |
Ensure that the option setters return OK (option used) even for options that don't change the list of keywords.
|
191180 |
17-Apr-2009 |
kientzle |
Fix a memory leak: Release the current list of /set keywords even when we exit on an error.
|
191179 |
17-Apr-2009 |
kientzle |
Document the new read options interface and the new read_header2() call.
|
191178 |
17-Apr-2009 |
kientzle |
Dynamically size the buffer we pass to getgrgid_r() and getpwuid_r(). Keep the buffer in the cache object so we don't have to keep doing this.
|
191177 |
17-Apr-2009 |
kientzle |
Don't match an empty file on a read error.
|
191176 |
17-Apr-2009 |
kientzle |
When pulling metadata from disk, lookup the user and group name at the same time.
|
191175 |
17-Apr-2009 |
kientzle |
LZW bugfix: when we hit end-of-file, return an invalid code.
|
191174 |
17-Apr-2009 |
kientzle |
Minor fix: some platforms require both inttypes.h and stdint.h.
|
191173 |
17-Apr-2009 |
kientzle |
Implement command-line fallbacks for gzip and bzip2 decompression as well. Not an issue for FreeBSD, since the base system has the necessary libraries. Since all decompressors are always available now, we can unconditionally enable them in archive_read_support_compression_all().
|
191172 |
17-Apr-2009 |
kientzle |
Merge new xz/lzma support from libarchive.googlecode.com. 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.
|
191171 |
17-Apr-2009 |
kientzle |
Don't use the open callback, which is deprecated (because it's never necessary). Also, simplify just a tad by delegating to read_open_fd() when we know the file descriptor, instead of duplicating that logic.
|
191170 |
17-Apr-2009 |
kientzle |
Accept empty options, add a new read_next_header2() which is more efficient for some uses.
|
191169 |
17-Apr-2009 |
kientzle |
Properly clone and free the recently-added "sourcepath" field.
|
191168 |
17-Apr-2009 |
kientzle |
Use thread-safe getgrnam_r() and getpwnam_r(); dynamically size the buffer used by this.
|
191167 |
17-Apr-2009 |
kientzle |
Fix a minor memory leak.
|
191166 |
17-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com: Numerous fixes to the write options handling, including documentation.
|
191165 |
17-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com: If we're given an empty filename, just invoke write_open_fd() instead of re-implementing the code to use stdout.
|
191008 |
13-Apr-2009 |
kientzle |
Re-enable backing up extended attributes, as the ZFS bug this triggered seems to have been fixed by John Baldwin's commit r189967.
|
190961 |
12-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com r791, r879, r884, r948: Various fixes to read_support_compression_program. In particular, failure of the external program is detected a lot earlier, which gives much more reasonable error handling.
|
190960 |
12-Apr-2009 |
kientzle |
Thanks to Christoph Mallon for pointing out the dead variable here. Also, rework this a little to make the logic excruciatingly clear.
|
190959 |
12-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com: Mostly a bunch of corrections to the Windows support to reconcile differences between Visual Studio and Cygwin. Includes parts of revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886.
Of particular note, r886 overhauled the UTF-8/Unicode conversions to work correctly regardless of whether the local system uses 16-bit or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision also added a preference for wcrtomb() (which is thread-safe) on platforms that support it.
|
190957 |
12-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com r756,r761: Document the new archive_read_disk API.
|
190956 |
12-Apr-2009 |
kientzle |
Merge from libarchive.googlecode.com: r751: Change __archive_strncat() to use a void * source, which reduces the amount of casting needed to use this with "char", "signed char" and "unsigned char". r752: Use additions instead of multiplications when growing buffer; faster and less chance of overflow.
|
190955 |
12-Apr-2009 |
kientzle |
Merge r881 from libarchive.googlecode.com: The "empty" format should not be recognized if there is a read error.
|
190699 |
04-Apr-2009 |
kientzle |
Temporary hack to unbreak user/group lookups; use a larger buffer for getpwuid_r/getgrgid_r. This needs to be dynamically sized.
|
189678 |
11-Mar-2009 |
kientzle |
Hack: *Temporarily* disable reading extended attributes from disk, as it seems to be badly broken on ZFS.
|
189508 |
08-Mar-2009 |
kientzle |
Set version to 2.6.901a to indicate this now matches libarchive.googlecode.com r745. (Except for the lzma/xz support, which needs a little more attention before it can be merged.)
|
189507 |
08-Mar-2009 |
kientzle |
Merge a bunch of changes through r722 from libarchive.googlecode.com: mtree writer now supports a variety of checksum keys; it also provides option hooks to set what keys get written.
|
189487 |
07-Mar-2009 |
kientzle |
Merge r718 from libarchive.googlecode.com: Some additional tests of restoring files to disk with unusual characters, specifically to exercise Windows issues.
|
189486 |
07-Mar-2009 |
kientzle |
Fix spelling.
|
189484 |
07-Mar-2009 |
kientzle |
Merge r348 from libarchive.googlecode.com: Suppress testing invalid conversions if there aren't any. In particular, Cygwin's "C" locale has no invalid inputs for wctomb().
|
189483 |
07-Mar-2009 |
kientzle |
Merge r596,r690 from libarchive.googlecode.com: Minor style and compile warning fixes for test_read_pax_truncated.c.
|
189482 |
07-Mar-2009 |
kientzle |
Merge r335,653,676 from libarchive.googlecode.com: Instead of conditioning tests on HAVE_ZLIB, etc, just ask libarchive for the service and handle the failure coming back from libarchive. This gives us better test coverage of common client usage where clients simply try to use libarchive services and handle the errors coming back instead of trying to second-guess which libarchive services are compiled in.
|
189481 |
07-Mar-2009 |
kientzle |
Merge r280,281,496,595,675,712 from libarchive.googlecode.com: Various test improvements, including some work on Windows compatibility and an extra check to verify that no test leaves open file descriptors around.
|
189480 |
07-Mar-2009 |
kientzle |
Merge r540 from libarchive.googlecode.com: Interix doesn't have inttypes.h either. <sigh>
|
189479 |
07-Mar-2009 |
kientzle |
Merge r723 from libarchive.googlecode.com: Don't try to restore owner or SUID bits on Windows; just ignore them.
|
189478 |
07-Mar-2009 |
kientzle |
Merge r511,r513,r607 from libarchive.googlecode.com: Mtree reader tweaks: Support nanosecond timestamps, handle attributes broken across multiple lines.
|
189477 |
07-Mar-2009 |
kientzle |
Merge r585,r669 from libarchive.googlecode.com: If zlib is unavailable, use external "gunzip" instead. With this in place, we can unconditionally enable gzip read support.
|
189476 |
07-Mar-2009 |
kientzle |
Merge r550,584,587,609,647,674 from libarchive.googlecode.com: Refactor the read_compression_program to add two new abilities: * Public API: You can now include a signature string when you register a program; the program will run only on input that matches the signature string. * Internal API: You can use the init() function to instantiate an external program as part of a filter pipeline. This can be used for graceful fallback (if zlib is unavailable, use external gzip instead) and to use external programs with bidders that are more sophisticated than a static signature check.
|
189475 |
07-Mar-2009 |
kientzle |
Merge r591 from libarchive.googlecode.com: signed/unsigned fixes.
|
189474 |
07-Mar-2009 |
kientzle |
Merge r558,567,569,571,581,582,583,598 from libarchive.googlecode.com: Support Joliet extensions. This currently ignores Rockridge extensions if both exist on the same disk unless the '!joliet' option is provided. e.g.: tar -xvf example.iso --options '!joliet' Thanks to: Andreas Henriksson
|
189473 |
07-Mar-2009 |
kientzle |
Merge r658 from libarchive.googlecode.com: Only flush and close the file if it was actually opened. Test for this case.
|
189472 |
07-Mar-2009 |
kientzle |
Merge r714,r715 from libarchive.googlecode.com: Fix Debian bug #516577. Don't crash if client does not provide a skip function. Extend one of the test cases to use archive_read_open2() with only a read callback.
|
189471 |
07-Mar-2009 |
kientzle |
Merge r608 from libarchive.googlecode.com: Clear a newly-allocated bidder object.
|
189469 |
07-Mar-2009 |
kientzle |
Merge r564,r566 from libarchive.googlecode.com: Fix segfault when specifying an option and the current format doesn't have an options handler.
|
189468 |
07-Mar-2009 |
kientzle |
Merge the rest of r453 from libarchive.googlecode.com: Test using libarchive APIs to read extended attributes from disk on FreeBSD.
|
189467 |
07-Mar-2009 |
kientzle |
Minor whitespace adjustment to reduce diffs with libarchive.googlecode.com.
|
189466 |
07-Mar-2009 |
kientzle |
Merge r552,r559 from libarchive.googlecode.com: Support high-resolution timestamps on Tru64, AIX, and GNU Hurd. Thanks to Björn Jacke.
|
189465 |
07-Mar-2009 |
kientzle |
Merge r283,r529 from libarchive.googlecode.com: Fix ext2_fs.h includes for Linux.
|
189464 |
07-Mar-2009 |
kientzle |
Merge r659 from libarchive.googlecode.com: Correctly report "none" as the compression name when no other read filter bid. Add some assertions to various tests to verify that read filters are properly setting the textual name as well as the compression code.
|
189440 |
06-Mar-2009 |
kientzle |
Merge r668 from libarchive.googlecode.com: Style correction to the 'ar' reader: Don't redefine 'isdigit' and don't create a macro that's only used once.
|
189439 |
06-Mar-2009 |
kientzle |
Merge r541,r542 from libarchive.googlecode.com: Two sign mismatches in the Zip reader.
|
189438 |
06-Mar-2009 |
kientzle |
Merge r491,493,500,507,510,530,543 from libarchive.googlecode.com: This implements the new generic options framework that provides a way to override format- and compression-specific parameters.
|
189437 |
06-Mar-2009 |
kientzle |
Merge r448 from libarchive.googlecode.com: Suppress testing write_disk failures on Windows for now. Someday this will be revisited.
|
189436 |
06-Mar-2009 |
kientzle |
Merge r403,702,721 from libarchive.googlecode.com: Handle odd pathnames on Windows by mapping '\\' to '/' and converting illegal characters to '_'.
|
189435 |
06-Mar-2009 |
kientzle |
Merge r505 from libarchive.googlecode.com: Fix %ju support. Simplify the code here a bit by making the int formatting functions static to archive_string_sprintf.c, which is the only place this has ever been used.
|
189434 |
06-Mar-2009 |
kientzle |
Merge r457 from libarchive.googlecode.com: Stop appending strerror() information to error strings. This caused a lot of unnecessary duplication in error messages; in particular, there are a few cases where error messages get copied from one archive object to another and this would cause the strerror() info to get appended each time.
|
189433 |
06-Mar-2009 |
kientzle |
Merge r420,r494 from libarchive.googlecode.com: Prettify the test harness a bit: remove a dead comment, tweak the wording of the summary report.
|
189432 |
06-Mar-2009 |
kientzle |
Merge r435,r443 from libarchive.googlecode.com: Read config files from include path; this makes it easier to support multiple build frameworks.
|
189431 |
06-Mar-2009 |
kientzle |
Merge r416 from libarchive.googlecode.com:
Restoring POSIX.1e Extended Attributes on FreeBSD, part 1
This implements the basic ability to restore extended attributes on FreeBSD, including a test suite.
|
189430 |
06-Mar-2009 |
kientzle |
Merge r407,r508 from libarchive.googlecode.com: Correctly handle Zip entries that are zero length but stored with deflate. This is arguably a silly thing to do (deflating a zero-length file actually makes it bigger) but apparently quite a few Zip writers do this. This was broken in two places: archive_write_disk disliked being asked to write data to zero-length files (even if the write was zero-length) and zip_read_file_header tripped over itself when non-regular files had compressed bodies.
|
189429 |
06-Mar-2009 |
kientzle |
Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590 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...
|
189428 |
06-Mar-2009 |
kientzle |
Merge r398 from libarchive.googlecode.com: Check that bidder object was allocated before we try to use it.
|
189427 |
06-Mar-2009 |
kientzle |
Merge r394,r396 from libarchive.googlecode.com: Plug some memory leaks in the ACL test, correctly mark that FreeBSD has acl_get_perm_np().
|
189424 |
05-Mar-2009 |
kientzle |
Merge r390,r391,r392,r397 from libarchive.googlecode.com: Virtualize "close" and "finish" across both read and write interfaces. (Someday, "finish" should be renamed to "free" to better reflect what it actually does...)
|
189419 |
05-Mar-2009 |
kientzle |
Merge r389 from libarchive.googlecode.com: Fix a memory leak in ISO9660 handler structure whenever a file entry has a nonsensical CE offset.
|
189417 |
05-Mar-2009 |
kientzle |
Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, break into the debugger on test setup failures (otherwise, the console window just goes away and you can't see what went wrong). On all platforms, clean up a stray buffer before exiting.
|
189392 |
05-Mar-2009 |
kientzle |
Argh. r189389 was supposed to include r539 from libarchive.googlecode.com but those compile fixes somehow got lost. This should fix the build.
|
189390 |
05-Mar-2009 |
kientzle |
Merge r551,r561 from libarchive.googlecode.com: Update gzip read filter to fully take advantage of the new peek/consume I/O support. In particular, this now properly handles concatenated gzip streams.
|
189389 |
05-Mar-2009 |
kientzle |
Merge r364, r378, r379, r393, and r539 from libarchive.googlecode.com: This is the last phase of the "big decompression refactor" that puts a lazy reblocking layer between each pair of read filters. I've also changed the terminology for this area---the two kinds of objects are now called "read filters" and "read filter bidders"---and moved ownership of these objects to the archive_read core.
This greatly simplifies implementing new read filters, which can now use peek/consume I/O semantics both for bidding (arbitrary look-ahead!) and for reading streams (look-ahead simplifies handling concatenated streams, for instance).
The first merge here is the overhaul proper; the remainder are small fixes to correct errors in the initial implementation.
|
189388 |
05-Mar-2009 |
kientzle |
Correct r189383, which mis-merged a change from libarchive.googlecode.com.
|
189386 |
05-Mar-2009 |
kientzle |
Merge r356 and r358 from libarchive.googlecode.com: Remove a Windows special case from archive_entry.c, add one to archive_check_magic.c.
|
189385 |
05-Mar-2009 |
kientzle |
Merge r357 from libarchive.googlecode.com: bzip2 compression support can always be enabled even if bzlib doesn't exist on this platform; don't give up until we fail to open the file.
|
189384 |
05-Mar-2009 |
kientzle |
Merge r362 from libarchive.googlecode.com: Minor fix to custom argument parser.
|
189383 |
05-Mar-2009 |
kientzle |
Merge r342 from libarchive.googlecode.com: Remove some Windows special casing.
|
189382 |
05-Mar-2009 |
kientzle |
Merge r344 from libarchive.googlecode.com: __LA_INT64_T and __LA_SSIZE_T are part of the public API and therefore need to be exposed. This is ugly; I'd like to find a better solution for this.
|
189381 |
05-Mar-2009 |
kientzle |
Merge r341,r345,r346,347 from libarchive.googlecode.com: Style fixes to test harness and a few extra guards to detect tests that can't succeed on certain platforms.
|
189309 |
03-Mar-2009 |
kientzle |
Merge r340 from libarchive.googlecode.com: If zlib/bzlib aren't available, we can still detect gzip/bzip2 compressed streams, we just can't decompress them.
|
189308 |
03-Mar-2009 |
kientzle |
Merge r294:337,r348:350 from libarchive.googlecode.com: A lot of work to make libarchive work on Windows.
|
189296 |
03-Mar-2009 |
kientzle |
Merge r294 from libarchive.googlecode.com: Skip testing for locale-based failures on systems where the "C" locale is so permissive that it cannot possibly fail. In particular, this fixes a test problem on Cygwin.
|
189294 |
03-Mar-2009 |
kientzle |
Merge r282 from libarchive.googlecode.com: Close multiple filters by walking the filter list in archive_read_close().
|
189293 |
03-Mar-2009 |
kientzle |
Merge r272 from libarchive.googlecode.com: Fix building on MSVC6.
|
187975 |
01-Feb-2009 |
kientzle |
Permit ` as a pad character in the filename table. This seems to fix the devel/zziplib port, which distributes its man pages in an ar archive.
|
187704 |
26-Jan-2009 |
kientzle |
Fix ARCHIVE_EXTRACT_SPARSE handling in libarchive. Add a test to exercise this feature. This should fix --sparse/-S support in tar.
Thanks to: Daichi GOTO MFC after: 1 week
|
187521 |
21-Jan-2009 |
kientzle |
Merge-from-Googlecode r419
In archive_write_disk: If archive_write_header() fails to create the file, that's a failure and should return ARCHIVE_FAILED. Metadata restore failures still return ARCHIVE_WARN, because that's non-critical. Fix test_write_disk_secure test to verify the correct return code in one case; add test_write_disk_failures to do another very simple test of restore failure.
This should fix cpio coredumping when it tries to restore to a write-protected directory.
Thanks to: Giorgos Keramidas MFC after: 30 days
|
187126 |
13-Jan-2009 |
kientzle |
"The first part is just to give more info, the latter part fixes an error to read files past the 32bit byte offset, for instance on DVDs."
Submitted by: phk@ MFC after: 10 days
|
186670 |
01-Jan-2009 |
kientzle |
Don't try to read the next Gzip header after we reach the end of the compressed stream. This is desirable behavior, but the implementation here is very broken and causes strange problems, so disable it for now.
Thanks to Simon L. Nielsen for reporting this problem.
|
186422 |
23-Dec-2008 |
kientzle |
If conversion from UTF8 fails, don't mark Unicode text as available.
Submitted by: Michihiro NAKAJIMA MFC after: 30 days
|
186366 |
21-Dec-2008 |
kientzle |
Teach get_refdir() about FreeBSD's /usr/obj convention. In development, I run libarchive_test frequently by hand and it gets tedious having to specify a suitable -r path all of the time.
|
186248 |
17-Dec-2008 |
kientzle |
Fill in a missing const
|
186247 |
17-Dec-2008 |
kientzle |
Exit earlier on failure in this test.
|
186246 |
17-Dec-2008 |
kientzle |
Once the test has failed, exit before the segfault.
|
186245 |
17-Dec-2008 |
kientzle |
Update the ar write test to give more detailed information about failures.
|
186244 |
17-Dec-2008 |
kientzle |
Clarify an 'ar' error message.
|
185771 |
08-Dec-2008 |
kientzle |
Obey the TMPDIR, TMP, TEMP, or TEMPDIR environment variables when choosing a scratch directory for the tests. Fallback to "/tmp", of course.
|
185683 |
06-Dec-2008 |
kientzle |
New tests: * support for bzip2 file with multiple concatenated bzip2 streams * support for bzip2 file with junk after bzip2 stream * support for gzip file with junk after gzip stream * "fuzz" tester randomly modifies a bunch of input files in order to try to crash libarchive (this found an amusing hang in the ISO9660 code when trying to read images that advertised a zero blocksize).
This test is implemented, but commented out for now: * support for gzip file with multiple concatenated gzip streams
|
185682 |
06-Dec-2008 |
kientzle |
Strip ";1" and trailing "." from ISO9660 entries. This seems a better match for people's expectations.
|
185681 |
06-Dec-2008 |
kientzle |
General improvements to Rockridge parsing and ISO9660 format detection.
|
185680 |
06-Dec-2008 |
kientzle |
Conditionalize a bunch of debugging messages; this also eliminates what should be the only remaining stdio dependency.
|
185679 |
06-Dec-2008 |
kientzle |
MfP4: Big read filter refactoring.
This is an attempt to eliminate a lot of redundant code from the read ("decompression") filters by changing them to juggle arbitrary-sized blocks and consolidate reblocking code at a single point in archive_read.c.
Along the way, I've changed the internal read/consume API used by the format handlers to a slightly different style originally suggested by des@. It does seem to simplify a lot of common cases.
The most dramatic change is, of course, to archive_read_support_compression_none(), which has just evaporated into a no-op as the blocking code this used to hold has all been moved up a level.
There's at least one more big round of refactoring yet to come before the individual filters are as straightforward as I think they should be...
|
185678 |
06-Dec-2008 |
kientzle |
Style: tabs after #define
|
185677 |
06-Dec-2008 |
kientzle |
Use GCC-specific dead function markers only when using GCC.
|
185676 |
06-Dec-2008 |
kientzle |
Structure declarations can't be dllexported.
|
185675 |
06-Dec-2008 |
kientzle |
Style fixes: * Wrap long declarations to fit 80 chars * #undef macros that shouldn't be exported * Organize the version-dependent conditionals a bit more consistently
Speculative: * libarchive 3.0 will (eventually) use int64_t instead of off_t. This is an attempt to avoid some the headaches caused by Linux LFS. (I'll still have to do ugly things for the struct stat references in archive_entry.h, of course.)
|
185674 |
06-Dec-2008 |
kientzle |
A couple of portability fixes from Joerg Sonnenberger
|
185672 |
06-Dec-2008 |
kientzle |
Recover after test failure.
|
185671 |
06-Dec-2008 |
kientzle |
Style: skipping() function correctly counts this as a skipped test.
|
185670 |
06-Dec-2008 |
kientzle |
Style improvements.
|
185669 |
06-Dec-2008 |
kientzle |
Better reporting of test failures.
|
185668 |
06-Dec-2008 |
kientzle |
Recover from a test failure here.
|
185667 |
06-Dec-2008 |
kientzle |
New internal archive_string_concat utility function.
|
185666 |
06-Dec-2008 |
kientzle |
Minor portability: Declare 'r' only within the conditional block where it's used; S_ISLNK is more portable than S_ISLINK.
|
185665 |
06-Dec-2008 |
kientzle |
Windows build now uses PLATFORM_CONFIG_H macro, so we can eliminate the special case for it.
|
185664 |
06-Dec-2008 |
kientzle |
2 is more portable than STDERR_FILENO
|
185030 |
17-Nov-2008 |
kientzle |
When running on a filesystem that lacks ACL support, just SKIP the test, don't report a test failure.
|
184529 |
01-Nov-2008 |
kientzle |
Correct the documented declaration of the archive_write_callback to match the code.
PR: docs/128089 Submitted by: Mel MFC after: 3 days
|
184123 |
21-Oct-2008 |
des |
Move va_end() up
|
184109 |
21-Oct-2008 |
kientzle |
If we don't know the file size, leave the file size unset. If it's not a regular file, don't return any data, even if the size is unknown.
Update the Zip test with a hand-tweaked Zip archive that has a directory (with length-at-end set), a regular file without length-at-end set, and a regular file with length-at-end set and a bad CRC. Update the test code to verify that the file size is unset for the regular file with length-at-end.
MFC after: 7 days
|
184038 |
19-Oct-2008 |
kientzle |
Add test to verify ACL restores on FreeBSD, verify kern/128203 (mtime restore fails if ACL provided), apply patch from kern/128203, and verify fix.
PR: kern/128203 Submitted by: Udo Schweigert MFC after: 3 days
|
184037 |
19-Oct-2008 |
kientzle |
Style: Mark private data 'static', correct an old comment.
MFC after: 3 days
|
183714 |
09-Oct-2008 |
peter |
Clean out some empty mergeinfo records, presumably by people doing local cp/mv operations. The full repo-relative URL should be specified for the source in these cases.
|
183484 |
30-Sep-2008 |
kientzle |
Verify high-res birthtime support on FreeBSD.
MFC after: 30 days
|
183483 |
30-Sep-2008 |
kientzle |
MfP4: restore birth time data to disk + more thorough tests for time restore to disk.
MFC after: 30 days
|
183482 |
30-Sep-2008 |
kientzle |
MfP4: Store/read birthtime data in pax format.
Submitted by: Pedro Giffuni MFC after: 30 days
|
183481 |
30-Sep-2008 |
kientzle |
MfP4: Support for storing birthtime in archive_entry objects.
Submitted by: Pedro Giffuni MFC after: 30 days
|
183136 |
18-Sep-2008 |
kientzle |
MfP4: Generalize int64_t in the public headers to support compilers which have a 64-bit integer type but don't provide standard C99 definitions.
|
183134 |
18-Sep-2008 |
kientzle |
Trying to distinguish different "versions" of mtree files was a silly idea.
Submitted by: Joerg Sonnenberger
|
183011 |
14-Sep-2008 |
kientzle |
Choose a flag-handling strategy based on platform capabilities rather than on platform.
|
182958 |
12-Sep-2008 |
kientzle |
Portability: Don't use symbolic constants when the values are more standard than the names are. Remove some trailing whitespace.
|
182955 |
12-Sep-2008 |
kientzle |
Portability: Not everyone is lucky enough to have ftruncate()
|
182954 |
12-Sep-2008 |
kientzle |
Portability: Support platforms that lack (struct stat).st_blksize or SSIZE_MAX Of course, FreeBSD has both.
|
182953 |
12-Sep-2008 |
kientzle |
Windows compatibility: The stub replacement for compression_program (which always returns an error when invoked) needs its prototype.
|
182860 |
08-Sep-2008 |
kientzle |
Fix a type-aliasing problem in the libarchive test suite, restore WARNS=6.
|
182858 |
08-Sep-2008 |
kientzle |
Correct a leaking archive_entry in the test suite.
|
182839 |
07-Sep-2008 |
kientzle |
Correct the comments here.
PR: bin/126849 MFC after: 3 days
|
182838 |
07-Sep-2008 |
kientzle |
When restoring a directory, allow symlinks to be followed. The full logic here gets a little complex, but the net effect is that the SECURE_SYMLINKS flag will prevent us from ever following a symlink. Without it, we'll only follow symlinks to dirs. bsdtar specifies SECURE_SYMLINKS by default, suppresses it for -P.
I've also beefed up the write_disk_secure test to verify this behavior.
PR: bin/126849
|
182780 |
05-Sep-2008 |
kientzle |
The link resolver now unsets the size to mark a hardlink with no body instead of setting it to zero.
|
182779 |
05-Sep-2008 |
kientzle |
MfP4: Handle entries with unset size properly: Regular files with unspecified size are "unlimited" (required by Zip reader, which sometimes does not know the uncompressed size of an entry until it gets to the end). Also, hardlinks with unspecified (or zero) size do not overwrite the data on disk nor do they set metadata. This is compatible with GNU tar and NetBSD pax behavior.
|
182778 |
05-Sep-2008 |
kientzle |
MfP4: Use the set/unset tracking to determine when mtime or atime is unavailable. Use start_time as a substitute when one is missing; if both are missing, skip the call to {f,l,}utime{s,}() entirely.
|
182747 |
04-Sep-2008 |
kientzle |
Markup fix.
MFC after: 3 days
|
182592 |
01-Sep-2008 |
kientzle |
Style: Use ARCHIVE_VERSION_NUMBER to conditionalize tests on the particular libarchive version being tested instead of the deprecated ARCHIVE_API_VERSION and ARCHIVE_VERSION_STAMP macros.
|
182590 |
01-Sep-2008 |
kientzle |
MfP4: set/unset tracking for atime, ctime, mtime, and size fields. This generalizes the existing set/unset tracking for hardlink/symlink fields and extends it to cover non-string fields. Eventually, this will be further extended to cover most fields.
In particular, this is needed to correctly detect when time fields are missing (for example, reading ustar archives doesn't set atime or ctime) for proper time restore and is helpful when trying to determine whether to overwrite data when restoring hardlinks.
This commit updates the tests but not the docs.
|
182588 |
01-Sep-2008 |
kientzle |
Sort the list of format names.
|
182587 |
01-Sep-2008 |
kientzle |
Use the "start_time" (time at which the restore process began) to fill in a missing atime instead of substituting mtime.
PR: bin/124915
|
182517 |
31-Aug-2008 |
kientzle |
New mtree writer, thanks to Joerg Sonnenberger.
Obtained from: Joerg Sonnenberger
|
182516 |
31-Aug-2008 |
kientzle |
Joerg Sonnenberger's improvements to the shar writer. Significant performance improvements, better quoting of file names, etc.
|
182515 |
31-Aug-2008 |
kientzle |
Make libarchive_test a little smarter about trying to find its reference files when you don't specify -r. It now checks a couple of likely nearby directories to see if any of them have a particular known file.
|
182470 |
30-Aug-2008 |
kientzle |
When atime wasn't specified, it should get set == mtime. This is much stronger than just asserting that it's not zero.
|
182360 |
28-Aug-2008 |
kientzle |
If no atime was specified (for example, when extracting from ustar archives), set atime == mtime. Before this, atime would get restored to 0.
|
182149 |
25-Aug-2008 |
kientzle |
Alphabetize the list of tests.
|
182102 |
24-Aug-2008 |
kientzle |
Update the total archive byte counters when writing entries to disk using archive_write_disk. Update cpio to use this to emit block counts in -p mode. Update cpio tests to verify these block counts.
|
182101 |
24-Aug-2008 |
kientzle |
Remove the stillborn attempt to cleanup tests as well as the build dir.
|
182098 |
24-Aug-2008 |
kientzle |
svn:ignore built files
|
182097 |
24-Aug-2008 |
kientzle |
Fail copying path/.. only if SECURE_NODOTDOT was specified. Since we already warn for any '..' elements in that case, the extra "lastdotdot" tracking turns out to be unnecessary.
PR: bin/124924
|
182093 |
24-Aug-2008 |
kientzle |
Fix the cpio bug tested for by r182092 of usr.bin/cpio/test. Since various 'find' incantations can emit container directories in various orders, we cannot refuse to update a dir because it's apparently the same age.
MFC after: 3 days
|
181555 |
11-Aug-2008 |
kientzle |
Fix up test suite so it works again with the libarchive 1.x API. In particular, FreeBSD 6 still uses the libarchive 1.x API and this correction will permit MFCing new libarchive features back to FreeBSD 6.
|
181542 |
10-Aug-2008 |
kientzle |
Correct test_tar_large so it works correctly with the libarchive 1.x API.
|
181489 |
10-Aug-2008 |
kientzle |
Explain why two apparently-identical archive_read_data() calls really should have different return values.
|
181485 |
10-Aug-2008 |
kientzle |
MfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers robust against multiple calls to their destroy() functions.
|
181269 |
04-Aug-2008 |
cperciva |
Mark functions as __dead2 in order to help the LLVM static checker understand which code paths aren't possible.
This commit eliminates 117 false positive bug reports of the form "allocate memory; error out if pointer is NULL; use pointer".
|
180423 |
10-Jul-2008 |
cperciva |
Garbage collect a variable which is assigned a value once but otherwise is never used.
Found by: LLVM/Clang Static Analyzer
|
180272 |
05-Jul-2008 |
kientzle |
libarchive in FreeBSD-CURRENT is now synched with libarchive-portable 2.5.5.
|
180271 |
05-Jul-2008 |
kientzle |
Remove a couple of capability definitions that are never used.
|
180270 |
05-Jul-2008 |
kientzle |
When ARCHIVE_EXTRACT_PERM is requested (e.g., by "tar -p"), always schedule a chmod() fixup for directories. In particular, this fixes sgid handling on systems where the sgid bit is inherited from the parent directory (which means that the actual mode of the dir does not match the mode used in the mkdir() system call.
It may be possible to tighten this condition a bit. In working through this, I also found a few other places where it looks like we can avoid a redundant syscall or two. I've commented those here but not yet tried to address them.
|
180269 |
05-Jul-2008 |
kientzle |
Don't use the deprecated linux/ext2_fs.h include file.
|
180209 |
03-Jul-2008 |
peter |
Exclude .cvsignore files from $FreeBSD$ checking
|
180204 |
03-Jul-2008 |
peter |
Add $FreeBSD$ to the uuencoded test files that didn't have them already.
|
180123 |
30-Jun-2008 |
des |
More explicit error message.
|
180122 |
30-Jun-2008 |
des |
Add missing $FreeBSD$
|
180029 |
26-Jun-2008 |
des |
Some tests won't build at WARNS level 6 due to aliasing violations. Add missing -I. so the tests will build when ${.OBJDIR} != ${.CURDIR}. ${.OBJDIR} does not need to be spelled out.
|
180028 |
26-Jun-2008 |
des |
Add regression test for CRC32 check. The test file has been modified to include an invalid checksum for file2.
Approved by: kientzle
|
180027 |
26-Jun-2008 |
des |
Implement CRC32 verification. Note that you have to read until EOF to trigger the check.
Requested by: ache Approved by: kientzle
|
180026 |
26-Jun-2008 |
des |
Allow the tests to build without libdmalloc.
|
180016 |
26-Jun-2008 |
kientzle |
Split out the reference zip file for ease of maintenance.
|
179916 |
21-Jun-2008 |
kientzle |
Refactor one of the ISO extraction tests: Move the reference file into a separate file (instead of embedding it in the C code) and use later timestamps (timestamps too close to the Epoch fail predictably on systems that lack timegm(), whose mktime() doesn't support dates before the Epoch and which are running in timezones with negative offsets from GMT). The goal here is to test the ISO extraction, not the local platform's time support.
|
179915 |
21-Jun-2008 |
kientzle |
MfP4: Joerg Sonnenberg's extensions to the mtree support for more complete quoting. In particular, this handles escaped newlines and common C-style escapes.
|
179914 |
21-Jun-2008 |
kientzle |
A security-check failure here should be ARCHIVE_FAILED (cannot continue this operation) and not ARCHIVE_WARN, since we don't actually open the file. Both bsdtar and bsdcpio will try to copy file contents after an ARCHIVE_WARN, which will fail loudly.
|
179802 |
15-Jun-2008 |
kientzle |
Rework the my_mbtowc_utf8() support function to fully match the mbtowc() calling convention, not the mbrtowc() convention.
|
179801 |
15-Jun-2008 |
kientzle |
Since wctomb() returns int, temporaries should be int, not size_t.
|
179800 |
15-Jun-2008 |
kientzle |
A number of minor corrections to the support for external compression programs: * Support platforms that have fork() but not vfork() * Don't write(), select(), or poll() against closed file descriptors
|
179799 |
15-Jun-2008 |
kientzle |
Be a little more careful about closing file descriptors that may not exist.
|
179798 |
15-Jun-2008 |
kientzle |
MfP4: test harness improvements.
|
179797 |
15-Jun-2008 |
kientzle |
Fix a bad cast.
|
179794 |
15-Jun-2008 |
kientzle |
Fix reading TOC from zip archives with unsupported compression. We can't read the body, but we shouldn't try to skip the body twice.
|
179793 |
15-Jun-2008 |
kientzle |
Mark hardlinks that lack any other interesting filetype information with an 'h'.
|
179792 |
15-Jun-2008 |
kientzle |
Portability: We can get away with the older and better-supported wctomb() here; we don't need wcrtomb(). In particular, this fixes libarchive building on FreeBSD 4.
|
179791 |
15-Jun-2008 |
kientzle |
Portability: wchar_t is defined in stdlib.h on some systems.
|
179790 |
15-Jun-2008 |
kientzle |
archive.h is no longer constructed from archive.h.in, so we can rename it and drop some no-longer-necessary build magic from the Makefile.
|
179789 |
15-Jun-2008 |
kientzle |
Fix the new generic link resolver in libarchive to never match dirs as hardlinks. In particular, this fixes some recent ports build failures.
Thanks to: Kris Kennaway
|
179679 |
09-Jun-2008 |
cperciva |
Don't store a pointer in "next" if we're never going to use it.
Fix typo in checking results of strchr.
Found by: Coverity Prevent
|
179351 |
27-May-2008 |
kientzle |
Minor code hardening: Verify the final bytes of the string are actually accessible before trying to use them.
|
179349 |
27-May-2008 |
kientzle |
Until the old archive.h.in gets renamed to archive.h in the repository, we still need some Makefile trickery to ensure archive.h is correctly built for the test harness.
|
179321 |
26-May-2008 |
kientzle |
MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit more 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.
|
179235 |
23-May-2008 |
cperciva |
Check that lseek(2) succeeds and puts us where we expect. [1]
While we're here, fix a long-standing bug in the handling of write(2) errors: The API changed from "return # of bytes written" to "return status code" almost 4 years ago, so instead of returning (-1) we need to return ARCHIVE_FATAL.
Found by: Coverity Prevent [1]
|
179234 |
23-May-2008 |
cperciva |
We only use the string "?rwxrwxrwx " once, so inline it rather than declaring a variable which points to it. Aside from eliminating a line of code and one level of unnecessary indirection, this eliminates a false positive in Coverity.
|
179125 |
19-May-2008 |
cperciva |
Return ARCHIVE_FATAL if we can't allocate memory instead of going ahead and dereferencing NULL.
Found by: Coverity Prevent
|
177776 |
31-Mar-2008 |
kientzle |
Include an extra byte for the trailing NUL. <sigh>
Pointy hat: Me
|
177473 |
21-Mar-2008 |
kaiw |
Add MLINK for archive_write_close.
Approved by: jkoshy(mentor), kientzle
|
177226 |
15-Mar-2008 |
kientzle |
Update a comment: the format bid only runs once per archive; it no longer runs once per entry.
|
177223 |
15-Mar-2008 |
kientzle |
Free up the entry objects allocated during this test.
|
177221 |
15-Mar-2008 |
kientzle |
Release the buffers used for exercising the compress code.
|
177220 |
15-Mar-2008 |
kientzle |
Remove the duplicate "archive_format" and "archive_format_name" fields from the private archive_write structure and fix up all writers to use the format fields in the base "archive" structure. This error made it impossible to query the format after setting up a writer because the write format was stored in an inaccessible place.
|
177218 |
15-Mar-2008 |
kientzle |
Correct a sign mismatch that only showed up on 64-bit systems.
Pointy hat: me
|
177217 |
15-Mar-2008 |
kientzle |
Refactor the mtree code a bit to make the layering clearer: Each "file" is described by multiple "lines" each possibly containing multiple "keywords." Incorporate some additions from Joerg Sonnenberger to handle linked files and correctly deal with backing files on disk.
|
177213 |
15-Mar-2008 |
kientzle |
FreeBSD does have fstat(). Correct the nasty typo this uncovers.
|
177212 |
15-Mar-2008 |
kientzle |
Testability is more important than standards conformance. Disable the use of PaxHeader.<pid> for the fake pax extension pathname until I can make the name here settable. Otherwise, tests that try to compare output to static pre-generated reference files break.
|
177202 |
15-Mar-2008 |
kientzle |
Ignore a few more common files.
|
177201 |
15-Mar-2008 |
kientzle |
Resolve a minor nit in SUS compliance by including the PID in the fake directory name used for pax extended headers.
|
177200 |
15-Mar-2008 |
kientzle |
GC a reference to the defunct TESTFILES variable.
|
177199 |
15-Mar-2008 |
kientzle |
A subtle point: "pax interchange format" mandates that all strings (including pathname, gname, uname) be stored in UTF-8. This usually doesn't cause problems on FreeBSD because the "C" locale on FreeBSD can convert any byte to Unicode/wchar_t and from there to UTF-8. In other locales (including the "C" locale on Linux which is really ASCII), you can get into trouble with pathnames that cannot be converted to UTF-8.
Libarchive's pax writer truncated pathnames and other strings at the first nonconvertible character. (ouch!) Other archivers have worked around this by storing unconvertible pathnames as raw binary, a practice which has been sanctioned by the Austin group. However, libarchive's pax reader would segfault reading headers that weren't proper UTF-8. (ouch!) Since bsdtar defaults to pax format, this affects bsdtar rather heavily.
To correctly support the new "hdrcharset" header that is going into SUS and to handle conversion failures in general, libarchive's pax reader and writer have been overhauled fairly extensively. They used to do most of the pax header processing using wchar_t (Unicode); they now do most of it using char so that common logic applies to either UTF-8 or "binary" strings.
As a bonus, a number of extraneous conversions to/from wchar_t have been eliminated, which should speed things up just a tad.
Thanks to: Bjoern Jacke for originally reporting this to me Thanks to: Joerg Sonnenberger for noting a bad typo in my first draft of this Thanks to: Gunnar Ritter for getting the standard fixed MFC after: 5 days
|
177194 |
15-Mar-2008 |
kientzle |
Ignore some built files.
|
177193 |
14-Mar-2008 |
kientzle |
Don't lie. If a string can't be converted to a wide (Unicode) string, return a NULL instead of an incomplete string. Expand the test coverage to verify the correct behavior here.
|
177192 |
14-Mar-2008 |
kientzle |
Don't advertise the default block size as a constant; don't rely on a deprecated value to set the default. This is also related to a longer-term goal of setting the default block size based on format and possibly other factors, which makes it a bad idea to tie this to a published constant.
|
177191 |
14-Mar-2008 |
kientzle |
New public functions archive_entry_copy_link() and archive_entry_copy_link_w() override the currently set link value, whether that's a hardlink or a symlink. Plus documentation update and tests.
|
177190 |
14-Mar-2008 |
kientzle |
Update some comments, comment out argument names to guard against namespace problems.
|
177189 |
14-Mar-2008 |
kientzle |
Since "length" computes the length of a string and is used as an argument to malloc(3), it should be size_t, not int.
|
177188 |
14-Mar-2008 |
kientzle |
Let archive_entry_clear() accept a NULL pointer and simply do nothing. In particular, this allows archive_entry_free() to work correctly for a NULL pointer, which makes it parallel with free(3).
|
177187 |
14-Mar-2008 |
kientzle |
Rework the versioning implementation and test to match the new interface. Mark the functions that are going away in libarchive 3.0.
In particular, archive_version_string() now computes the string rather than assuming that it will be created by the build infrastructure. Eventually, this will allow some simplification of the build infrastructure.
|
177186 |
14-Mar-2008 |
kientzle |
Rework the versioning information, hopefully for the last time. * There are now only two public version identifiers: "number" is a single integer that combines Major/minor/release in a single value of the form Mmmmrrr. This is easy to compare against for checking feature support. "string" is a displayable text string of the form "libarchive M.mm.rr". * The number is present both as a macro (version of the installed header) and a function (version of the shared library). The string form is available only as a function. * Retain the older version definitions for now, but mark them all as deprecated, to disappear in libarchive 3.0 (whenever that happens). * Rework the various deprecation conditionals to use ARCHIVE_VERSION_NUMBER.
An ancillary goal is to reduce the number of @...@ substitutions that are required. Someday, I might even be able to avoid build-time processing of archive.h entirely.
|
177185 |
14-Mar-2008 |
kientzle |
Add a useful sprintf()-style wrapper around archive_string_vsprintf(). (Which is built on top of libarchive's internal resizable string support.)
|
177183 |
14-Mar-2008 |
kientzle |
Support for writing 'compress' format, thanks to Joerg Sonnenberger.
|
177182 |
14-Mar-2008 |
kientzle |
A block in a tar file is 512 bytes. Period. Remove the entirely pointless symbolic constant and sizeof(unsigned char). (The constant here is doubly wrong, since not only does it obscure a basic format constant, it was never intended to be a tar-specific value, so could conceivably be changed at some point in the future.)
|
177122 |
12-Mar-2008 |
kaiw |
Current 'ar' read support in libarchive can only handle a GNU/SVR4 filename table whose size is less than 65536 bytes.
The original intention was to not consume the filename table, so the client will have a chance to look at it. To achieve that, the library call decompressor->read_ahead to read(look ahead) but do not call decompressor->consume to consume the data, thus a limit was raised since read_ahead call can only look ahead at most BUFFER_SIZE(65536) bytes at the moment, and you can not "look any further" before you consume what you already "saw".
This commit will turn GNU/SVR4 filename table into "archive format data", i.e., filename table will be consumed by libarchive, so the 65536-bytes limit will be gone, but client can no longer have access to the content of filename table.
'ar' support test suite is changed accordingly. BSD ar(1) is not affected by this change since it doesn't look at the filename table.
Reported by: erwin Discussed with: jkoshy, kientzle Reviewed by: jkoshy, kientzle Approved by: jkoshy(mentor), kientzle
|
177084 |
12-Mar-2008 |
kientzle |
Portability: Eliminate the need for uudecode by incorporating uudecode into the main test driver and invoking it just-in-time within the various tests.
Also, incorporate a number of improvements to the main test support code that have proven useful on other projects where I've used this framework.
|
177082 |
12-Mar-2008 |
kientzle |
Remove some unused fields from the private archive_read structure (left over from when the unified read/write structure was copied to form separate read and write structures) and eliminate the pointless initialization of a couple of the unused fields.
|
177081 |
12-Mar-2008 |
kientzle |
Tighten up the semantics of acl_next() and xattr_next() when you hit the end of the ACL or xattr list.
Thanks to: Jeff Johnson for pointing out the obvious typo
|
177080 |
12-Mar-2008 |
kientzle |
Typo, thanks to: Jeff Johnson. MFC after: 3 days
|
177030 |
10-Mar-2008 |
jkoshy |
Use .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns. Correct a typo [a misplaced comma].
Reviewed by: ru
|
177029 |
10-Mar-2008 |
jkoshy |
Use .Fo/.Fc and .Xo/.Xc to bring the line widths below 79 columns.
Reviewed by: ru
|
176620 |
27-Feb-2008 |
kientzle |
Spelling correction, thanks to Joerg Sonnenberger.
|
176619 |
27-Feb-2008 |
kientzle |
Optimize skipping over Zip entries.
Thanks to: Dan Nelson, who sent me the patch MFC after: 7 days
|
176576 |
26-Feb-2008 |
kientzle |
Rename the archive_endian.h functions to avoid name clashes with NetBSD's sys/endian.h file.
Pointed out by: Joerg Sonnenberger
|
176432 |
21-Feb-2008 |
kientzle |
Sanity-check the block size.
Thanks to: Joerg Sonnenberger MFC after: 7 days
|
176405 |
19-Feb-2008 |
kientzle |
Include O_BINARY in open() calls on platforms that support it.
|
176404 |
19-Feb-2008 |
kientzle |
Another tiny, tiny step towards Windows support. No, I don't plan to ever commit the Windows support files to FreeBSD CVS. That would just be wrong.
|
176403 |
19-Feb-2008 |
kientzle |
Someday I might forgive the standards bodies for omitting timegm(). Maybe. In the meantime, my workarounds for trying to coax UTC without timegm() are getting uglier and uglier. Apparently, some systems don't support setenv()/unsetenv(), so you can't set the TZ env var and hope thereby to coax mktime() into generating UTC. Without that, I don't see a really good alternative to just giving up and converting to localtime with mktime(). (I suppose I should research the Perl library approach for computing an inverse function to gmtime(); that might actually be simpler than this growing list of hacks.)
|
176402 |
19-Feb-2008 |
kientzle |
Simplify file type setting.
|
176401 |
19-Feb-2008 |
kientzle |
The test_assert() function that backs my custom assert() macro now returns a value, which supports such convenient constructs as: if (assert(NULL != foo())) { }
Also be careful to setlocale("C") for each new test to avoid locale pollution.
Also a couple of minor portability enhancements.
|
176400 |
19-Feb-2008 |
kientzle |
Portability: Since the values are fixed and the symbolic names are only present on some platforms, just use the values directly.
|
176399 |
19-Feb-2008 |
kientzle |
Portability: Include O_BINARY if the local platform defines it.
|
176398 |
19-Feb-2008 |
kientzle |
Correct a compile error when libbz2/zlib are unavailable.
|
176397 |
19-Feb-2008 |
kientzle |
Mark a few additional functions that are/are not available on FreeBSD.
|
176396 |
19-Feb-2008 |
kientzle |
Portability improvements: * If the platform can't restore char nodes, block nodes, or fifos, don't try and just return error. * Include O_BINARY in most open() calls (define O_BINARY to 0 if the platform doesn't provide a definition already) * Refactor the ownership restore to more cleanly support platforms that don't have any form of {l,f,}chown() call. * Comment a lingering issue with older Unix-like systems that allow root to hose the filesystem. I don't (yet) have a good solution for this, but I expect it will require adding more redundant stat() calls. <sigh>
MFC after: 14 days
|
175844 |
31-Jan-2008 |
kaiw |
Add hook routine archive_write_ar_finish() which writes the 'ar' 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
|
175843 |
31-Jan-2008 |
kientzle |
Add a test to verify compatibility with archives with odd hardlinks. I need to extend this to test pax extended archives with bodies attached to hardlinks and other less-common cases.
|
175842 |
31-Jan-2008 |
kientzle |
Tighten up the heuristic that decides whether or not we should obey or ignore the size field on a hardlink entry. In particular, if we're reading a non-POSIX archive, we should always ignore the size field.
This should fix both the audio/xmcd port and the math/unixstat port.
Thanks to: Pav Lucistnik for pointing these two ports out to me. MFC after: 7 days
|
175592 |
23-Jan-2008 |
kientzle |
Track version # from the portable release.
|
175591 |
23-Jan-2008 |
kientzle |
Explain a subtle API change that was made recently. Even though I believe this is a good change, it does have the potential to break certain clients, so it's good to document the reasoning behind the change.
|
175589 |
23-Jan-2008 |
kientzle |
Properly pad symlinks when writing cpio "newc" format. Thanks to: Jesse Barker for reporting this. MFC after: 7 days
|
175428 |
18-Jan-2008 |
kientzle |
I misread the Tinderbox error; this should really unbreak 64-bit builds.
Pointy hats, yep, keep 'em coming. ;-/
|
175427 |
18-Jan-2008 |
kientzle |
Fix 64-bit build after my last commit. <sigh>
|
175426 |
18-Jan-2008 |
kientzle |
The previous commit caused the archive_write_disk interface to start obeying filesize limits; this test wasn't properly setting file sizes before trying to write file data.
|
175423 |
18-Jan-2008 |
kientzle |
Issues with hardlinks in newc-format files prompted me to write a new test to exercise the hardlink strategies used by different archive formats (tar, old cpio, new cpio). This uncovered two problems, both fixed by this commit:
1) Enforce file size when writing files to disk.
2) When restoring hardlink entries, if they have data associated, go ahead and open the file so we can write the data.
In particular, this fixes bsdtar/bsdcpio extraction of new cpio formats where the "original" is empty and the subsequent "hardlink" entry actually carries the data. It also provides correct behavior for old cpio archives where hardlinked entries have their bodies stored multiple times in the archive; the last body should always be the one that ends up in the final file. The new pax format also permits (but does not require) hardlinks to carry file data; again, the last contents should always win.
Note that with any of these, a size of zero on a hardlink simply means that the hardlink carries no data; it does not mean that the file has zero size. A non-zero size on a hardlink does provide the file size.
Thanks to: John Baldwin, for reminding me about this long-standing bug and sending me a simple example archive that prompted this test case
|
175422 |
18-Jan-2008 |
kientzle |
Reconnect the progress callback. It may not get called as often as you might expect, but at least it will get called now.
Thanks to: David Topham for asking how this got disconnected.
|
175358 |
15-Jan-2008 |
kientzle |
Handle Zip archives that are "multi-part archives with only one part" by simply ignoring the marker at the beginning of the file. (Zip archivers reserve four bytes at the beginning of each part of a multi-part archive, if it happens to only require one part, those four bytes get filled with a placeholder that can be ignored.)
Thanks to: Marius Nuennerich, for pointing me to a Zip archive that libarchive couldn't handle MFC after: 7 days
|
175343 |
15-Jan-2008 |
kientzle |
Support uppercase hex digits in cpio archives.
Thanks to: Joshua Kwan MFC after: 7 days
|
175307 |
13-Jan-2008 |
kientzle |
Since the tar bidder can never get called more than once, it doesn't need to compensate for this situation.
While here, fix a minor longstanding bug that empty tar archives (which begin with at least 512 zero bytes) never properly reported their format. In particular, this fixes the output of: bsdtar tvvf /dev/zero
And, of course, a new test to verify that libarchive correctly recognizes the format of such files.
|
175073 |
03-Jan-2008 |
des |
Crib {be,le}{16,32,64}{dec,enc} from src/sys/sys/endian.h and use it instead of home-rolled [iu][248] in the ZIP support code.
Approved by: kientzle
|
175072 |
03-Jan-2008 |
des |
Add an internal utility function to simplify the many, many places where the number of bytes read is actually not important as long as we have at least what we ask for. Illustrate its benefits by using it throughout the ZIP support code, except for the few cases where it doesn't apply.
Approved by: kientzle
|
175044 |
01-Jan-2008 |
kientzle |
Extensive improvements to the libarchive_test test program that exercises and verifies the libarchive APIs:
* Improved error reporting; hexdumps are now provided for many file/memory content differences. * Overall status more clearly counts "tests" and "assertions" * Reference files can now be stored on disk instead of having to be compiled into the test program itself. A couple of tests have been converted to this more natural structure. * Several memory leaks corrected so that leaks within libarchive itself can be more easily detected and diagnosed. * New test: GNU tar compatibility * New test: Zip compatibility * New test: Zero-byte writes to a compressed archive entry * New test: archive_entry_strmode() format verification * New test: mtree reader * New test: write/read of large (2G - 1TB) entries to tar archives (thanks to recent performance work, this test only requires a few seconds) * New test: detailed format verification of cpio odc and newc writers * Many minor additions/improvements to existing tests as well.
|
175031 |
01-Jan-2008 |
kientzle |
The mtree.5 file has been moved to src/usr.sbin/mtree.
|
174991 |
30-Dec-2007 |
kientzle |
Update libarchive to 2.4.10. This includes a number of improvements 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.
|
174246 |
04-Dec-2007 |
kientzle |
If a Zip entry has the "length at end" flag set, then just ignore a length field of zero; it does not mean the body is empty.
Thanks to: Lapo Luchini for sending me a JAR archive that demonstrated this bug MFC after: 3 days
|
173085 |
27-Oct-2007 |
kientzle |
When skipping input data, don't overflow a 32-bit size_t. This can only happen on 32-bit systems when you're reading an uncompressed archive and the skip request is an exact multiple of 4G (e.g., skipping a tar entry with an 8G body).
The symptom is that the read_ahead() ends up returning zero bytes, and the extraction stops with a premature end-of-file.
Using '1' here is more correct anyway, as it allows read_ahead() to function opportunistically and minimize copying.
MFC after: 5 days
|
172920 |
24-Oct-2007 |
kientzle |
Fix reading of files that use pax 'size' attribute to store size. In particular, bsdtar uses the pax 'size' attribute for any file over 8G.
MFC after: 3 days
|
172560 |
12-Oct-2007 |
kientzle |
Correct the cpio writers to not accept data for non-regular files. In particular, the previous code led to archives that had non-empty bodies following directory entries. Not a fatal problem, as bsdtar and GNU cpio are both happy to just skip this bogus data, but it still shouldn't be there.
MFC after: 3 days
|
172559 |
12-Oct-2007 |
kientzle |
Correct the return values of the final zero-length block at EOF. Return EOF immediately if an entry in a ZIP archive has no body. In particular, the latter issue was causing bsdtar to emit spurious warnings when extracting directory entries from ZIP archives.
MFC after: 3 days
|
172267 |
21-Sep-2007 |
kientzle |
Fix the archive_write_data() function so it always returns number of bytes written, even when used to write files to disk. Extend the test suite to verify the correct return values for archive_write_data() and archive_write_data_block().
Thanks to: Bruce Mah, for stepping in promptly to back out the earlier broken version of this fix Thanks to: Colin Percival, for pointing out the correct fix MFC after: 5 days Approved by: re (ksmith) Pointy hat: \me
|
172248 |
19-Sep-2007 |
kientzle |
Fill in a missing 'e'
Thanks to: Kai Wang, for pointing this out Approved by: re (bmah) MFC after: 3 days
|
172222 |
18-Sep-2007 |
bmah |
Revert the last commit to libarchive. It introduced some regresssions, most noticably the incorrect extraction of files by bsdtar.
This commit reverts:
src/lib/libarchive/archive_write_disk.c 1.15 src/lib/libarchive/test/test_write_disk.c 1.4
Approved by: re (implicitly)
|
172215 |
18-Sep-2007 |
kientzle |
Correct the return value from archive_write_data() (when used to restore files to disk) to match: * The documentation * The return values of this function when used to write files into an archive.
Approved by: re (bmah) Pointy hat: \me MFC after: 5 days
|
171892 |
18-Aug-2007 |
kientzle |
This commit updates libarchive to be compatible with GNU tar 1.17's implementation of --posix --sparse, at the cost of losing compatibility with GNU tar 1.16. Fortunately, the 1.17 implementation actually makes sense, so the libarchive code is now a bit more straightforward than before.
Background: GNU tar 1.16 defined a new way to store sparse files in --posix archives. Unfortunately, the implementation incorrectly inserted several blocks of null padding after each such entry. As a result, non-GNU tar implementations saw the archive as truncated after any sparse entry. This was fixed in GNU tar 1.17 at the cost of losing compatibility with GNU tar 1.16 for this new format (which is not the default, so hopefully rarely used). Libarchive recently gained support for reading the GNU tar 1.16 formats; this commit updates it to read the GNU tar 1.17 variant instead.
Approved by: re (ksmith for libarchive portion) Approved by: re (blanket for libarchive_test portion) MFC after: 5 days
|
171811 |
12-Aug-2007 |
kientzle |
Make suid/sgid restore be "opportunistic" if owner restore is not requested. If you ask for permissions to be restored but not owner, you will now get no error if suid/sgid bits cannot be set. (It's a security hole to restore suid/sgid bits if the owner/group aren't restored.)
This fixes an obscure problem where a simple "tar -xf" with no other options will sometimes fail gratuitously because of suid/sgid bits. This is causing occasional problems for people using bsdtar as a drop-in replacement for "that other tar program." ;-)
Note: If you do ask for owner restore, then suid/sgid restore failures still issue an error. This only suppresses the error in the case where an suid/sgid bit restore fails because of an owner mismatch and owner restore was not requested.
Approved by: re (bmah) MFC after: 7 days
|
171806 |
12-Aug-2007 |
kientzle |
Update the tests for reading the various GNU tar sparse formats. In particular: * Include a second entry in all of the test archives (to catch errors with intermediate padding) * Test the GNU tar 1.17 version of "posix sparse format 1.0" instead of the GNU tar 1.16 version (the latter is no longer supported by GNU tar).
Right now, libarchive fails this test because I originally implemented the GNU tar 1.16 version of "posix sparse format 1.0". I'll fix libarchive shortly.
Approved by: re (blanket, libarchive testing)
|
171669 |
31-Jul-2007 |
kientzle |
Two minor nits: * Allow libarchive_test to compile on Interix again. * Track the test name (not just line number) when counting skipped tests.
Thanks to: Joerg Sonnenberger Approved by: re (blanket; libarchive testing)
|
171512 |
20-Jul-2007 |
kientzle |
Fix a strict aliasing warning from GCC 4.1.
Thanks to: Joerg Sonnenberger Approved by: re (hrs) MFC after: 3 days
|
171460 |
15-Jul-2007 |
kientzle |
archive_string_ensure() used to call exit(3) if it couldn't allocate more memory for a string. Change this so it returns NULL in that case, and update all of its callers to handle the error. Some of those callers can now return errors back to the client instead of calling exit(3).
Approved by: re (bmah)
|
171459 |
15-Jul-2007 |
kientzle |
Add archive_entry_copy_gname() and archive_entry_copy_uname() functions.
Approved by: re (bmah) MFC after: 3 days
|
171458 |
15-Jul-2007 |
kientzle |
Clarify one test.
Approved by: re (blanket, libarchive testing)
|
171444 |
14-Jul-2007 |
kientzle |
Use an uncompressed test archive for gtar sparse format 1.0 format, as that better exercises some internal read-combining logic than the compressed archive.
Approved by: re (blanket, libarchive testing)
|
171443 |
14-Jul-2007 |
kientzle |
Report each failed test once, but keep a count and report that count if there was more than one. In particular, this simplifies test_tar_filenames.c, which has a tendency to be very noisy otherwise.
Approved by: re (blanket, libarchive testing)
|
171439 |
14-Jul-2007 |
kientzle |
Restore the 'break' that was inadvertently removed in 1.57 of this file. Without this, hardlinks get returned as symlinks.
Approved by: re (Ken Smith) MFC after: 2 days
|
171438 |
14-Jul-2007 |
kientzle |
Extend the basic tar reading test to exercise most types of entries. This doesn't cover everything yet, but it's a big improvement.
Approved by: re (blanket, libarchive testing)
|
171431 |
13-Jul-2007 |
kientzle |
Make the test for reading gtar sparse entries more robust; it now verifies that the returned blocks have the correct data at the correct file offsets, ignoring any null padding that may exist.
Approved by: re (blanket, libarchive test suite)
|
171430 |
13-Jul-2007 |
kientzle |
New test suite test_read_pax_truncated probes libarchive behavior with truncated or damaged pax archives. This tests most of the cases covered by the recent security advisory.
Approved by: re (blanket, libarchive test suite)
|
171429 |
13-Jul-2007 |
kientzle |
New file "read_open_memory.c" is a custom variant of archive_read_open_memory.c that tries to test border cases. In particular, it copies over each returned block so that formats or decompressors that read past the end of a returned block will break.
Approved by: re (blanket, libarchive test suite)
|
171428 |
13-Jul-2007 |
kientzle |
Fix running individual tests via "libarchive_test <number> <number> ..."
Approved by: re (blanket)
|
171402 |
12-Jul-2007 |
cperciva |
Correct multiple security issues in how libarchive handles corrupt tar archives, including a potentially exploitable buffer overflow.
Approved by: re (kensmith, security blanket) Reviewed by: kientzle Security: FreeBSD-SA-07:05.libarchive
|
171294 |
07-Jul-2007 |
kientzle |
Fix installworld: /usr/bin/printf isn't available then, so use awk's printf for the formatting here instead.
Pointy hat: Yours Truly Approved by: re
|
171280 |
06-Jul-2007 |
kientzle |
Make test suite work with libarchive 1.3.1: Take advantage of 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)
|
171279 |
06-Jul-2007 |
kientzle |
New "version stamp" simplifies determining the exact version 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)
|
171041 |
26-Jun-2007 |
kientzle |
Fix 'bsdtar -t' on tape drives. Libarchive uses the 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
|
170986 |
22-Jun-2007 |
kientzle |
Ouch. I partially screwed up the last commit by enabling a test that's not ready yet. <sigh>
Pointy hat: /me Approved by: re@
|
170984 |
22-Jun-2007 |
kientzle |
Support for writing the 'newc' cpio format, plus a minimal test harness for the cpio formats.
Thanks to: Rudolf Marek Approved by: re@
|
170902 |
18-Jun-2007 |
kientzle |
Track whether the current read stream supports seek(). For now, we 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.
|
170650 |
13-Jun-2007 |
kientzle |
Make 'ar' write test a tad more portable.
|
170649 |
13-Jun-2007 |
kientzle |
Read support for the new GNU tar sparse formats added in gtar 1.15 and gtar 1.16.
|
170648 |
13-Jun-2007 |
kientzle |
Add some options to libarchive_test: -k: like make -k, try to keep going after errors. -q: quiet
|
170647 |
13-Jun-2007 |
kientzle |
Fix a broken function declaration.
|
170644 |
13-Jun-2007 |
sepotvin |
Options spring cleanup: - 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
|
170538 |
11-Jun-2007 |
kientzle |
Don't lose leading '/' for pathnames exactly 101 bytes long. Also, update the test harness to exercise this case.
|
170079 |
29-May-2007 |
kientzle |
libarchive 2.2.3 * "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.
|
169870 |
22-May-2007 |
cperciva |
Replace "sizeof(struct bucket[cache_size])" with "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
|
169813 |
21-May-2007 |
cperciva |
Don't test for NULL when it is both unnecessary (the pointer is checked against NULL when it is first allocated) and pointless (we've already dereferenced the pointer several times).
Found by: Coverity Prevent(tm) CID: 3204
|
169812 |
21-May-2007 |
cperciva |
Remove pointless code: Don't assign a value to a variable when we're 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)
|
169733 |
19-May-2007 |
cperciva |
Don't forget to free a string allocated by strdup where necessary.
Found by: Coverity Prevent Coverity ID: CID 3132
|
169201 |
02-May-2007 |
cperciva |
s/@VERSION@/@ARCHIVE_VERSION@/
This is a no-op as far as FreeBSD is concerned, but makes libarchive more autoconf-friendly.
Approved by: kientzle
|
168907 |
20-Apr-2007 |
kientzle |
Fix a memory leak in the uname/gname lookup cache. Thanks to: VMiklos
|
168771 |
16-Apr-2007 |
cperciva |
In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors which 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
|
168747 |
15-Apr-2007 |
kientzle |
Properly cleanup the UID/GID lookup data.
|
168746 |
15-Apr-2007 |
kientzle |
Don't free a NULL pointer.
|
168745 |
15-Apr-2007 |
kientzle |
Clean up a lot of memory leaks in the libarchive test harness.
|
168744 |
15-Apr-2007 |
kientzle |
Thanks to Colin for catching my mixup. The original problem wasn't suppressing the second error, it was failing to address the first.
|
168743 |
15-Apr-2007 |
kientzle |
Consolidate numeric limit macros in one place; include them only on platforms that need them. FreeBSD doesn't.
|
168741 |
14-Apr-2007 |
kientzle |
Pass through error message if any operation fails, not just the last one.
|
168740 |
14-Apr-2007 |
kientzle |
Overhaul of 'ar' support: * 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.
|
168739 |
14-Apr-2007 |
kientzle |
Invoke utime(2) properly. (It's only used on platforms that lack utimes(2).)
|
168730 |
14-Apr-2007 |
kientzle |
Fix the build by temporarily disabling 'ar' support until I can clean it up.
|
168708 |
14-Apr-2007 |
kientzle |
Fix the build. 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.
|
168707 |
14-Apr-2007 |
kientzle |
Fixes from Joerg Sonnenberger, reviewed by Kai Wang.
|
168706 |
14-Apr-2007 |
kientzle |
Conventionally, tar archives have always included a trailing '/' 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.
|
168704 |
14-Apr-2007 |
kientzle |
Portability: Don't use mkdtemp() when mkdir() will suffice. If we can't create the dir, just give up.
|
168701 |
14-Apr-2007 |
kientzle |
More portability improvements from Martin Koeppe: conditionally use utime() when utimes() is not available; allow the most common wide-char functions to be replaced when local alternatives are lacking.
|
168690 |
13-Apr-2007 |
kientzle |
Portability.
|
168648 |
12-Apr-2007 |
kientzle |
Now that libarchive is being built in more environments, factor out the platform-specific configuration header a bit more cleanly. Suggested by: Joerg Sonnenberger
|
168647 |
12-Apr-2007 |
kientzle |
Make Lint happier.
|
168476 |
07-Apr-2007 |
kientzle |
Fix build on Solaris.
|
168453 |
07-Apr-2007 |
kientzle |
Enable 'ar' support; hook it up to the build and enable it with _read_support_format_all().
|
168452 |
07-Apr-2007 |
kientzle |
Clarification: Point people to archive_read_data(), which should be used instead of archive_read_data_into_buffer().
|
168448 |
07-Apr-2007 |
cperciva |
When copying data from one archive to another, only set the error 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.
|
168388 |
05-Apr-2007 |
cperciva |
Move archive_read_data_into_buffer into archive_read.c, simplify its 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
|
168381 |
05-Apr-2007 |
kientzle |
More corrections from Joerg Sonnenberger.
|
168380 |
05-Apr-2007 |
kientzle |
Style fixes from Joerg Sonnenberger: use correct types, spell lint(1) comments correctly.
|
168379 |
05-Apr-2007 |
kientzle |
From Joerg Sonnenberger: Fix a number of style gaffes, including type puns and avoidable casts.
|
168378 |
05-Apr-2007 |
kientzle |
Wordsmithing.
|
168331 |
03-Apr-2007 |
cperciva |
Parse SCHILY.dev and SCHILY.ino fields. These are ignored when extracting 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
|
168287 |
03-Apr-2007 |
kientzle |
'ar' format support for libarchive, contributed by Kai Wang.
|
168249 |
02-Apr-2007 |
cperciva |
Now that there is always a compression-layer skip function available, 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.
|
168239 |
02-Apr-2007 |
kientzle |
Fix type-punned pointer, minor style fixes. Thanks to: Joerg Sonnenberger
|
168236 |
02-Apr-2007 |
kientzle |
Remove unused variable; use consistent types. Thanks to: Joerg Sonnenberger
|
168235 |
02-Apr-2007 |
kientzle |
Be consistent: file flags are unsigned bitmaps. Thanks to: Joerg Sonnenberger
|
168234 |
02-Apr-2007 |
kientzle |
Don't compare a signed char to 0xFF. Thanks to: Joerg Sonnenberger
|
168233 |
02-Apr-2007 |
kientzle |
Avoid a potential overflow when 'skip' is larger than a pointer. Thanks to: Joerg Sonnenberger
|
168232 |
02-Apr-2007 |
kientzle |
Style fix: Use the correct type for 'bytes_to_write'.
Thanks to: Joerg Sonnenberger
|
168231 |
02-Apr-2007 |
kientzle |
Style: bare "unsigned" is deprecated, use "unsigned int" instead.
Thanks to: Joerg Sonnenberger
|
168230 |
02-Apr-2007 |
kientzle |
Remove some unused fields from archive_read internal structure. (Left over from when read and write used to share this structure.)
|
168189 |
31-Mar-2007 |
cperciva |
Provide a dummy compression-layer skip function which just reads data and discards it, for use when the compression layer code doesn't know how to skip data (e.g., everything other than the "none" compressor). This makes format level code simpler because that code can now assume that the compression layer always knows how to skip and will always skip exactly the requested number of bytes.
Discussed with: kientzle (3 months ago)
|
167863 |
24-Mar-2007 |
kientzle |
Notice when mkdir() fails. 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.
|
167860 |
24-Mar-2007 |
kientzle |
Fix compile error when libbz2 is unavailable.
|
167660 |
17-Mar-2007 |
cperciva |
Don't forget to increment the raw_position (bytes written) counter, even when operating in non-buffered mode.
Pointy hat to: cperciva MFC after: 3 days
|
167499 |
13-Mar-2007 |
kientzle |
When ARCHIVE_EXTRACT_UNLINK is requested: * 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.
|
167449 |
11-Mar-2007 |
kientzle |
Libarchive 2.0.23: * 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.
|
167325 |
08-Mar-2007 |
kientzle |
New tests for system-independent ACL support. These tests verify that archive_entry objects can store and return ACL data and that pax format archives can read and write ACL information. These do not (yet) test that ACL data is read or written to disk correctly. (And hence would not have caught the recent snafu about ACL read-from-disk being turned off.)
|
167324 |
08-Mar-2007 |
kientzle |
Distinguish between the end of ACL data and an error in pulling ACL data from the archive entry. This doesn't impact archive_read_extract or archive_write_disk since they only check for != ARCHIVE_OK when calling this function. (Though they should be more careful.)
|
167186 |
03-Mar-2007 |
kientzle |
libarchive 2.0 * 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.
|
167171 |
02-Mar-2007 |
kientzle |
Force the umask to something predictable while creating objects on disk. In particular, this fixes tar -xp restore of mode bits.
|
167132 |
01-Mar-2007 |
kientzle |
Because the buffer gets released immediately, I need to copy the symlink target name, not just copy the reference. This problem sometimes caused crashes when extracting symlinks from ISO9660 images.
Thanks to: Diego "Flameeyes" Pettenò
|
166518 |
05-Feb-2007 |
cperciva |
If (a == NULL), don't dereference (a) to record an error message. [1]
Fallout from changing the skip API to use off_t instead of size_t: Print the skip length using %jd and cast to (intmax_t) instead of %d / (int), and if ARCHIVE_API_VERSION >= 2, allow the client skipper to be called for requests longer than SSIZE_MAX. [2]
Approved by: kientzle Pointy hats to: kientzle [1], cperciva [2] MFC after: 3 days
|
166387 |
01-Feb-2007 |
kientzle |
Add support for a new archive format "empty" that reads empty files.
|
165993 |
13-Jan-2007 |
kientzle |
Correct the int->text conversion. <sigh> MFC after: 3 days
|
165912 |
09-Jan-2007 |
kientzle |
Fix the copyright notice; it was always intended to be a vanilla 2-clause BSD license, but somehow some confusing extra verbage get copied from somewhere.
Also, update the copyright dates to 2007 for all of the files.
Prompted by: several questions about what those extra words really mean
|
165874 |
07-Jan-2007 |
kientzle |
Special case to support hard-coded configuration for building on Windows.
|
165800 |
05-Jan-2007 |
cperciva |
Change the client skipper API to use off_t instead of size_t/ssize_t; but wrap this within #if/#else/#endif so that it will only take effect once ARCHIVE_API_VERSION is increased (which should happen on HEAD some time between now and when RELENG_7 is branched).
|
165767 |
04-Jan-2007 |
cperciva |
Convert compression_skip from taking a size_t skip length request and returning the length skipped in a ssize_t to using off_t for both. This does not break any A[BP]Is, since compression_skip is entirely internal to libarchive.
If a skip request is > SSIZE_MAX, don't pass it down to the client layer skip function, since those still uses size_t / ssize_t. Instead, just read the data and throw it away.
With this commit, libarchive/bsdtar should now successfully skip archive entries of >2GB on 32-bit systems, but does so slower than necessary. The performance will improve with a future A[BP]I breaking commit which makes client layer skip functions use off_t.
Discussed with: kientzle MFC after: 1 week
|
165755 |
03-Jan-2007 |
cperciva |
Rewrite and simplify archive_read_format_tar_skip. Compression-layer skip functions are required to skip the requested distance, so we can avoid lots of bookkeeping which would otherwise be necessary.
Reviewed by: kientzle MFC after: 1 week
|
165752 |
03-Jan-2007 |
cperciva |
Quiet a compiler warning where (off_t + size_t) has a different sign from (off_t).
Submitted by: delphij
|
165751 |
03-Jan-2007 |
cperciva |
Insert zero-padding between sparse blocks in archive_read_data(). This fixes "tar -c @foo.tar" where "foo.tar" contains sparse entries.
MFC after: 1 week
|
165576 |
28-Dec-2006 |
cperciva |
Correct spelling of "accommodate", "guarantee", "guaranteed", "guard", "return", "ridiculous", and "success".
MFC after: 3 days
|
165000 |
08-Dec-2006 |
kientzle |
Minor refactoring; move the FreeBSD-specific config info into config_freebsd.h. archive_platform.h decides which config file to bring in and uses some of those selectors to define wrapper macros and other compatibility glue.
|
164868 |
04-Dec-2006 |
kientzle |
Argh. Restore a stat() call that was erroneously removed.
Thanks to: WATANABE, Kazuo Pointy hat: me, from the handy dispenser I keep nearby.
|
164674 |
27-Nov-2006 |
kientzle |
Improve support for large ISOs: * Correct a signed/unsigned problem that broke handling of files >2G. * Implement "skip" support for much faster "tar -t".
Thanks to: Robert Sciuk for sending me a DVD that illustrated the first problem
|
164630 |
26-Nov-2006 |
kientzle |
Bump the libarchive version number, correct the shell hackery to break the full version down into major/minor values.
|
164628 |
26-Nov-2006 |
kientzle |
Write-blocking cleanup, largely thanks to Colin Percival (cperciva@). * 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
|
164609 |
26-Nov-2006 |
kientzle |
Unbreak libarchive on arm. Two parts of libarchive relied on a 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
|
164589 |
24-Nov-2006 |
kientzle |
Connect four new files to the build. PR: bin/86742
|
164576 |
24-Nov-2006 |
kientzle |
Fill in a couple of missing casts: clarify one narrowing conversion and correct the use of unary minus with an unsigned value. (The unary minus here is actually being used as a bitwise operation, which is unusual enough to deserve a clarifying cast.)
|
164575 |
24-Nov-2006 |
kientzle |
A few minor clarifications and corrections.
|
164574 |
24-Nov-2006 |
kientzle |
A few minor corrections to the libarchive.3 overview page.
|
164573 |
24-Nov-2006 |
kientzle |
Document the new _open_FILE() and _open_memory() interfaces.
PR: bin/86742
|
164569 |
24-Nov-2006 |
kientzle |
New hooks for reading/writing archives to/from a FILE * or an in-memory buffer.
PR: bin/86742
|
164448 |
20-Nov-2006 |
kientzle |
Officially rename archive_{read,write}_open_file() to 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.
|
164292 |
15-Nov-2006 |
kientzle |
Add archive_write_open_filename()/archive_read_open_filename() as synonyms for archive_write_open_file()/archive_read_open_file(). The new names are much clearer.
|
164291 |
15-Nov-2006 |
kientzle |
Style: Use the correct type for a sizeof() variable.
|
164290 |
15-Nov-2006 |
kientzle |
Change the internal API for writing data to an entry; make the internal format-specific functions return the same as the public function, so that the public API layer doesn't have to guess the correct return value. This addresses an obscure problem that occurs when someone tries to write more data than the size of the entry (as indicated in the entry header). In this case, the return value from archive_write_data() was incorrect, reflecting the requested write rather than the amount actually written.
MFC after: 15 days
|
164256 |
13-Nov-2006 |
kientzle |
No change in functionality, but fill in a missing error message when reading a truncated tar archive.
|
164235 |
13-Nov-2006 |
kientzle |
These files no longer use internal APIs, so no longer need to include archive_private.h.
|
164233 |
13-Nov-2006 |
kientzle |
Minor cleanup of the standard read/write I/O modules:
* Use public API, don't access struct archive directly. (People should be able to copy these into their applications as a template for custom I/O callbacks.) * Set "skip" only for regular files. ("skip" allows the low-level library to catch attempts to add an archive to itself or extract over itself.) * Simplify the write_open functions by just calling stat() at the beginning. Somehow, these functions had acquired some complex logic that tried to avoid the stat() call but never succeeded.
MFC after: 10 days
|
164232 |
12-Nov-2006 |
kientzle |
Correctly handle writing very large blocks (>1M) through to a disk file. This doesn't happen in normal use, because the file I/O and decompression layers only pass through smaller blocks. It can happen with custom read functions that block I/O in larger blocks.
|
164142 |
10-Nov-2006 |
kientzle |
Portability and style fixes: * Actually use the HAVE_<header>_H macros to conditionally include system headers. They've been defined for a long time, but only used in a few places. Now they're used pretty consistently throughout. * Fill in a lot of missing casts for conversions from void*. Although Standard C doesn't require this, some people have been trying to use C++ compilers with this code, and they do require it.
Bit-for-bit, the compiled object files are identical, except for one assert() whose line number changed, so I'm pretty confident I didn't break anything. ;-)
|
164093 |
08-Nov-2006 |
simon |
Fix infinite loop in corrupt archives handling in libarchive(3).
Reported by: rink Submitted by: kientzle Security: FreeBSD-SA-06:24.libarchive
|
164014 |
06-Nov-2006 |
kientzle |
Eliminate documentation references to a non-existent function.
|
164013 |
06-Nov-2006 |
kientzle |
Computing SHLIB_MAJOR is not a good idea. It's really a FreeBSD system value that has no real relation to the libarchive version. (Except, of course, that any ABI breakage will force both to be incremented.)
|
164012 |
06-Nov-2006 |
kientzle |
Remove an unused declaration.
|
162996 |
04-Oct-2006 |
kientzle |
Performance: If the dir mode requested is "reasonable", then just restore it directly and skip chmod() during the post-extract fixup. In particular, bsdtar -xm now completely skips the post-extract fixup for directories, which produces a noticable speedup in that case.
|
162385 |
17-Sep-2006 |
ru |
Markup fixes.
|
162028 |
05-Sep-2006 |
kientzle |
Some minor corrections: * 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
|
161706 |
29-Aug-2006 |
kientzle |
When skipping data, track the position in the bytestream correctly. Without this, tar -r breaks badly; new entries overwrite the middle of the archive instead of being added at the end.
Thanks to: Chris Spiegel
|
160870 |
01-Aug-2006 |
kientzle |
If skip_file_dev and skip_file_ino haven't been set (are still == 0), then don't use them for testing for a recursive add.
Thanks to: Spencer Minear MFC after: 7 days
|
160838 |
30-Jul-2006 |
kientzle |
Conditionally include sys/mkdev.h on platforms (such as Solaris) that need it.
Thanks to: VMiklos
|
160830 |
30-Jul-2006 |
kientzle |
Use 'skip' when ignoring data in tar archives. This dramatically increases performance when extracting a single entry from a large uncompressed archive, especially on slow devices such as USB hard drives.
Requires a number of changes: * New archive_read_open2() supports a 'skip' client function * Old archive_read_open() is implemented as a wrapper now, to continue supporting the old API/ABI. * _read_open_fd and _read_open_file sprout new 'skip' functions. * compression layer gets a new 'skip' operation. * compression_none passes skip requests through to client. * compression_{gzip,bzip2,compress} simply ignore skip requests.
Thanks to: Benjamin Lutz, who designed and implemented the whole thing. I'm just committing it. ;-)
TODO: Need to update the documentation a little bit.
|
160829 |
29-Jul-2006 |
kientzle |
Don't mention 'pax' in the context of POSIX-1988, since pax wasn't introduced until the 1993 (?) revision.
(I need to double-check when pax was introduced and clarify some of the history here. In particular, I should explain that the 'pax' standard now owns the 'ustar' format spec.)
|
160828 |
29-Jul-2006 |
kientzle |
Remove mention of 'tp' format, since that support has been removed. (It was introduced experimentally and I have simply never had time to finish it.)
|
158203 |
01-May-2006 |
kientzle |
Simplify some of the wide-character handling, inspired 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.)
|
158202 |
01-May-2006 |
kientzle |
Whitespace cleanup.
|
156984 |
22-Mar-2006 |
kientzle |
Even if a system does not support restoring extended attributes, it's only a failure if there were actually attributes to be restored. In particular, this fixes the problem where tar -xp always returned a failure code on FreeBSD (which doesn't yet have all of the extended attribute support).
Thanks to: Diego "Flameeyes" Petteno
|
156961 |
21-Mar-2006 |
kientzle |
POSIX.1e-style Extended Attribute support
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.
|
156601 |
12-Mar-2006 |
kientzle |
Remove automake source from FreeBSD tree.
|
156584 |
11-Mar-2006 |
kientzle |
The idea of supporting 'tp' was a fun one, but it is really not worth the effort to develop and maintain support for a format that hasn't been used for 30 years. ;-/
|
156417 |
08-Mar-2006 |
kientzle |
Remove configure.ac.in and reorganize a few other things. This is part of a program to remove the non-FreeBSD autoconf/automake build system for libarchive from the FreeBSD source tree.
|
155654 |
14-Feb-2006 |
kientzle |
Minor fixes to the code that generates an internal ustar filename for Pax extended attribute entries.
|
155653 |
14-Feb-2006 |
kientzle |
Extract device number information from SVR4 CPIO archives. Without this, you cannot properly restore device node entries from such archives.
Thanks to: Steve 'dillo Okay for reporting this oversight.
|
154847 |
26-Jan-2006 |
kientzle |
Fix an aliasing error in the new TP support and reenable it in the build.
|
154501 |
18-Jan-2006 |
kientzle |
Disable "tp" support until I figure out why it's breaking the build. <sigh>
|
154445 |
17-Jan-2006 |
kientzle |
If the attempt to open the archive fails (either the client open routine fails or the first read fails), invoke the client close routine immediately so the client can clean up. Also, don't store the client pointers in this case, so that the client close routine can't accidentally get called more than once.
A minor style fix to archive_read_open_fd.c while I'm here.
PR: 86453 Thanks to: Andrew Turner for reporting this and suggesting a fix.
|
154444 |
17-Jan-2006 |
kientzle |
Add support for "tp" format. tp was the standard system 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.
|
153380 |
13-Dec-2005 |
ru |
[mdoc] add missing space before a punctuation type argument.
|
152849 |
27-Nov-2005 |
kientzle |
Portability: Remove AC_CHECK_MALLOC from configure.ac.in. libarchive doesn't make malloc(0) requests, so the autoconf checks aren't needed and the autoconf workarounds for broken malloc(0) just create problems.
Thanks to: Dan Nelson, who reports that this fixes libarchive on AIX 5.2
|
152757 |
24-Nov-2005 |
ru |
Fix prototypes.
|
152551 |
17-Nov-2005 |
ru |
-mdoc sweep.
|
152285 |
10-Nov-2005 |
ru |
Add missing shared library interdependencies.
|
152183 |
08-Nov-2005 |
kientzle |
Bump the maximum number of archive formats that can be enabled at one time from 4 to 8.
|
152182 |
08-Nov-2005 |
kientzle |
Correctly clean up if gzip format gets mis-identified as compress format. (This can only happen in the pathalogical case where the client is providing single-byte blocks.)
|
152181 |
08-Nov-2005 |
kientzle |
Fine-tune the format detection for CPIO and ISO9660 sub-types. This has no impact on the actual operation, it just fixes some inaccuracies in the format code and description reported back to the caller.
|
152174 |
08-Nov-2005 |
kientzle |
Portability: Use some autoconf magic to include the correct headers for major()/minor()/makedev() on various platforms.
Thanks to: Darin Broady
|
152146 |
06-Nov-2005 |
kientzle |
Portability: timegm() isn't standard, so check for timegm() in the configure script and substitute mktime() when necessary.
Thanks to: Darin Broady
|
151332 |
14-Oct-2005 |
kientzle |
Fix installworld breakage. <sigh>
expr and printf are not available during installworld, so use /bin/sh arithmetic expansion instead of expr and simply give up on vanity formatting. ;-)
|
151275 |
13-Oct-2005 |
kientzle |
1) Use GNU libtool to build shared libraries on non-FreeBSD 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.
|
151259 |
12-Oct-2005 |
kientzle |
Make some purely internal symbols static to reduce link pollution.
|
151251 |
12-Oct-2005 |
kientzle |
Minor style nit: tab instead of space after #define
|
151250 |
12-Oct-2005 |
kientzle |
When reading GNU-style sparse archive entries, handle the first sparse block correctly (we used to assume that the first sparse block was always at offset zero).
|
151249 |
12-Oct-2005 |
kientzle |
In pax interchange format, use UTF8 for writing link names, usernames, or group names that contain non-ASCII characters.
In particular, this corrects an inconsistency reported by Ed Maste when archiving symlinks with odd characters: long symlinks would get preserved, short ones would be changed.
|
150527 |
24-Sep-2005 |
kientzle |
signed/unsigned fixes (thanks to GCC4) and a few related minor style corrections.
|
150409 |
21-Sep-2005 |
kientzle |
In archive_read_open(), do not set the internal archive state to "HEADER" unless the open is successful. Instead, leave the state as "NEW." In particular, if archive_read_open() fails, a subsequent call to archive_read_next_header() will now cause an explicit assertion failure instead of a silent segmentation fault.
This may need a little more work to fully realize the intention: If archive_read_open() fails, you should be able to call it again on the same archive handle to open a different archive (or the same archive using a different mechanism).
|
150407 |
21-Sep-2005 |
kientzle |
Add a lot of error checks, based on the patches provided by Dan Lukes. Also fixes a memory leak reported by Andrew Turner.
PR: bin/83476 Thanks to: Dan Lukes, Andrew Turner
|
150389 |
20-Sep-2005 |
kientzle |
Correct the documentation for archive_read_data_into_buffer()
Thanks to: Marcus Alves Grando PR: docs/85854 MFC after: 7 days
|
149964 |
10-Sep-2005 |
kientzle |
Style issue: Don't include <wchar.h> where it is not actually needed. (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.
|
149952 |
10-Sep-2005 |
kientzle |
Fix some errors in archive_read_data that caused failures in bsdtar's pass-through filtering.
Thanks to: Bjoern Koenigönig PR: bin/82878
|
149914 |
09-Sep-2005 |
yar |
Fix fallout from the previous commit: We shouldn't call chmod() if we've just used fchmod() OK on the same file.
Approved by: kientzle
|
149794 |
05-Sep-2005 |
kientzle |
Terminate metadata restore early only on failure, not success. In particular, this bug was preventing the restore of fflags.
|
148933 |
10-Aug-2005 |
kientzle |
Record an error message if there are write errors when extracting the content of an archive entry to a file descriptor.
|
148932 |
10-Aug-2005 |
kientzle |
Minor configuration fix to disable ACL support on MacOS X (which lacks ACL_USER).
Thanks to: Marcus Geiger, Joe Esch, and Markus Slopianka
|
148635 |
02-Aug-2005 |
kientzle |
Generate default fake "device" and "inode" numbers for entries extracted from tar archives. Otherwise, converting tar archives to cpio format (with "bsdtar -cf out.cpio @in.tar") convert every entry into a hard link to a single file. This simple logic breaks hard links, but that's better than the alternative.
MFC after: 7 days
|
148634 |
02-Aug-2005 |
kientzle |
When copying time values from the main entry header to be used in the header of the pax extension entry, clip them to ustar limits. In particular, this prevents an internal panic for very old files.
Thanks to: Chris Spiegel MFC after: 7 days
|
148633 |
02-Aug-2005 |
kientzle |
Correct a few minor mis-statements (libarchive does support reading GNU tar sparse files, people have extended cpio) and clarify an important detail about pax format (that ustar-compliant archivers can mostly read pax archives correctly).
MFC after: 7 days
|
148580 |
31-Jul-2005 |
keramida |
Fix all the spelling mistakes I could find in the man pages for words that have at least 3 characters.
MFC after: 1 week Thanks to: Music band ``Chingon'' for keeping me company while searching for these.
|
148297 |
22-Jul-2005 |
kensmith |
Bump the shared library version number of all libraries that have not been bumped since RELENG_5.
Reviewed by: ru Approved by: re (not needed for commit check but in principle...)
|
147402 |
15-Jun-2005 |
ru |
Assorted markup fixes.
Approved by: re
|
146980 |
04-Jun-2005 |
kientzle |
Minor clean up for flags restoration: Use fchflags/lchflags when available, stub out flags restore on platforms that don't support it, update autoconf to probe for fchflags and lchflags support.
|
146979 |
04-Jun-2005 |
kientzle |
Sort archive_entry_ctime/archive_entry_ctime_nsec correctly.
|
146978 |
04-Jun-2005 |
kientzle |
Support libarchive with C++ by adding appropriate conditional extern "C" declarations.
|
146977 |
04-Jun-2005 |
kientzle |
Fix one error in the example usage of the archive_write API and fill in a few missing details. The example code here is now a complete, functioning example program.
|
146880 |
01-Jun-2005 |
scottl |
Provide missing implementations for archive_entry_ctime() and archive_entry_ctime_nano()
|
146877 |
01-Jun-2005 |
kientzle |
Remove the C99-specific __func__ that is one of the few barrier to compiling on IRIX and Solaris. Remove the "archive_check_magic" macro that existed only to provide __func__ to the underlying __archive_check_magic function.
Thanks to: Darin Broady MFC after: 14 days
|
146876 |
01-Jun-2005 |
kientzle |
<Ooops> Two lines got dropped from the previous commit. Apologies.
MFC after: 14 days
|
146875 |
01-Jun-2005 |
kientzle |
A minor refinement to "pax" output: Remove suid/sgid/sticky bits from mode before using mode for extended attributes entry, copy mtime/atime/ctime to extended attributes entry so it's a little more clear that it corresponds to the like-named regular entry.
MFC after: 14 days
|
146471 |
21-May-2005 |
kientzle |
Start to address the race issue between restoring a file's contents 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
|
146470 |
21-May-2005 |
kientzle |
Correct return values in myopen() and myclose() in Example code.
Bug: docs/79318 Thanks to: Derek Tattersall MFC after: 7 days
|
146012 |
08-May-2005 |
kientzle |
archive_entry_set_link is supposed to update whichever link field (symlink or hardlink) is already set. Instead, it was always setting the hardlink field. In particular, this caused GNU tar format long symlinks to be interpreted as hardlinks.
Thanks to: Brooks Davis MFC after: 7 days
|
145455 |
23-Apr-2005 |
kientzle |
Fix broken ACL configuration on FreeBSD 4 and Linux.
Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
|
145454 |
23-Apr-2005 |
kientzle |
Certain filenames between 245 and 255 characters long would cause an internal error if pax extended attributes were being generated. Being < 255 characters, the first-pass path editing (to generate a ustar-compatible name for the main entry) wouldn't occur, and the second-pass path editing (to generate a ustar name for the pax attributes entry) assumed the input was already < 245 chars.
The core problem here was using an abbreviated algorithm for the second pass that relied on the first pass having already run. The rewritten code is much simpler: It just uses the full path-shortening algorithm for building both ustar pathnames. This way, the second ustar pathname will always be short enough.
Thanks to: Mark Cammidge Related to: bin/74385
|
145211 |
17-Apr-2005 |
kientzle |
Portability enhancement: MS Windows won't restore metadata if the file is still open, so close the file as soon as we've written the file contents, before we attempt to restore metadata.
Thanks to: Kees Zeelenberg
|
145203 |
17-Apr-2005 |
kientzle |
Update "make distfile" to use newest automake/autoconf from ports.
Thanks to: Juergen Lock
|
144703 |
06-Apr-2005 |
kientzle |
A number of improvements to ZIP support. * Handles entries with compressed size >2GB (signed/unsigned cleanup) * Handles entries with compressed size >4GB ("ZIP64" extension) * Handles Unix extensions (ctime, atime, mtime, mode, uid, etc) * Format-specific "skip data" override allows ZIP reader to skip entries without decompressing them, which makes "tar -t" a lot faster. * Handles "length-at-end" entries generated by, e.g., "zip -r - foo"
Many thanks to: Dan Nelson, who contributed the code and test files for the first three items above and suggested the fourth.
|
144267 |
29-Mar-2005 |
kientzle |
Clean up the support for extracting very long pathnames.
|
143484 |
13-Mar-2005 |
kientzle |
Support extracting entries with pathnames longer than PATH_MAX. In testing, I've archived and restored dir trees with ~1MB pathnames. Most formats, of course, have much smaller limits.
|
143482 |
13-Mar-2005 |
kientzle |
When rejecting rediculously large pax attributes (such as pathnames over 1MB), issue a warning instead of forcing an internal assertion failure.
|
143480 |
13-Mar-2005 |
kientzle |
Correctly pass low-level I/O errors back up to the caller when reading cpio format.
|
143479 |
13-Mar-2005 |
kientzle |
Better error messages on read and file-open errors.
|
143478 |
13-Mar-2005 |
kientzle |
Include detailed error message from zlib after a decompression error.
|
143477 |
13-Mar-2005 |
kientzle |
If the output is not a regular file, it's okay to add it to the archive. In particular, /dev/st0 can be added to an archive being written to /dev/st0.
Thanks to: Jaakko Heinonen
|
142990 |
02-Mar-2005 |
kientzle |
Use correct byte order when parsing the size of the gzip "Extra data" field. In particular, this correctly allows bsdtar (and pkg_add) to skip package signatures.
Thanks to: Theo Schlossnagle
|
142290 |
23-Feb-2005 |
kientzle |
Fix a misplaced .El
|
142289 |
23-Feb-2005 |
kientzle |
Don't return NULL if there's no error message; return a generic text message instead. (Someday, I'll track down all the places that are generating errors but not recording messages. ;-/
Thanks to: Jaakko Heinonen
|
141851 |
13-Feb-2005 |
ru |
Expand contractions.
|
141850 |
13-Feb-2005 |
kientzle |
Fix a buffer overflow in the "none" decompression handler that 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.
|
141846 |
13-Feb-2005 |
ru |
Expand *n't contractions.
|
141776 |
12-Feb-2005 |
kientzle |
Oops. I missed a 0 => '\0' correction.
Thanks to: Ruslan
|
141774 |
12-Feb-2005 |
kientzle |
Clear the error message buffer on entry to major routines. This avoids having error messages get concatenated over multiple calls.
|
141773 |
12-Feb-2005 |
kientzle |
Update the format descriptions to include ISO9660 and ZIP support. Also remove some unnecessary blank lines from archive_read.3.
|
141772 |
12-Feb-2005 |
kientzle |
Performance optimization, code clarification, and bug workaround. When reading the bodies of Zip archive entries, request a minimum of 1 byte, rather than a minimum of the full entry size. This is faster (since it does not force the decompression layer to combine reads) and works around a bug in the "none" decompression handler (which I'm testing a separate fix for now). I've also renamed "bytes_read" to "bytes_avail" in several places to more accurately reflect that the value returned from (a->compression_read_ahead) is the number of bytes available, not necessarily the number of bytes requested.
|
141771 |
12-Feb-2005 |
kientzle |
Fill in some more Rockridge details in ISO9660 support: Ignore PD (padding) entries, extract inode value from PX entry, recognize SP and ST (start/end of SUSP extensions).
I don't enforce SP yet, as I've seen CDROMs which use Rockridge extensions but don't have the SP record (which is officially required).
The ISO9660 support is now mature enough to extract FreeBSD distribution CDROMs created with mkisofs.
|
141770 |
12-Feb-2005 |
kientzle |
Flush input when reading from pipe to avoid "broken pipe" warnings. For example, when using 'gunzip | tar' to decompress. Also, fix some style issues (write null character as '\0').
Thanks to: Jaakko Heinonen
|
140842 |
26-Jan-2005 |
kientzle |
This should (finally) fix the 64-bit build. <sigh>
|
140826 |
25-Jan-2005 |
kientzle |
Fix some signed/unsigned mismatches.
Reported by: tinderbox Pointy hat: me
|
140790 |
25-Jan-2005 |
kientzle |
Basic support for ZIP archives. 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.
|
140757 |
24-Jan-2005 |
charnier |
spell "file system" correctly Approved by: ru
|
140646 |
23-Jan-2005 |
kientzle |
Set the format code and name correctly for: * ISO9660 CDROM images * ISO9660 images with Rockridge extensions
|
140599 |
21-Jan-2005 |
ru |
Fixed xrefs.
|
140500 |
20-Jan-2005 |
kientzle |
Support 'CE' records in Rockridge extensions (specifies that record is extended elsewhere on the disk).
|
140362 |
16-Jan-2005 |
kientzle |
Implement a custom print formatter (archive_string_vsprintf) for libarchive error messages. Mostly, this avoids a portability headache related to copying va_list arguments (some FreeBSD 5 platforms require va_copy; FreeBSD 4 doesn't support va_copy at all). It also dramatically reduces the size of libarchive for embedded applications: a minimal "untar" program using libarchive can now be under 64k statically linked (as opposed to ~100k using library *printf() functions).
MFC after: 14 days
|
140296 |
15-Jan-2005 |
ru |
Removed empty line.
|
140103 |
12-Jan-2005 |
kientzle |
Bring some file descriptions in line with reality.
Also, add some hints to help people understand which functions are most appropriate for typical uses.
|
140081 |
11-Jan-2005 |
ru |
Scheduled mdoc(7) sweep.
|
139959 |
10-Jan-2005 |
kientzle |
libarchive does much more than just tar ;-)
|
139914 |
08-Jan-2005 |
kientzle |
Recognize and parse symlinks in ISO9660 CDROM images with Rockridge extensions.
|
139913 |
08-Jan-2005 |
kientzle |
Documentation improvements. In particular, expand and clarify the description of the client callback functions and how they should handle errors.
Thanks to: Antony Dovgal
|
139911 |
08-Jan-2005 |
kientzle |
Correctly document the order of arguments to archive_read_open and archive_write_open.
Thanks to: Antony Dovgal
|
139910 |
08-Jan-2005 |
kientzle |
Clear the error buffer on entry to archive_read_next_header so the next error doesn't just get appended.
MFC after: 7 days
|
139605 |
03-Jan-2005 |
kientzle |
First cut at RockRidge support.
Large thanks to the easy-to-read and well-documented sys/isofs/cd9660 source code, which provided many of the details I needed for this exercise.
|
139600 |
03-Jan-2005 |
kientzle |
Next round of work on ISO9660 support: * Reference-count the directory data so that we don't leak memory. * Correctly step through the directory records (skipping unrecognized extensions) * Use better defaults for file modes * Sort directory entries by offset of the end of the file rather than the beginning of the file. This fixes a lot of "out-of-order" problems with zero-length files, in particular. * Style fixes, remove some debug code, add some error messages.
|
139566 |
02-Jan-2005 |
kientzle |
Enable ISO9660 support in "read_support_format_all". In particular, bsdtar should now recognize ISO9660 images.
|
139565 |
02-Jan-2005 |
kientzle |
First cut support for extracting from ISO9660 disk images. 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
|
139420 |
29-Dec-2004 |
kientzle |
Rewrite the code that hacks a short names to use in the regular ustar entry. The old code sometimes created a too-long name that overflowed the ustar fields and triggered an internal assertion failure. This version should be more robust.
Thanks to: Michal Listos Fixes: bin/74385 MFC after: 15 days
|
139197 |
22-Dec-2004 |
wollman |
Correct speling erors.
|
139166 |
22-Dec-2004 |
kientzle |
Include wchar.h to improve our chances of finding WCHAR_MAX. This might fix a portability problem on HP_UX.
Thanks to: Susan Kim
|
139165 |
22-Dec-2004 |
kientzle |
Portability nit: Some platforms require stdio.h before bzlib.h.
Thanks to: Kurt J. Lidl
|
139162 |
22-Dec-2004 |
kientzle |
Add __archive_strappend_int to format a decimal number into a variable-length archive_string.
|
139157 |
22-Dec-2004 |
kientzle |
Don't truncate major/minor numbers written to the legacy ustar fields. Later, we're going to permit numeric extensions for these fields, so we can support large values here. In particular, this allows GNU tar to correctly extract such entries even though it doesn't support the pax extended attributes.
Note: r1.18 and r1.17.2.1 of this file allowed similar treatment of the uid/gid fields.
Thanks to: Ben Mesander
|
139156 |
22-Dec-2004 |
kientzle |
Tune the bidding for tar archives. This improves the recognition of hardlink entries with/without bodies (which is implemented through a look-ahead that uses the bid function).
MFC after: 7 days
|
138675 |
11-Dec-2004 |
kientzle |
Be more careful about assembling/disassembling device numbers. In particular, this should fix a bug where archiving a device node with a very large minor number would sometimes overflow and corrupt the major number.
Thanks to: Ben Mesander MFC after: 7 days
|
138165 |
28-Nov-2004 |
kientzle |
When determining whether filename is too long for a regular 'ustar' entry, use narrow-character version, not wide-character version, as the ustar entry always uses the narrow-character filename.
Thanks to: Michal Listos Inspired by, but doesn't fix: bin/74385
|
138163 |
28-Nov-2004 |
kientzle |
Correct the spelling of "archive_write_pax_header" in an error message.
Thanks to: Michal Listos Inspired by, but doesn't fix: bin/74385
|
137711 |
15-Nov-2004 |
kientzle |
Since I'm not using the public API for writing the the pax attributes, I shouldn't try using the public API for finishing out the attribute entry, either.
This also removes some old dubious state manipulations.
|
137710 |
15-Nov-2004 |
kientzle |
Pax extended headers were always failing because the code was using the external API (archive_write_data) and assuming internal error-return conventions. Use the internal API for writing data.
Thanks to: Joe Marcus Clarke
|
137296 |
06-Nov-2004 |
kientzle |
Ooops. ssize_t != int. <sigh>
Thanks to: Oliver Lehmann and Peter Wemm
|
137240 |
05-Nov-2004 |
kientzle |
Makefile tweaks: * Update Version * Add a missing MLINK * Fix 'distfile' target so it works from a clean checkout
|
137238 |
05-Nov-2004 |
kientzle |
Remove the unused archive_string_sprintf() utility function.
|
137237 |
05-Nov-2004 |
kientzle |
Revert 1.24: Brain glitch. <sigh>
|
137236 |
05-Nov-2004 |
kientzle |
Clean up the error handling in the write path. In particular, this should solve some problems people have seen with bsdtar not exiting on various write errors.
|
137235 |
05-Nov-2004 |
kientzle |
archive.h gets built in ${.OBJDIR}
|
137234 |
05-Nov-2004 |
kientzle |
Update a comment.
|
136986 |
27-Oct-2004 |
kientzle |
Allow tar format to read and accept an empty (or non-existent) file. In particular, this allows bsdtar to append (-r) to an empty file.
Thanks to: Ryan Sommers
While I'm here, straighten out a misleading comment about GNU-compatible sparse file handling.
|
136642 |
18-Oct-2004 |
kientzle |
Revert 1.18: It broke Athlon64 builds, which probably means it also requires a .so version bump. Defer it until I finish some related work on cleaning up error returns throughout the library.
Thanks to: Conrad J. Sabatier
|
136641 |
18-Oct-2004 |
kientzle |
Use STDERR_FILENO instead of 2, as POSIX intended.
Thanks to: Alfred Perlstein
|
136631 |
17-Oct-2004 |
kientzle |
Correctly report write errors from the lowest-level output routines back to the compression layer.
|
136630 |
17-Oct-2004 |
kientzle |
Refine the error-checking and reporting in the "compress" format decompression code. In particular, distinguish between EOF and fatal data errors.
|
136629 |
17-Oct-2004 |
kientzle |
Correct the return type of archive_write_data to match the documentation.
MFC after: 30 days
|
136628 |
17-Oct-2004 |
kientzle |
Don't rely on stdio here.
|
136403 |
11-Oct-2004 |
obrien |
Build as a shared lib again.
Discussed with: kientzle
|
135358 |
17-Sep-2004 |
kientzle |
Fix two ugly errors: 1. The correct cutoff for large uid/gid handling is 1<<18, not 1<<20. 2. Limit the uid/gid in the 'x' extension header (where numeric extensions are not permitted) to 1<<18, but use the correct value in the regular header (where numeric extensions are permitted). Thanks to: Dan Nelson MFC after: 3 days
|
134775 |
04-Sep-2004 |
kientzle |
Some old tar archives rely on "regular-file-plus-trailing-slash" to denote a directory. Unfortunately, in the presence of GNU or POSIX extensions, this code was checking the truncated filename stored in the regular header rather than the full filename stored in the extended attribute. As a result, long filenames with '/' in just the right position would trigger this check and be erroneously marked as directories. Move the check so it only considers the full filename. Note: the check can't simply be disabled for archives that contain these extensions because there are some very broken archivers out there.
Thanks to: Will Froning MFC after: 3 days
|
134587 |
01-Sep-2004 |
kientzle |
Per Ruslan, bsd.lib.mk already has support for dynamically-generated .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)
|
134367 |
27-Aug-2004 |
kientzle |
Cache uid-from-uname and gid-from-gname lookups during extraction. This should provide a big performance boost for folks using NIS or LDAP.
MFC after: 3 days Thanks to: Jun Kuriyama (for reminding me that this was still on my TODO list)
|
134328 |
26-Aug-2004 |
kientzle |
Don't edit permissions of pre-existing directories during extract.
This closes a security hole. Otherwise, libarchive will happily extract into directories to which it lacks write permissions by resetting the permissions during the extract.
Thanks to: Kris Kennaway
|
134327 |
26-Aug-2004 |
kientzle |
It is not legal to re-use a va_list variable. This caused a crash on amd64, in particular.
Thanks to: Sean McNeil
|
133710 |
14-Aug-2004 |
kientzle |
Eliminate reliance on non-portable <err.h> by implementing a very 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.
|
133708 |
14-Aug-2004 |
kientzle |
We don't need <paths.h>, so don't bother including it.
|
133317 |
08-Aug-2004 |
kientzle |
Add archive_entry_set_mtime()
|
133304 |
08-Aug-2004 |
kientzle |
Oops. Use "unsigned long" instead of "int" for the intermediate variables in wide-character conversions, since it's guaranteed to be large enough. Thanks to: Andrey Chernov
|
133299 |
08-Aug-2004 |
kientzle |
Use 'int' for certain wide-character conversions instead of wchar_t. That quiets some compiler warnings on platforms with 16-bit wchar_t. With this change, libarchive now compiles cleanly on Win32/cygwin.
|
133294 |
08-Aug-2004 |
kientzle |
The configure-built Makefile wasn't installing archive.h
|
133293 |
08-Aug-2004 |
kientzle |
If you don't need a header, don't bother including it.
|
133277 |
07-Aug-2004 |
kientzle |
Split archive_{read,write}_finish into separate "close" (finish the archive 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.
|
133276 |
07-Aug-2004 |
kientzle |
Don't forget to count the end-of-file padding as part of the finished file size.
|
133274 |
07-Aug-2004 |
kientzle |
Having implemented read support for it, I now know how to document the GNU sparse file extension.
|
133272 |
07-Aug-2004 |
kientzle |
Correct an mdoc error; add a sentence about tar's ancestors "tp" and "tap."
|
133257 |
07-Aug-2004 |
kientzle |
Fix the calculation of the most negative int64_t value, which is used on systems that lack C99 headers (such as FreeBSD 4).
|
133244 |
07-Aug-2004 |
kientzle |
libarchive now has two complete build systems. The usual "Makefile" 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.
|
133243 |
07-Aug-2004 |
kientzle |
Pass the pointy hat, please: Don't blow away the high-order mode bits when setting permissions from ACL data. Thanks to: David Gilbert for first reporting this and Jimmy Olgeni for noticing that it only occurred on ACL-enabled filesystems.
|
133242 |
07-Aug-2004 |
kientzle |
Beef up the "cannot archive this" error message with the actual mode that failed, to help track down a bug.
|
133107 |
04-Aug-2004 |
kientzle |
Correct the names and descriptions of the man pages.
|
132971 |
01-Aug-2004 |
kientzle |
For the "portable" distribution, the configure script will overwrite "Makefile," so I'm moving all the FreeBSD build machinery to "Makefile.freebsd", with the default "Makefile" containing a single include.
|
132967 |
01-Aug-2004 |
kientzle |
C standard does not permit empty initializer list. Thanks to: Stefan Farfeleder
|
132869 |
30-Jul-2004 |
kientzle |
Conditionalize the bzip2/gzip compression/decompression code on the existence of the relevant libraries (actually, the existence of the include files).
This will allow the library to be easily ported to systems that don't have these libraries. (Of course, it also means that clients using the library on such systems will not be able to take advantage of the automatic compression format detection.)
|
132647 |
26-Jul-2004 |
kientzle |
When writing "pax" format, readers are supposed to ignore fields 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.
|
132643 |
25-Jul-2004 |
kientzle |
Allow "posix" as a synonym for "pax". (The gtar folks chose "posix", which is really, really dumb and just going to cause confusion among people who understand that "ustar" is also a POSIX standard tar format.)
|
132635 |
25-Jul-2004 |
kientzle |
We were forcing a pax extension header for files >= 1G. Set that cutoff to >= 8G, as it should be.
|
132618 |
24-Jul-2004 |
kientzle |
Minor style nits.
|
132615 |
24-Jul-2004 |
kientzle |
Rework the feature-detection logic in archive_platform.h so that it will work cleanly with autoconf.
|
132614 |
24-Jul-2004 |
kientzle |
Define the PACKAGE_NAME and PACKAGE_VERSION macros.
|
132613 |
24-Jul-2004 |
kientzle |
Suppress a minor compiler warning if the platform doesn't support hi-res timestamps.
|
132609 |
24-Jul-2004 |
kientzle |
Add some functions to query basic facts about the library: archive_version: Returns a text string, e.g., "libarchive 1.00.000" archive_api_version: Returns the SHLIB major version archive_api_feature: Returns a feature number useful for answering questions such as "Is this recent enough to do XXX?"
The last two also have macros defined in archive.h, so you can compare the compile-time and run-time environments. (In particular, you can compare ARCHIVE_API_VERSION to archive_api_version() to detect library version mismatches.)
With these in hand, it will soon be time to turn on the shared-library version of libarchive... stay tuned.
|
132604 |
24-Jul-2004 |
kientzle |
Use "linux" instead of "LINUX" to control Linux-specific code. Thanks to: David O'Brien for pointing this out.
Also, add in a few additional portability tweaks and make a few more things conditional on features (HAVE_XXXX macros) rather than platform.
|
132603 |
24-Jul-2004 |
kientzle |
Fix the handling of signed values when parsing base-256 header values. In particular, this means we can now correctly read gtar archives that contain timestamps prior to the start of the Epoch.
Also, make the code in this area more portable. ANSI C99 headers are not yet ubiquitous (for example, FreeBSD 4 still lacks them), so be prepared for systems that don't have the INT64_MAX, INT64_MIN, and UINT64_MAX macros. This version still requires int64_t and uint64_t be defined (which can be done in archive_platform.h if necessary), but doesn't require them to be exactly 64 bits.
|
132168 |
15-Jul-2004 |
kientzle |
Style: rename 'mkdirpath' so it's clearer exactly what it does. (To be precise, it creates the parent dir of the provided path.)
|
132003 |
12-Jul-2004 |
kientzle |
Update the README notes to include the current list of supported formats and remove some outdated comments about library limitations.
|
131902 |
10-Jul-2004 |
kientzle |
Correct a brain-o in extract_dir: mkdirpath() and mkdir(2) are not interchangable.
|
131779 |
08-Jul-2004 |
kientzle |
I think this is my fourth complete rewrite of the dir-creation code. <whew!> This version handles all of the following edge cases: * Restoring explicit dirs with 000 permissions (star fails this test) * Restore of implicit or explicit dirs when umask=777 (gtar and star both fail this test) * Restoring dir paths containing "." and ".." components This version initially creates all dirs with permission 700 (ignoring umask), then does a post-extract "fixup" pass to set the correct permissions (which may or may not depend on umask, depending on the restore flags and whether it's an explicit or implicit dir). Permissions are restored depth-first so that permissions within non-writable dirs can be correctly restored. (The depth-sorting does correctly account for dirs with ".." components.)
|
131645 |
05-Jul-2004 |
kientzle |
Minor wordsmithing; remove a controversial colon.
|
131640 |
05-Jul-2004 |
kientzle |
Add convenience functions to retrieve the atime fields directly, without having to first pull the stat structure.
|
131639 |
05-Jul-2004 |
kientzle |
ru@'s ambitious sweep through the manpages is mostly a good thing, but some colons are supposed to be followed by uppercase letters.
|
131635 |
05-Jul-2004 |
ru |
Fix the NAME section making whatis(1) happy in particular.
|
131595 |
04-Jul-2004 |
ru |
Fixed cross-references in SEE ALSO. Emininated double space and hard sentence breaks.
|
131585 |
04-Jul-2004 |
kientzle |
Yet another pointy hat: When restoring file flags, it's okay to use the shared stat buffer, but don't try to access it through an uninitialized pointer.
|
131504 |
02-Jul-2004 |
ru |
Mechanically kill hard sentence breaks.
|
131317 |
30-Jun-2004 |
kientzle |
In case symlinks happen to already be sitting around, be sure to use chmod() and not lchmod() whenever we know we didn't extract a symlink.
|
131240 |
28-Jun-2004 |
kientzle |
Some implicit dirs were not having the umask correctly applied to their permissions. Just calculate the default dir mode once and use it consistently, rather than trying to remember to calculate it everywhere it's needed.
|
131214 |
27-Jun-2004 |
kientzle |
Refuse to extract an entry from an archive on top of the archive being read. (This is the converse of the "don't add an archive to itself".)
|
131212 |
27-Jun-2004 |
kientzle |
More cleanup work on permissions restore: * Rename some variables/functions/etc to try to make things clearer. * Add separate flags to control fflag/acl restore * Collect metadata restore into a single function for clarity * Propagate errors in metadata restore back out to the client * Fix some places where errors were being returned when they shouldn't and vice-versa * Modes are now always restored; ARCHIVE_EXTRACT_PERM just controls whether or not umask is obeyed. * Restore suid/sgid bits only if user/group matches archive * Cache the last stat results to try to reduce the number of stat calls
|
131211 |
27-Jun-2004 |
kientzle |
Add two new convenience functions to query the uid/gid from an 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.
|
131205 |
27-Jun-2004 |
kientzle |
Clean up some consistent confusion between "dev" and "rdev." Mostly, these were being used correctly even though a lot of variables and function names were mis-named.
In the process, I found and fixed a couple of latent bugs and added a guard against adding an archive to itself.
|
131198 |
27-Jun-2004 |
kientzle |
More tweaks to implicit directory creation. Even such abominations as a/././b/../b/../c/./../d/e/f now work correctly. And yes, a/b and a/c both get created in this example; if you want, you can create an entire dir heirarchy from a tar archive with only one entry.
More tweaks to umask support: umasks are now obeyed for all objects, not just directories; the umask used is now the one in effect at the corresponding call to archive_read_extract(), so clients that want to tinker with umask during extract should get the expected behavior.
|
131175 |
27-Jun-2004 |
kientzle |
* The mode for implicitly-created dirs is now 0777 modified by the umask in effect when the archive is closed * Correct a typo that broke implicit dir creation for non-directories.
Thanks to: Garret A Wollman for pointing out my umask oversight
|
131166 |
27-Jun-2004 |
kientzle |
Unify mkdirpath (used to automatically create missing parent dirs) and read_extract_dir (which creates directories in the archive). This brings a number of advantages: * FINALLY fix the problems creating dirs ending in "/." <sigh> * Missing parent dirs now get created securely, just like explicit dirs. (Created 0700 initially, then edited to 0755 at end of extraction.) * Eliminate some duplicate code and some weird special cases.
While I'm cleaning, inline the regular-file creation code as well.
|
131162 |
27-Jun-2004 |
kientzle |
Read gtar-style sparse archives.
This change also pointed out one API deficiency: the archive_read_data_into_XXX functions were originally defined to return the total bytes read. This is, of course, ambiguous when dealing with non-contiguous files. Change it to just return a status value.
|
130709 |
19-Jun-2004 |
kientzle |
Ignore file flag bits that we don't support. In particular, this corrects a segfault seen when archiving files from NTFS (which sets bits in st_flags that are not documented in <sys/stat.h>.)
Thanks to: Doug Rabson
|
130623 |
17-Jun-2004 |
kientzle |
Always restore permissions for regular files, even if the file already exists on disk.
Pointed out by: www/resin3 port (whose distfile contains the same file twice with different permissions and relies on the permissions associated with the second instance) Thanks again to: Kris Kennaway
|
130518 |
15-Jun-2004 |
kientzle |
Be a little more careful about creating directories: * Restore directories with 0700 permissions initially, then use the fixup pass to correct the permissions * Trim trailing "/" and "/." in mkdirpath()
Suggested by: Garrett Wollman
|
130222 |
08-Jun-2004 |
kientzle |
Correct some spelling errors.
|
130198 |
07-Jun-2004 |
kientzle |
Linux (at least Debian) requires sys/types.h to get off_t.
|
130175 |
07-Jun-2004 |
kientzle |
History: A few very, very old tar programs used the filename to distinguish files from dirs (trailing '/' indicated a dir). Since POSIX.1-1987, this convention is no longer necessary. However, there are current tar programs that pretend to write POSIX-compliant archives, yet store directories as "regular files", relying on this old filename convention to save them. <sigh> So, move the check for this old convention so it applies to all tar archives, not just those identified as "old."
Pointed out by: Broken distfile for audio/faad port
|
130173 |
07-Jun-2004 |
kientzle |
Tar bidder should just return a zero bid ("not me!") if it sees a truncated input the first time it gets called. (In particular, files shorter than 512 bytes cannot be tar archives.) This allows the top-level archive_read_next_header code to generate a proper error message for unrecognized file types.
Pointed out by: numerous ports that expect tar to extract non-tar files ;-( Thanks to: Kris Kennaway
|
130110 |
05-Jun-2004 |
kientzle |
Pointy hat: We can't avoid a chown() call without checking both UID and GID. Suppress a premature attempt at optimization.
|
130109 |
05-Jun-2004 |
kientzle |
YAPHtM: Yet Another Pointy Hat to Me.
After calculating new dir permissions that allow creating files, don't be stupid and use the original permissions. <sigh>
|
130108 |
05-Jun-2004 |
kientzle |
Recognize when we've accidentally created "foo/." and don't complain about it.
|
130099 |
04-Jun-2004 |
kientzle |
Correctly reset archive_read_data state everytime a header is read.
|
130098 |
04-Jun-2004 |
kientzle |
Correct the layering violation in read_body_to_string. The previous version called the higher-level archive_read_data and archive_read_data_skip functions, which screwed up state management of those functions. This bit of mis-design has existed for a long time, but became a serious issue with the recent changes to the archive_read_data APIs, which added more internal state to the high-level archive_read_data function. Most common symptom was a failure to correctly read 'L' entries (long filename) from GNU-style archives, causing the message ": Can't open: No such file or directory" with an empty filename.
Pointed out by: Numerous port build failures Thanks to: Kris Kennaway
|
130064 |
04-Jun-2004 |
kientzle |
When we go to read the next tar header, if we get zero bytes, accept that as end-of-archive. Otherwise, a short read at this point generates an error. This accomodates broken tar writers (such as the one apparently in use at AT&T Labs) that don't even write a single end-of-archive block.
Note that both star and pdtar behave this way as well. In contrast, gtar doesn't complain in either case, and as a result, will generate no warning for a lot of trashed archives.
Pointed out by: shells/ksh93 port (Thanks to Kris Kennaway)
|
130048 |
04-Jun-2004 |
kientzle |
Be more careful about the initial read (used for "tasting" the compression): * Check for and return input errors * Treat empty file (zero-length read) as a fatal error
|
130042 |
03-Jun-2004 |
kientzle |
Refactor the extraction code somewhat. In particular, push extract data down into archive_read_extract.c and out of the library-global archive_private.h; push dir-specific mode/time fixup down into dir restore function; now that the fixup list is file-local, I can use somewhat more natural naming.
Oh, yeah, update a bunch of comments to match current reality.
|
129991 |
02-Jun-2004 |
kientzle |
Add MLINKS for new API functions.
|
129990 |
02-Jun-2004 |
kientzle |
Refactor read_data: * New read_data_block is both sparse-file aware and uses zero-copy semantics * Push read_data_block down into specific formats (opens door to various encoded entry bodies, such as zip or gtar -S) * Reimplement read_data, read_data_skip, read_data_into_fd in terms of new read_data_block. * Update documentation It's unfortunate that I couldn't just call the new interface archive_read_data, but didn't want to upset the API that much.
|
129791 |
27-May-2004 |
kientzle |
Connect libarchive decompress support to the build. Also, add it to archive_read_support_compression_all() so that typical clients get it pulled in by default.
|
129786 |
27-May-2004 |
kientzle |
'gnutar' is now handled by the 'tar' reader, so there's no need to enable support for it separately from 'tar.' (The call to enable gnutar support is now just an alias for the tar support, left in to avoid API breakage.)
|
129771 |
27-May-2004 |
kientzle |
Previously, restoring an archive with hardlinked files that had certain flags set (e.g., schg or uappend) would fail because the flags were restored before the hardlink was created.
To address this, I've generalized the existing machinery for deferring directory timestamp/mode restoration and used it to defer the restoration of highly-restrictive flags to the end of the extraction, after any links have been created.
Pointed out by: Pawel Jakub Dawidek (pjd@)
|
129768 |
27-May-2004 |
kientzle |
Document support for reading .Z compressed archives. Correct a few other minor nits.
|
129767 |
27-May-2004 |
kientzle |
GC some no-longer-used constants.
|
129766 |
27-May-2004 |
kientzle |
Add prototypes for .Z compression support.
|
129765 |
27-May-2004 |
kientzle |
Add read-only support for .Z compressed archives.
|
129540 |
21-May-2004 |
kientzle |
Correct parsing of Solaris default ACLs.
|
129464 |
20-May-2004 |
kientzle |
Nits fixed.
Pointed out by: Daniel Harris
|
129461 |
20-May-2004 |
kientzle |
More research, more shuffling and clarification.
|
129447 |
19-May-2004 |
kientzle |
When combining ustar prefix and name fields, check before adding a '/' character, as some tar implementations incorrectly include a '/' with the prefix.
Thanks to: Divacky Roman for the UnixWare 7 tarfile that demonstrated this issue.
|
129422 |
19-May-2004 |
kientzle |
I've recently been looking at the Seventh Edition source code available at tuhs.org, and found out that my chronology is a bit off. In particular, Seventh Edition already used the "linkflag" and "linkname" fields. Also, it appears that there was no tar in Sixth Edition, contrary to what an earlier tar.1 manpage claimed.
A few mdoc fixes also crept in here.
|
129421 |
19-May-2004 |
kientzle |
Refine the heuristic used to determine whether or not to obey the size field for a hardlink entry. Specifically, ensure that we do obey the size field for archives that we know are pax interchange format archives, as required by POSIX.
Also, clarify the comment explaining why this is necessary and explain the (very unusual) conditions under which it might fail.
|
129399 |
18-May-2004 |
kientzle |
Be smarter about hardlink sizes: some tar programs write a non-zero size but no body, some write a non-zero size and include a body. To distinguish these cases, look for a valid tar header immediately following a hardlink header with non-zero size.
|
129370 |
18-May-2004 |
kientzle |
Clarify an error message.
|
129215 |
14-May-2004 |
cognet |
Use WARNS?=3 for these in the arm case for now, due to toolchain issues.
|
129173 |
13-May-2004 |
kientzle |
Update raw byte count statistic correctly.
|
129172 |
13-May-2004 |
kientzle |
Add MLINK for newly-added archive_read_extract_set_progress_callback(3).
|
129171 |
13-May-2004 |
kientzle |
Add hook for a client-provided progress callback to be invoked during lengthy extract operations.
|
128855 |
03-May-2004 |
kientzle |
Consistify: #define gets 1 tab character afterwards Pointed out by: Simon Nielsen
|
128808 |
02-May-2004 |
kientzle |
Include appropriate flag header on Linux.
|
128743 |
30-Apr-2004 |
kientzle |
Create missing directories when extracting hardlinks and symlinks.
|
128732 |
29-Apr-2004 |
kientzle |
Implement ARCHIVE_EXTRACT_UNLINK for regular files. This supports the -U flag to bsdtar. Essentially, this option breaks existing hard links. According to SUSv2, tar is supposed to overwrite existing files on extract by default which, in particular, preserves existing hard links. Note that this is yet another bug in gtar; it appears to always break existing links. (Maybe gtar's -U is broken?)
I'm unsure about how to handle this for other file types; the current code always unlinks first unless the NO_OVERWRITE flag is specified. I've commented this issue liberally and will come back to it later.
|
128703 |
28-Apr-2004 |
kientzle |
Add statistics: track offset in compressed and uncompressed archive, provide an interface for the client to query this information.
|
128702 |
28-Apr-2004 |
kientzle |
Correct spelling of "shell archive" to match /usr/share/misc/magic.
|
128701 |
28-Apr-2004 |
kientzle |
Add the libarchive-formats.5 manpage. This summarizes the various 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).
|
128700 |
28-Apr-2004 |
kientzle |
Add read support for four more common cpio variants: * little-endian old-style binary cpio archives * big-endian old-style binary cpio archives * SVR4 portable archives without CRC * SVR4 portable archives with CRC
Note that I don't yet verify the CRC for the last one, and I'm not quite certain I'm correctly parsing device numbers.
|
128669 |
26-Apr-2004 |
kientzle |
Update file flag handling.
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.
|
128586 |
23-Apr-2004 |
kientzle |
Make clone more aggressive about copying strings to the new entry. The original might have pointers to user-specified strings; copying the string (instead of just the pointer) protects against the client re-using their own buffers.
I'm trying hard to avoid dumping all of the 'set' string functions in favor of slower, but more predictable 'copy' semantics.
|
128584 |
23-Apr-2004 |
kientzle |
Set the 'dump' flag for shardump format.
Credit Juergen Lock. Pointy hat to me for deleting this somewhere along the way.
|
128581 |
23-Apr-2004 |
kientzle |
Correct spelling of == so that file flags are correctly restored.
Credit to Juergen Lock.
|
128515 |
21-Apr-2004 |
kientzle |
More portability improvements, thanks to Juergen Lock.
High-resolution mtime/ctime/atime is not POSIX-standard, so hide set/get of high-resolution time fields behind easily-mutable macros. That makes it easier to change how those fields are accessed.
|
128497 |
20-Apr-2004 |
kientzle |
Yucky bug: Don't emit 'mkdir' commands for regular files in shar archives. While I'm here, add some logic to avoid "mkdir ."
Reported by: Juergen Lock
|
128496 |
20-Apr-2004 |
kientzle |
In GNU tar archives, read ctime from ctime field, not atime field.
Credit: Juergen Lock
|
128495 |
20-Apr-2004 |
kientzle |
Eliminate some redundant calls to archive_entry_hardlink.
|
128443 |
19-Apr-2004 |
kientzle |
Optimize ustar header formatting.
|
128296 |
16-Apr-2004 |
kientzle |
Only enable the ACL restore logic on FreeBSD versions >= 5.0. Earlier versions of FreeBSD don't support ACLs.
Note that the ACL support code in archive_entry is standalone code and unaffected by this. (In particular, it should be possible to manipulate archives containing ACLs even if the ACLs cannot be restored on the current system.)
|
128204 |
13-Apr-2004 |
kientzle |
* Plug a buffer overrun in ACL parsing. (archive_entry.c) * Re-use a single buffer for shar output formatting rather than hammering the heap. (archive_write_set_format_shar.c) * Fix a handful of minor memory leaks and clean up some of the memory-management code.
|
128148 |
12-Apr-2004 |
kientzle |
More work on ACLs: fix error in archive_entry's ACL parsing code, 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
|
128014 |
07-Apr-2004 |
kientzle |
Linux still uses 32-bit off_t by default. Ask for 64-bit off_t on Linux.
|
127971 |
06-Apr-2004 |
kientzle |
Fix some issues with ACL handling: * ACL storage is no longer erased before a group of entries are added. * ACL text creation no longer tries to skip over non-existent text. * UTF8 encoder no longer blows up on invalid wide characters. * Fixed ACL state management for default ACLs. Also, publicize function for obtaining text-format ACL in various formats. The interface is now extensible through a "flags" argument that allows you to select a variant format.
|
127912 |
05-Apr-2004 |
kientzle |
Overhauled ACL support. This makes us compatible 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.
|
127325 |
23-Mar-2004 |
kientzle |
mdoc fixes
|
127295 |
22-Mar-2004 |
kientzle |
Just use autoconf-compatible feature macros; don't try to be clever.
|
127244 |
20-Mar-2004 |
kientzle |
Bug: Standard C still requires declarations to precede statements. <sigh>
Portability: Eliminate an accidental __unused, accomodate systems with non-POSIX strerror_r
|
127212 |
19-Mar-2004 |
kientzle |
Many fixes:
* 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>
|
126782 |
09-Mar-2004 |
kientzle |
Many fixes.
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
|
126705 |
07-Mar-2004 |
kientzle |
Recognize hardlinks when reading cpio files.
This doesn't yet address the issue of selective restore of hardlinked files. With cpio format, it's possible to correctly restore any linked file; the API doesn't yet fully support this. (There's no way for the library to inform a client whether or not there's a file body associated with this entry. The assumption right now is that "hardlink" entries have no file body.)
|
126684 |
06-Mar-2004 |
kientzle |
Minor API tweak: The format-specific write_header function now sets the size in the archive_entry object to zero if that format doesn't store a body for that file type. This allows the client to determine whether or not it should feed the file body to the archive. In particular, cpio stores the file body for hardlinks, tar and shar don't. With this change, bsdtar now correctly archives hardlinks in all supported formats.
While I'm here, make shar output be more aggressive about creating directories. Before this, commands such as: bsdtar -cv -F shar some/explicit/path/to/a/file wouldn't create the directory. Some simple logic to remember the last directory creation helps reduce unnecessary mkdirs here.
At this point, I think the only flaw in libarchive's cpio support is the failure to recognize hardlinks when reading.
|
126680 |
06-Mar-2004 |
kientzle |
Remove last evidence of a long-dead function.
|
126679 |
06-Mar-2004 |
kientzle |
Add ARCHIVE_EXTRACT_UNLINK option to permit clients to control how archive_extract handles pre-existing files. (Not implemented yet, but documented.)
|
126678 |
06-Mar-2004 |
kientzle |
Correctly read symlinks from cpio files.
While I'm here, fix a bug in reading filenames from cpio files. (Copy should count the length of the name, not the number of bytes available for input.)
|
126621 |
05-Mar-2004 |
kientzle |
Correctly read SCHILY.nlink from pax-format archives. In particular, -tv output for pax-format archives now lists everything that ls -l does.
|
125744 |
12-Feb-2004 |
kientzle |
sys/types.h must be included before sys/acl.h, as clearly documented in the acl manpage.
Thanks to bde for catching this blunder.
|
125726 |
12-Feb-2004 |
kientzle |
libarchive itself is now completely clean at WARNS=10 on all architectures.
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.
|
125635 |
09-Feb-2004 |
kientzle |
Initial import of libarchive.
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.
|