155 Commits

Author SHA1 Message Date
cperciva
c42cf872d1 MFC rev. 1.62: Complain about "tar -c /path/which/does/not/exist". 2007-05-24 09:27:50 +00:00
cperciva
3f174ff209 MFC revisions 1.5[6789]:
* Remove unused pathlen argument from write_entry function.
 * Fix logic bug in deciding if do_chdir should be called.
 * Don't consider an lstat(2) failure to be an error.
 * Correct warning message when lstat(2) fails.
2007-03-21 15:15:57 +00:00
cvs2svn
22b21ad204 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2007-03-14 18:20:37 +00:00
kientzle
96743a0bb4 MFC 1.22: Re-enable archiving of ACLs 2007-03-11 19:46:56 +00:00
kientzle
939d23bb36 MFC write.c 1.54. This implements -r support for empty or
nonexistent files and corrects the bad handling of files that
change size during archiving.

PR: bin/108607
PR: bin/108990
2007-02-25 07:24:44 +00:00
kientzle
0c542aca20 MFC copyright message correction: Make this a standard vanilla
2-clause BSD license, update the year to 2007.
2007-01-27 06:48:39 +00:00
cperciva
206b24dde9 MFC revisions 1.48-1.50:
* Print error messages where appropriate, and print the right one.
 * Properly handle errors in archive_write_close.
 * Correct resource leak in @<archive> handling.
2007-01-23 12:13:29 +00:00
cperciva
4c5a39da78 MFC revisions 1.68-1.71 of bsdtar.c, 1.25 of bsdtar.h:
* Remove nonexistant -F option from getopts string.
* Correct the names of some options.
* Check for -U and --strip-components options in inappropriate contexts.
2006-12-26 05:27:49 +00:00
kientzle
3ece0b55ea MFC: getdate.y 1.7
Fix "1 day ago", "yesterday" and similar relative-time phrases
when parsing dates.

PR: bin/104934: bug in some date handling of bsdtar
Approved by: re
2006-11-10 16:09:13 +00:00
kientzle
aeb96a35d9 MFC 1.47: Remove two unused variables 2006-08-15 03:54:41 +00:00
kientzle
5c16608d6a MFC 1.26: conditionally include sys/mkdev.h on platforms that need it. 2006-08-15 03:53:50 +00:00
kientzle
cce1fd0901 MFC bsdtar 1.2.53 to FreeBSD 6:
* Fixes bin/87911 (internal error attempting -u with empty file)
  * Fixes bin/84993 (warnings with GCC 4.1)
  * Fixes bin/95175 (core dump on nonexistent symlink)
  * Documentation fixes
  * Corrections to pathname matching
  * Portability fixes
  * Initial extended attribute support
2006-07-30 06:32:14 +00:00
simon
5f94cb1c4b MFC rev 1.31:
Use the .Fx macro.
2006-01-25 20:56:17 +00:00
kientzle
7a3cda744e MFC 1.65: Correct error message from incorrect use of --format.
PR: bin/86915
2005-11-06 22:27:21 +00:00
kientzle
4151fc111d MFC 1.17: Correctly detect NL_LANG_INFO.
PR: bin/88013
2005-11-06 22:24:27 +00:00
delphij
b1029e7f15 MFC 1.64 by kientzle:
The bsdtar_warnc() reporting function requires the program name to be
set up before it is called, so move the progname initialization before
the first possible call to bsdtar_warnc().

Thanks to: Stanislav Sedov
PR: bin/83366

Approved by:	re (scottl)
2005-09-20 07:48:00 +00:00
ru
07317cc4f0 Fixed troff warnings.
Approved by:	re (blanket manpages)
2005-06-27 07:37:01 +00:00
kientzle
5fd4825f3c Clarify some error messages. 2005-05-08 06:25:15 +00:00
kientzle
839391fc8e bsdtar now uses the "tree" package instead of "fts" for walking
directory heirarchies.
2005-04-24 05:53:37 +00:00
kientzle
d4451ef08b Correct autoconf/automake invocation to work with devel/gnu-auto* from
ports.

