* 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
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"
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.
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
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
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
that should result in a non-zero return value.
In particular, this should address the issue that David Wolfskill
ran into with a somewhat flaky NFS mount resulting in a damaged
archive even though tar returned success.
MFC after: 4 days
subtle why it comes out the way it does. Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case. (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)
(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)
PR: bin/128562
MFC after: 30 days
good job writing this test; it exercises a lot of subtle cases. The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted. In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.
The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.
Submitted by: Jaakko Heinonen
MFC after: 30 days
This replaces the getopt()/getopt_long() wrapper, the old-style
argument rewriter and the associated configuration glue with a more
straightforward custom command parser. In particular, this ensures
that bsdtar will have consistent option parsing on every platform,
regardless of whether the platform supports getopt_long().
MFC after: 30 days
from Jaakko's original patch: I have misgivings about the portability
of the 'z' printf modifier so opted to cast the arguments to (int)
instead.
PR: bin/128561
Submitted by: Jaakko Heinonen
MFC after: 30 days
HAVE_STRUCT_STAT_ST_FLAGS, Linux support depends on the
existence of the appropriate ioctl() options. In particular,
this should fix some nagging compile errors on Linux platforms
that don't have e2fsprogs-devel installed.
In particular:
* tar -x -P follows symlinks to existing dirs, but not without -P
* symlinks to files are always replaced
* broken symlinks are always replaced
I would like to provide a way to preview the effects of pathname edits,
but pattern selection has to happen against the unedited path, so it
seems that we have to show people the unedited path to help in
designing selection patterns.
understand which code paths aren't possible.
This commit eliminates 117 false positive bug reports of the form
"allocate memory; error out if pointer is NULL; use pointer".