Commit Graph

40 Commits

Author SHA1 Message Date
Martin Matuska
fd082e96c4 Update libarchive to 3.0.4 2012-07-28 06:38:44 +00:00
Martin Matuska
6c95142e79 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
2012-02-25 10:58:02 +00:00
Martin Matuska
45d3b226a6 Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

MFC after:	2 weeks
2011-12-22 08:42:07 +00:00
Martin Matuska
2ad1419f1b Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:33:15 +00:00
Martin Matuska
7fbeb03eb7 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
2010-05-10 15:28:44 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Tim Kientzle
c7e120041d Merge from libarchive.googlecode.com: Numerous Windows-specific build tweaks. 2009-04-17 03:36:07 +00:00
Tim Kientzle
ebf7581e4d Match a comment to reduce differences with libarchive.googlecode.com. 2009-03-08 06:09:20 +00:00
Tim Kientzle
66c8431841 Merge r709,r710 from libarchive.googlecode.com: More work on
Windows support.
2009-03-08 06:07:35 +00:00
Tim Kientzle
ac90bcdea0 Merge r687-689,691,693-701,720 from libarchive.googlecode.com:
Translate getdate.y into C for portability.  Make the get_date()
function easier to test as well:
 * Have it accept a time_t "now" to use as a reference so that test
   code can verify relative time specifications against known starting
   points.
 * Set up default date after parsing the string so that we
   can use the specified timezone (if any) instead of the local
   default.  Otherwise, local DST makes it almost impossible to
   reliably test time specifications such as "sunday UTC"
2009-03-08 06:03:15 +00:00
Tim Kientzle
74d5acaf4c Merger r629-631,633-646,648,654,678,681,682 from libarchive.googlecode.com:
Many changes for Windows compatibility.  bsdtar_test now runs successfully
on both POSIX platforms and Windows.
2009-03-08 05:47:21 +00:00
Tim Kientzle
503c6aa1ca Merge r368,496,625,626 from libarchive.googlecode.com: A number of
style and portability tweaks to the test harness.  Most significantly,
don't use getopt().
2009-03-08 05:38:45 +00:00
Tim Kientzle
88b0df8855 Merge r435,r443 from libarchive.googlecode.com: Let the compiler options
determine how to read config.h.
2009-03-08 05:24:37 +00:00
Tim Kientzle
e8f0b45249 Merge r374 from libarchive.googlecode.com: Stupid typo in open() call. <sigh> 2009-03-08 05:19:36 +00:00
Tim Kientzle
c9dae218f2 Merge r369 from libarchive.googlecode.com: Test -s option. 2009-03-08 05:17:58 +00:00
Tim Kientzle
5ff33ec7ae Merge r278 from libarchive.googlecode.com: Reduce the number of
patterns tested here from 200 to 170, which seems to be the
most that Cygwin can handle.
2009-03-08 05:14:16 +00:00
Tim Kientzle
7bae205d49 Merge r273 from libarchive.googlecode.com: Use open() correctly. 2009-03-08 05:10:51 +00:00
Tim Kientzle
8666079cdb Include more detailed explanation of this case, since it's pretty
subtle why it comes out the way it does.  Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case.  (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)

(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)

PR:		bin/128562
MFC after:	30 days
2008-11-10 05:24:13 +00:00
Tim Kientzle
c4a52c7226 Test --strip-components and fix it to actually work. Jaakko did a
good job writing this test; it exercises a lot of subtle cases.  The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted.  In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.

The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.

Submitted by:	Jaakko Heinonen
MFC after:	30 days
2008-11-10 05:04:55 +00:00
Tim Kientzle
025b20f6e5 When comparing, cast to the larger size, off_t in this case.
Once we know which one is smaller, then we cast to the smaller size.

Thanks to Xin Li (delphij@)
Pointy hat: /me
2008-11-05 06:40:53 +00:00
Tim Kientzle
f4e24c4e7a Fix compile warnings building on amd64. This is modified slightly
from Jaakko's original patch: I have misgivings about the portability
of the 'z' printf modifier so opted to cast the arguments to (int)
instead.

