summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* bsdtar 2.0.23:kientzle2007-03-1119-228/+1139
| | | | | | | | | | * 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.
* Argh. Support for reading ACLs off of disk was inadvertently disabledkientzle2007-03-081-0/+1
| | | | | | | | | as part of an old configuration shuffle. As a result, although ACL restore has been working, ACLs haven't been written into archives for some time. <sigh> Pointy hat: You know. MFC after: 3 days
* Make the file tests robust against broken symlinks and otherkientzle2007-03-031-3/+17
| | | | sources of stat()/lstat() failure.
* If we already have stat() data, we might be able tokientzle2007-02-211-21/+29
| | | | | | determine if this is a physical dir without an lstat(). While I'm in here, try to clarify the comments around the _is_dir() and _is_physical_dir() tests.
* Andrew and Colin each pointed out to me that truncating the backupkientzle2007-02-181-2/+0
| | | | | | | | of a growing file should not be considered a "bad thing." PR: bin/108990 MFC after: 7 days Pointy hat: /me
* Correctly handle writes beyond the end of the archive entrykientzle2007-02-141-1/+9
| | | | | | | (as determined by the initial size given to the header). Libarchive recently changed to correctly return the amount of data actually consumed in this case, which revealed this bug in bsdtar.
* Update -r handling:kientzle2007-02-081-12/+40
| | | | | | | * Create file if it doesn't exist. * If archive is "empty", then append to it with pax restricted * If user specified a format, use that if it's compatible with the existing format.
* Correct the copyright messages: Make this a standard vanillakientzle2007-01-0911-34/+21
| | | | 2-clause BSD license, update the year to 2007.
* If append_archive fails while writing an archive header, output the errorcperciva2007-01-051-1/+1
| | | | | | | message from the archive being written (not the message from the archive being read, where no error has occurred). MFC after: 3 days
* Clean up the struct archive used for reading an archive in the handlingcperciva2007-01-021-0/+1
| | | | | | | of @archive commands. This bug should be harmless as long as you don't use an excessive number of @archive commands. MFC after: 1 week
* Handle errors which occur during archive_write_data and archive_write_closecperciva2007-01-021-5/+11
| | | | | | by printing an error message and exiting with a non-zero status code. MFC after: 1 week
* Fic typo in previous commit.cperciva2006-12-231-1/+1
| | | | MFC after: 3 days
* Add two checks for inappropriate options: -U only makes sense in "x"cperciva2006-12-231-0/+4
| | | | | | mode, and --strip-components only makes sense in "x" and "t" modes. MFC after: 3 days
* Correct the names of some options.cperciva2006-12-232-5/+5
| | | | MFC after: 3 days
* Remove -F option from getopts string -- this option has never donecperciva2006-12-201-1/+1
| | | | | | | | anything apart from invoking usage(), and apparently slipped in by accident. Approved by: kientzle MFC after: 3 days
* Fix "1 day ago", "yesterday" and similar relative-time phraseskientzle2006-11-021-2/+2
| | | | | | | | when parsing dates. PR: bin/104934: bug in some date handling of bsdtar Reported by: Herve Boulouis MFC after: 3 days
* Remove two unused variables.kientzle2006-07-311-6/+0
| | | | Thanks to: Stefan Farfeleder
* Conditionally include sys/mkdev.h on platforms (such as Solaris) that need it.kientzle2006-07-301-1/+4
| | | | | | While I'm here, correctly alphabetize 't' after 's'. Thanks to: VMiklos
* In the examples, use "tar.gz" as the extension forkientzle2006-05-011-3/+3
| | | | | | gzip-compressed tar archives. Thanks to: Mike Hunter
* If you see a broken symlink, don't try to follow it,kientzle2006-04-022-4/+7
| | | | | | | | just archive it as a symlink, even if -h was specified. Thanks to: Jin Guojun PR: bin/95175 MFC After: 1 week
* Extended attribute support on write for Linux; FreeBSD hooks arekientzle2006-03-219-23/+140
| | | | | | | | | | forthcoming. This commit also has a number of style(9) fixes and minor corrections so the code works better with the build system being used for non-FreeBSD builds. Many thanks to: Jaakko Heinonen, who proposed a mechanism for extended attribute support and implemented both the machine-independent portion and the Linux-specific portion.
* Remove non-FreeBSD source from FreeBSD repository.kientzle2006-03-121-20/+0
|
* Remove configure.ac.in and the 'distfile' target fromkientzle2006-03-084-164/+6
| | | | | the FreeBSD makefile. This is a step towards cleaning out the non-FreeBSD bits from the FreeBSD source tree.
* Add a check for Linux' "libacl" library and headers.kientzle2006-03-071-0/+4
|
* Change the output of --version to match GNU "gnits" standards.kientzle2006-03-071-5/+2
| | | | | | | | (I'm not using GPL, but I still think there are good ideas in the GNU projects. ;-) Among other things, this should make it easier for clients of bsdtar to recognize it automatically: bsdtar --version | grep bsdtar
* Fix a format mismatch (%d integer format, platform-dependentkientzle2006-03-071-1/+1
| | | | argument type).
* If opendir(".") fails after descending into a subdirectory viapeadar2006-02-221-1/+2
| | | | | | | | | | chdir(), be sure to undo the effects of the chdir before continuing. Without this, after hitting a directory with mode 0111 (for example), tar will get lost, and won't add any yet unvisted files to your archive. (Or possibly add the wrong files, I suppose...) Reviewed By: kientzle@
* Use the .Fx macro.simon2006-01-171-2/+7
| | | | MFC after: 3 days
* Remove the -B option from the directory-copying examples. The -Bkientzle2005-12-091-2/+2
| | | | | | | | option is undocumented because it does nothing. It does nothing because bsdtar never needs it. It is accepted because gnutar does sometimes need it and many scripts use it. Reported by: Pawel Jakub Dawidek
* Portability: remove AC_FUNC_MALLOC from configure.ac.in.kientzle2005-11-271-1/+0
| | | | According to Dan Nelson, this fixes the build on AIX 5.2.
OpenPOWER on IntegriCloud