| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make "make test" fully operational.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
Revision 3769:
Merge r3744 from trunk: Correctly return errors when reading
an archive using @archive extension.
Obtained from: http://code.google.com/p/libarchive
MFC after: 2 weeks
|
|
|
|
|
|
| |
from libarchive.googlecode.com.
MFC after: 3 days
|
|
|
|
|
|
|
| |
Use common code from lib/libarchive/libarchive_fe
Approved by: kientzle
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
directories to look for new files.
PR: bin/150890
Submitted by: Tobias Herre
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
| |
exit immediately with an error.
If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.
PR: bin/154407
|
|
|
|
|
|
|
|
|
|
| |
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow. This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.
Thanks to: Boris Samorodov
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
file information, change some functions to static, remove
some unused headers.
|
| |
|
|
|
|
|
| |
point. In particular, this carves out a place for detecting and
excluding synthetic or network filesystems.
|
|
|
|
| |
some unused headers, etc.
|
|
|
|
| |
error reporting, prefer int64_t to off_t.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
program name into a global, which eliminates an extra
argument from a lot of places.
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
new options mechanism to userland. Documentation pending...
|
|
|
|
|
| |
Many changes for Windows compatibility. bsdtar_test now runs successfully
on both POSIX platforms and Windows.
|
|
|
|
| |
headers on Linux.
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Fix a bug I introduced 7 minutes ago: clean up properly from archive_write
if we exit the argv-handling loop due to -C not having an argument.
|
|
|
|
| |
instead of using 64kB of stack space in copy_file_data and write_file_data.
|
|
|
|
|
|
|
|
|
| |
where it is used. [1]
Don't leak file descriptors in write_entry_backend if archive_write_header
returns ARCHIVE_FAILED.
Found by: Coverity Prevent [1]
|
|
|
|
|
| |
of write_entry. (This was perfectly safe, since archive_entry_free(NULL) is
a no-op, but adding the check back makes the style more consistent.)
|
| |
|
|
|
|
|
|
| |
can include the filename when reporting errors.
Thanks to: Dan Nelson
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hardlink table for two reasons: 1. If le->name is set to NULL, the
structure le won't be inserted into the table; 2. Even if le somehow
did manage to get into the table with le->name equal to NULL, we would
die when we dereferenced le->null before we could get to the point of
freeing the entry.
Remove the unnecessary "if (le->name != NULL)" test and just free the
pointer.
Found by: Coverity Prevent
|
|
|
|
|
|
|
|
| |
(in fact, there has never been any way for it to be NULL, going all the
way back to revision 1.1 of this file), so remove the check and
unconditionally free entry.
Found by: Coverity Prevent
|
|
|
|
|
|
|
|
|
|
|
| |
handling to bsdtar. When writing archives (including copying via the
@archive directive) a line is output to stderr indicating what is being
done (adding or copying), the path, and how far through the file we are;
extracting currently does not report progress within each file, but
this is likely to happen eventually.
Discussed with: kientzle
Obtained from: tarsnap
|
|
|
|
|
| |
PR: bin/123246
MFC after: 3 days
|
|
|
|
| |
now that libarchive supports it.
|
|
|
|
|
|
| |
archives in regular files, since both are seekable.
Thanks to: Reinoud Zandijk (@netbsd.org)
|
|
|
|
|
|
|
|
|
| |
* Implement --use-compress-program using new libarchive feature.
* Minor portability improvement by adjusting casts used to
print out uids, gids, and device numbers.
Thanks to: Joerg Sonnenberger for the --use-compress-program implementation.
MFC after: 15 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
failed path is one which was specified on the command line.
This is a compromise between the situation prior to revision 1.57
(where a race between tar(1) and rm(1) could cause tar(1) to
spuriously report an error) and the situation after revision 1.57
(where "tar -c /no/such/path" prints a warning but returns with
an exit code of zero).
Inspired by: rafan
MFC after: 1 week
|
|
|
|
|
|
| |
handled in write_hierarchy.
Approved by: kientzle
|
|
|
|
|
|
|
|
|
|
|
|
| |
into separate append_archive and append_archive_filename functions; the first
takes a "struct archive *" as input, while the second takes a filename, opens
the archive, and calls the first.
There should be no changes in behaviour as a result of this commit; it simply
reorganizes code to make more sense. At some point in the future it may be
possible to share code between append_archive and read_archive, but not yet.
Discussed with: kientzle
|
|
|
|
|
| |
Approved by: kientzle
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
doesn't start with @/ either.
This unbreaks "tar -c -C /no/such/directory @/path/to/archive".
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
affecting the return value from bsdtar), since (a) it usually occurs
due to a perfectly innocent (and unavoidable) race condition where a
user deletes a file in the window between bsdtar reading a directory
and attempting to read the file; and (b) aside from printing a warning
message, bsdtar behaves exactly as if the file had been deleted prior
to bsdtar reading its parent directory.
Reviewed by: kientzle
MFC after: 6 days
|
|
|
|
|
|
|
|
| |
complaining about lstat(2) failing. It's a bit scary to find the message
tar: /: Cannot stat: No such file or directory
printed while doing a backup.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
of a growing file should not be considered a "bad thing."
PR: bin/108990
MFC after: 7 days
Pointy hat: /me
|
|
|
|
|
|
|
| |
(as determined by the initial size given to the header).
Libarchive recently changed to correctly return the amount
of data actually consumed in this case, which revealed this
bug in bsdtar.
|