Commit Graph

17 Commits

Author SHA1 Message Date
Tim Kientzle
3ae673ed49 Merge r283,r423 from libarchive.googlecode.com: Use libarchive's new
archive_read_disk API to pull metadata off of disk.  This
removes a lot of platform-specific knowledge of things like
ACLs, file flags, and extended attributes from bsdtar.
2009-03-08 05:22:50 +00:00
Tim Kientzle
651eea9aa8 Fix SVN r181821 by not using FNM_LEADING_DIR where
it shouldn't be used.
2008-08-18 18:13:40 +00:00
Tim Kientzle
0f4b98311a Strip leading "./" or ".//" from patterns and filenames
so that "./foo" matches "foo" (and vice versa).

This is related to PR bin/119141.

PR:		bin/119141
MFC after:	4 days
2008-08-18 04:58:54 +00:00
Tim Kientzle
ac2dcb729f Don't strip a leading '/' from a pattern to be matched.
This aligns the pattern-matching behavior with GNU tar
and restores the behavior of bsdtar prior to FreeBSD 6.3.

PR:		bin/117909
MFC after:	3 days
2008-08-17 19:43:45 +00:00
Tim Kientzle
eb36031906 MFp4: bsdtar 2.5.4b
In addition to a number of bug fixes and minor changes:
 * --numeric-owner (ignore user/group names on create and extract)
 * -S (sparsify files on extraction)
 * -s (regex filename substitutions)
 * Use new libarchive 'linkify' to get correct hardlink handling for
   both old and new cpio formats
 * Rework 'copy' test to be insensitive to readdir() filename ordering

Most of the credit for this work goes to Joerg Sonnenberger, who
has been duplicating features from NetBSD's 'pax' program.
2008-05-26 17:10:10 +00:00
Tim Kientzle
3b56813eb0 Fix --fast-read by decrementing the remaining patterns to be matched,
instead of incrementing.

Pointy hat: me
Thanks to: Tomasz Przygoda
MFC after: 3 days
2008-03-18 06:18:49 +00:00
Tim Kientzle
45d4d7ac8c bsdtar 2.0.23:
* New test scripts exercise some basic functionality
   * Most header inclusions are now protected (portability)
   * read.c now relies on security checks in libarchive instead
     of trying to do its own (optimization)
   * -p now enabled by default for root, add --no-same-permissions
     to disable it
   * Comments, minor style fixes.
2007-03-11 10:36:42 +00:00
Tim Kientzle
dbd5adf0d9 Correct the copyright messages: Make this a standard vanilla
2-clause BSD license, update the year to 2007.
2007-01-09 08:12:17 +00:00
Tim Kientzle
fd51bae501 A handful of minor portability and style improvements. 2005-03-14 00:30:35 +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
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
d3d1a208cb Augment the -T handling:
* 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.
2004-06-27 06:29:03 +00:00
Tim Kientzle
b7ec47bb9f Add gtar-compatible -X/--exclude-from 2004-06-15 05:55:41 +00:00
Tim Kientzle
e47b3d7a25 Both "foo/" and "foo" should match "foo/bar", so strip
trailing '/' characters on include patterns for extraction.

Pointed out by: games/quakeforge port (thanks to Kris!)
2004-06-02 07:23:54 +00:00
Tim Kientzle
088bdb251d Propagate struct bsdtar down into a lot more places.
Move global progname variable into struct bsdtar.
2004-05-17 05:44:53 +00:00
Tim Kientzle
4cbbc3a35e Add DPADD to Makefile (thanks to Andrey for pointing this out).
Generally clean up Makefile, remove dmalloc references from source
(there are better ways to do this than pollute the FreeBSD src tree).
2004-04-12 00:13:23 +00:00
Tim Kientzle
d7fe3b4f52 Initial commit for bsdtar. 2004-04-05 21:32:18 +00:00