Commit Graph

61 Commits

Author SHA1 Message Date
wiz 3ac7ce187d Fix various spelling, grammar, and punctuation problems in comments, from Sergey Svishchev in PR 20164. 2003-02-02 10:21:13 +00:00
wiz 0b76bcaac8 tar(1) has no -L any longer. 2003-01-19 01:13:46 +00:00
kristerw 7b4c88f831 Correct which _usage function to use for some pax/cpio error cases. 2003-01-15 21:56:46 +00:00
christos a86cae9911 PR/19757: Andreas Wrede: make tar's -h behave like pax's -L 2003-01-09 17:26:21 +00:00
mrg c3510d1409 add --exclude support.
XXX:  --exclude & --exclude-from are still not 100% compatible, but since
rafal fixed --exclude-from's most annoying bug, they mostly work now.
2002-12-08 01:35:12 +00:00
grant 3c0fae1fef void functions should not return a value. 2002-11-27 18:40:34 +00:00
christos ff3d818d91 Handle -C\ndir\n in a file containing a file list. From Eric Gillespie. 2002-10-18 13:45:05 +00:00
christos 860d26c69b Fix DEFOP botch. DEFOP == LIST so tar -tvf stopped working. (hi soren) 2002-10-17 00:42:02 +00:00
soren 4ba08d1776 Tweak tar_usage(). 2002-10-16 23:37:49 +00:00
soren af892f930e Have tar require a specific action as documented. 2002-10-16 23:22:59 +00:00
soren f9d5774005 Sync cpio_usage() with cpio.1 as with pax and tar. 2002-10-16 22:38:36 +00:00
christos 169f625866 we need to have -force-local on pax. 2002-10-16 21:45:31 +00:00
christos f830cb1865 turn gnu tar off by pax and cpio front ends. 2002-10-16 18:53:40 +00:00
christos f70dfaaf73 Support gnu long filename extensions by default for tar on create, list, and
extract. We now generate GNU tar archives by default ("ustar  ^@" instead of
"ustar^@00"). GNU extensions can be disabled with --strict.

XXX: long symlinks untested.
2002-10-16 03:46:07 +00:00
christos ca541391bc PR/18663: Jeremy Reed: pax/tar/cpio allows ".." in names.
We now disallow it by default on both archive creation and extraction.
Add --insecure option to override.
2002-10-15 16:16:29 +00:00
christos 675306eb0e implement fast read. nothing to it really, it was already there as -q option. 2002-10-15 14:58:53 +00:00
christos 9a9c32e167 Add all the gnu cpio long options. 2002-10-15 14:51:04 +00:00
soren f05dd4bfd6 Sync tar_usage() with tar.1. 2002-10-14 15:04:41 +00:00
christos 8ffc5b1c59 -T expects an argument. From Eric Gillespie, thanks. 2002-10-13 17:23:40 +00:00
mrg a9a7ae57f7 fix "pax -rw" processing. for some reason, it was now written to process
"pax -rwvpe a b" as "pax -rwvpe b a", and "pax -rwvpe a b c" as
"pax -rwvpe b c a".  only the part of revision 1.40 that broken this has
been reverted.
2002-10-13 11:31:02 +00:00
mrg ed83539f6e add a "+" to the options string rather than setting POSIXLY_CORRECT 2002-10-13 00:32:09 +00:00
christos 0c61202168 merge OpenBSD changes:
- correct -C processing
    - add ability to read filenames and flags from a file
    - don't print dangerous escape sequences to the terminal
    - use strlcpy/strncpy properly.
    - handle tmpfile creation better.
    - improve documentation of options.
    - handle stdout/stderr list selection correctly.
    - kill gzip when we get interrupted.
    - simplify gzip setup.
    - add more flags to programs.

additional changes:
    - librmt processing.
    - set POSIXLY_CORRECT in options parsing.
    - prevent more string overruns.
    - support -T