Thanks to: Dag-Erling Sm?rgrav (des@)
2005-04-23 18:44:25 +00:00
kientzle
c4cef244d6 Minor fix to the configure logic to properly detect ACL support. 2005-04-23 18:41:28 +00:00
kientzle
2fe0aef3f1 Overhaul getdate.y. In particular, remove minutes-based logic
(combine with existing seconds-based), treat '-' as punctuation rather
than a negative number indicator (eliminates several special cases),
use a single list of special words instead of several separate lists,
use table-driven abbreviation logic (eliminate duplicate word entries
and special-case abbreviation and plural handling).  The result is
shorter, simpler (judging from comments, earlier maintainers didn't
understand the special handling for "negative years"), handles more
cases (e.g., "tu" is now a recognized abbreviation for "tuesday",
"3rd" is now equivalent to "third") and it has 2 fewer shift/reduce
conflicts.
2005-04-23 18:38:32 +00:00
murray
9097797b6a Point users to tcsh(1) for information about shell globbing patterns,
rather than 'XXXX'.

MFC after:	1 week
2005-04-19 16:06:04 +00:00
kientzle
6857f1e3f7 A very minor tweak to the handling of leading '/' characters. 2005-04-17 19:46:50 +00:00
kientzle
f666e865e6 A number of fixes to the autoconf-generated build system. In
particular, acl support is no longer enabled on FreeBSD 4, acl support
should be correctly enabled on Linux, dirent.d_namlen should be
correctly detected on platforms that support it.

Thanks to: Greg Lewis, Juergen Lock, and Jaakko Heinonen
2005-04-17 19:43:37 +00:00
kientzle
b27e034c99 Configure script needs to test for dirent.d_namlen.
Thanks to: Juergen Lock
2005-04-17 17:53:24 +00:00
kientzle
877f4c482e Update "make distfile" to use newest automake/autoconf from ports.
Thanks to: Juergen Lock
2005-04-17 17:51:05 +00:00
kientzle
ec0a4e2bdb Support path-rewriting options (including --strip-components) for both
extraction and creation.  While I'm here, fix a bug reported by Garrett
Wollman: when stripping the leading '/' from the path "/", don't produce
an entry with an empty name; produce "." instead.
2005-04-17 17:20:54 +00:00
obrien
f37742ff89 Add directory hierarchy copying example. 2005-03-28 18:18:44 +00:00
kientzle
c74d7d94bd Deorbit gtar, step 1: Remove WITH_GTAR knob.
"tar" is now always a synonym for "bsdtar".
  People who need gtar can access it as "gtar."

Approved by:	No objections on arch@
2005-03-20 20:38:46 +00:00
kientzle
7f4dba0f0e A handful of minor portability and style improvements. 2005-03-14 00:30:35 +00:00
kientzle
c46a8c03ea Style correction: one tab after #define. 2005-03-14 00:29:05 +00:00
kientzle
b3cbed0960 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
kientzle
2b38f44c2f Fix a compile warning, fix the build. 2005-03-13 21:36:15 +00:00
kientzle
4949e1d1ad "make depend" with .y files is trickier than it looks. <sigh> 2005-03-13 19:55:53 +00:00
kientzle
5d0c5f694a Brain-o. Missing quote. 2005-03-13 19:44:19 +00:00
kientzle
832a345376 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
kientzle
0eac7627b8 Add --strip-components option, per bin/77666.
Thanks to: Sangwoo Shim
2005-03-13 04:12:30 +00:00
kientzle
34d9e63e65 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
ru
7f3c7f0d46 Sort sections. 2005-01-18 13:43:56 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
kientzle
5babdbc5e3 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
kientzle
b5c1699658 GC an unused #include 2004-12-22 05:54:10 +00:00
kientzle
5b6c40f225 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
kientzle
38e8a38c12 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
ru
7448ff52b4 Use a relative symlinking so that "tar" also works in /stand. 2004-11-12 13:28:42 +00:00
kientzle
4dc09ab3c8 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
kientzle
ac9cf04ce1 Correct error handling on failed writes
to the archive.
2004-11-05 05:39:37 +00:00
kientzle
a5b447bdc1 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
kientzle
ccd13c40f2 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