| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Otherwise there are 32/64-bit pointer conversions going on. In Windows
since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit
time_t.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
| |
These were missing from 2d329073435d36065ce30bfd29428f6a45e41016
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
| |
Issue #1828
|
|
|
| |
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
| |
Use strncpy() and strncat() instead of strcpy() and strcat()
|
|
|
| |
use regfree() to release the memory requested by the regular expression.#1804
|
|
|
|
|
|
| |
Also changed a few vsprintf to vsnprintf.
Most cases were trivial, one private function was changed to take the buffer length, one case required some fancy arithmetic.
|
| |
|
| |
|
|
|
|
| |
Closes #1659
|
|
|
|
|
|
|
|
| |
In b6b423f0 a fallback in tar to stdio was implemented. However, the check
for the tape device didn't interpret the correct value returned from
access(). Fix the check to implement the fallback to stdio properly.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Have `bsdtar` default to stdout if this system has no tape device. This uses an `access()` check to see if the default tape device (e.g., `/dev/tape` on FreeBSD) exists and will use stdout as the default if it doesn't exist. If the system does have a tape device, there is no change to the existing behavior.
For libarchive 4.0, we'll change the default behavior of `bsdtar`:
* The `TAPE` environment variable will still be honored at runtime
* The `_PATH_DEFTAPE` preprocessor macro will still be honored at build time
* But `_PATH_DEFTAPE` will no longer be set by libarchive's default build, with the effect that for most people, bsdtar will default to stdout if there is no `-f` option provided.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since current tar defaults to tape devices that are rare nowadays add an
additional step to fallback to "-" if tape devices are not found.
This is a clean way to have a default to "-" on those systems that tape
devices are not present while keeping the current behavior for other
cases. Additionally prepare for future releases where this kind of defaults
will be dropped.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's fairly common for people to use caf and xaf on Linux. The former in
itself being GNU tar specific - libarchive tar does not allow xa.
While it makes little sense to use xaf with libarchive tar, that is
implementation detail which gets in the way when trying to write trivial
tooling/scripts.
For the sake of compatibility, reduce the error to a warning and augment
the message itself. Making it clear that the option makes little sense.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|\
| |
| | |
Add ARCHIVE_READDISK_NO_SPARSE/--no-read-sparse to improve reproducibility of generated archives
|
| | |
|
| |
| |
| |
| | |
Add some basic tests for operations on concatenated archives.
|
| |
| |
| |
| | |
Previously, --ignore-zeros was only being applied to t and x modes.
|
|/ |
|
|
|
|
| |
Typos found with codespell
|
| |
|
|
|
|
|
|
|
|
| |
The list of format and filter options in bsdtar(1) is incomplete.
Add reference to manual pages archive_write_set_options(3) and
archive_read_set_options(3) for a complete list of supported options.
Fixes #1323
|
|
|
|
|
|
|
| |
Add "none" as acceptable value to xar:checksum and xar:toc-checksum
Document XAR options in bsdtar(1)
Fixes #1317
|
|
|
|
|
|
| |
the format errors.
Closes #1318
|
|
|
|
| |
Fixes #1314
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag changes the way that regular files are extracted:
Instead of removing existing files first and re-creating them in
order to replace their contents, a temporary file is created and
when writing to the temporary file is completed, the file is
rename(2)d to the final destination name.
This has the effect of presenting a consistent view of the file to
the system (either the file with the new contents or the file with
the old contents). Removing and overwriting the file has the
undesired side effect that the the system can either not see the
file at all (from the time it is being removed till the time it is
being re-created), or worse it can see partial file contents. This
is problematic when extracting system files (for example shared
libraries).
If the existing file that is going to be overwritten is a hard link,
for now we unlink it before calling rename(2). This can be done
correctly by creating a hardlink to a tmpnam(3) generated file
and then use rename(2), but that is fairly intrusive and requires
refactoring.
Fixes #1289
|
| |
|
|
|
|
| |
Found by LGTM.com code analysis
|
|
|
|
| |
Found by LGTM.com code analysis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found with mandoc -Tlint; fixing the following messages:
WARNING: bad NAME section content
WARNING: missing comma before name
WARNING: new sentence, new line
WARNING: parenthesis in function name
WARNING: skipping no-space macro
WARNING: skipping paragraph macro
WARNING: unusual Xr order
WARNING: unusual Xr punctuation
STYLE: no blank before trailing delimiter
STYLE: possible typo in section name
STYLE: trailing delimiter
STYLE: whitespace at end of input line
For the meaning of the messages, see:
https://man.openbsd.org/mandoc#DIAGNOSTICS
|
| |
|
| |
|
|
|
|
|
| |
- use term "extended file attributes"
- use term "file attributes or file flags"
|
|
|
|
|
|
|
|
| |
- the -p option does not restore owner by default.
- the -n option was listed twice
- file flags are called file attributes on Linux and are platform-specific
Fixes #1204
|
|
|
|
|
|
| |
Add Fedora_29_distcheck task with "make distcheck"
Add support for debug build with address sanitizer
Add missing free to tar/test/test_option_C_mtree.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Testing uses only listing because extraction uses the same code
paths. Indirectly this covers also the new API call.
Some corner cases get special attention:
- archive where a file in a directory is present without the
directory
- the error when asking to extract a directory which is not
present
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it makes sense to extract or list a directory contained in
an archive without also doing the same for the content of the
directory, i.e. allowing -n (= --no-recursion) in combination with the
x and t modes.
bsdtar uses the match functionality in libarchive to track include
matches. A new libarchive API call
archive_match_set_inclusion_recursion() gets introduced to
influence the matching behavior, with the default behavior as before.
Non-recursive matching can be achieved by anchoring the path match at
both start and end. Asking for a directory which itself isn't in the
archive when in non-recursive mode is an error and handled by the
existing mechanism for tracking unused inclusion entries.
|
|
|
|
| |
Fixes #999
|
|
|
|
|
|
|
| |
Treat targets ending with /. and /.. as directory symlinks
Explicitly test for file and directory symlinks
Improve debug output on test failure
Fix two memory allocations
|
|
|
|
| |
Enable tests on MinGW CI builds
|
|
|
|
| |
tests: extend assertMakeSymlink with targetIsDir
|
| |
|
|
|
|
|
|
|
|
|
|
| |
During archiving, if some of the "delayed" hard link entries
happened to disappear on filesystem (or become unreadable) for
some reason (most probably race), the old code free()d the 'entry'
and continued with the loop; the next loop though dereferenced
'entry' and crashed the archiver.
Per report from Coverity.
|
|
|
|
| |
Fixes #1068
|
| |
|
| |
|
| |
|