summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Ooops! Previous commit added an over-zealous error check.kientzle2004-06-071-0/+2
| | | | | It is, in fact, perfectly legal to not specify a compression when writing an archive. <sigh>
* If -b is specified, then force full padding for the last block.kientzle2004-06-074-6/+30
|
* Per style(9), don't use double spaces in expressions.kientzle2004-06-072-3/+3
| | | | Pointed out by: njl, des.
* Pointy hat: sticky bit 't' or 'T' is shown over IXOTH bit, not IXGRP. <sigh>kientzle2004-06-032-2/+2
|
* Improve help handling:kientzle2004-06-021-0/+13
| | | | | | * --help produces long help message on systems with getopt_long * -h with no other options also produces long help message (If a mode is specified, -h has its usual meaning.)
* Both "foo/" and "foo" should match "foo/bar", so stripkientzle2004-06-021-0/+3
| | | | | | trailing '/' characters on include patterns for extraction. Pointed out by: games/quakeforge port (thanks to Kris!)
* Correction: -h should be a synonym for -L, not -H.kientzle2004-05-312-3/+3
| | | | (as specified by Linux Standards Base, GNU tar, and 4.4BSD documentation)
* Permit (but ignore) -Z with -x or -t, now that libarchivekientzle2004-05-301-2/+9
| | | | recognizes and decompresses .Z format.
* Minor corrections to error handling and user notifications:kientzle2004-05-271-23/+26
| | | | | | | | * Move format/compression reporting to end of output, since we don't always know the input format until then. * Set bsdtar exit value to 1 if any file could not be restored. * Generate gtar-style warning when stripping leading '/' characters. * Warn when removing symlinks.
* Provide framework for exiting with non-zero value on non-critical errors.kientzle2004-05-272-1/+3
|
* Add --no-same-owner as a synonym for -o.kientzle2004-05-221-0/+1
| | | | | | | Note that bsdtar's -o (which follows SUSv2) is not the same as GNU tar's -o. In GNU tar, -o and --no-same-owner are not synonyms. Pointed out by: Kris Kennaway (required by xpenguins port)
* Add --dereference as a synonym for -Hkientzle2004-05-211-0/+1
| | | | Pointed out by: Kris Kennaway (unbreaks nspr port build)
* Default is to restore timestamps, even when operating as root. <sigh>kientzle2004-05-191-1/+1
|
* Fix a segfault when looking up a non-existent group.kientzle2004-05-181-1/+1
|
* Accept (but ignore) GNU tar's -B option. bsdtar neverkientzle2004-05-181-2/+8
| | | | needs it, but it does no harm for people to specify it.
* Set errno to 0 before calling getpwuid/getgrgid, so that errorkientzle2004-05-171-0/+2
| | | | messages will be displayed only when there is, in fact, an error.
* Speed up safe_fprintf by copying to a temp buffer, then writingkientzle2004-05-171-13/+32
| | | | blocks at a time, rather than using putc().
* Propagate struct bsdtar down into a lot more places.kientzle2004-05-176-138/+137
| | | | Move global progname variable into struct bsdtar.
* Refactor name caching to use a common piece of code for uname_cache andkientzle2004-05-172-88/+113
| | | | | gname_cache. Cache negative lookups to dramatically improve performance building archives containing nonexistent uid/gid.
* Make symlink protection a bit more useful:kientzle2004-05-173-4/+17
| | | | | | * Remove terminal symlinks so they can be replaced. * If -U, remove intermediate symlinks as well * Otherwise, refuse the extraction
* Update manpage to track new security features.kientzle2004-05-171-28/+125
|
* Add --unlink and --unlink-first synonyms for -Ukientzle2004-05-051-30/+32
| | | | Make indentation of tar_longopts array more consistent.
* Contrariwise, Linux sys/stat.h doesn't define mode_t and friends,kientzle2004-05-041-0/+1
| | | | even though POSIX requires it. <sigh>
* Include local copies of fts.c and fts.h to be used ONLY on non-FreeBSDkientzle2004-05-042-0/+1342
| | | | | | | systems. The fts.h here is an exact copy of include/fts.h (except for an initial explanatory comment and the revision tags, of course). The fts.c here is slightly modified from lib/libc/gen/fts.c so it can compile correctly on non-FreeBSD systems.
* For portability, don't rely on libc's strmode(3). <sigh>kientzle2004-05-033-1/+53
|
* Correct copy/paste error in Linux nodump support.kientzle2004-05-031-3/+4
| | | | | Thanks to: Juergen Lock for his continuing patience while I botch his patches.
* Style: Use single tab after #definekientzle2004-05-023-16/+16
|
* More of Juergen Lock's patches for Linux.kientzle2004-05-022-8/+63
| | | | | (fflags support on Linux, nanosecond timestamp portability, enable 64-bit file offsets)
* A security issue: An archive containing a symlink to anotherkientzle2004-05-022-13/+71
| | | | | | | | directory, then a file with that symlink as a prefix can drop a file outside of the current directory, which can be a security hole. Plug this hole by refusing to extract files if a prefix of the pathname is a symlink. The -P option disables this check.
* -U is now implemented. (It's been recognized by bsdtar for a while;kientzle2004-04-291-1/+4
| | | | now libarchive actually supports the underlying request.)
OpenPOWER on IntegriCloud