Commit Graph

329 Commits

Author SHA1 Message Date
Sergey Poznyakoff
afa743ac23 Update copyright years 2021-01-06 17:55:16 +02:00
Sergey Poznyakoff
01dd89c121 Fix typo in the manpage
* doc/tar.1: Fix description of the --newer option
2020-07-13 09:01:29 +03:00
Sergey Poznyakoff
1ff0b63f48 Accept only position-sensitive (file-selection) options in file list files.
Using such options as -f, -z, etc. is senseless in the file list file
and bypasses the option consistency checks in decode_options.  Therefore,
only options related to file selection (a.k.a position-sensitive options)
are allowed in files.

* doc/tar.texi: Document changes.
* src/common.h (tar_args): Move from tar.c
(TAR_ARGS_INITIALIZER): New macro.
* src/names.c: Declare option group identifiers as an enum.
(names_parse_opt): Special handling for ARGP_KEY_ERROR.
(names_argp): Remove static qualifier.
(names_argp_children): Remove.
* src/tar.c: Declare option group identifiers as an enum.
(parse_opt): Special handling for ARGP_KEY_INIT.
(argp_children): New static variable.
(args): Remove static variable.
(more_options): Allow only options from names_argp.
(parse_default_options): Take a pointer to struct tar_args as argument.
Replace the loc member during the call to argp_parse and restore it
afterwards.
(decode_options): Use automatic variable for args.
2020-06-24 16:43:26 +03:00
Alfred M. Szmidt
d9ec6f04e2 Remove freemanuals.texi
* doc/Makefile.am (tar_TEXINFOS): Remove freemanuals.texi.
* doc/freemanuals.texi: Delete file.
* doc/tar.texi (Free Software Needs Free Documentation): Remove
appendix.
2020-06-10 21:56:54 +03:00
Sergey Poznyakoff
b5418cd393 Fix typo in docs 2020-06-03 10:55:51 +03:00
Sergey Poznyakoff
8d90723d30 Update copyright years 2020-02-08 13:21:13 +02:00
Sergey Poznyakoff
2c9730357f Typesetting fixes in the manpage
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-28 13:58:44 +02:00
Zachary Vance
ef0f882382 POSIX extended format headers do not include PID by default
The intent is to make binary-equivalent PAX archives easy to create.  If
POSIXLY_CORRECT is set, the POSIX standard default is used, which embeds
the pid.

* src/common.h (posixly_correct): New global.
* src/tar.c (decode_options): Detect the POSIXLY_CORRECT environment
variable.
* src/buffer.c (add_chunk_header): Change filenames of multipart files to
omit the pid.
* src/xheader.c (HEADER_TEMPLATE): New macro.
(xheader_xhdr_name, xheader_ghdr_name): Use HEADER_TEMPLATE to select
the template for the POSIX extended header name.
* doc/tar.texi: Document the change.

Signed-off-by: Zachary Vance <za3k@za3k.com>
2019-03-28 13:37:07 +02:00
Sergey Poznyakoff
97d8951536 Minor fixes in docs.
* doc/tar.1: Remove description of the --preserve option
Document verbosity levels.
* doc/tar.texi: Fix description of the -o option.
2019-02-04 21:30:00 +02:00
Daniel Le
bf5d66109c Fix typos in the documentation
Short option "t" was mistranslated to "--test" instead of "--list" in commit
67cad0792b.
2019-01-15 15:29:03 +02:00
Sergey Poznyakoff
b0930da045 Fix typo in manpage. 2019-01-14 12:48:16 +02:00
Sergey Poznyakoff
2684c88a49 Version 1.31 2019-01-02 20:20:28 +02:00
Sergey Poznyakoff
e7cd377f78 Implement the "wait" checkpoint action.
This action instructs tar to pause until given signal is delivered.
The newer genfile tool uses this action for communication between
genfile and tar in exec mode. This eliminates race conitions and
speeds up the tests based on exec mode.