PR:		bin/128561
Submitted by:	Jaakko Heinonen
MFC after:	30 days
2008-11-05 05:26:11 +00:00
Tim Kientzle
1756b590c9 Test handling of restores relative to symlinks.
In particular:
  * tar -x -P follows symlinks to existing dirs, but not without -P
  * symlinks to files are always replaced
  * broken symlinks are always replaced
2008-09-14 02:16:04 +00:00
Tim Kientzle
83cb61fa3a Minor cleanup of the -q test: Assert that stdout/stderr are empty for each
extraction.
2008-08-22 01:35:08 +00:00
Tim Kientzle
ba1a633912 Explain how the test_option_q test works. 2008-08-22 01:26:55 +00:00
Tim Kientzle
3873424684 Test for -q (aka --fast-read).
Fix the error uncovered by this test.
2008-08-22 01:22:55 +00:00
Tim Kientzle
b1feec2392 The results for test 2 here are short enough to just be included inline.
There's no need to go through the hassle of having a checked-in uuencoded
reference file for comparison.
2008-08-21 22:28:00 +00:00
Tim Kientzle
503b743566 Add some more tests to verify that "./foo" matches "foo" but "/foo" does not. 2008-08-21 07:04:57 +00:00
Tim Kientzle
e0e53b4111 Always display the unedited pathname in -t output.
I would like to provide a way to preview the effects of pathname edits,
but pattern selection has to happen against the unedited path, so it
seems that we have to show people the unedited path to help in
designing selection patterns.
2008-08-21 06:41:14 +00:00
Tim Kientzle
b14f19cf97 Better comment the pattern tests; adjust the filenames for the
reference files to match the corresponding source.

MFC after:	3 days
2008-08-20 06:01:53 +00:00
Tim Kientzle
8eccad56d9 Test updates: Handling of patterns on command line, error messages. 2008-08-15 06:12:02 +00:00
Tim Kientzle
669a9b2e92 MfP4: test harness cleanup. 2008-06-15 10:07:54 +00:00
Tim Kientzle
eb36031906 MFp4: bsdtar 2.5.4b
In addition to a number of bug fixes and minor changes:
 * --numeric-owner (ignore user/group names on create and extract)
 * -S (sparsify files on extraction)
 * -s (regex filename substitutions)
 * Use new libarchive 'linkify' to get correct hardlink handling for
   both old and new cpio formats
 * Rework 'copy' test to be insensitive to readdir() filename ordering

Most of the credit for this work goes to Joerg Sonnenberger, who
has been duplicating features from NetBSD's 'pax' program.
2008-05-26 17:10:10 +00:00
Tim Kientzle
c40b056519 New bsdtar test harness. Still rather skimpy, but a lot easier
to run and maintain than the old scripts that used to be here.
2008-05-02 05:17:16 +00:00
Tim Kientzle
4a1f529a56 Remove the old bsdtar test scripts; something much
better is almost ready to commit.
2008-01-02 00:28:44 +00:00
Tim Kientzle
007c50304b When testing basic functionality, strip trailing '/' from
dir names, so they match the names generated by 'find'.
2007-04-18 04:35:17 +00:00
Colin Percival
17c0c70552 Add test to confirm that piping a tar archive created by bsdtar through
'bsdtar -cf- @-' doesn't alter it.
2007-04-04 03:12:15 +00:00
Colin Percival
a92fcfb26e Add tests for "bsdtar -t". These are useful primarily because they test
the archive_read_data_skip code.
2007-03-31 22:04:36 +00:00
Tim Kientzle
1267d00111 Clarify the test comments in test-basic.sh. Have config.sh do a
better job searching for the bsdtar binary to test and the gtar binary
to use for inter-operability testing.  It should now find the built
(but not installed) binary if there is one, then search for an
installed binary in a number of standard locations.
2007-03-11 19:33:45 +00:00
Tim Kientzle
45d4d7ac8c bsdtar 2.0.23:
* New test scripts exercise some basic functionality
   * Most header inclusions are now protected (portability)
   * read.c now relies on security checks in libarchive instead
     of trying to do its own (optimization)
   * -p now enabled by default for root, add --no-same-permissions
     to disable it
   * Comments, minor style fixes.
2007-03-11 10:36:42 +00:00