summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
* Make -I and --files-from be synonyms for -Tkientzle2004-08-131-0/+4
|
* gtar uses -F for another purpose, so bsdtar no longer treats it as akientzle2004-08-083-20/+18
| | | | | | synonym for --format. Update the man page to reflect this. While I'm here, change the man page to document "tar" rather than "bsdtar," update some comments about -l compatibility and fix a few grammar nits.
* Better low-memory handling: If the link cache runs out of memory, justkientzle2004-08-081-35/+36
| | | | | | throw out the whole thing and stop tracking links entirely. That will break all remaining hardlinks, but should free up enough memory to let everything finish.
* Move the smart chdir logic into a couple of utility functions in util.c.kientzle2004-08-085-85/+66
| | | | | Then use them to provide consistent -C support throughout the program. Thanks to: Christoph Mallon
* It shouldn't be an error to specify the same mode twice: allow -cc but not -ct.kientzle2004-08-082-50/+38
| | | | | Thanks to: Christoph Mallon (whose proposed patch was actually simpler than what I ended up with)
* Another pointy-hat problem: PACKAGE_VERSION macro is set inkientzle2004-08-082-3/+0
| | | | | CFLAGS, it shouldn't be in bsdtar_platform.h. Thanks to: Andrey Chernov for looking over my shoulder so much lately.
* Minor portability fixes. bsdtar now compiles on Win32/cygwin, thoughkientzle2004-08-081-2/+18
| | | | it doesn't yet seem to work entirely correctly.
* Add --totals option. Unlike gtar, this reports the bytes actuallykientzle2004-08-074-3/+25
| | | | | written to the archive, not the ones written to the compressor. For uncompressed archives, these numbers are the same, of course.
* Linux port corrections:kientzle2004-08-073-5/+6
| | | | | | * Add a more reasonable default device for linux * Add an autoconf check for the FNM_LEADING_DIR extension (which isn't yet obeyed in the code)
* Add "make distfile" capabilities to bsdtar, including informationalkientzle2004-08-077-50/+251
| | | | COPYING file and some conditional compilation cleanups.
* Ensure that there's always a space between the user name andkientzle2004-08-051-1/+1
| | | | group name in -tv output format.
* GNU and POSIX disagree about -o and -l.kientzle2004-08-032-22/+70
| | | | | | | | | | | | For -l, upset everyone by breaking it. Specifically, -l now produces a lengthy error message that suggests --check-links (POSIX -l) or --one-file-system (GNU -l) instead. However, if POSIXLY_CORRECT is set, use the POSIX interpretation. For -o, please everyone by making it work both ways: * -xo uses POSIX behavior * -co uses "almost GNU" behavior (as close as we can get until libarchive implements a true V7 tar format)
* Correct the explanation of the -X option.kientzle2004-08-011-3/+5
| | | | Thanks to: Pav Lucistnik
* Improve portability to FreeBSD 4.kientzle2004-07-301-0/+6
| | | | Thanks to: Barry Bouwsma
* Fix comment.kientzle2004-07-301-1/+1
| | | | Thanks to: Johan Karlsson
* Add a --version option to bsdtar that prints the versions ofkientzle2004-07-262-4/+21
| | | | | both bsdtar and libarchive. Of course, this requires that bsdtar have a version number. Let's call this 1.00, shall we? ;-)
* A bunch of style and security fixes (error checking return values, etc),kientzle2004-07-254-35/+70
| | | | mostly from: Tim J Robbins
* Of course, I meant POSIX.1-1996, not 1997.kientzle2004-07-251-1/+1
| | | | Thanks to: Andrey Chernov
* A bunch of stuff from Christoph Mellon:kientzle2004-07-247-74/+77
| | | | | | | | * Whitespace fixes * Check some malloc calls * Simplify long_help formatting * Spell "LINUX" -> "linux" * A few other miscellaneous style improvements
* My bad: /dev/sa0, no 'r'kientzle2004-07-211-1/+1
| | | | Thanks (and many apologies) to: Cristoph Mallon
* Guard against argv[0] being NULL.kientzle2004-07-191-6/+11
| | | | Thanks to: Tim J Robbins
* Fix some misspellings, document the TAPE environmentkientzle2004-07-191-2/+16
| | | | variable and the default tape device.
* Remove unused user_uname variable.kientzle2004-07-172-16/+8
| | | | | | Add range-checking to argument of -b. Thanks to: Tim J Robbins
* Make bsdtar the default system tar. This makes /usr/bin/tar a symlinkkientzle2004-07-171-1/+1
| | | | | pointing to /usr/bin/bsdtar by default. To make it point to /usr/bin/gtar, you can define WITH_GTAR.
* Validate -o usage. Strictly speaking, -o only makes sense with -x,kientzle2004-07-172-0/+8
| | | | | | of course, but I make an effort to accomodate GNU tar scripts that use -o with -c (with a meaning that totally contradicts SUSv2) by only issuing a benign warning message in that case.
* Make the day/month ordering dependent on the current locale bykientzle2004-07-154-4/+17
| | | | | testing the locale at program startup and setting a flag, then using that flag to determine appropriate strftime() arguments.
* Mimic ls(1) by putting an extra space before the year in old dateskientzle2004-07-121-1/+1
|
* Fix tab/space screwup in long_help()kientzle2004-07-121-1/+1
|
* Fixed cross-references in SEE ALSO.ru2004-07-041-1/+1
| | | | Emininated double space and hard sentence breaks.
* Pass the pointy hat, please:kientzle2004-07-041-2/+2
| | | | All of --help should go to stdout, not some to stdout and some to stderr.
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+2
|
* Add yet another synonym for -n.kientzle2004-06-281-0/+1
|
* Update -p:kientzle2004-06-271-1/+2
| | | | | | | * Don't change the umask; the library now ignores the umask if you set EXTRACT_PERM * Set the EXTRACT_ACL and EXTRACT_FFLAGS bits (used to be controlled by EXTRACT_PERM).
* Warn about stripping leading '/' when creating archives.kientzle2004-06-271-1/+8
|
* Augment the -T handling:kientzle2004-06-276-98/+161
| | | | | | | | | | | | * Add --null option (sort #defines here) * Add process_lines function to util.c that reads newline-terminated or null-terminated lines (with self-sizing buffers, etc) and iteratively invokes a provided function. Use this to dramatically simplify: -T handling for -c, --exclude-from-file, and --include-from-file. * Add -T handling to -x (via include_from_file) Hopefully, this will fix the openoffice port and a couple of others that rely on -T and --null.
* Fix "@-" which has apparently been broken for some time. <sigh>kientzle2004-06-271-8/+28
| | | | While I'm here, add in a lot more error-checking around append_archive.
* Don't abort immediately on directory change errors.kientzle2004-06-271-6/+16
| | | | | | Instead, display a warning, clean up, and let main() return the error. In particular, this means that chdir() problems won't leave broken archives, though they will prompt an error exit value.
* Document the -W convention for accessing long options.kientzle2004-06-261-9/+15
| | | | Also correct an old error: there was no tar command in Sixth Edition.
* Rename C=dir to -C dir, which is what people expect.kientzle2004-06-263-77/+127
| | | | | | | This requires some non-trivial surgery to the options parsing. While here, let people who only have getopt() access long options through the -W longopt=value convention.
* Update some internal comments about the --no-same-permissions option.kientzle2004-06-151-1/+6
| | | | Thanks to: Kris Kennaway for doing some gtar research for me.
* As near as I can tell, --no-same-permissions is a no-op inkientzle2004-06-151-0/+7
| | | | | | | gtar, so that makes it easy to implement. Required by: audio/timidity port Thanks to: Kris Kennaway
* Oops. bsdtar's old -X option didn't take an argument; the newkientzle2004-06-151-1/+1
| | | | (gtar-compatible) one does require an argument.
* Add gtar-compatible -X/--exclude-fromkientzle2004-06-153-0/+43
|
* Fix build.kientzle2004-06-151-1/+1
|
* Rename -X to --one-file-system, as GNU tar uses -X forkientzle2004-06-151-5/+9
| | | | | something else. I would really like a short option for this, but all of the obvious ones conflict with something else.
* Clean up usage message(s):kientzle2004-06-151-9/+29
| | | | | | | | | | | | | | | * Usage goes to stderr, not stdout * Use correct argument markup * bsdtar --help no longer exits with an error return code * ensure that the word "bsdtar" appears in the first line output from "bsdtar --help" (even if the program is invoked as "tar") In particular, scripts can now test for the presence of bsdtar. For example, in /bin/sh: if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1) then \ echo bsdtar; else echo not bsdtar; fi
* Oops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.kientzle2004-06-112-3/+3
| | | | | Pointed out by: devel/nspr port Thanks to: Kris Kennaway
* Set program exit value to 1 if there are any of various errors whenkientzle2004-06-071-0/+4
| | | | | | | creating an archive. Pointed out by: Failure to complain when building certain broken packages (Thanks again to Kris Kennaway for finding this!)
* Fix the symlink-detection code. Don't squawk if we're just replacingkientzle2004-06-071-6/+22
| | | | | | | | | | an existing symlink (as might happen if you extract an archive twice). Also, if we remove the offending link, then we've removed the problem and can safely go forward with the extraction. Pointed out by: print/adobe-cmaps port (whose distfile has duplicate entries for the same symlinks) Thanks to: Kris Kennaway (for using ports as a testbed for bsdtar)
* The --include='pattern' option is the natural counterpart tokientzle2004-06-072-0/+25
| | | | | | | | | --exclude='pattern'. I should have added this a long time ago, since it's so useful for testing. In particular, it allows me to select a few entries from a troublesome archive so that I can easily focus my debugging efforts: bsdtar -czf new.tgz --include='*foo*' @old.tgz
OpenPOWER on IntegriCloud