| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make "make test" fully operational.
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
Use common code from lib/libarchive/libarchive_fe
Approved by: kientzle
MFC after: 2 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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Windows support.
|
|
|
|
|
| |
Many changes for Windows compatibility. bsdtar_test now runs successfully
on both POSIX platforms and Windows.
|
|
|
|
| |
that lack regex.h.
|
|
|
|
|
|
|
| |
PR: bin/128616
Submitted by: Jaakko Heinonen
Pointy hat: Tim Kientzle
MFC after: 30 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
possibility of memory becoming undereferenceable when it is freed, this
change should have no effect on bsdtar behaviour.
Found by: Coverity Prevent
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
(This does a couple of things that the standard library's strmode()
doesn't; it proved useful in bsdcpio as well, so I pushed it down
into libarchive.)
|
|
|
|
|
| |
"tar -u" works again. Otherwise, "tar -u" wants to
treat every dir as new and re-adds it.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
2-clause BSD license, update the year to 2007.
|
|
|
|
|
|
|
|
|
|
| |
forthcoming. This commit also has a number of style(9) fixes and
minor corrections so the code works better with the build system being
used for non-FreeBSD builds.
Many thanks to: Jaakko Heinonen, who proposed a mechanism for extended
attribute support and implemented both the machine-independent portion
and the Linux-specific portion.
|
| |
|
|
|
|
|
|
| |
extraction and creation. While I'm here, fix a bug reported by Garrett
Wollman: when stripping the leading '/' from the path "/", don't produce
an entry with an empty name; produce "." instead.
|
|
|
|
|
| |
Then use them to provide consistent -C support throughout the program.
Thanks to: Christoph Mallon
|
|
|
|
| |
mostly from: Tim J Robbins
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
blocks at a time, rather than using putc().
|
|
|
|
| |
Move global progname variable into struct bsdtar.
|
|
|
|
| |
even though POSIX requires it. <sigh>
|
| |
|
|
|
|
|
|
|
|
| |
table for the hardlink cache. This dramatically improves
performance when archiving millions of hardlinked files.
While I'm here, clean up some style bugs (per Bruce Evans)
and clarify some comments.
|
|
|
|
|
| |
a stack-allocated buffer for safe_fprintf formatting.
Only if the result is too large do we resort to malloc.
|
|
|