summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Version 1.27release_1_27Sergey Poznyakoff2013-10-062-4/+4
| | | | | * NEWS: Update. * configure.ac: Update.
* Minor fixes.Sergey Poznyakoff2013-10-063-8/+9
| | | | | | | | | | | * src/names.c: Include argp.h * tests/testsuite.at (AT_XATTRS_UTILS_PREREQ) (AT_SELINUX_UTILS_PREREQ,AT_ACLS_UTILS_PREREQ) (AT_CAPABILITIES_UTILS_PREREQ) (AT_XATTRS_PREREQ,AT_SELINUX_PREREQ) (AT_ACLS_PREREQ): Use POSIX-compatible syntax for mktemp. * tests/incr08.at: Fix find usage.
* Xfail the remfiles09b test.Sergey Poznyakoff2013-10-051-1/+2
| | | | * tests/remfiles09b.at: Turn into expected failure.
* Tiny changeNathan Stratton Treadway2013-10-051-1/+3
| | | | * scripts/tar-snapshot-edit: Mention --show-snapshot-field-ranges option
* Tiny changePavel Raiskup2013-10-051-0/+1
| | | | * configure.ac (RSH): Define as AC_ARG_VAR.
* Fix namespace contamination in testsuite.Sergey Poznyakoff2013-10-0512-17/+35
| | | | | | | | | | | | | | | * tests/append01.at: Use m4_pushdef/m4_popdef to define local macros. * tests/delete03.at: Likewise. * tests/exclude06.at: Likewise. * tests/incr04.at: Likewise. * tests/link03.at: Likewise. * tests/long01.at: Likewise. * tests/longv7.at: Likewise. * tests/lustar01.at: Likewise. * tests/lustar02.at: Likewise. * tests/lustar03.at: Likewise. * tests/multiv05.at: Likewise. * tests/sparse04.at: Likewise.
* Provide comprehensive testcases for various file removal modes.Nathan Stratton Treadway2013-10-0521-91/+884
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. * tests/incr09.at: Add description. * tests/remfiles04a.at: New file. * tests/remfiles05.at: Rename to ... * tests/remfiles04b.at: ... this. * tests/remfiles04.at: Rename to ... * tests/remfiles04c.at: ... this. * tests/remfiles05a.at: New file. * tests/remfiles05b.at: New file. * tests/remfiles06.at: Rename to ... * tests/remfiles05c.at: ... this. * tests/remfiles06a.at: New file. * tests/remfiles06b.at: New file. * tests/remfiles06c.at: New file. * tests/remfiles07a.at: New file. * tests/remfiles07b.at: New file. * tests/remfiles07c.at: New file. * tests/remfiles08a.at: New file. * tests/remfiles08b.at: New file. * tests/remfiles08c.at: New file. * tests/remfiles08.at: Rename to ... * tests/remfiles09a.at: ... this. * tests/remfiles09b.at: New file. * tests/remfiles07.at: Rename to ... * tests/remfiles09c.at: ... this.
* Tiny changes.Sergey Poznyakoff2013-10-032-17/+39
| | | | | | | | | * src/misc.c: Fix comments, rename wd.cwd to wd.abspath (Nathan Stratton Treadway); * src/tar.c (options): Reword description of the --starting-file and --preserve-order options. (decode_options): Both --starting-file and --preserve-order have meaning only when used together with an archive reading command. (Pavel Raiskup).
* Revamp tar_getcwd/normalize_filename stuff.Sergey Poznyakoff2013-10-017-39/+84
| | | | | | | | | | | | | | | | | | The changes are based on the discussion with Nathan. * src/common.h (normalize_filename): Take two arguments. All callers updated. (tar_getcwd): Replaced with .. (tar_getcdpath): New proto. * src/misc.c (normalize_filename): Take two arguments. (chdir_arg): Populate cwd along with creating the structure. (tar_getcwd): Removed. (tar_getcdpath): New function. * tests/incr09.at: New test case. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise.
* BugfixSergey Poznyakoff2013-09-271-0/+1
| | | | * tests/remfiles08.at: Restore missing find
* Use relative addressing in deferred unlinks.Sergey Poznyakoff2013-09-268-18/+99
| | | | | | | | | | | | | | | | * src/common.h (tar_dirname): New function. * src/misc.c (normalize_filename_x): Make extern. (tar_dirname): New function. (tar_getcwd): Take into account absoulte pathnames. * src/unlink.c (deferred_unlink) <dir_idx>: New member; keeps the value of chdir_current at the moment of structure allocation. (flush_deferred_unlinks): Use chdir_do and relative addressing. (queue_deferred_unlink): Initialize dir_idx. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Add new tests. * tests/remfiles06.at: Fix description. * tests/remfiles07.at: Fix description. * tests/remfiles08.at: New test case.
* Improve tar-snapshot-editNathan Stratton Treadway2013-09-251-63/+185
| | | | | | | Support architecture-specific field ranges for the "-c" function. Better handle negative or larger-than-32-bit field values even when running in 32-bit Perl (for the default "print a summary" function)
* Improve tar_getcwdSergey Poznyakoff2013-09-2510-24/+378
| | | | | | | | | | | | | | | | | | | * src/common.h (tar_getcwd): Return pointer is const. * src/misc.c (wd) <cwd>: New member. (chdir_arg): Initialize cwd. (tar_getcwd): Use cwd member to cache the result. Take into account absolute pathnames, (normalize_filename): Don't free the value returned from tar_getcwd. * src/names.c (name_next_elt): Remove leftover call chdir(). * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/incr08.at: New testcase. * tests/remfiles04.at: New testcase. * tests/remfiles05.at: New testcase. * tests/remfiles06.at: New testcase. * tests/remfiles07.at: New testcase.
* Fix normalize_filename.Sergey Poznyakoff2013-09-242-1/+44
| | | | | | | | | | | | The function did not take into account eventual -C options, which in particular led to various problems when using -C and --remove-files together. * src/common.h (namebuf_add_dir,namebuf_finish) (tar_getcwd): New prototypes. * src/misc.c (namebuf_add_dir,namebuf_finish) (tar_getcwd): New functions. (normalize_filename): Use tar_getcwd.
* Changes for compatibility with Slackware installation scripts.Sergey Poznyakoff2013-09-238-20/+90
| | | | | | | | | | | | | | | | | | | * src/buffer.c (short_read): the "Record size" message is controlled by the WARN_RECORD_SIZE warning_option bit. * src/common.h (keep_directory_symlink_option): New global. (WARN_RECORD_SIZE): New constant. (WARN_VERBOSE_WARNINGS): Add WARN_RECORD_SIZE. * src/extract.c (extract_dir): If keep_directory_symlink_option is set, follow symlinks to directories. * src/suffix.c (compression_suffixes): Add support for txz suffix. * src/tar.c (KEEP_DIRECTORY_SYMLINK_OPTION): New constant. (options): New option --keep-directory-symlink. (parse_opt): Handle this option. * src/warning.c: Implement "record-size" warning control. * NEWS: Update. * doc/tar.texi: Document new features.
* Fix error message (complements 0ea6e686)Sergey Poznyakoff2013-09-211-1/+1
| | | | * src/tar.c (set_subcommand_option): Mention --delete in the error message.
* Improve the incr07 testSergey Poznyakoff2013-09-151-1/+7
|
* Implement the --show-snapshot-field-ranges optionNathan Stratton Treadway2013-09-155-10/+93
| | | | | | | | | * src/common.h (show_snapshot_field_ranges): New prototype. * src/incremen.c (show_snapshot_field_ranges): New function. * src/tar.c: New option --show-snapshot-field-ranges. * doc/snapshot.texi: Document the --show-snapshot-field-ranges option. * doc/tar.texi: Likewise.
* Take into account chdir_fd when extracting from incremental dumps.Sergey Poznyakoff2013-09-158-17/+142
| | | | | | | | | | | | * src/common.h (tar_savedir): New prototype. * src/misc.c (tar_savedir): New function. (remove_any_file): Use tar_savedir. * src/incremen.c (try_purge_directory): Use tar_savedir. * src/update.c (update_archive): Use tar_savedir. * tests/incr07.at: New testcase. * tests/Makefile.am (TESTSUITE_AT): Add new test. * tests/testsuite.at: Likewise. * THANKS: Updated.
* Minor fixSergey Poznyakoff2013-09-152-1/+2
| | | | | * src/tar.c (main): Mention --delete in the error message. * THANKS: Update
* * src/names.c (file_list_name): Properly prototype.Paul Eggert2013-09-131-12/+12
|
* tar: don't warn about zero timestampsPaul Eggert2013-09-131-1/+1
| | | | | * src/extract.c (check_time): Suppress warniing when t.tv_sec == 0. Problem reported by Denis Excoffier.
* Minor fix in the testsuite.Pavel Raiskup2013-08-191-3/+4
| | | | * tests/T-cd.at: sort the 'tar cf' output.
* Improve error diagnosticsSergey Poznyakoff2013-08-174-2/+72
| | | | | | | | | * src/names.c (file_list_name): New static function. (add_file_id): If a filelist is being read twice, print the names of the files that caused it. * tests/T-rec.at: New test case. * tests/Makefile.am: Add new file. * tests/testsuite.at: Include new file.
* Revamp initial name collection functions to ensure proper argument ordering.Sergey Poznyakoff2013-08-166-40/+207
| | | | | | | | | | | | | | | | | | | * src/names.c (NELT_NOOP): New constant (name_elt) <next,prev>: New members. (name_array,allocated_entries,entries,scanned): Remove. (check_name_alloc): Remove function. (name_elt_alloc): New static. (name_list_adjust,name_list_advance): New functions. (name_add_name,name_add_dir) (name_add_file): Use new allocation functions. (read_next_name): Advance list head pointer as necessary before returning. (name_next_elt): Read elements from list. * tests/T-cd.at: New file. * tests/T-mult.at: New file. * tests/T-nest.at: New file. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise.
* Don't treat attempts to read an already read file list as fatal errors.Sergey Poznyakoff2013-08-161-4/+7
| | | | | | | * src/names.c (add_file_id): Report error and return 1 if the file has already been read. (read_next_name): Don't try to open file if add_file_id returns 1. (name_next_elt): Simplify conditional.
* Minor change.Sergey Poznyakoff2013-08-161-5/+4
| | | | * src/names.c (name_next_elt): Simplify conditional.
* Fix use of uninitialized memoryPavel Raiskup2013-08-151-0/+1
| | | | | * src/names.c (name_add_file): Initialize the ep->v.file.fp pointer after structure allocation.
* Minor changesSergey Poznyakoff2013-08-051-3/+1
| | | | | | * src/names.c (handle_option): Use program_invocation_short_name instead of the constant string. (read_next_name): Remove unused variable.
* Update the docs.Sergey Poznyakoff2013-08-041-43/+5
| | | | | | * doc/tar.texi: Parsing of the options found in the file list follows the same rules as for command line. Remove the obsolete description. This complements 26538c9b.
* Fix interacton of --verbose and --append.Sergey Poznyakoff2013-08-045-5/+69
| | | | | | | | | * src/buffer.c (_open_archive): don't overwrite existing archive if given the --verify option. * tests/append04.at: New file. * tests/Makefile.am: Add new testcase. * tests/testsuite.at: Add new testcase. * THANKS: Update.
* Bugfix.Sergey Poznyakoff2013-08-042-3/+7
| | | | | * src/names.c (read_name_from_file): Fix a typo. Remove unused variable.
* Reduce memory consuption when handling the -T option.Sergey Poznyakoff2013-08-0410-227/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit cdb27293 made the -T option more flexible, but incurred a very considerable memory overhead by storing all file names in the argument array. In case of very big file lists this caused tar to run out of memory. This was reported by Christian Wetzel <wetzel@phoenix-pacs.de> on March 14, 2013 (http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00018.html). On the other hand, Michal Žeidl discovered that tar misfunctioned when given empty file lists or lists with the trailing newline misssing in the last entry. This was reported by Pavel Raiskup on July 23 (http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html and msg00010.html). This change fixes both issues. * src/common.h (name_add_file,request_stdin): New prototype. (more_options): New prototype. * src/names.c (NELT_FILE): New entry type. (name_elt) <file>: New union member. (name_add_file): New function. (read_name_from_file): New function, a rewrite of the same function from tar.c (read_next_name,copy_name): New static functions. (name_next_elt): Handle NELT_FILE entries. * src/tar.c (request_stdin): Make extern. (read_name_from_file,add_file_id) (update_argv): Removed. (parse_opt): Change handling of the -T option. (more_options): New function. * tests/T-null.at: Rewrite test. * tests/T-zfile.at: New file. * tests/T-nonl.at: New file. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. * THANKS: Update.
* Fix the compatibility check for the --occurrence option.Sergey Poznyakoff2013-06-291-5/+7
| | | | | | | * src/tar.c (SUBCL_OCCUR): New class. (subcommand_class): Update. (decode_options): Accept the --occurrence option with any subcommand from the SUBCL_OCCUR class.
* testsuite: do not resist on file order in archivePavel Raiskup2013-06-299-16/+25
| | | | | | | | | | | | | | | | On my Fedora 19 box, the exclude08 & exclude11 tests failed before this fix. The reason was that the directory traversing chosen the file order differently than the testsuite expected. * tests/exclude08.at: Sort the tarball content output. * tests/exclude09.at: Likewise. * tests/exclude10.at: Likewise. * tests/exclude11.at: Likewise. * tests/exclude12.at: Likewise. * tests/exclude13.at: Likewise. * tests/exclude14.at: Likewise. * tests/exclude15.at: Likewise. * tests/exclude16.at: Likewise.
* Improve checks for incompatible options.Sergey Poznyakoff2013-06-2910-33/+293
| | | | | | | | | | | | | | | | | | * src/common.h (READ_LIKE_SUBCOMMAND): Remove define. * src/tar.c (IS_SUBCOMMAND_CLASS): New macro. (decode_options): Use IS_SUBCOMMAND_CLASS in checking option compatibility. Accept the --verify option only with subcommands that write to the archive. * tests/opcomp01.at: New test case. * tests/opcomp02.at: New test case. * tests/opcomp03.at: New test case. * tests/opcomp04.at: New test case. * tests/opcomp05.at: New test case. * tests/opcomp06.at: New test case. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise.
* tar: port to Mingw ShellPaul Eggert2013-06-271-1/+1
| | | | | | | * src/extract.c (extract_symlink) [!HAVE_SYMLINK]: Fix typo by replacing WARN_SYMBOLIC_CAST with WARN_SYMLINK_CAST. Problem reported by kaka in <http://lists.gnu.org/archive/html/bug-tar/2013-06/msg00008.html>.
* maint: revert previous changePaul Eggert2013-05-061-1/+1
| | | | | | It wasn't actually needed. Reported by Stefano Lattarini in <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00041.html>. * configure.ac (AM_GNU_GETTEXT_VERSION): Decrease from 0.18.2 back to 0.16.
* maint: port to bleeding-edge Automake by assuming Gettext 0.18.2Paul Eggert2013-04-241-1/+1
| | | | | | | | Reported by Stefano Lattarini in <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00009.html>. * configure.ac (AM_GNU_GETTEXT_VERSION): Increase from 0.16 to 0.18.2. README-alpha says that we do not make any efforts to accommodate older versions of Gettext.
* tar: port to --without-xattrs --enable-gcc-warningsPaul Eggert2013-04-241-0/+2
| | | | | | Reported by Pavel Raiskup in <http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00029.html>. * src/xattrs.c (xattrs__fd_set) [!HAVE_XATTRS]: Omit.
* doc: port to texinfo 5Paul Eggert2013-04-241-9/+10
| | | | | * doc/tar.texi (Reports, assumptions, Mixing): Put FIXMEs at line start.
* Continue extracting from a separate volume after skipping a partial member.Sergey Poznyakoff2013-03-121-1/+8
| | | | | | | | Reported by Göran Udeborg on 2013-03-09. * src/extract.c (extract_skip): New function. (prepare_to_extract): Set extractor to extract_skip if starting at a partial member.
* Fix interaction of various --exclude-tag options with --listed-incremental.Sergey Poznyakoff2013-03-1218-78/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/incremen.c (procdir): Set directory->tagfile in the exclusion_tag_contents case. (makedumpdir): Mark all entries as ignored if directory->tagfile is set. Free new_dump before returning. (maketagdumpdir): New function. (scan_directory): If directory->children is set to NO_CHILDREN and directory->tagfile is set, create a dumpdir consisting of the tagfile only. * tests/exclude08.at: New testcase. * tests/exclude09.at: New testcase. * tests/exclude10.at: New testcase. * tests/exclude11.at: New testcase. * tests/exclude12.at: New testcase. * tests/exclude13.at: New testcase. * tests/exclude14.at: New testcase. * tests/exclude15.at: New testcase. * tests/exclude16.at: New testcase. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Include new tests. * tests/atlocal.in (mkexcltest): New function. * tests/chtype.at: Update keywords. * tests/filerem01.at: Likewise. * tests/filerem02.at: Likewise. * tests/incremental.at: Likewise. * tests/multiv04.at: Likewise.
* tar: remove lintPaul Eggert2013-02-202-18/+13
| | | | | | | | | * lib/wordsplit.c (_wsplit_error): Mark with printf attribute. (expvar): "Use" defstr to pacify GCC. * src/system.c (xexec): Now _Noreturn, to pacify GCC. (run_decompress_program): Add cast to pacify GCC. (sys_exec_command, sys_exec_info_script, sys_exec_checkpoint_script): Remove unused variables.
* Pass command line arguments to external commands.Sergey Poznyakoff2013-02-106-78/+1990
| | | | | | | | | | | | | | | | | | Any option taking a command name as its argument accepts additional arguments as well. * lib/wordsplit.c: New file. * lib/wordsplit.h: New file. * lib/Makefile.am: Add new files. * src/system.c (xexec): New function. (run_decompress_program): Use wordsplit. (sys_child_open_for_compress,sys_exec_command) (sys_exec_info_script) (sys_exec_checkpoint_script): Use xexec to invoke external command. * NEWS: Update. * doc/tar.texi: Update.
* tar: improve compile-time diagnosticsNathan Stratton Treadway2013-01-281-2/+2
| | | | * src/misc.c (sysinttostr, strtosysint): Improve #error wording.
* tar: improve quality of diagnostics with incrementalsPaul Eggert2013-01-271-93/+78
| | | | | | | | | | | Inspired by a prototype by Nathan Stratton Treadway in <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00000.html>. * src/incremen.c (read_num): Rewrite by merging read_negative_num and read_unsigned_num. Use strtosysint rather than rolling this stuff ourselves. Change return type to bool. All uses changed. (read_negative_num, read_unsigned_num): Remove. (read_num, read_timespec, read_incr_db_2): Improve quality of diagnostics, e.g., by supplying byte offset of error.
* tar: fix bug with sparse files with effective size of 8 GiB or morePaul Eggert2013-01-262-7/+22
| | | | | | | | Reported by Pavel Raiskup in <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html>. * NEWS: Document the fix. * src/sparse.c (pax_start_header): New function. (pax_dump_header_0, pax_dump_header_1): Use it.
* maint: update copyrights for 2013 and as per current GNU standardsPaul Eggert2012-12-31207-1667/+1843
|
* maint: remove unnecessary filePaul Eggert2012-12-311-57/+0
| | | | * src/configure.in: Remove. This file has been obsolete for a while.