Tim Kientzle
fd51bae501
A handful of minor portability and style improvements.
2005-03-14 00:30:35 +00:00
Tim Kientzle
fbef37980b
Style correction: one tab after #define.
2005-03-14 00:29:05 +00:00
Tim Kientzle
bab7b08353
Re-unbreak the distfile target.
...
Also, reduce the WARNS level to 5 since different build environments
end up using different Yacc skeletons. The BSD one does not
predeclare yyparse, the FSF one does, so it's not really possible to
consistently enforce both -Wmissing-prototypes and -Wredundant-decls.
2005-03-13 23:49:53 +00:00
Tim Kientzle
0c83e61cd1
Fix a compile warning, fix the build.
2005-03-13 21:36:15 +00:00
Tim Kientzle
6f55523db7
"make depend" with .y files is trickier than it looks. <sigh>
2005-03-13 19:55:53 +00:00
Tim Kientzle
3e41208d6e
Brain-o. Missing quote.
2005-03-13 19:44:19 +00:00
Tim Kientzle
d14c1502f0
Add --newer-ctime, --newer-mtime, --newer-ctime-than, and --newer-mtime-than
...
switches to support selecting files by time of modification.
Special thanks to: Steven M. Bellovin, Rich $alz, and Jim Berets,
authors of the public-domain getdate.y date-parsing code.
2005-03-13 18:36:24 +00:00
Tim Kientzle
62a2ad1b03
Add --strip-components option, per bin/77666.
...
Thanks to: Sangwoo Shim
2005-03-13 04:12:30 +00:00
Tim Kientzle
b432e867aa
Document the --null, --one-file-system, and -I options.
...
Clarify that -T can be used in 'x' mode as well as 'c' mode.
2005-02-18 19:19:45 +00:00
Ruslan Ermilov
6c7216df78
Sort sections.
2005-01-18 13:43:56 +00:00
Ruslan Ermilov
a866e17077
Added the EXIT STATUS section where appropriate.
2005-01-17 07:44:44 +00:00
Tim Kientzle
225ac9a3dd
Add a fallback version of fnmatch() to the bsdtar
...
source code. Include configure logic to pick up the
system one when it exists and use the fallback version
when it doesn't exist. Set the default for FreeBSD
to use the system version.
With this, bsdtar should now be quite portable.
2004-12-22 06:08:04 +00:00
Tim Kientzle
4d7142130b
GC an unused #include
2004-12-22 05:54:10 +00:00
Tim Kientzle
882aa4c9cd
Fix -W long option handling.
...
In particular:
-W excl=text
fails because "excl" is a prefix of both "exclude" and "exclude-from". But,
-W exclude=text
is okay because it matches "exclude" exactly.
Thanks to: Jose F Nieves
MFC after: 7 days
2004-12-22 03:38:28 +00:00
Tim Kientzle
e69591ddc3
Portability: the included fts.c should now
...
compile on many non-FreeBSD systems, including
Linux, Solaris, Darwin, etc.
Thanks to: many people who pointed out the same portability problem
2004-12-22 00:21:28 +00:00
Ruslan Ermilov
2f841e1a7b
Use a relative symlinking so that "tar" also works in /stand.
2004-11-12 13:28:42 +00:00
Tim Kientzle
2a44183a72
FreeBSD does have uintmax_t, so it can correctly
...
print out very large file sizes.
Thanks to: Yar Tikhiy
2004-11-06 18:38:13 +00:00
Tim Kientzle
f52188fc8a
Correct error handling on failed writes
...
to the archive.
2004-11-05 05:39:37 +00:00
Tim Kientzle
9969ea22ef
getopt(3) prints an "unrecognized option" warning for me, so I
...
shouldn't print another.
MFC after: 15 days
2004-10-17 23:58:17 +00:00
Tim Kientzle
ce7691dcad
Cosmetic goof: Use two spaces in "Jan 03 2004" but only one in "Jan 03 12:32"
...
MFC after: 15 days
2004-10-17 23:57:10 +00:00
Tim Kientzle
cb7f04cf39
Make -C and -T work correctly together.
...
MFC after: 3 days
Thanks to: Guy Helmer
2004-08-28 05:28:19 +00:00
Tim Kientzle
6eb25c6af2
Document the -O option's new behavior in the presence of -t.
...
MFC after: 3 days
2004-08-27 04:19:28 +00:00
Tim Kientzle
773d437982
Support -t -O as in gtar. Perversely enough, -O means "send to stderr"
...
when used with -t, "send to stdout" when used with -x.
Thanks to: Ryan Hamilton for pointing out this odd beast
MFC after: 3 days
2004-08-27 04:13:15 +00:00
Tim Kientzle
85c6c73a4d
Permit -P to be combined with -t. (It's a no-op then, just as in gtar.)
2004-08-26 06:28:39 +00:00
Tim Kientzle
1ced550de7
Tell getopt to accept the (already-implemented) -I option.
2004-08-26 01:58:14 +00:00
Tim Kientzle
fc1f10af70
Make -I and --files-from be synonyms for -T
2004-08-13 07:23:02 +00:00
Tim Kientzle
b757c8251b
gtar uses -F for another purpose, so bsdtar no longer treats it as a
...
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.
2004-08-08 17:20:23 +00:00
Tim Kientzle
6fc954815f
Better low-memory handling: If the link cache runs out of memory, just
...
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.
2004-08-08 06:36:03 +00:00
Tim Kientzle
991f1d87bb
Move the smart chdir logic into a couple of utility functions in util.c.
...
Then use them to provide consistent -C support throughout the program.
Thanks to: Christoph Mallon
2004-08-08 05:50:10 +00:00
Tim Kientzle
dd1a40a3c0
It shouldn't be an error to specify the same mode twice: allow -cc but not -ct.
...
Thanks to: Christoph Mallon (whose proposed patch was actually
simpler than what I ended up with)
2004-08-08 05:10:10 +00:00
Tim Kientzle
3387f49acb
Another pointy-hat problem: PACKAGE_VERSION macro is set in
...
CFLAGS, it shouldn't be in bsdtar_platform.h.
Thanks to: Andrey Chernov for looking over my shoulder so much lately.
2004-08-08 04:36:32 +00:00
Tim Kientzle
5ccc2612d1
Minor portability fixes. bsdtar now compiles on Win32/cygwin, though
...
it doesn't yet seem to work entirely correctly.
2004-08-08 01:30:30 +00:00
Tim Kientzle
8095e9d82b
Add --totals option. Unlike gtar, this reports the bytes actually
...
written to the archive, not the ones written to the compressor.
For uncompressed archives, these numbers are the same, of course.
2004-08-07 19:25:34 +00:00
Tim Kientzle
dfee4c496f
Linux port corrections:
...
* 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)
2004-08-07 17:17:11 +00:00
Tim Kientzle
5232906014
Add "make distfile" capabilities to bsdtar, including informational
...
COPYING file and some conditional compilation cleanups.
2004-08-07 03:24:49 +00:00
Tim Kientzle
d9fbe79b07
Ensure that there's always a space between the user name and
...
group name in -tv output format.
2004-08-05 05:46:22 +00:00
Tim Kientzle
a6cc81c62c
GNU and POSIX disagree about -o and -l.
...
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)
2004-08-03 06:19:08 +00:00
Tim Kientzle
1c962ead2f
Correct the explanation of the -X option.
...
Thanks to: Pav Lucistnik
2004-08-01 20:09:08 +00:00
Tim Kientzle
92371d176f
Improve portability to FreeBSD 4.
...
Thanks to: Barry Bouwsma
2004-07-30 02:59:58 +00:00
Tim Kientzle
cfdb7dd69b
Fix comment.
...
Thanks to: Johan Karlsson
2004-07-30 02:46:12 +00:00
Tim Kientzle
556d6e605e
Add a --version option to bsdtar that prints the versions of
...
both bsdtar and libarchive. Of course, this requires that bsdtar
have a version number. Let's call this 1.00, shall we? ;-)
2004-07-26 03:21:41 +00:00
Tim Kientzle
4f23b47afa
A bunch of style and security fixes (error checking return values, etc),
...
mostly from: Tim J Robbins
2004-07-25 04:15:50 +00:00
Tim Kientzle
8e5c78995e
Of course, I meant POSIX.1-1996, not 1997.
...
Thanks to: Andrey Chernov
2004-07-25 00:31:24 +00:00
Tim Kientzle
62010d3541
A bunch of stuff from Christoph Mellon:
...
* Whitespace fixes
* Check some malloc calls
* Simplify long_help formatting
* Spell "LINUX" -> "linux"
* A few other miscellaneous style improvements
2004-07-24 22:13:44 +00:00
Tim Kientzle
ee92911f48
My bad: /dev/sa0, no 'r'
...
Thanks (and many apologies) to: Cristoph Mallon
2004-07-21 06:43:10 +00:00
Tim Kientzle
040d3851d1
Guard against argv[0] being NULL.
...
Thanks to: Tim J Robbins
2004-07-19 14:54:38 +00:00
Tim Kientzle
d3ca4b04cb
Fix some misspellings, document the TAPE environment
...
variable and the default tape device.
2004-07-19 05:24:41 +00:00
Tim Kientzle
5ebbe2f056
Remove unused user_uname variable.
...
Add range-checking to argument of -b.
Thanks to: Tim J Robbins
2004-07-17 18:21:00 +00:00
Tim Kientzle
16847ae6c0
Make bsdtar the default system tar. This makes /usr/bin/tar a symlink
...
pointing to /usr/bin/bsdtar by default. To make it point to /usr/bin/gtar,
you can define WITH_GTAR.
2004-07-17 06:03:47 +00:00
Tim Kientzle
b3ea6ecd42
Validate -o usage. Strictly speaking, -o only makes sense with -x,
...
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.
2004-07-17 04:17:50 +00:00