summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
* Improve portability via s/struct siginfo/struct siginfo_data/. This wascperciva2008-05-222-3/+3
| | | | running into a namespace collision on an avian operating system.
* Detect if argv[1] is "" and avoid calling malloc(0). Prior to this commit,cperciva2008-05-191-2/+2
| | | | | | running 'tar ""' would print 'No memory' instead of the correct error message, 'Must specify one of -c, -r, -t, -u, -x' if malloc is set to System V mode (malloc(0) == NULL).
* There's no way for entry to possibly be NULL at the end of write_entrycperciva2008-05-191-2/+1
| | | | | | | | (in fact, there has never been any way for it to be NULL, going all the way back to revision 1.1 of this file), so remove the check and unconditionally free entry. Found by: Coverity Prevent
* Add SIGINFO (and for portability to SIGINFO-lacking systems, SIGUSR1)cperciva2008-05-185-1/+205
| | | | | | | | | | | handling to bsdtar. When writing archives (including copying via the @archive directive) a line is output to stderr indicating what is being done (adding or copying), the path, and how far through the file we are; extracting currently does not report progress within each file, but this is likely to happen eventually. Discussed with: kientzle Obtained from: tarsnap
* Add --keep-newer-files option (as in GNU tar: When in -x mode, ignorecperciva2008-05-172-0/+9
| | | | | | | | | | | files if the existing file is newer than the archive entry). Currently if any files are ignored, bsdtar will exit with a non-zero exit status; this is likely to change in the future, but requires some API changes in libarchive. Discussed with: kientzle Obtained from: tarsnap
* Documentation updates:kientzle2008-05-022-3/+9
| | | | | | * --format can be used with -r or -u * -o is a synonym for --format=ustar when used with -c, -r, or -u Also, fix the erroneous sanity check that suppressed --format with -r or -u.
* bsdtar --version should succeed.kientzle2008-05-021-1/+1
|
* New bsdtar test harness. Still rather skimpy, but a lot easierkientzle2008-05-0211-0/+2203
| | | | to run and maintain than the old scripts that used to be here.
* Allow -r with -T even if there are no files on the command line.kientzle2008-05-021-1/+1
| | | | | PR: bin/123246 MFC after: 3 days
* Fix --fast-read by decrementing the remaining patterns to be matched,kientzle2008-03-182-2/+2
| | | | | | | | instead of incrementing. Pointy hat: me Thanks to: Tomasz Przygoda MFC after: 3 days
* style(9) fix to add whitespace around an '=' sign and restorekientzle2008-03-151-1/+2
| | | | a comment that got accidentally dropped.
* Support NetBSD's --insecure as a synonym for -P.kientzle2008-03-151-0/+1
|
* Document --chroot.kientzle2008-03-151-0/+6
|
* Support -q (from NetBSD) as a synonym for --fast-read (the old FreeBSDkientzle2008-03-152-14/+13
| | | | | | extension to GNU tar). Thanks to: Joerg Sonnenberger
* Also accept --uncompress as a synonym for -Z.kientzle2008-03-151-0/+1
| | | | Thanks to: Joerg Sonnenberger
* --chroot implementation thanks to Joerg Sonnenberger.kientzle2008-03-154-0/+18
|
* Support --compress as a synonym for -Z.kientzle2008-03-151-0/+1
|
* Enable and document the -Z option for selecting "compress" compression,kientzle2008-03-153-5/+13
| | | | now that libarchive supports it.
* Allow appending to archives on block devices as well askientzle2008-02-191-1/+1
| | | | | | archives in regular files, since both are seekable. Thanks to: Reinoud Zandijk (@netbsd.org)
* Make -l always have the SUSv2 meaning of "check links."kientzle2008-01-222-30/+11
| | | | | | | | GNU tar changed -l to match SUSv2 a couple of years ago, so bsdtar no longer needs to pander to this particular GNUism. Thanks to: Debian maintainers MFC after: 7 days
* Remove the old bsdtar test scripts; something muchkientzle2008-01-028-859/+0
| | | | better is almost ready to commit.
* A couple of miscellaneous fixes:kientzle2008-01-023-4/+18
| | | | | | | | * prototypes for optarg/optind on platforms that don't already have them * Disambiguate version number macros * Remove unnecessary PACKAGE_NAME macro * Hook for forthcoming bsdtar test suite * Sync version number up with the portable distribution
* Fill in the approximate date when tar(1) first appeared.kientzle2008-01-021-1/+1
|
* Include a suitable stub definition of __FBSDID() for non-FreeBSD platforms.kientzle2008-01-021-1/+2
|
* Use archive_entry_strmode() instead of a local bsdtar_strmode().kientzle2008-01-023-53/+3
| | | | | | (This does a couple of things that the standard library's strmode() doesn't; it proved useful in bsdcpio as well, so I pushed it down into libarchive.)
* Include Guido's copyright for the fnmatch() code I cribbed from.kientzle2008-01-021-1/+36
| | | | (It's in the C source, just wasn't in the COPYING file until now.)
* Add --posix as a synonym for --format=pax, for GNUkientzle2007-09-091-0/+5
| | | | | | tar compatibility. Approved by: re (bmah)
* Fix for PR bin/115033. This corrects a crash when long optionskientzle2007-08-011-0/+4
| | | | | | | are specified with the "-W option=arg" syntax and the '=' is omitted. MFC after: 3 days Approved by: re (rwatson)
* Fill in some casts that are needed (according to GCC 4.1)kientzle2007-07-201-6/+6
| | | | | | Thanks to: Joerg Sonnenberger Approved by: re (hrs) MFC after: 3 days
* Don't exit immediately on libarchive warnings, justkientzle2007-07-202-4/+4
| | | | | | | set the delayed return value and keep going. Approved by: re (hrs) MFC after: 7 days
* bsdtar 2.2.3:kientzle2007-05-296-20/+39
| | | | | | | | | * Implement --use-compress-program using new libarchive feature. * Minor portability improvement by adjusting casts used to print out uids, gids, and device numbers. Thanks to: Joerg Sonnenberger for the --use-compress-program implementation. MFC after: 15 days
* Mention the formats supported by bsdtar; include ankientzle2007-05-201-0/+6
| | | | example that shows how to work with an ISO 9660 image.
* Set the program return value non-zero if we enounterkientzle2007-05-081-0/+1
| | | | | | | | an error while skipping the body of an entry during "tar -t" processing. Thanks to: Spencer Minear PR: misc/112521
* If lstat(2) fails, have bsdtar return a non-zero exit code if thecperciva2007-05-031-0/+10
| | | | | | | | | | | | | failed path is one which was specified on the command line. This is a compromise between the situation prior to revision 1.57 (where a race between tar(1) and rm(1) could cause tar(1) to spuriously report an error) and the situation after revision 1.57 (where "tar -c /no/such/path" prints a warning but returns with an exit code of zero). Inspired by: rafan MFC after: 1 week
* Ignore trailing '/' when comparing pathnames, so thatkientzle2007-04-181-3/+26
| | | | | "tar -u" works again. Otherwise, "tar -u" wants to treat every dir as new and re-adds it.
* When testing basic functionality, strip trailing '/' fromkientzle2007-04-181-3/+3
| | | | dir names, so they match the names generated by 'find'.
* In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors whichcperciva2007-04-161-9/+8
| | | | | | | | | | | | | | | | 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
* Portability.kientzle2007-04-131-0/+2
| | | | Thanks to: Martin Koeppe for testing on Interix
* Make it easier to support more platforms.kientzle2007-04-122-8/+7
| | | | Thanks to: Joerg Sonnenberger for pointing out the need and the technique.
* Clean up error handling in archive_append to match how errors arecperciva2007-04-091-19/+39
| | | | | | handled in write_hierarchy. Approved by: kientzle
* Simplify the logic for handling header readkientzle2007-04-071-7/+5
| | | | errors.
* Add test to confirm that piping a tar archive created by bsdtar throughcperciva2007-04-041-0/+5
| | | | 'bsdtar -cf- @-' doesn't alter it.
* Add tests for "bsdtar -t". These are useful primarily because they testcperciva2007-03-311-0/+16
| | | | the archive_read_data_skip code.
* Split the append_archive function (used for processing @<archive> directives)cperciva2007-03-311-13/+28
| | | | | | | | | | | | into separate append_archive and append_archive_filename functions; the first takes a "struct archive *" as input, while the second takes a filename, opens the archive, and calls the first. There should be no changes in behaviour as a result of this commit; it simply reorganizes code to make more sense. At some point in the future it may be possible to share code between append_archive and read_archive, but not yet. Discussed with: kientzle
* Issue a warning if there's a non-zero exit value.kientzle2007-03-242-1/+4
|
* Remove pathlen argument from write_entry function. It has never been used.cperciva2007-03-171-5/+2
| | | | | Approved by: kientzle MFC after: 3 days
* Fix logic bug; we want to do_chdir if arg doesn't start with / _and_ itcperciva2007-03-171-1/+1
| | | | | | | | doesn't start with @/ either. This unbreaks "tar -c -C /no/such/directory @/path/to/archive". MFC after: 3 days
* Don't consider an lstat(2) failure to be an error (in the sense ofcperciva2007-03-151-1/+0
| | | | | | | | | | | | affecting the return value from bsdtar), since (a) it usually occurs due to a perfectly innocent (and unavoidable) race condition where a user deletes a file in the window between bsdtar reading a directory and attempting to read the file; and (b) aside from printing a warning message, bsdtar behaves exactly as if the file had been deleted prior to bsdtar reading its parent directory. Reviewed by: kientzle MFC after: 6 days
* Reduce the risk of inducing heart attacks, by printing the right path whencperciva2007-03-141-1/+1
| | | | | | | | complaining about lstat(2) failing. It's a bit scary to find the message tar: /: Cannot stat: No such file or directory printed while doing a backup. MFC after: 1 week
* Clarify the test comments in test-basic.sh. Have config.sh do akientzle2007-03-112-34/+47
| | | | | | | 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.
OpenPOWER on IntegriCloud