we don't turn the switch on to replace tar and cpio yet.
2002-10-12 15:39:29 +00:00
lukem 6ee4925cf5 - don't compile in support for -M (mtree specfile input) or -N dbdir
(alternate directory for id info) if SMALL is defined
- enable -DSMALL and remove unused objects if CRUNCHEDPROG is defined
- minor cleanup in next_file() (preparation for future work)
2002-02-02 12:34:39 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
lukem 1a63c49a4f provide meaningful warning if -N is called with a dodgy dbdir 2002-01-26 02:22:54 +00:00
lukem ae5120dc49 Add '-N dbdir', to specify that user & group lookups (via pwcache(3)) are to
be done from dbdir/master.passwd and dbdir/group, using simple text file
parsing routines from ../../usr.sbin/mtree/getid.c.
This does not affect the -G and -U options, which always use the
system databases.
2002-01-24 07:45:33 +00:00
lukem 55026d5454 Implement -M flag: During a write or copy operation, treat the list of
files on standard input as an mtree(8) `specfile' specification, and
write or copy only those items in the specfile.

If the file exists in the underlying file system, its permissions and
modification time will be used unless specifically overridden by the
specfile. An error will be raised if the type of entry in the specfile
conflicts with that of an existing file.

Otherwise, it is necessary to specify at least the following parameters
in the specfile: type, mode, gname or gid, and uname or uid, device
(in the case of block or character devices), and link (in the case of
symbolic links). If time isn't provided, the current time will be used.
2001-10-25 08:51:50 +00:00
lukem c1bd745ccb - ansi KNF (just remove all the #ifndef __STDC__ prototype junk,
leaving the ansi stuff)
- use longlong_t instead of quad_t (etc), and rename *uqd*() -> *ull*()
- clean up the NET2_STAT stuff similar to ftpd; provide #defines and
  macros which select which cast to use, etc
- clean up the NET2_FTS and NET2_REGEX #define use
2001-10-25 05:33:32 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
thorpej 547c89117a Implement --atime-preserve. 2000-07-04 17:28:47 +00:00
thorpej a3a7c5ccf1 Implement --use-compress-program. 2000-07-04 17:24:47 +00:00
thorpej 4120b8a499 Add GNU tar-style long options for pax's tar front-end. Still many
GNU options not implemented, but there is an #if 0'd out canonical
list.
2000-07-04 17:17:49 +00:00
simonb 51ee9dc68d Don't declare 'extern opt*' getopt variables. 2000-04-14 05:52:56 +00:00
thorpej d0666190e1 Add a -O option: force one volume. This causes pax to not prompt for
a new volume upon premature end-of-volume (e.g. broken pipe).  This is
especially useful in automated environments where error recovery cannot
be performed by a human.
2000-03-30 17:53:04 +00:00
itohy f8adf56da0 Cleanup and fix typos.
Partially from FreeBSD.
2000-02-17 03:12:22 +00:00
mycroft e9e9dbbd42 Disable -pf for now, too. 1999-11-07 15:57:31 +00:00
mrg b60cafe2fb add a new -p subflag: 'f' to preserve 4.4BSD fileflags. this only
really works for `pax -rw' but that's where it is most useful.
1999-11-01 01:35:58 +00:00
is e413a4ff50 Implement positional -C argument to tar. 1999-10-22 20:59:08 +00:00
tron 10fa22ca89 Fix "tar" mode usage string. 1999-08-24 08:02:27 +00:00
tron 62724fe719 Recognize GnuTAR's "h" (instead of "H") and "P" options. 1999-08-24 08:00:03 +00:00
tron 1fbe6b7eae Strip leading slashes from filenames by default, add new "A" option to
disable this behaviour. Patches supplied by Peter Seebach in PR bin/8233.
1999-08-24 07:57:06 +00:00
mycroft 12cb4ca205 Add -z option to usage message. 1999-03-07 01:03:32 +00:00
tv 4aa7016df7 Fix opt_add to take const char * so that it can be passed a constant
string legally (it strdup()s the argument).  How pax-as-tar `-o' ever
worked without a coredump is beyond me...

Also modify pax-as-tar `-o' to do three things, which depend on the
create/extract mode:

- write V7 format archives (which, though part of GNU tar, actually
  goes along with the following point--after all, old pax-as-tar created
  V7 archives by default);
- write archives with "write_opt=nodir", as pax already did, and as
  specified by 4.2BSD;
- extract archives with owner/group set to invoking user, as specified
  by SUS.
1999-02-07 00:56:55 +00:00
tv fb3e11970f Lost 5 lines in the version that was committed. Re-add them. 1999-02-02 23:42:41 +00:00
tv 6e7077da0a Uh, when called as "tar" we should still default to "ustar" output, not
V7 tar format.  Also change meaning of pax-as-tar option "-o" to mean
"use V7 output format" (same as GNU tar's -o).
1999-02-02 23:31:52 +00:00
mrg ce6b187617 implement the gnutar -X flag in terms of pax -s. fix some bugs in pax -s handling while i am here... 1999-01-20 14:45:09 +00:00
mycroft d0e267dc7f Use the uid/gid caching moved into libc. Fixed a memory leak! 1998-07-28 17:44:23 +00:00
mycroft ee9e50eacb Be more retentive about use of NOTREACHED and noreturn. 1998-07-28 11:41:40 +00:00
mycroft 9dc385beb1 Delint. 1998-07-28 05:31:22 +00:00