* doc/tar.texi: Document changes.
* paxutils: Upgrade.
* src/checkpoint.c: Implement the wait action.
* src/common.h (decode_signal): New proto.
* src/tar.c (decode_signal): New function.
(set_stat_signal): Rewrite.
* tests/dirrem01.at: Adjust genfile and tar command line arguments
to use the new feature.
* tests/dirrem02.at: Likewise.
* tests/filerem01.at: Likewise.
* tests/filerem02.at: Likewise.
* tests/grow.at: Likewise.
* tests/sptrcreat.at: Likewise.
* tests/sptrdiff00.at: Likewise.
* tests/sptrdiff01.at: Likewise.
* tests/truncate.at: Likewise.
2018-12-28 13:27:02 +02:00
Paul Eggert
e81c89ddd6 * doc/tar.1: Fix font typo noted by esr. 2018-06-13 15:07:32 -07:00
Paul Eggert
07b0026e5d * doc/tar.1: Don't refer to nonexistent tar(5). 2018-05-16 09:03:47 -07:00
Andrew Hounsell
f563b896cc Tiny fix
* doc/snapshot.texi: Fix a typo
* scripts/tar-snapshot-edit: Fix a typo
2018-04-07 11:07:57 +03:00
Aaron Schrab
00f03498a9 Fix typo 2018-03-18 12:06:36 +02:00
Adam Borowski
3d45373d3b Add support for zstd compression
* configure.ac (zstd): Register compression program.
* doc/tar.1: Mention --zstd.
* doc/tar.texi: Document zstd support.
* src/buffer.c: Register zstd compression.
* src/suffix.c: Add suffixes zst and tzst.
* src/tar.c: New compression option --zstd.
2018-03-18 10:24:13 +02:00
Sergey Poznyakoff
7b8efcc7cb Fix typos in the docs 2018-03-13 22:20:53 +02:00
Paul Eggert
22b5645879 Fix "concatenating" typo.
Problem reported by Rodrigo Queiro in:
https://lists.gnu.org/r/bug-tar/2017-11/msg00021.html
* doc/intern.texi (Extensions): Fix typo.
2017-11-20 11:10:25 -08:00
Paul Eggert
0c8e7bad3e Port to Texinfo 6.4
* doc/tar.texi (Sparse Recovery): Omit ‘.’ from anchor name,
as ‘makeinfo’ now complains about it.  All uses changed.
2017-11-18 08:42:23 -08:00
Paul Eggert
37d7ce16c5 Document base-256 representation in GNU format
Problem reported by Rodrigo Queiro in:
https://lists.gnu.org/r/bug-tar/2017-11/msg00018.html
* doc/intern.texi (Standard, Extensions):
Document base-256 representations.
2017-11-18 08:42:23 -08:00
Sergey Poznyakoff
9855bc011e Update docs
* doc/Makefile.am: Add recipes.texi
* doc/recipes.texi: New file.
* doc/tar.texi: New appendix "Recipes"
2017-11-16 18:12:36 +02:00
Sergey Poznyakoff
ee0508f01c Minor improvements in the docs. 2017-11-16 14:31:53 +02:00
Sergey Poznyakoff
32e51de2af New option --warning=failed-read
* NEWS: Document the --warning=failed-read option.
* doc/tar.texi: Likewise.
* doc/tar.1: Likewise.
* src/common.h (WARN_FAILED_READ): New constant.
(WARNING_ENABLED): New macro.
* src/misc.c (close_diag, open_diag)
(read_diag_details, readlink_diag)
(savedir_diag, seek_diag_details)
(stat_diag): Suppress warnings if WARN_FAILED_READ is set.
* src/warning.c (failed-read): New keyword.
2017-11-16 14:22:48 +02:00
Sergey Poznyakoff
560f67c9f0 Fix docs
* doc/tar.texi: Fix description of the argument to --xattrs-exclude
and --xattrs-include option. It is a globbing pattern, not a regex.

