summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-2/+0
| | | | Tested with: make universe
* Make sure to use up-to-date libarchive header files from source tree whenpjd2009-09-071-1/+1
| | | | | | | compiling tar and not the ones from /usr/include/. Reviewed by: kientzle Approved by: kientzle
* Make -lcrypto usage dependent on whether or not we're building with OpenSSL.kientzle2009-04-181-1/+5
|
* Merge remaining changes from libarchive.googlecode.com:kientzle2009-04-176-42/+150
| | | | | | | | * Add xz and lzma compression options * Rename --format-options to simply --options * Add --same-owner for GNU tar compat * Add -lmd and -lcrypto to fix link * Documentation
* Set options before opening the archive.kientzle2009-04-171-7/+10
| | | | Catch and report close-time errors.
* Minor portability improvement in calls to ctype.h macros.kientzle2009-04-171-2/+2
|
* Merge from libarchive.googlecode.com: Numerous Windows-specific build tweaks.kientzle2009-04-1710-52/+58
|
* Update version to 2.6.901a to indicate this is synced up with r745 ofkientzle2009-03-081-1/+1
| | | | libarchive.googlecode.com (except for the lzma/xz support).
* Merge r492 from libarchive.googlecode.com: First cut at exposing thekientzle2009-03-085-0/+29
| | | | new options mechanism to userland. Documentation pending...
* Match a comment to reduce differences with libarchive.googlecode.com.kientzle2009-03-082-1/+5
|
* Merge r709,r710 from libarchive.googlecode.com: More work onkientzle2009-03-083-31/+779
| | | | Windows support.
* Merge r687-689,691,693-701,720 from libarchive.googlecode.com:kientzle2009-03-086-822/+1102
| | | | | | | | | | | | 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"
* Merger r629-631,633-646,648,654,678,681,682 from libarchive.googlecode.com:kientzle2009-03-0823-66/+733
| | | | | Many changes for Windows compatibility. bsdtar_test now runs successfully on both POSIX platforms and Windows.
* Merge r368,496,625,626 from libarchive.googlecode.com: A number ofkientzle2009-03-082-36/+83
| | | | | style and portability tweaks to the test harness. Most significantly, don't use getopt().
* Merge r622 from libarchive.googlecode.com: Avoid warning on platformskientzle2009-03-081-1/+1
| | | | that lack regex.h.
* Merge r552,r559 from libarchive.googlecode.com: High-resolution timekientzle2009-03-081-3/+10
| | | | support on Tru64, AIX, and GNU Hurd, thanks to Björn Jacke.
* Merge r529 from libarchive.googlecode.com: Fix how we read ext2fs_fs.hkientzle2009-03-081-4/+11
| | | | headers on Linux.
* Merge r435,r443 from libarchive.googlecode.com: Let the compiler optionskientzle2009-03-082-4/+4
| | | | determine how to read config.h.
* Merge r283,r423 from libarchive.googlecode.com: Use libarchive's newkientzle2009-03-083-530/+127
| | | | | | archive_read_disk API to pull metadata off of disk. This removes a lot of platform-specific knowledge of things like ACLs, file flags, and extended attributes from bsdtar.
* Merge r374 from libarchive.googlecode.com: Stupid typo in open() call. <sigh>kientzle2009-03-081-1/+1
|
* Merge r369 from libarchive.googlecode.com: Test -s option.kientzle2009-03-082-0/+96
|
* Merge r278 from libarchive.googlecode.com: Reduce the number ofkientzle2009-03-081-3/+5
| | | | | patterns tested here from 200 to 170, which seems to be the most that Cygwin can handle.
* Merge r273 from libarchive.googlecode.com: Use open() correctly.kientzle2009-03-081-1/+1
|
* Fix multiple -s options.kientzle2009-02-081-1/+1
| | | | MFC after: 7 days
* When copying file data to the archive, don't write morekientzle2009-02-081-1/+1
| | | | | | | | | than was read. This seems to have only affected the shar writer, since other formats proactively truncate output to the originally-advertised size. PR: bin/131244 MFC after: 7 days
* Spell "substitution" correctly.kientzle2008-12-151-3/+3
| | | | | | | PR: bin/128616 Submitted by: Jaakko Heinonen Pointy hat: Tim Kientzle MFC after: 30 days
* bsdtar is synced up with 2.5.903akientzle2008-12-061-1/+1
|
* bsdtar always supports long options now, so we can removekientzle2008-12-061-2/+2
| | | | a documentation disclaimer.
* Only use GCC-specific __dead2 marker when building with GCC.kientzle2008-12-062-1/+11
|
* When deciding which characters (of a filename, for instance)kientzle2008-11-292-49/+119
| | | | | | | | | | | | are safe to print, try to take into account the current locale. This iterates over output strings using mbtowc() to identify multi-byte sequences. If iswprint() claims the corresponding wide character is printable, the original bytes are passed through. Otherwise, we expand characters into C-style \-escape sequences. Submitted by: Michihiro NAKAJIMA MFC after: 30 days
* After visiting a subdirectory, we use chdir("..") orkientzle2008-11-273-19/+57
| | | | | | | | | | fchdir() to return back to the parent. If those fail, we're just dead in the water. Add a new error value TREE_ERROR_FATAL to indicate that directory traversal cannot continue. Have write.c honor that by exiting immediately. MFC after: 30 days
* If we're unable to chdir() to a directory that we know exists,kientzle2008-11-271-1/+3
| | | | | | | | | | that should result in a non-zero return value. In particular, this should address the issue that David Wolfskill ran into with a somewhat flaky NFS mount resulting in a damaged archive even though tar returned success. MFC after: 4 days
* Include more detailed explanation of this case, since it's prettykientzle2008-11-101-5/+34
| | | | | | | | | | | | | | | 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
* Test --strip-components and fix it to actually work. Jaakko did akientzle2008-11-103-16/+116
| | | | | | | | | | | | | | | 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
* New command-line parser for bsdtar.kientzle2008-11-086-356/+455
| | | | | | | | | | This replaces the getopt()/getopt_long() wrapper, the old-style argument rewriter and the associated configuration glue with a more straightforward custom command parser. In particular, this ensures that bsdtar will have consistent option parsing on every platform, regardless of whether the platform supports getopt_long(). MFC after: 30 days
* When comparing, cast to the larger size, off_t in this case.kientzle2008-11-051-1/+1
| | | | | | | Once we know which one is smaller, then we cast to the smaller size. Thanks to Xin Li (delphij@) Pointy hat: /me
* Fix compile warnings building on amd64. This is modified slightlykientzle2008-11-051-4/+5
| | | | | | | | | | 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
* Clean up flags support just a tad: FreeBSD support depends onkientzle2008-09-142-28/+30
| | | | | | | HAVE_STRUCT_STAT_ST_FLAGS, Linux support depends on the existence of the appropriate ioctl() options. In particular, this should fix some nagging compile errors on Linux platforms that don't have e2fsprogs-devel installed.
* Test handling of restores relative to symlinks.kientzle2008-09-142-0/+173
| | | | | | | 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
* Minor cleanup of the -q test: Assert that stdout/stderr are empty for eachkientzle2008-08-221-3/+9
| | | | extraction.
* Don't clean before running tests.kientzle2008-08-221-1/+1
|
* Explain how the test_option_q test works.kientzle2008-08-221-0/+15
|
* Test for -q (aka --fast-read).kientzle2008-08-223-1/+106
| | | | Fix the error uncovered by this test.
* The results for test 2 here are short enough to just be included inline.kientzle2008-08-212-8/+3
| | | | | There's no need to go through the hassle of having a checked-in uuencoded reference file for comparison.
* Add some more tests to verify that "./foo" matches "foo" but "/foo" does not.kientzle2008-08-214-1/+76
|
* Always display the unedited pathname in -t output.kientzle2008-08-214-21/+12
| | | | | | | 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.
* Better comment the pattern tests; adjust the filenames for thekientzle2008-08-204-12/+22
| | | | | | reference files to match the corresponding source. MFC after: 3 days
* Fix SVN r181821 by not using FNM_LEADING_DIR wherekientzle2008-08-181-1/+1
| | | | it shouldn't be used.
* Strip leading "./" or ".//" from patterns and filenameskientzle2008-08-181-3/+39
| | | | | | | | | so that "./foo" matches "foo" (and vice versa). This is related to PR bin/119141. PR: bin/119141 MFC after: 4 days
* Don't strip a leading '/' from a pattern to be matched.kientzle2008-08-171-2/+0
| | | | | | | | This aligns the pattern-matching behavior with GNU tar and restores the behavior of bsdtar prior to FreeBSD 6.3. PR: bin/117909 MFC after: 3 days
OpenPOWER on IntegriCloud