Commit Graph

315 Commits

Author SHA1 Message Date
uqs
8f141f1a13 Fix several typos in macros or macro misusage.
Found by:	make manlint
Reviewed by:	ru
Approved by:	philip (mentor)
2010-03-12 10:01:06 +00:00
ru
4d27ff91d0 Fixed dependencies (make checkdpadd). 2010-02-25 20:24:19 +00:00
uqs
f41a820b03 Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
kientzle
fd70ced203 Simplify, remove unnecessary code. 2010-02-07 02:04:58 +00:00
kientzle
a405ab8bd4 Merge a bunch of refactoring from Joerg Sonnenberger to
isolate common code used by tar and cpio (and useful to other
libarchive clients).  The functions here are prefixed with
"lafe" (libarchive front-end) to indicate their use.
2010-02-07 02:00:26 +00:00
kientzle
e3debd74cb Style & Portability: Use archive_entry methods to examine
file information, change some functions to static, remove
some unused headers.
2010-02-07 01:35:28 +00:00
kientzle
ec04c1933e Various portability workarounds for non-FreeBSD platforms. 2010-02-07 01:26:45 +00:00
kientzle
38d0db1832 Restructure the logic that determines when we're crossing a mount
point.  In particular, this carves out a place for detecting and
excluding synthetic or network filesystems.
2010-02-07 01:22:55 +00:00
kientzle
15e360bfc8 Minor code rework. 2010-02-07 01:16:05 +00:00
kientzle
8ceb112e10 Trim out some unused configuration variables, remove
some unused headers, etc.
2010-02-07 01:07:58 +00:00
kientzle
418133299a Fill in some missing error handling, be a little more careful about
error reporting, prefer int64_t to off_t.
2010-02-06 20:41:25 +00:00
kientzle
6b176158d3 bsdtar doesn't actually know what compression is supported by libarchive
and it should not pretend that it does.  It should just pass along the
user's request and handle an error if it's not supported.
2010-02-06 20:36:14 +00:00
kientzle
4392f2bf72 Refactor the siginfo/sigusr1 handling. The read/write reporting
is sufficiently different that it was simpler to just put separate
reporting functions into read.c and write.c rather than try to have
a single all-purpose reporting function.
Switch to a custom function for converting int64_t to a string; in
the portable version, this saves a lot of configuration headaches
trying to decipher the platform printf().
2010-02-06 20:27:36 +00:00
kientzle
dad3a1b37a Remove all traces of an experiment for handling "root" on Windows systems. 2010-02-06 19:56:32 +00:00
kientzle
8f2c956ea0 Reformat the Makefile slightly. 2010-02-06 19:53:48 +00:00
kientzle
06dea2fd79 Allow -b up to 8192. I've had reports from people who routinely
use -b 2048 (1MiB block size).  Setting the limit to 8192 should
allow some room for growth while still helping people who mistakenly
put in byte counts here instead of block counts.
2010-02-06 19:48:59 +00:00
kientzle
cf5d23cf83 Diff reduction compared to portable bsdtar 2.8: Move the
program name into a global, which eliminates an extra
argument from a lot of places.
2010-02-06 19:44:37 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
delphij
0842b7d53f Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
delphij
b963db4652 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
pjd
811a23dd7d Make sure to use up-to-date libarchive header files from source tree when
compiling tar and not the ones from /usr/include/.

Reviewed by:	kientzle
Approved by:	kientzle
2009-09-07 06:37:44 +00:00
kientzle
392ab3c6f7 Make -lcrypto usage dependent on whether or not we're building with OpenSSL. 2009-04-18 06:03:09 +00:00
kientzle
4e8cb50d8b Merge remaining changes from libarchive.googlecode.com:
* Add xz and lzma compression options
 * Rename --format-options to simply --options
 * Add --same-owner for GNU tar compat
 * Add -lmd and -lcrypto to fix link
 * Documentation
2009-04-17 03:45:15 +00:00
kientzle
f1f2531950 Set options before opening the archive.
Catch and report close-time errors.
2009-04-17 03:40:40 +00:00
kientzle
a88f72ea58 Minor portability improvement in calls to ctype.h macros. 2009-04-17 03:37:09 +00:00
kientzle
1d72251133 Merge from libarchive.googlecode.com: Numerous Windows-specific build tweaks. 2009-04-17 03:36:07 +00:00
kientzle
47f7c87c96 Update version to 2.6.901a to indicate this is synced up with r745 of
libarchive.googlecode.com (except for the lzma/xz support).
2009-03-08 06:20:35 +00:00
kientzle
26f0010266 Merge r492 from libarchive.googlecode.com: First cut at exposing the
new options mechanism to userland.  Documentation pending...
2009-03-08 06:19:28 +00:00
kientzle
ad587d0765 Match a comment to reduce differences with libarchive.googlecode.com. 2009-03-08 06:09:20 +00:00
kientzle
482c4aae45 Merge r709,r710 from libarchive.googlecode.com: More work on
Windows support.
2009-03-08 06:07:35 +00:00
kientzle
fa748c4160 Merge r687-689,691,693-701,720 from libarchive.googlecode.com:
Translate getdate.y into C for portability.  Make the get_date()
function easier to test as well:
 * Have it accept a time_t "now" to use as a reference so that test
   code can verify relative time specifications against known starting
   points.
 * Set up default date after parsing the string so that we
   can use the specified timezone (if any) instead of the local
   default.  Otherwise, local DST makes it almost impossible to
   reliably test time specifications such as "sunday UTC"