Fix a typo (LZOP)
2017-11-16 12:24:45 +02:00
Sergey Poznyakoff
13edc746f6 Fix typo
* doc/tar.texi
2017-11-09 09:06:18 +02:00
Troels Thomsen
ede0d1b42d Fix typo 2017-06-29 14:23:15 +03:00
Pavel Raiskup
d06126f814 Test and document --keep-directory-symlink
* doc/tar.1: Document the option.
* tests/extrac20.at: New testcase.
* tests/Makefile.am: Mention extrac20.
* tests/testsuite.at: Likewise.
2017-02-28 12:59:17 +02:00
Sergey Poznyakoff
30fe67226a Update copyright years 2017-01-02 14:49:55 +02:00
Sergey Poznyakoff
2bfacfe3d0 Fix description of the "escape" quoting style 2016-11-12 12:49:10 +02:00
Sergey Poznyakoff
a2fd82f622 Minor documentation fix
* doc/tar.texi: Fix example about use of --no-recursion with -T
2016-11-12 11:46:43 +02:00
Sergey Poznyakoff
9a33077a7b Report positional options that were used but had no effect during archive creation
* src/names.c (file_selection_option)
(file_selection_option_name): New functions.
(unconsumed_option_push, unconsumed_option_free)
(unconsumed_option_report): New functions.
(name_list_advance): Maintain a list
of eventually unconsumed options during archive creation.
Report unconsumed options, if any.

* tests/positional01.at: New test case.
* tests/positional02.at: New test case.
* tests/positional03.at: New test case.
* tests/Makefile.am: Add new test cases.
* tests/testsuite.at: Likewise.

* NEWS: Document the changes.
* configure.ac: Version 1.29.90
* doc/tar.texi: Document the changes.
2016-05-27 11:50:19 +03:00
Sergey Poznyakoff
61cd3fd268 Fix argument handling when running external commands.
* src/system.c (xexec): Use sh -c to run the command.  This fixed
bug introduced by 7b5e80396 (tar 1.27)
* doc/tar.texi: Fix checkpoint examples: (1) $TAR_FILENAME
is not available when creating archive and (2) --checkpoint
can't be used as abbreviation of --checkpoint-action
2016-04-14 11:51:38 +03:00
Sergey Poznyakoff
195a25316c Remove --preserve option
* src/tar.c: Remove --preserve option
* NEWS: Update.
* doc/tar.texi: Update.
2016-03-24 08:39:52 +02:00
Jeremy Bobbio
13d04fe6ae New option --clamp-mtime
The new `--clamp-mtime` option will change the behavior of `--mtime` to only
use the time specified if the file mtime is newer than the given time.
The `--clamp-mtime` option can only be used together with `--mtime`.

Typical use case is to make builds reproducible: to loose less
information, it's better to keep the original date of an archive, except for
files modified during the build process. In that case, using a reference
(and thus reproducible) timestamps for the latter is good enough. See
<https://wiki.debian.org/ReproducibleBuilds> for more information.

Patch submitted by Jeremy Bobbio and
Daniel Kahn Gillmor <dkg@fifthhorseman.net>

* doc/tar.1: Document --clamp-mtime
* doc/tar.texi: Likewise.

* src/common.h (set_mtime_option_mode): New enum
(set_mtime_option): Change type to enum set_mtime_option_mode.
(NEWER_OPTION_INITIALIZED): Rename to NEWER_OPTION_INITIALIZED.
* src/create.c (start_header): Set mtime depending on set_mtime_option.
* src/tar.c (options,parse_opt): New option --clamp-mtime
(decode_options): Initialize mtime_option

* tests/time02.at: New testcase.
* tests/Makefile.am: Add new testcase
* tests/testsuite.at: Likewise.
2016-03-24 07:26:27 +02:00
Sergey Poznyakoff
6ac0dd1d73 Revise docs 2016-03-18 14:27:27 +02:00
Sergey Poznyakoff
e4b246c14a Document xattrs, ACL and SELinux-related options.
* doc/tar.1: Document all options.
* doc/tar.texi: Likewise.
2016-03-16 20:08:00 +02:00
Sergey Poznyakoff
8980ecd62d Update copyright years 2016-01-20 11:29:17 +02:00
Sergey Poznyakoff
0f26331b17 fix a typo
* doc/tar.texi (Incremental Dumps): Add missing --file to the
'--list' example.
2015-12-11 15:21:04 +02:00
Sergey Poznyakoff
196fef9b40 Minor fixes.
* doc/tar.texi: Document position-sensitive options in a
separate subsection.
* src/names.c (names_argp,names_argp_children): Explicitly initialize
all members.
2015-12-11 14:19:44 +02:00
Sergey Poznyakoff
b684326e69 Use SEEK_HOLE for hole detection
Based on patch by Pavel Raiskup.

Use SEEK_HOLE/SEEK_DATA feature of lseek on systems that support
it.  This can make archiving of sparse files much faster.

