summaryrefslogtreecommitdiff
path: root/tar/bsdtar.h
Commit message (Collapse)AuthorAgeFilesLines
* tar: expose ARCHIVE_READDISK_NO_SPARSE as --no-read-sparseJonas Witschel2021-11-141-0/+4
|
* Introduce archive_write_disk(3) flag ARCHIVE_EXTRACT_SAFE_WRITESzoulasc2020-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Unify header style, header guard comes firstMartin Matuska2020-01-131-0/+5
| | | | Found by LGTM.com code analysis
* tar: add option --exclude-vcsMartin Matuska2019-04-141-0/+1
| | | | Fixes #999
* Fix alphabetical order, other small fixesSean Purcell2017-05-151-2/+2
|
* Add Zstandard write supportSean Purcell2017-05-151-0/+1
|
* Mark function that doesn't return as dead.Joerg Sonnenberger2017-02-261-1/+1
|
* Add format function annotation.Joerg Sonnenberger2017-02-261-2/+2
|
* tar: add new options to allow fine-tuning of --preserve-permissionsMartin Matuska2017-02-241-6/+19
| | | | | | | | | | Allow enabling and disabling reading or writing of: Access Control Lists (--acls, --no-acls) Extended file flags (--fflags, --no-fflags) Extended attributes (--xattrs, --no-xattrs) Mac OS X metadata in AppleDouble (--mac-metadata, --no-mac-metadata) Make --disable-copyfile an alias to --no-mac-metadata.
* tar: use option_flags bitfield for boolean optionsMartin Matuska2017-02-231-13/+19
|
* bsdtar: move list_item_verbose() into common util.cBjoern Jacke2016-02-051-0/+2
|
* Add a new tar option --clear-nochange-fflags that causes file systemBrooks Davis2015-05-141-0/+1
| | | | | | | flags which might prevent the removal or modifiction of files to be cleared before attempting to remove them. Sponsored by: DARPA, AFRL
* Issue #131: Implement tar --no-xattrTim Kientzle2015-01-101-0/+1
| | | | | | | | | This option suppresses both archiving and restoring xattrs. The latter relies on existing machinery; for the former, I've added a ARCHIVE_READDISK_NO_XATTR flag to archive_read_disk. Caveat: I've not implemented any tests for these new features.
* Implement reading a passphrase from ttys.Michihiro NAKAJIMA2014-09-211-0/+3
|
* Add --passphrase option to bsdtar and bsdcpio.Michihiro NAKAJIMA2014-09-161-0/+2
|
* Add support for lz4 write filter.Michihiro NAKAJIMA2014-08-141-0/+1
|
* Add --ignore-zeros option to bsdtarKevin Locke2014-01-141-0/+2
| | | | | | | This option is an alias for --options read_concatenated_archive introduced for compatibility with GNU tar. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* Support POSIX regular expression support using PCRE in CMake builds.Andres Mejia2013-01-311-1/+1
| | | | | | | This change is mainly meant for Windows regex support, where PCRE Windows development is much more active than development of the regex library found in the GNUWin32 packages. I found that the latest release of PCRE built right out of the box, unlike the GNUWin32 regex library released 6 years ago which failed to build from source for me using the mingw toolchain.
* Add support for TAR_WRITE_OPTIONS and TAR_READ_OPTIONS environmmentMichihiro NAKAJIMA2012-11-071-0/+3
| | | | | variables to set default options to writing or reading archives with bsdtar.
* Add --nopreserveHFSCompression option to bsdtar to preventMichihiro NAKAJIMA2012-10-311-0/+1
| | | | | a file which was compressed before archived from automatically HFS+ Compression.
* Add experimental support for HFS+ Compression.Michihiro NAKAJIMA2012-10-261-0/+1
| | | | - bsdtar provides --hfsCompression option.
* Introduce -a/--auto-compress option into bsdtar.Michihiro NAKAJIMA2012-10-221-4/+15
| | | | | This automatically decides on a creation format and filters by the archive suffix.
* Add support for grzip compression.Michihiro NAKAJIMA2012-10-101-0/+1
|
* Introduce b64encode filter.Michihiro NAKAJIMA2012-10-081-1/+2
|
* Introduce uuencode filter.Michihiro NAKAJIMA2012-10-081-0/+2
|
* Add --lrzip option to bsdtar and bsdcpio to use lrzip compression.Michihiro NAKAJIMA2012-10-071-0/+1
|
* Add support for lzop.Michihiro NAKAJIMA2012-10-071-0/+1
|
* Add --older,--older-than,--older-mtime and --older-mtime-than to bsdtar toMichihiro NAKAJIMA2012-10-031-0/+4
| | | | enable only including files and directories older than specified date or file.
* Introduce archive_match_exclude_pattern_from_file(_w) andMichihiro NAKAJIMA2012-02-121-2/+0
| | | | | | archive_match_include_pattern_from_file(_w) reading exclusion/inclusion patterns from a file. And so retire lafe_exclude_from_file() and lafe_include_from_file because we can use new APIs instead.
* Implement optional behavior of archive_read_disk that do not traverse mount ↵Michihiro NAKAJIMA2012-01-191-1/+0
| | | | | | points if user requests. SVN-Revision: 4186
* Add archive_read_disk_set_behavior function and drop ↵Michihiro NAKAJIMA2012-01-191-2/+1
| | | | | | | | archive_read_disk_honor_nodump and archive_read_disk_disable_mac_copyfile. SVN-Revision: 4184
* Use archive_matching API at both bsdcpio and bsdtar instead of lafe_exclude ↵Michihiro NAKAJIMA2012-01-181-7/+1
| | | | | | | | | functions. - Remove libarchive_fe/matching.[ch], which are no longer needed. - Move cpio/test/test_pathmatch.c into libarchive/test/test_archive_pathmatch.c. SVN-Revision: 4168
* Switch directory traversals code in bsdtar from tar/tree.[ch] to the new one ↵Michihiro NAKAJIMA2012-01-051-0/+1
| | | | | | | | | in libarchive library. This can fix issue 211. This reduce platform specific code in bsdtar, especially a check of nodump flag, and, of course, a use of Windows APIs. SVN-Revision: 4089
* Issue 193: allow ctime/mtime filters to work accurately onTim Kientzle2011-11-091-0/+2
| | | | | | platforms that support times before the epoch. SVN-Revision: 3762
* Extend the tar test to verify that symlink and hardlinkTim Kientzle2011-09-041-1/+1
| | | | | | | | | | targets get properly rewritten by default. Adjust the -s parser so that symlink and hardlink target rewriting is enabled by default and the 's' or 'S' flags disable both. SVN-Revision: 3676
* Move the parser state into the bsdtar structure.Tim Kientzle2011-08-111-0/+4
| | | | SVN-Revision: 3591
* Work around broken PSXCRT unistd.h, which defines macrosTim Kientzle2011-02-131-1/+1
| | | | | | that break any usage of names "optarg" or "option". SVN-Revision: 2979
* Support --numeric-owner for tar extraction as well as archive creation.Tim Kientzle2010-12-311-0/+1
| | | | | | | | | | This just involves reworking tar's extraction routines slightly to use archive_read_extract2() with a custom-configured archive_write_disk object, instead of the more convenient archive_read_extract() interface that automatically builds a standard archive_write_disk object. SVN-Revision: 2849
* Choose the copy buffer size used for reading filesTim Kientzle2010-06-261-0/+1
| | | | | | | | | | | to be archived dynamically: * At least 64k * At least as large as the -b setting In particular, this should speed up things noticably when large -b values are in use. This is also the first cut at aligning the copy buffer so we can take advantage of O_DIRECT someday. SVN-Revision: 2504
* Use -b setting when interpolating archives.Tim Kientzle2010-06-261-0/+1
| | | | | | | | Simplify the handling of -b values by setting a default early and then just using the value instead of duplicating the logic. SVN-Revision: 2503
* Add lzip write filter and --lzip option to bsdtar.Michihiro NAKAJIMA2010-05-051-0/+1
| | | | SVN-Revision: 2373
* Add --gid, --gname, --uid, --uname options to tar.Tim Kientzle2010-05-011-2/+9
| | | | | | | | | | | These allow you to override the user/group information both when creating an archive and when restoring an archive. I've also reimplemented --numeric-owner to be a synonym for --gname="" --uname="". Still needs tests... SVN-Revision: 2349
* Style: remove extra blank lineTim Kientzle2010-04-101-1/+0
| | | | SVN-Revision: 2227
* Change this to use positive flags, not negative.Tim Kientzle2010-02-021-1/+1
| | | | | | Idioms like "if (!disabled)" are really hard to read. SVN-Revision: 1853
* First step towards integrating Mac OS "copyfile" extension from Apple.Tim Kientzle2010-02-011-0/+2
| | | | | | | This part adds probes for the copyfile.h header, and adds a new command-line option --disable-copyfile, which does nothing on non-MacOS systems. SVN-Revision: 1852
* Trying to figure out what printf modifiers to use on what platforms toTim Kientzle2009-10-311-0/+1
| | | | | | | display 64-bit values is getting to be real PITA. Just roll our own conversion and use that. SVN-Revision: 1562
* Overhaul the SIGINFO/SIGUSR1 reporting. This is a littleTim Kientzle2009-07-161-6/+1
| | | | | | | | simpler and gives a lot more information. In particular, it reports total bytes in/out, total files and compression ratio, in addition to reporting the current file being processed. SVN-Revision: 1223
* Drop a few unnecessary arguments.Tim Kientzle2009-06-141-1/+1
| | | | SVN-Revision: 1163
* Refactor common frontend code into a separate library.Joerg Sonnenberger2009-05-261-15/+3
| | | | SVN-Revision: 1118
* Rename --format-options to simply --options, since these are optionsTim Kientzle2009-03-261-2/+2
| | | | | | | for filter/compressors as well as format handlers. On write, set options before we open the file. SVN-Revision: 857