2009-03-08 06:03:15 +00:00
kientzle
9ab299b136 Merger r629-631,633-646,648,654,678,681,682 from libarchive.googlecode.com:
Many changes for Windows compatibility.  bsdtar_test now runs successfully
on both POSIX platforms and Windows.
2009-03-08 05:47:21 +00:00
kientzle
f11509af10 Merge r368,496,625,626 from libarchive.googlecode.com: A number of
style and portability tweaks to the test harness.  Most significantly,
don't use getopt().
2009-03-08 05:38:45 +00:00
kientzle
93903defed Merge r622 from libarchive.googlecode.com: Avoid warning on platforms
that lack regex.h.
2009-03-08 05:35:59 +00:00
kientzle
2016bf66ed Merge r552,r559 from libarchive.googlecode.com: High-resolution time
support on Tru64, AIX, and GNU Hurd, thanks to Björn Jacke.
2009-03-08 05:34:20 +00:00
kientzle
65c5348f79 Merge r529 from libarchive.googlecode.com: Fix how we read ext2fs_fs.h
headers on Linux.
2009-03-08 05:28:52 +00:00
kientzle
70eb245d1e Merge r435,r443 from libarchive.googlecode.com: Let the compiler options
determine how to read config.h.
2009-03-08 05:24:37 +00:00
kientzle
a6848f2b2f 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
kientzle
4d11395f65 Merge r374 from libarchive.googlecode.com: Stupid typo in open() call. <sigh> 2009-03-08 05:19:36 +00:00
kientzle
3b0a25ce9e Merge r369 from libarchive.googlecode.com: Test -s option. 2009-03-08 05:17:58 +00:00
kientzle
29e37907df Merge r278 from libarchive.googlecode.com: Reduce the number of
patterns tested here from 200 to 170, which seems to be the
most that Cygwin can handle.
2009-03-08 05:14:16 +00:00
kientzle
1050e75e55 Merge r273 from libarchive.googlecode.com: Use open() correctly. 2009-03-08 05:10:51 +00:00
kientzle
1885a77c0e Fix multiple -s options.
MFC after:	7 days
2009-02-08 22:04:17 +00:00
kientzle
3bdbf535c0 When copying file data to the archive, don't write more
than was read.  This seems to have only affected the shar
writer, since other formats proactively truncate output
to the originally-advertised size.

PR:		bin/131244
MFC after:	7 days
2009-02-08 22:02:46 +00:00
kientzle
664c3aeb01 Spell "substitution" correctly.
PR:		bin/128616
Submitted by:	Jaakko Heinonen
Pointy hat:	Tim Kientzle
MFC after:	30 days
2008-12-15 06:00:25 +00:00
kientzle
73b5159ecd bsdtar is synced up with 2.5.903a 2008-12-06 07:38:14 +00:00
kientzle
a57587d2f5 bsdtar always supports long options now, so we can remove
a documentation disclaimer.
2008-12-06 07:37:55 +00:00
kientzle
48226e3cb7 Only use GCC-specific __dead2 marker when building with GCC. 2008-12-06 07:37:14 +00:00
kientzle
3a229bf1d0 When deciding which characters (of a filename, for instance)
are safe to print, try to take into account the current locale.
This iterates over output strings using mbtowc() to identify
multi-byte sequences.  If iswprint() claims the corresponding
wide character is printable, the original bytes are passed
through.  Otherwise, we expand characters into C-style
\-escape sequences.

Submitted by:	Michihiro NAKAJIMA
MFC after:	30 days
2008-11-29 20:06:53 +00:00
kientzle
79862beef3 After visiting a subdirectory, we use chdir("..") or
fchdir() to return back to the parent.  If those fail,
we're just dead in the water.  Add a new error value
TREE_ERROR_FATAL to indicate that directory traversal
cannot continue.  Have write.c honor that by exiting
immediately.

MFC after:	30 days
2008-11-27 05:49:52 +00:00