Implement the --hole-detection option to allow users to select
hole-detection method.

* src/common.h (hole_detection_method): New enum.
(hole_detection): New global.
* src/sparse.c  (sparse_scan_file_wholesparse): New function as a
method for detecting sparse files without any data.
(sparse_scan_file_raw): Rename from sparse_scan_file; with edits.
(sparse_scan_file_seek): New function.
(sparse_scan_file): Reimplement function.
* src/tar.c: New option --hole-detection

* tests/checkseekhole.c: New file.
* tests/.gitignore: Mention two test binaries.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at (AT_SEEKHOLE_PREREQ): New macro.
Include sparse06.at.
* tests/sparse06.at: New test case.
* tests/sparse02.at: Force raw hole-detection method.
* tests/sparsemv.at: Likewise.
* tests/sparsemvp.at: Likewise.

* doc/tar.1: Document --hole-detection option.
* doc/tar.texi: Document hole-detection algorithms and
command-line options.
* NEWS: Document hole-detection.
2015-12-06 00:14:55 +02:00
Sergey Poznyakoff
1a615a41f5 New options: --owner-map and --group-map.
* NEWS: Update.
* doc/tar.1: Document --owner-map and --group-map
* doc/tar.texi: Likewise.

* src/map.c: New file.
* src/Makefile.am: Add map.c
* src/common.h (owner_map_read, owner_map_translate)
(group_map_read, group_map_translate): New protos.
* src/create.c (start_header): Use owner_map_translate
and group_map_translate to optionally translate user/group names/ids.
* src/tar.c: New options --owner-map and --group-map.

* tests/map.at: New file.
* tests/Makefile.am: Add map.at
* tests/testsuite.at: Include map.at.
2015-11-02 13:00:39 +02:00
Kir Kolyshkin
cdf41c383f doc: fix font and spelling typos
* doc/tar.1: Fix font and spelling typos in man page.
Copyright-paperwork-exempt: yes
2015-09-24 09:22:51 -07:00
Sergey Poznyakoff
6cb94e37a9 Include gnulib and paxutils as submodules.
* .gitmodules: New file.
* README-alpha: Update.
* README-hacking: Update.
* bootstrap: Install slightly modified version from the gnulib repo.
* bootstrap.conf: Add paxutils-related stuff.
* .gitignore: Update.
* doc/.gitignore: Update.
* po/.gitignore: Update.
* gnu/Makefile.am
2015-08-24 11:52:14 +03:00
Sergey Poznyakoff
232a7258c3 Update docs.
* doc/tar.1: Document --verbatim-files-from option.
2015-08-24 09:29:04 +03:00
Sergey Poznyakoff
429bd311b7 Add missing VCS files to --exclude-vcs list
* src/tar.c (vcs_file_table): Add .gitmodules and .gitattributes
* doc/tar.texi: Update.
2015-08-20 17:52:20 +03:00
Sergey Poznyakoff
eb621c67cf Options to control option handling in file lists.
The --verbatim-files-from option disables option handling in
file lists.  The --no-verbatim-files-from reverts its effect.

The --null option implies --verbatim-files-from.  This restores
the documented behavior, broken by 26538c9b.

* src/common.h (verbatim_files_from_option): New global.
* src/names.c (name_elt): New member: file.verbatim
(name_add_file): Take 'verbatim' state as its third parameter.
(read_next_name): Don't call handle_option if file.verbatim
is set.
* src/tar.c: New options --verbatim-files-from and
--no-verbatim-files-from.

* doc/tar.texi: Document --verbatim-files-from and
--no-verbatim-files-from options.
* NEWS: Update.
* configure.ac: Version 1.28.90

* tests/T-null2.at: New testcase.
* tests/Makefile.am: Update.
* tests/testsuite.at: Update.
2015-08-03 16:47:22 +03:00
Anders Jonsson
21f86195b7 Fix typos (preceeded etc.)
Copyright-paperwork-exempt: yes
2015-07-25 08:47:25 -07:00
Paul Eggert
4eb1484dce tar: don't suggest GZIP
* doc/tar.texi (gzip): Don't suggest using the GZIP environment
variable, as it will be deprecated in the next gzip release.
2015-03-17 10:46:51 -07:00