1 2014-07-27 Sergey Poznyakoff <gray@gnu.org>
5 2014-07-27 Nathan Stratton Treadway <nathanst@ontko.com>
7 Minor change in docstrings. nor ch#
9 Restructure the remfiles testsuite.
11 2014-07-22 Sergey Poznyakoff <gray@gnu.org>
13 Don't build ttyemu and run tty I/O test if grantpt is not
16 * configure.ac (TAR_COND_GRANTPT): Define conditional depending
17 on whether grantpt is available.
18 * gnulib.modules: Remove grantpt. It relies upon a helper binary
19 pt_chown which it installs and which is useless in the testsuite.
20 * tests/Makefile.am [TAR_COND_GRANTPT]: Build ttyemu
21 * tests/iotty.at: Skip test if ttyemu is not build.
22 * tests/ttyemu.c (noecho): Fix error message
23 (main): Use TIOCSCTTY if it is defined.
25 2014-07-22 Benno Schulenberg <bensberg@justemail.net>
27 Fix a typo and some wordings in the documentation.
29 * doc/tar.texi: Fix some missing articles, and make it clearer
30 that "any" does not mean "anything" but "either of the two".
32 2014-07-22 Nathan Stratton Treadway <nathanst@ontko.com>
36 * tests/incr07.at: Don't assume case-sensitive filesystem.
38 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
40 tar: minor fixups related to recent checkpoint.c change
42 * src/checkpoint.c (getwidth, format_checkpoint_string):
43 Use long and strtol, not int, to avoid overflow issues.
44 (getwidth): Don't assume termios.h defines TIOCGWINSZ,
45 as it doesn't on some older hosts.
47 2014-07-11 Sergey Poznyakoff <gray@gnu.org>
51 * gnulib.modules: Add faccessat
52 * src/checkpoint.c: Include termios.h
54 2014-06-29 Nathan Stratton Treadway <nathanst@ontko.com>
56 tar: document xgetcwd test case better
58 * src/misc.c (normalize_filename): Add commentary for clarity.
59 * tests/extrac09.at: Retitle test case and add comments for
62 2014-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
64 Fix typos in ChangeLog
66 * ChangeLog.CVS: Fix typos.
67 * ChangeLog.amend: New file.
68 * Makefile.am: Define changelog_amend_file.
70 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
72 tar: do not dereference NULL pointer with '--remove-files .'
74 Problem reported by Thorsten Hirsch in:
75 http://lists.gnu.org/archive/html/bug-tar/2014-04/msg00011.html
76 * src/unlink.c (flush_deferred_unlinks):
77 Do not attempt to find the parent of "." when "." is
79 * tests/remfiles10.at: New file.
80 * tests/Makefile.am (TESTSUITE_AT):
81 * tests/testsuite.at: Add it.
83 2014-03-27 Sergey Poznyakoff <gray@gnu.org>
85 Refuse to write archive contents to a tty.
88 * src/buffer.c (_open_archive): Refuse to write to a tty.
89 * tests/iotty.at: Test output to a tty.
91 2014-03-26 Vitezslav Cizek <vcizek@suse.cz>
93 fix an eternal loop in handle_option
95 * src/names.c (handle_option): increment loop counter
97 2014-03-20 Sergey Poznyakoff <gray@gnu.org.ua>
99 Fail if archive comes from a terminal.
101 Based on patch from Pavel Raiskup <praiskup@redhat.com>.
103 * gnulib.modules: Add new modules.
104 * src/buffer.c (_open_archive): Refuse to read archive from a tty.
105 * tests/Makefile.am (TESTSUITE_AT): Add iotty.at
106 (check_PROGRAMS): New program ttyemu
107 * tests/testsuite.at: Include iotty.at
108 * tests/iotty.at: New file.
109 * tests/ttyemu.c: New file.
111 2014-03-13 Paul Eggert <eggert@cs.ucla.edu>
113 tar: port to Solaris 9
115 Problem reported by Jesse C in:
116 http://lists.gnu.org/archive/html/bug-tar/2014-03/msg00034.html
117 * gnulib.modules: Add strtoimax and strtoumax, since tar invokes
118 these functions directly and they don't exist on Solaris 9.
120 2014-02-25 Sergey Poznyakoff <gray@gnu.org.ua>
122 Test the --[no-]recursive options (see commit 2bd9c153_.
124 * tests/recurs02.at: New test case.
125 * tests/Makefile.am: Add new file.
126 * tests/testsuite.at: Add new file.
128 2014-02-22 Sergey Poznyakoff <gray@gnu.org.ua>
130 Support exclusion patterns from various VCS ignore lists.
132 * src/Makefile.am (tar_SOURCES): Add exclist.c
133 * src/common.h (EXCL_DEFAULT, EXCL_RECURSIVE)
134 (EXCL_NON_RECURSIVE): New flags.
135 (excfile_add, info_attach_exclist)
136 (info_cleanup_exclist,info_free_exclist)
137 (exclude_vcs_ignores): New prototypes.
138 * src/create.c (dump_dir0): Call info_attach_exclist.
139 * src/exclist.c: New file.
140 * src/incremen.c (scan_directory): Call info_attach_exclist.
141 * src/names.c (excluded_name): Moved to exclist.c. Change
144 * src/tar.c: New options: --exclude-ignore,
145 --exclude-ignore-recursive
146 and --exclude-vcs-ignores.
147 (tar_stat_destroy): Free exclist.
148 * src/tar.h (tar_stat_info): New member exclude_list.
150 * NEWS: Document new exclusion options.
151 * doc/tar.texi: Likewise.
152 * doc/tar.1: Likewise.
154 2014-02-14 Sergey Poznyakoff <gray@gnu.org.ua>
158 * acls03.at: Fix improper invocation of setfacl.
160 2014-02-14 Pavel Raiskup <praiskup@redhat.com>
162 testsuite: add test for buggy default ACLs
164 * tests/Makefile.am: Mention acls03.at.
165 * tests/testsuite.at: Likewise.
166 * tests/acls03.at: New testcase.
168 2014-02-14 Pavel Raiskup <praiskup@redhat.com>
170 acls: bugfix for default ACLs extraction
172 When --acls option is on (regardless of tarball contents or
173 tarball format), we should explicitly set OR delete default ACLs
174 for extracted directories. Prior to this update, we always
175 created arbitrary default ACLs based standard file permissions.
177 * configure.ac (with_posix_acls): Check also for acl_free and
178 acl_delete_def_file to mark IEEE 1003.1e ACLs as supported.
179 * src/xattrs.c (acl_delete_def_file_at): New function.
180 (xattrs__acls_set): Do not treat acls_option at all; Delete
181 default ACLs if appropriate.
184 http://www.mail-archive.com/bug-tar@gnu.org/msg04355.html
185 Thanks: Juan J. MartÃnez and Mark Steinborn
187 2014-02-14 Pavel Raiskup <praiskup@redhat.com>
189 tar: imply --xattrs when --xattrs-{inc,exc}lude used
191 Options --xattrs-include=MASK and --xattrs-exclude=MASK now turn
192 on the --xattrs option.
194 Fix also bug in printing in xattrs.c - don't print when option is
197 * src/tar.c (set_xattr_option): New static function.
198 (parse_opt): Call new function when --xatrrs, --xattrs-include or
199 --xattrs-exclude option is used.
200 * src/xattrs.c (xattrs_print, xattrs_print_char): Expect positive
203 2014-02-14 Sergey Poznyakoff <gray@gnu.org.ua>
205 THANKS: Add Anthony G. Basile.
207 2014-02-14 Sergey Poznyakoff <gray@gnu.org.ua>
209 Use correct headers/libraries when providing xattr support
211 See https://savannah.gnu.org/patch/index.php?8252. Patch provided
212 by Anthony G. Basile.
214 * acinclude.m4 (TAR_HEADERS_ATTR_XATTR_H): Look for <sys/xattr.h>
215 first and then for <attr/xattr.h>. Link against libattr.so if
217 * lib/xattr-at.h: Include sys/xattr.h or attr/xattr.h, depending
218 on which one is detected.
219 * src/Makefile.am [TAR_LIB_ATTR] (tar_LDADD): Link against -lattr.
221 2014-02-14 Sergey Poznyakoff <gray@gnu.org.ua>
225 * src/tar.c (decode_options): Silently ignore --one-top-level
226 if used with a non-reading command.
228 2014-02-14 Sergey Poznyakoff <gray@gnu.org>
230 New option --sort=ORDER
232 This option makes tar sort the entries of directories that will be
233 added to an archive according to ORDER (none, name, or order).
235 Based on proposition by Dick Streefland
236 (https://savannah.gnu.org/patch/?7892).
238 * src/common.h (savedir_sort_order): New global.
239 * src/create.c: Pass savedir_sort_order to streamsavedir.
240 * src/misc.c: Likewise.
241 * src/tar.c: New option --sort.
244 * doc/tar.texi: Document the --sort option.
245 * doc/tar.1: Likewise.
247 2014-02-13 Sergey Poznyakoff <gray@gnu.org>
251 * tests/opcomp01.at: Update expected error messages.
252 * tests/opcomp03.at: Likewise.
254 2014-02-13 Sergey Poznyakoff <gray@gnu.org.ua>
256 Fix --one-top-level used together with --list.
258 * src/extract.c: Move one_top_level stuff to tar.c
260 * src/tar.c (option_conflict_error): New function.
261 (decode_options): Use option_conflict_error to complain about
262 conflicting options in a uniform manner.
263 Process one_top_level options here.
264 (request_stdin): Fix error message.
265 * tests/onetop04.at: New testcase: check --one-top-level with
267 * tests/Makefile.am: Add new testcase.
268 * tests/testsuite.at: Add new testcase.
270 2014-02-13 Sergey Poznyakoff <gray@gnu.org.ua>
274 * NEWS: Remove duplicate description of the --one-top-level
277 2014-02-12 Sergey Poznyakoff <gray@gnu.org.ua>
279 configure.ac: look for host-prefixed ar
281 See https://savannah.gnu.org/patch/?8183
283 2014-02-10 Sergey Poznyakoff <gray@gnu.org>
287 * src/suffix.c (find_compression_suffix): Fix eventual coredump.
289 2014-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
293 2014-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
297 * NEWS: Document --one-top-level
298 * THANKS: Mention Connor Behan
300 2014-01-30 Sergey Poznyakoff <gray@gnu.org.ua>
302 Update copyright years.
304 2014-01-28 Sergey Poznyakoff <gray@gnu.org.ua>
306 Improve one-top-level functionality
308 Make sure the changes become visible with
309 --show-transformed-names.
311 * src/common.h (strip_compression_suffix): New function.
312 (one_top_level): Rename to one_top_level_dir. All uses changed.
313 * src/extract.c (extr_init): Use strip_compression_suffix.
314 Bail out if unable to determine top-level directory.
315 (maybe_prepend_name): Remove. All uses removed.
316 * src/tar.c (options): --one-top-level takes optional argument.
317 (parse_opt): Handle it.
318 * src/list.c (enforce_one_top_level): New function.
319 (transform_stat_info): Call enforce_one_top_level if required.
320 * src/suffix.c (compression_suffixes): List "tar" (no
322 terminate with NULL entry.
323 (find_compression_suffix): New static.
324 (strip_compression_suffix): New function.
327 * doc/tar.texi: Update.
329 * tests/onetop01.at: New testcase.
330 * tests/onetop02.at: New testcase.
331 * tests/onetop03.at: New testcase.
332 * tests/Makefile.am: Add new testcases.
333 * tests/testsuite.at: Likewise.
335 2014-01-27 Connor Behan <connor.behan@gmail.com>
337 Detect tarbombs while extracting
339 * src/common.h (one_top_level_option): New global.
340 (one_top_level): New global.
341 * src/extract.c (extr_init): If one_top_level_option is set,
343 the name one_top_level that might have to be prepended.
344 (extract_archive): If one_top_level_option is set, prepend
346 to all names that don't already start with it.
347 * src/tar.c (ONE_TOP_LEVEL_OPTION): New contant.
348 (options): New option --one-top-level.
349 (parse_opt): Handle this option.
350 (decode_options): Make it conflict with --absolute-names.
352 2014-01-27 Sergey Poznyakoff <gray@gnu.org.ua>
354 Don't install rmt.8 if rmt is not built.
356 * doc/Makefile.am [PU_RMT_COND]: Define RMT_8
357 (dist_man_MANS): use RMT_8 instead of the hardcoded rmt.8
359 2014-01-27 Sergey Poznyakoff <gray@gnu.org.ua>
361 Provide tar(1) and rmt(8) manpages.
364 * doc/Makefile.am: Add manpages.
365 * doc/tar.1: New file.
367 * src/tar.c (tar_help_filter): Handle LZOP_OPTION.
369 2014-01-23 Sergey Poznyakoff <gray@gnu.org.ua>
371 Make sure transformed file names retain trailing slash in listing.
373 * src/list.c (simple_print_header): Print trailing slash
374 if using the transformed name.
375 Use had_trailing_slash instead of analyzing last byte if temp_name
377 2014-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
379 checkpoint actions: further improvements.
382 * doc/tar.texi: Update.
383 * src/buffer.c (print_stats): Avoid use of additional string
385 Allow for text to be NULL.
386 Call gettext if it is not.
387 (format_total_stats): Don't use gettext when calling print_stats.
388 * src/checkpoint.c (def_format): Change default format.
389 (format_checkpoint_string): Implement optional arguments for
391 (finish_checkpoint_actions): Rename to checkpoint_flush_actions,
392 make extern. All uses changed.
393 * src/common.h (checkpoint_flush_actions): New proto.
394 * src/tar.c (main): Set error_hook
396 2014-01-22 Sergey Poznyakoff <gray@gnu.org>
398 Improve checkpoint interface.
400 * src/buffer.c (format_total_stats): The format arg is const
402 (default_total_format): const
403 * src/checkpoint.c (tty, tty_cleanup): New static.
404 (format_checkpoint_string): New "canned" format %c
405 (checkpoint_finish): New function.
406 * src/common.h (checkpoint_finish): New proto.
407 * src/tar.c (main): Call checkpoint_finish.`
409 2014-01-21 Sergey Poznyakoff <gray@gnu.org.ua>
411 Implement statistics display in checkpoint actions.
414 * configure.ac: Version 1.27.90
415 * gnulib.modules: Add fprintftime.
416 * doc/tar.texi: Document the "totals" action and new format
418 for echo and ttyout checkpoint actions.
419 * src/buffer.c (compute_duration): Return computed value.
420 (print_stats): Don't print trailing newline. Return number of
422 (format_total_stats): New function.
423 (print_total_stats): Rewrite via format_total_stats.
424 * src/checkpoint.c (checkpoint_opcode) <cop_totals>: New opcode.
425 (checkpoint_compile_action): Handle cop_totals.
426 (expand_checkpoint_string): Remove.
427 (format_checkpoint_string): New function to be used instead of
428 expand_checkpoint_string. All callers updated.
429 * src/common.h (TF_READ,TF_WRITE)
430 (TF_DELETED): New constants.
431 (format_total_stats,print_total_stats): New protos.
433 2014-01-10 Sergey Poznyakoff <gray@gnu.org.ua>
435 Remove shar archives from distribution.
437 These are going to phase out in automake 2.0
439 2014-01-10 Sergey Poznyakoff <gray@gnu.org>
441 Fix the use of --no-recursion and --recursion options.
443 Each option remains in effect until cancelled by the next
445 of its counterpart, as stated in the documentation.
447 * src/names.c (name_next_elt): Restore recursion_option from the
448 value of matching_flags.
450 2014-01-09 Sergey Poznyakoff <gray@gnu.org.ua>
454 * src/compare.c (diff_dumpdir): Close descriptor if fstat failed.
455 (diff_multivol): Make sure the descriptor is closed and eventual
456 errors reported if lseek fails.
457 Both reported by Jiri Kukacka.
459 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
461 tar: work aruond IBM XL C bug
463 * src/incremen.c (show_snapshot_field_ranges)
464 (write_directory_file_entry): Use simpler array size expression,
465 one that evaluates to the same value. This works around
467 bug with IBM XL C. Problem reported by Yannick Bergeron in
468 <http://lists.gnu.org/archive/html/bug-tar/2014-01/msg00009.html>.
470 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
472 tar: update ancient configure cruft
474 * configure.ac: Use AC_PROG_CC_STDC, not just AC_PROG_CC.
475 Remove obsolete macros AC_ISC_POSIX, AC_HEADER_SYS_WAIT,
476 AC_HEADER_DIRENT, AC_HEADER_STAT, AC_HEADER_STDC, AC_TYPE_SIGNAL,
478 * lib/prepargs.c (IN_CTYPE_DOMAIN): Remove. All uses removed.
479 * src/list.c (from_header): Use isspace, not ISSPACE.
480 * src/system.c (pipe_handler, sys_exec_info_script):
481 * src/tar.c (sigstat):
482 Use void, not RETSIGTYPE.
484 2013-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
488 2013-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
490 Fix star compatibility (sparse headers)
492 * src/sparse.c (star_get_sparse_info): Update file->dumped_size
494 2013-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
496 Fix GNU long link header.
498 * src/create.c (write_gnu_long_link): Set timestamp to
499 0 for backward compatibility. Bug reported by David Barri.
502 2013-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
504 Fix unquoting of input file names.
506 * src/names.c (read_next_name): Unquote file names coming from the
507 -T argument. Bug reported by Nicolas Dudebout.
510 2013-10-24 Paul Eggert <eggert@cs.ucla.edu>
512 build: fix bug where 'configure --with-posix-acls' disables ACLs
514 Reported by Lars Wendler in
515 <http://lists.gnu.org/archive/html/bug-tar/2013-10/msg00022.html>.
516 * configure.ac (with_posix_acls): Fix typo.
518 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
520 Fix core dump on Solaris 10 when "." isn't readable.
522 Reported by Peter Kruse in
523 <http://lists.gnu.org/archive/html/bug-tar/2013-10/msg00017.html>.
524 This doesn't fix all the Solaris 10 test failures, just the
526 * src/common.h, src/misc.c (tar_getcdpath): Now static.
527 * src/misc.c (normalize_filename): Report a fatal error
528 if cdpath is null, since we don't know the absolute name
529 of the working directory in that case. FIXME: there should
530 be no need to know absolute file names.
531 (chdir_arg): Simplify wd allocation.
532 Don't assume that xgetcwd returns non-null.
534 2013-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
539 * configure.ac: Update.
541 2013-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
545 * src/names.c: Include argp.h
546 * tests/testsuite.at (AT_XATTRS_UTILS_PREREQ)
547 (AT_SELINUX_UTILS_PREREQ,AT_ACLS_UTILS_PREREQ)
548 (AT_CAPABILITIES_UTILS_PREREQ)
549 (AT_XATTRS_PREREQ,AT_SELINUX_PREREQ)
550 (AT_ACLS_PREREQ): Use POSIX-compatible syntax for
552 * tests/incr08.at: Fix find usage.
554 2013-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
556 Xfail the remfiles09b test.
558 * tests/remfiles09b.at: Turn into expected failure.
560 2013-10-05 Nathan Stratton Treadway <nathanst@ontko.com>
564 * scripts/tar-snapshot-edit: Mention --show-snapshot-field-ranges
567 2013-10-05 Pavel Raiskup <praiskup@redhat.com>
571 * configure.ac (RSH): Define as AC_ARG_VAR.
573 2013-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
575 Fix namespace contamination in testsuite.
577 * tests/append01.at: Use m4_pushdef/m4_popdef to define local
579 * tests/delete03.at: Likewise.
580 * tests/exclude06.at: Likewise.
581 * tests/incr04.at: Likewise.
582 * tests/link03.at: Likewise.
583 * tests/long01.at: Likewise.
584 * tests/longv7.at: Likewise.
585 * tests/lustar01.at: Likewise.
586 * tests/lustar02.at: Likewise.
587 * tests/lustar03.at: Likewise.
588 * tests/multiv05.at: Likewise.
589 * tests/sparse04.at: Likewise.
591 2013-10-05 Nathan Stratton Treadway <nathanst@ontko.com>
593 Provide comprehensive testcases for various file removal modes.
595 * tests/Makefile.am: Add new testcases.
596 * tests/testsuite.at: Likewise.
597 * tests/incr09.at: Add description.
598 * tests/remfiles04a.at: New file.
599 * tests/remfiles05.at: Rename to ...
600 * tests/remfiles04b.at: ... this.
601 * tests/remfiles04.at: Rename to ...
602 * tests/remfiles04c.at: ... this.
603 * tests/remfiles05a.at: New file.
604 * tests/remfiles05b.at: New file.
605 * tests/remfiles06.at: Rename to ...
606 * tests/remfiles05c.at: ... this.
607 * tests/remfiles06a.at: New file.
608 * tests/remfiles06b.at: New file.
609 * tests/remfiles06c.at: New file.
610 * tests/remfiles07a.at: New file.
611 * tests/remfiles07b.at: New file.
612 * tests/remfiles07c.at: New file.
613 * tests/remfiles08a.at: New file.
614 * tests/remfiles08b.at: New file.
615 * tests/remfiles08c.at: New file.
616 * tests/remfiles08.at: Rename to ...
617 * tests/remfiles09a.at: ... this.
618 * tests/remfiles09b.at: New file.
619 * tests/remfiles07.at: Rename to ...
620 * tests/remfiles09c.at: ... this.
622 2013-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
626 * src/misc.c: Fix comments, rename wd.cwd to wd.abspath (Nathan
629 * src/tar.c (options): Reword description of the --starting-file
631 --preserve-order options.
632 (decode_options): Both --starting-file and --preserve-order
634 only when used together with an archive reading command. (Pavel
637 2013-10-01 Sergey Poznyakoff <gray@gnu.org.ua>
639 Revamp tar_getcwd/normalize_filename stuff.
641 The changes are based on the discussion with Nathan.
643 * src/common.h (normalize_filename): Take two arguments. All
645 (tar_getcwd): Replaced with ..
646 (tar_getcdpath): New proto.
647 * src/misc.c (normalize_filename): Take two arguments.
648 (chdir_arg): Populate cwd along with creating the
650 (tar_getcwd): Removed.
651 (tar_getcdpath): New function.
653 * tests/incr09.at: New test case.
654 * tests/Makefile.am: Add new tests.
655 * tests/testsuite.at: Likewise.
657 2013-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
661 * tests/remfiles08.at: Restore missing find
663 2013-09-26 Sergey Poznyakoff <gray@gnu.org.ua>
665 Use relative addressing in deferred unlinks.
667 * src/common.h (tar_dirname): New function.
668 * src/misc.c (normalize_filename_x): Make extern.
669 (tar_dirname): New function.
670 (tar_getcwd): Take into account absoulte pathnames.
671 * src/unlink.c (deferred_unlink) <dir_idx>: New member; keeps the
672 value of chdir_current at the moment of structure allocation.
673 (flush_deferred_unlinks): Use chdir_do and relative addressing.
674 (queue_deferred_unlink): Initialize dir_idx.
675 * tests/Makefile.am: Add new tests.
676 * tests/testsuite.at: Add new tests.
677 * tests/remfiles06.at: Fix description.
678 * tests/remfiles07.at: Fix description.
679 * tests/remfiles08.at: New test case.
681 2013-09-25 Nathan Stratton Treadway <nathanst@ontko.com>
683 Improve tar-snapshot-edit
685 Support architecture-specific field ranges for the "-c" function.
686 Better handle negative or larger-than-32-bit field values even
687 when running in 32-bit Perl (for the default "print a summary"
690 2013-09-25 Sergey Poznyakoff <gray@gnu.org.ua>
694 * src/common.h (tar_getcwd): Return pointer is const.
695 * src/misc.c (wd) <cwd>: New member.
696 (chdir_arg): Initialize cwd.
697 (tar_getcwd): Use cwd member to cache the result. Take into
698 account absolute pathnames,
699 (normalize_filename): Don't free the value
700 returned from tar_getcwd.
701 * src/names.c (name_next_elt): Remove leftover call chdir().
702 * tests/Makefile.am: Add new tests.
703 * tests/testsuite.at: Likewise.
705 * tests/incr08.at: New testcase.
706 * tests/remfiles04.at: New testcase.
707 * tests/remfiles05.at: New testcase.
708 * tests/remfiles06.at: New testcase.
709 * tests/remfiles07.at: New testcase.
711 2013-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
713 Fix normalize_filename.
715 The function did not take into account eventual -C options, which
716 in particular led to various problems when using -C and
720 * src/common.h (namebuf_add_dir,namebuf_finish)
721 (tar_getcwd): New prototypes.
722 * src/misc.c (namebuf_add_dir,namebuf_finish)
723 (tar_getcwd): New functions.
724 (normalize_filename): Use tar_getcwd.
726 2013-09-23 Sergey Poznyakoff <gray@gnu.org.ua>
728 Changes for compatibility with Slackware installation scripts.
730 * src/buffer.c (short_read): the "Record size" message
731 is controlled by the WARN_RECORD_SIZE warning_option bit.
732 * src/common.h (keep_directory_symlink_option): New global.
733 (WARN_RECORD_SIZE): New constant.
734 (WARN_VERBOSE_WARNINGS): Add WARN_RECORD_SIZE.
735 * src/extract.c (extract_dir): If keep_directory_symlink_option is
736 set, follow symlinks to directories.
737 * src/suffix.c (compression_suffixes): Add support for txz
739 * src/tar.c (KEEP_DIRECTORY_SYMLINK_OPTION): New constant.
740 (options): New option --keep-directory-symlink.
741 (parse_opt): Handle this option.
742 * src/warning.c: Implement "record-size" warning control.
745 * doc/tar.texi: Document new features.
747 2013-09-21 Sergey Poznyakoff <gray@gnu.org.ua>
749 Fix error message (complements 0ea6e686)
751 * src/tar.c (set_subcommand_option): Mention --delete in the
754 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
756 Improve the incr07 test
758 2013-09-15 Nathan Stratton Treadway <nathanst@ontko.com>
760 Implement the --show-snapshot-field-ranges option
762 * src/common.h (show_snapshot_field_ranges): New prototype.
763 * src/incremen.c (show_snapshot_field_ranges): New function.
764 * src/tar.c: New option --show-snapshot-field-ranges.
765 * doc/snapshot.texi: Document the --show-snapshot-field-ranges
767 * doc/tar.texi: Likewise.
769 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
771 Take into account chdir_fd when extracting from incremental dumps.
773 * src/common.h (tar_savedir): New prototype.
774 * src/misc.c (tar_savedir): New function.
775 (remove_any_file): Use tar_savedir.
776 * src/incremen.c (try_purge_directory): Use tar_savedir.
777 * src/update.c (update_archive): Use tar_savedir.
778 * tests/incr07.at: New testcase.
779 * tests/Makefile.am (TESTSUITE_AT): Add new test.
780 * tests/testsuite.at: Likewise.
783 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
787 * src/tar.c (main): Mention --delete in the error message.
790 2013-09-13 Paul Eggert <eggert@cs.ucla.edu>
792 * src/names.c (file_list_name): Properly prototype.
794 2013-09-13 Paul Eggert <eggert@cs.ucla.edu>
796 tar: don't warn about zero timestamps
798 * src/extract.c (check_time): Suppress warniing when t.tv_sec
800 Problem reported by Denis Excoffier.
802 2013-08-19 Pavel Raiskup <praiskup@redhat.com>
804 Minor fix in the testsuite.
806 * tests/T-cd.at: sort the 'tar cf' output.
808 2013-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
810 Improve error diagnostics
812 * src/names.c (file_list_name): New static function.
813 (add_file_id): If a filelist is being read twice, print the names
814 of the files that caused it.
815 * tests/T-rec.at: New test case.
816 * tests/Makefile.am: Add new file.
817 * tests/testsuite.at: Include new file.
819 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
821 Revamp initial name collection functions to ensure proper
824 * src/names.c (NELT_NOOP): New constant
825 (name_elt) <next,prev>: New members.
826 (name_array,allocated_entries,entries,scanned): Remove.
827 (check_name_alloc): Remove function.
828 (name_elt_alloc): New static.
829 (name_list_adjust,name_list_advance): New functions.
830 (name_add_name,name_add_dir)
831 (name_add_file): Use new allocation functions.
832 (read_next_name): Advance list head pointer as necessary
834 (name_next_elt): Read elements from list.
835 * tests/T-cd.at: New file.
836 * tests/T-mult.at: New file.
837 * tests/T-nest.at: New file.
838 * tests/Makefile.am: Add new testcases.
839 * tests/testsuite.at: Likewise.
841 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
843 Don't treat attempts to read an already read file list as
846 * src/names.c (add_file_id): Report error and return 1 if the file
847 has already been read.
848 (read_next_name): Don't try to open file if add_file_id returns 1.
849 (name_next_elt): Simplify conditional.
851 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
855 * src/names.c (name_next_elt): Simplify conditional.
857 2013-08-15 Pavel Raiskup <praiskup@redhat.com>
859 Fix use of uninitialized memory
861 * src/names.c (name_add_file): Initialize the ep->v.file.fp
863 after structure allocation.
865 2013-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
869 * src/names.c (handle_option): Use program_invocation_short_name
870 instead of the constant string.
871 (read_next_name): Remove unused variable.
873 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
877 * doc/tar.texi: Parsing of the options found in the file list
878 follows the same rules as for command line. Remove the obsolete
879 description. This complements 26538c9b.
881 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
883 Fix interacton of --verbose and --append.
885 * src/buffer.c (_open_archive): don't overwrite existing archive
886 if given the --verify option.
887 * tests/append04.at: New file.
888 * tests/Makefile.am: Add new testcase.
889 * tests/testsuite.at: Add new testcase.
892 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
896 * src/names.c (read_name_from_file): Fix a typo. Remove
899 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
901 Reduce memory consuption when handling the -T option.
903 The commit cdb27293 made the -T option more flexible, but
904 incurred a very considerable memory overhead by storing
905 all file names in the argument array. In case of very
906 big file lists this caused tar to run out of memory. This
907 was reported by Christian Wetzel <wetzel@phoenix-pacs.de>
909 (http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00018.html).
911 On the other hand, Michal Žeidl discovered that tar misfunctioned
912 when given empty file lists or lists with the trailing newline
913 misssing in the last entry. This was reported by Pavel Raiskup
915 (http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html
919 This change fixes both issues.
921 * src/common.h (name_add_file,request_stdin): New prototype.
922 (more_options): New prototype.
923 * src/names.c (NELT_FILE): New entry type.
924 (name_elt) <file>: New union member.
925 (name_add_file): New function.
926 (read_name_from_file): New function, a rewrite of
927 the same function from tar.c
928 (read_next_name,copy_name): New static functions.
929 (name_next_elt): Handle NELT_FILE entries.
930 * src/tar.c (request_stdin): Make extern.
931 (read_name_from_file,add_file_id)
932 (update_argv): Removed.
933 (parse_opt): Change handling of the -T option.
934 (more_options): New function.
936 * tests/T-null.at: Rewrite test.
937 * tests/T-zfile.at: New file.
938 * tests/T-nonl.at: New file.
939 * tests/Makefile.am: Add new testcases.
940 * tests/testsuite.at: Likewise.
944 2013-06-29 Sergey Poznyakoff <gray@gnu.org.ua>
946 Fix the compatibility check for the --occurrence option.
948 * src/tar.c (SUBCL_OCCUR): New class.
949 (subcommand_class): Update.
950 (decode_options): Accept the --occurrence option
951 with any subcommand from the SUBCL_OCCUR class.
953 2013-06-29 Pavel Raiskup <praiskup@redhat.com>
955 testsuite: do not resist on file order in archive
957 On my Fedora 19 box, the exclude08 & exclude11 tests failed before
958 this fix. The reason was that the directory traversing chosen the
959 file order differently than the testsuite expected.
961 * tests/exclude08.at: Sort the tarball content output.
962 * tests/exclude09.at: Likewise.
963 * tests/exclude10.at: Likewise.
964 * tests/exclude11.at: Likewise.
965 * tests/exclude12.at: Likewise.
966 * tests/exclude13.at: Likewise.
967 * tests/exclude14.at: Likewise.
968 * tests/exclude15.at: Likewise.
969 * tests/exclude16.at: Likewise.
971 2013-06-29 Sergey Poznyakoff <gray@gnu.org.ua>
973 Improve checks for incompatible options.
975 * src/common.h (READ_LIKE_SUBCOMMAND): Remove define.
976 * src/tar.c (IS_SUBCOMMAND_CLASS): New macro.
977 (decode_options): Use IS_SUBCOMMAND_CLASS in checking
978 option compatibility.
979 Accept the --verify option only with subcommands that
980 write to the archive.
982 * tests/opcomp01.at: New test case.
983 * tests/opcomp02.at: New test case.
984 * tests/opcomp03.at: New test case.
985 * tests/opcomp04.at: New test case.
986 * tests/opcomp05.at: New test case.
987 * tests/opcomp06.at: New test case.
988 * tests/Makefile.am: Add new testcases.
989 * tests/testsuite.at: Likewise.
991 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
993 tar: port to Mingw Shell
995 * src/extract.c (extract_symlink) [!HAVE_SYMLINK]:
996 Fix typo by replacing WARN_SYMBOLIC_CAST with WARN_SYMLINK_CAST.
997 Problem reported by kaka in
998 <http://lists.gnu.org/archive/html/bug-tar/2013-06/msg00008.html>.
1000 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
1002 maint: revert previous change
1004 It wasn't actually needed. Reported by Stefano Lattarini in
1005 <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00041.html>.
1006 * configure.ac (AM_GNU_GETTEXT_VERSION): Decrease from 0.18.2
1009 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
1011 maint: port to bleeding-edge Automake by assuming Gettext 0.18.2
1013 Reported by Stefano Lattarini in
1014 <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00009.html>.
1015 * configure.ac (AM_GNU_GETTEXT_VERSION): Increase from 0.16
1017 README-alpha says that we do not make any efforts to accommodate
1018 older versions of Gettext.
1020 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
1022 tar: port to --without-xattrs --enable-gcc-warnings
1024 Reported by Pavel Raiskup in
1025 <http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00029.html>.
1026 * src/xattrs.c (xattrs__fd_set) [!HAVE_XATTRS]: Omit.
1028 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
1030 doc: port to texinfo 5
1032 * doc/tar.texi (Reports, assumptions, Mixing):
1033 Put FIXMEs at line start.
1035 2013-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1037 Continue extracting from a separate volume after skipping a
1040 Reported by Göran Udeborg on 2013-03-09.
1042 * src/extract.c (extract_skip): New function.
1043 (prepare_to_extract): Set extractor to extract_skip if starting
1044 at a partial member.
1046 2013-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1048 Fix interaction of various --exclude-tag options with
1049 --listed-incremental.
1051 * src/incremen.c (procdir): Set directory->tagfile in
1052 the exclusion_tag_contents case.
1053 (makedumpdir): Mark all entries as ignored if directory->tagfile
1055 Free new_dump before returning.
1056 (maketagdumpdir): New function.
1057 (scan_directory): If directory->children is set to
1058 NO_CHILDREN and directory->tagfile is set, create a
1059 dumpdir consisting of the tagfile only.
1061 * tests/exclude08.at: New testcase.
1062 * tests/exclude09.at: New testcase.
1063 * tests/exclude10.at: New testcase.
1064 * tests/exclude11.at: New testcase.
1065 * tests/exclude12.at: New testcase.
1066 * tests/exclude13.at: New testcase.
1067 * tests/exclude14.at: New testcase.
1068 * tests/exclude15.at: New testcase.
1069 * tests/exclude16.at: New testcase.
1070 * tests/Makefile.am: Add new tests.
1071 * tests/testsuite.at: Include new tests.
1072 * tests/atlocal.in (mkexcltest): New function.
1073 * tests/chtype.at: Update keywords.
1074 * tests/filerem01.at: Likewise.
1075 * tests/filerem02.at: Likewise.
1076 * tests/incremental.at: Likewise.
1077 * tests/multiv04.at: Likewise.
1079 2013-02-20 Paul Eggert <eggert@cs.ucla.edu>
1083 * lib/wordsplit.c (_wsplit_error): Mark with printf attribute.
1084 (expvar): "Use" defstr to pacify GCC.
1085 * src/system.c (xexec): Now _Noreturn, to pacify GCC.
1086 (run_decompress_program): Add cast to pacify GCC.
1087 (sys_exec_command, sys_exec_info_script,
1088 sys_exec_checkpoint_script):
1089 Remove unused variables.
1091 2013-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
1093 Pass command line arguments to external commands.
1095 Any option taking a command name as its argument accepts
1096 additional arguments as well.
1098 * lib/wordsplit.c: New file.
1099 * lib/wordsplit.h: New file.
1100 * lib/Makefile.am: Add new files.
1101 * src/system.c (xexec): New function.
1102 (run_decompress_program): Use wordsplit.
1103 (sys_child_open_for_compress,sys_exec_command)
1104 (sys_exec_info_script)
1105 (sys_exec_checkpoint_script): Use xexec to invoke external
1109 * doc/tar.texi: Update.
1111 2013-01-29 Nathan Stratton Treadway <nathanst@ontko.com>
1113 tar: improve compile-time diagnostics
1115 * src/misc.c (sysinttostr, strtosysint): Improve #error wording.
1117 2013-01-27 Paul Eggert <eggert@cs.ucla.edu>
1119 tar: improve quality of diagnostics with incrementals
1121 Inspired by a prototype by Nathan Stratton Treadway in
1122 <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00000.html>.
1123 * src/incremen.c (read_num): Rewrite by merging read_negative_num
1124 and read_unsigned_num. Use strtosysint rather than rolling this
1125 stuff ourselves. Change return type to bool. All uses changed.
1126 (read_negative_num, read_unsigned_num): Remove.
1127 (read_num, read_timespec, read_incr_db_2): Improve quality of
1128 diagnostics, e.g., by supplying byte offset of error.
1130 2013-01-26 Paul Eggert <eggert@cs.ucla.edu>
1132 tar: fix bug with sparse files with effective size of 8 GiB
1135 Reported by Pavel Raiskup in
1136 <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html>.
1137 * NEWS: Document the fix.
1138 * src/sparse.c (pax_start_header): New function.
1139 (pax_dump_header_0, pax_dump_header_1): Use it.
1141 2012-12-31 Paul Eggert <eggert@cs.ucla.edu>
1143 maint: update copyrights for 2013 and as per current GNU standards
1145 2012-12-31 Paul Eggert <eggert@cs.ucla.edu>
1147 maint: remove unnecessary file
1149 * src/configure.in: Remove. This file has been obsolete for
1152 2012-12-24 Paul Eggert <eggert@cs.ucla.edu>
1154 maint: don't enable warnings by default unless GCC 4.6 or later
1156 * configure.ac (gl_GCC_VERSION_IFELSE): New macro, from coreutils.
1157 (gl_gcc_warnings): By default, disable warnings for GCC versions
1158 before 4.6. This works around a failure when building from git on
1159 Ubuntu 10, reported privately by Nathan Stratton Treadway.
1161 2012-12-23 Paul Eggert <eggert@cs.ucla.edu>
1163 Handle incremental format 2 with negative numbers, too.
1165 * src/incremen.c (read_unsigned_num): Last arg is intmax_t *, not
1166 uintmax_t, for consistency with other readers. All callers
1168 Avoid signed integer overflow.
1171 2012-12-23 Paul Eggert <eggert@cs.ucla.edu>
1173 Fix some problems with negative and out-of-range integers.
1175 Original problem reported for HP-UX LVM v2.2 by Michael White in
1176 <http://lists.gnu.org/archive/html/bug-tar/2012-10/msg00000.html>.
1177 This patch fixes some other gotchas that I noticed.
1178 * gnulib.modules: Add extern-inline.
1179 * src/common.h: Use _GL_INLINE_HEADER_BEGIN,
1180 _GL_INLINE_HEADER_END.
1181 (COMMON_INLINE, max, min): New macros.
1182 (represent_uintmax, valid_timespec): New inline functions.
1183 (SYSINT_BUFSIZE): New constant.
1184 (sysinttostr, strtosysint, decode_timespec): New decls.
1185 * src/create.c (start_private_header): Silently bring the time_t
1186 value into range; it is now the caller's responsibility to deal
1187 with any overflow error. Use uid 0 and gid 0 rather than the
1188 user's uid/gid, since the faked header isn't "owned" by the user
1189 and the uid/gid could in theory be out of range. Leave major and
1192 (write_gnu_long_link): Let start_private_header zero things out.
1193 * src/create.c (write_gnu_long_link, write_extended):
1194 * src/xheader.c (xheader_write_global):
1195 Use start_time, not current time; no point hammering on the clock.
1196 * src/compare.c (diff_multivol): Check that offset, size are
1198 * src/incremen.c (read_incr_db_01, write_directory_file_entry):
1199 Allow negative time_t, dev_t, and ino_t.
1200 * src/list.c (max): Remove (moved to common.h).
1201 (read_header): Check that size is in range.
1202 (from_header): Return intmax_t, not uintmax_t, to allow negative.
1203 All callers changed. At compile time, check assumptions about
1204 intmax_t and uintmax_t. Use bool for booleans. Avoid overflow
1205 hassles on picky hosts.
1206 (mode_from_header): Last arg is now bool *, not unsigned *.
1207 All callers changed.
1208 (simple_print_header): Do not assume UID, GID fit in 'long'.
1209 * src/list.c (from_header):
1210 * src/xheader.c (out_of_range_header):
1211 Arg is now a plain minimum value, not minus minval converted to
1212 uintmax_t. All callers changed.
1213 * src/misc.c (COMMON_INLINE): New macro.
1214 (sysinttostr, strtosysint, decode_timespec): New functions.
1215 * src/sparse.c (oldgnu_add_sparse, oldgnu_fixup_header)
1216 (star_fixup_header):
1217 Check for offset overflow.
1218 (decode_num): Clear errno before calling strtoumax.
1219 * src/tar.c (expand_pax_option): Don't discard nanoseconds.
1220 * src/xheader.c (assign_time_option): Allow negative time_t.
1221 (decode_record): Simplify, since out-of-range string is guaranteed
1222 to produce a value exceeding len_max.
1223 (xheader_read): Last arg is off_t, not size_t.
1224 Caller should diagnose negative arg, as needed.
1225 Check that it's in range.
1226 (enum decode_time_status): Remove.
1227 (_decode_time): Remove, folding into decode_time.
1228 (decode_time): Return bool, not enum decode_time_status.
1229 Rely on decode_timespec to do most of the work.
1230 (code_signed_num): New function.
1232 (decode_signed_num): New function.
1233 (decode_num): Use it.
1234 (gid_coder, gid_decoder, uid_coder, uid_decoder,
1236 (sparse_map_decoder): Code and decode negative values.
1237 (sparse_map_decoder): Improve check for out-of-range values.
1238 * tests/time01.at: New file.
1239 * tests/Makefile.am (TESTSUITE_AT): Add it.
1240 * tests/testsuite.at: Include it.
1242 2012-12-22 Paul Eggert <eggert@cs.ucla.edu>
1244 Port use of mkdirat etc. to Solaris 10.
1246 * gnulib.modules (fchmodat, fchownat, fstatat, mkdirat, unlinkat):
1247 Add. These were split out in gnulib, so we now need to request
1248 them separately. mkdirat, for example, is not in Solaris 10.
1250 2012-12-22 Paul Eggert <eggert@cs.ucla.edu>
1252 Port ACL configuration to Solaris 10.
1254 * configure.ac (with_posix_acls): Fix misspellings.
1255 Stop checking at the first failure, to speed up 'configure'.
1257 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
1259 tar: remove unused externs, or make them static
1261 * src/buffer.c (record_buffer_aligned, flush_write_ptr,
1264 * src/list.c (recent_global_header):
1265 * src/unlink.c (deferred_unlink_delay):
1266 * src/transform.c (transform_flags):
1267 * src/xattrs.c (acl_get_file_at, acl_set_file_at,
1270 * src/common.h (rmt_command_option): Remove; unused.
1271 * src/tar.c (check_links_option, allocated_archive_names):
1272 Move decls here from common.h; these are now static.
1274 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
1276 * .gitignore: Regenerate.
1278 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
1280 build: new configure option --enable-gcc-warnings
1282 This has a similar meaning as in other GNU applications
1283 such as coreutils and Emacs.
1284 * NEWS: Document it.
1285 * .gitignore: Remove redundant build-aux.
1286 Remove gnu, since gnu/Makefile.am is now in git.
1287 Add gnu/.gitignore, gnu/charset.alias, gnu/*.h, gnu/*/ to cover
1288 autogenerated files.
1289 * bootstrap.conf (gnulib_mk): Remove.
1290 * configure.ac: Add support for --enable-gcc-warnings,
1291 taken from coreutils and simplified.
1292 * gnu/Makefile.am: New file. Formerly this was autogenerated,
1293 but the autogenerated file has been renamed to gnulib.mk,
1294 its usual name when bootstrapping from gnulib.
1295 This way, AM_CFLAGS can incorporate warning options.
1296 * gnulib.modules: Add manywarnings.
1297 * lib/Makefile.am, src/Makefile.am (AM_CFLAGS): New macro,
1298 incorporating warning options.
1299 * lib/attr-xattr.in.h (ENOATTR): New macro, if not already
1301 * src/buffer.c (magic): Don't rely on incomplete initializers.
1302 * src/common.h (report_difference): Add printf format attribute.
1303 * src/system.c (sys_exec_command, sys_exec_info_script)
1304 (sys_exec_checkpoint_script):
1305 * src/tar.c (update_argv):
1306 Add casts to char * to pacify GCC warnings about using string
1307 literals in a char * context.
1308 * src/xattrs.c, src/xattrs.h (xattrs_clear_setup):
1309 Declare parameters as (void), not ().
1310 * src/xheader.c (xheader_format_name): Initialize pptr to null,
1311 to pacify GCC. Remove unnecessary test of nptr versus null.
1313 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
1315 tar: don't truncate diagnostic
1317 * src/list.c (from_header): Fix buffer size calculation when
1318 generating a diagnostic.
1320 2012-12-03 Sergey Poznyakoff <gray@gnu.org.ua>
1324 * tests/Makefile.am: Fix double AM_CPPFLAGS
1326 2012-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
1328 Use AM_CPPFLAGS instead of INCLUDES.
1330 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
1334 * NEWS: Mention the support for POSIX ACLs, extended
1335 attributes and SELinux context.
1336 * THANKS: List James Antill and Pavel Raiskup.
1338 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
1342 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
1344 Allow to store/extract '=' character in xattr keyword
1346 * src/xheader.c (xattr_decode_keyword)
1347 (xattr_encode_keyword): New functions.
1348 (xheader_print_n,xattr_decoder): Use them.
1349 * tests/xattr05.at: New test case.
1350 * tests/Makefile.am: Add new test case.
1351 * tests/testsuite.at: Likewise.
1353 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
1357 * configure.ac: Avoid linking against -lacl when
1358 --without-posix-acls is given.
1359 * tests/selacl01.at: Call restorecon
1360 * tests/selnx01.at: Likewise.
1361 * tests/testsuite.at (AT_SELINUX_UTILS_PREREQ): Likewise.
1362 (AT_SELINUX_PREREQ,AT_ACLS_PREREQ): Use the right _PREREQ macros.
1364 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
1368 * bootstrap (gnulib_extra_files): Remove $build_aux/missing
1370 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
1374 * src/xattrs.c: Don't mix variable declarations and statements.
1375 Use proper data types. Remove improper use of const qualifiers.
1376 Use x2nrealloc to reallocate memory buffers.
1378 2012-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
1382 * src/xattrs.c: Fix indentation. Fix copyleft statement, promote
1384 * src/xattrs.h: Likewise
1386 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
1388 Add SELinux context store/restore/list support.
1390 * gnulib.modules: Add selinux-at.
1391 * src/Makefile.am (tar_LDADD): Add LIB_SELINUX.
1393 * src/create.c (start_header, dump_file0): Handle selinux
1395 * src/extract.c (delayed_set_stat) <cntx_name>: New member.
1396 (delayed_link) <cntx_name>: New member.
1397 (set_stat, delay_set_stat)
1398 (apply_nonancestor_delayed_set_stat): Handle selinux contexts.
1399 * src/tar.c: New options: "--selinux", "--no-selinux".
1400 (tar_stat_destroy): Free cntx_name.
1401 * src/tar.h (tar_stat_info) <cntx_name>: New member.
1402 * src/xattrs.c (xattrs_selinux_get)
1403 (xattrs_selinux_set): New functions.
1404 (xattrs_print_char): Honor selinux_context_option.
1405 (xattrs_print): Print selinux context.
1406 * src/xheader.c: Handle new keyword "RHT.security.selinux".
1407 * tests/Makefile.am: Add new tests.
1408 * tests/testsuite.at: Likewise.
1409 * tests/selacl01.at: New test.
1410 * tests/selnx01.at: New test.
1412 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
1414 Support for POSIX ACLs
1416 * configure.ac: Check whether ACLs are available on the
1418 * gnulib.modules: Add acl
1419 * src/create.c (start_header): Store ACLs when creating
1421 (dump_file0): Handle ACLs.
1422 * src/extract.c (delayed_set_stat) <acls_a_ptr, acls_a_len>
1423 <acls_d_ptr, acls_d_len>: New members.
1424 (delayed_link): Likewise.
1425 (set_stat,delay_set_stat)
1426 (apply_nonancestor_delayed_set_stat): Set ACLs.
1427 * src/tar.c: New options: "--acls", "--no-acls"
1428 (tar_stat_destroy): Free acls_a_ptr and acls_d_ptr fields.
1429 * src/tar.h (tar_stat_info) <acls_a_ptr, acls_a_len>
1430 <acls_d_ptr, acls_d_len>: New members.
1431 * src/xattrs.c (xattrs_acls_get, xattrs_acls_set): New functions.
1432 * src/xheader.c: Support new keywors: "SCHILY.acl.access" and
1433 "SCHILY.acl.default".
1434 * tests/Makefile.am: Add new tests.
1435 * tests/testsuite.at: Likewise.
1436 * tests/acls01.at: New test.
1437 * tests/acls02.at: New test.
1439 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
1441 Add basic suuport for extended attributes.
1443 * src/Makefile.am: Add xattrs.[ch]
1444 * src/xattrs.c: New file.
1445 * src/xattrs.h: New file.
1446 * src/common.h (READ_LIKE_SUBCOMMAND): New define.
1447 (selinux_context_option, acls_option, xattrs_option): New globals.
1448 (xheader_xattr_init, xheader_xattr_free)
1449 (xheader_xattr_copy, xheader_xattr_add): New protos.
1450 (WARN_XATTR_WRITE): New mask.
1451 * src/create.c (start_header): Handle xattrs pairs if in POSIX
1453 (dump_file0): Handle extended attributes.
1454 * src/extract.c (delayed_set_stat,delayed_link) <xattr_map_size>
1455 <xattr_map>: New members.
1456 (set_xattr): New static function.
1457 (open_output_file): Accept an additional argument indicating
1458 whether the file has already been created.
1459 (set_stat,delay_set_stat)
1460 (apply_nonancestor_delayed_set_stat)
1461 (extract_file): Handle extended attributes.
1462 * src/list.c (decode_header, simple_print_header): Display
1463 extended attributes.
1464 * src/tar.c: New options --xattrs, --no-xattrs, --xattrs-include,
1466 (tar_stat_destroy): Free the xattr_map storage.
1467 * src/tar.h (xattr_array): New struct.
1468 (tar_stat_info) <xattr_map_size, xattr_map>: New members.
1469 * src/warning.c: New warning control keyword "xattr-write".
1470 * src/xheader.c (xheader_xattr_init)
1471 (xheader_xattr_free, xheader_xattr_add)
1472 (xheader_xattr_copy): New functions.
1473 (struct xhdr_tab) <prefix>: New member.
1474 (locate_handler): Permit selecting the keyword based on its
1476 (xheader_protected_pattern_p)
1477 (xheader_protected_keyword_p): Likewise.
1478 (xattr_coder, xattr_decoder): New functions.
1479 (xhdr_tab): Reflect the changes to struct xhdr_tab.
1480 New keyword "SCHILY.xattr".
1481 * tests/Makefile.am: Add new tests.
1482 * tests/testsuite.at: Likewise.
1483 (AT_CHECK_UTIL, AT_XATTRS_UTILS_PREREQ)
1484 (AT_CAPABILITIES_UTILS_PREREQ, AT_XATTRS_PREREQ): New defuns.
1485 * tests/xattr01.at: New test.
1486 * tests/xattr02.at: New test.
1487 * tests/xattr03.at: New test.
1488 * tests/xattr04.at: New test.
1489 * tests/capabs_raw01.at: New test.
1491 2012-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
1493 Prepare for implementing extended attribute support.
1495 This patch adds *xattr() stubs in case extended attribute
1497 not present and implements the *attrat() family of functions.
1499 on the patch by Pavel Raiskup <pavel@raiskup.cz> for gnulib.
1501 * acinclude.m4 (TAR_HEADERS_ATTR_XATTR_H): New defun.
1502 * configure.ac: Call TAR_HEADERS_ATTR_XATTR_H
1503 * lib/Makefile.am: Add xattr-at.[ch], distribute attr-xattr.in.h
1504 [!TAR_COND_XATTR_H]: Build attr/xattr.h
1505 * lib/attr-xattr.in.h: New file.
1506 * lib/xattr-at.c: New file.
1507 * lib/xattr-at.h: New file.
1509 2012-11-14 Sergey Poznyakoff <gray@gnu.org.ua>
1511 Fix creation of incremental archives when a subdirectory becomes
1514 When used with --listed-incrfental and --one-file-system, tar
1515 was unable to cope with directories that had once been part of the
1516 dumped system and became separate mount points afterwards.
1518 has been reported and a fix proposed by Nathan Stratton Treadway.
1520 * src/incremen.c (procdir): If one_file_system_option is in
1522 clear out dumpdir info from the directory.
1523 * tests/Makefile.am: Add new testcase.
1524 * tests/listed05.at: New testcase.
1525 * tests/testsuite.at (AT_PRIVILEGED_PREREQ): New macro.
1526 include listed05.at.
1529 2012-07-27 Jim Meyering <jim@meyering.net>
1531 maint: try to avoid unwanted chatter in ChangeLog
1533 * bootstrap.conf: Do not alter ChangeLog if it already exists.
1535 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
1537 doc: improve discussion of compressed archives
1539 * doc/tar.texi (gzip): Don't claim that -I 'gzip --best' works.
1540 Problem reported by Davide Brini in
1541 <http://lists.gnu.org/archive/html/bug-tar/2012-07/msg00025.html>.
1542 Also, improve some of the surrounding text.
1544 This file is a placeholder. It will be replaced with the actual
1546 by make dist. Run make ChangeLog if you wish to create it
1549 2012-06-27 Paul Eggert <eggert@cs.ucla.edu>
1551 tests: fix permissions-assumption bug in test
1553 * tests/owner.at: Don't assume umask is 022.
1554 Reported by Pavel Raiskup in
1555 <http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00015.html>.
1557 2012-06-27 Paul Eggert <eggert@cs.ucla.edu>
1559 tar: don't assume root is uid 0
1561 This is not true for Tandem NonStop Kernel. See Joachim Schmitz's
1562 comment in <http://bugs.gnu.org/10305#111>.
1563 * gnulib.modules: Add root-uid.
1564 * src/extract.c: Include <root-uid.h>.
1565 (extr_init): Don't assume root is uid 0.
1567 2012-04-25 Paul Eggert <eggert@cs.ucla.edu>
1569 * src/compare.c (diff_dumpdir): Omit useless 'stat'.
1571 2012-04-25 Paul Eggert <eggert@cs.ucla.edu>
1573 * doc/tar.texi (Option Summary): Fix xref typo.
1575 Reported by Nathan Stratton Treadway in
1576 <http://lists.gnu.org/archive/html/bug-tar/2012-04/msg00035.html>.
1578 This file is a placeholder. It will be replaced with the actual
1580 by make dist. Run make ChangeLog if you wish to create it
1583 2012-03-29 Sergey Poznyakoff <gray@gnu.org.ua>
1585 Fix unrecognized option.
1587 * src/tar.c (parse_opt): Handle OLD_ARCHIVE_OPTION.
1589 2012-03-11 Paul Eggert <eggert@cs.ucla.edu>
1593 This lint was found by GCC 4.6.2 on Fedora 15 x86-64.
1594 * src/buffer.c (buffer_write_global_xheader, mv_end,
1596 (compute_duration, print_total_stats, flush_read, flush_write):
1597 * src/checkpoint.c (checkpoint_finish_compile):
1598 * src/list.c (test_archive_label):
1599 * src/misc.c (chdir_count):
1600 * src/names.c (const):
1601 * src/unlink.c (finish_deferred_unlinks):
1602 Define with (void) instead of with (), for slightly-better C type
1603 checking and to avoid a GCC warning.
1604 * src/compare.c (diff_dumpdir):
1605 * src/tar.c (parse_owner_group): Remove unused local.
1606 * src/misc.c (chdir_do):
1607 * src/tar.c (add_exclude_array): Rename local to avoid shadowing.
1608 (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
1609 Define only if needed.
1610 * src/update.c (update_archive): Initialize a local; this fixes
1611 what appears to be a real bug.
1613 2012-02-14 Paul Eggert <eggert@cs.ucla.edu>
1615 doc: suggest Bash for large-fd script
1617 * doc/tar.texi (Multi-Volume Archives): Suggest Bash for shell
1618 script that might use >&10. Problem reported by Edward F
1620 <http://lists.gnu.org/archive/html/bug-tar/2012-02/msg00002.html>.
1622 2012-01-18 Paul Eggert <eggert@cs.ucla.edu>
1624 tar: quote 'like this', not `like this'
1626 This fixes some test failures recently introduced by gnulib
1628 prompted by recent changes to the GNU coding standards,
1629 which now advise to use quotes 'like this' or "like this"
1630 rather than `like this'.
1631 * NEWS: Document this.
1632 * README, README-hacking, doc/Makefile.am, scripts/backup.in:
1633 * scripts/backup.sh.in, scripts/dump-remind.in:
1634 * src/buffer.c, src/checkpoint.c, src/create.c, src/incremen.c:
1635 * src/misc.c, src/names.c, src/sparse.c, src/transform.c:
1636 * tests/incr02.at, tests/incremental.at, tests/multiv08.at:
1637 * tests/sparse04.at, tests/star/README, tests/update01.at:
1638 Quote 'like this' in comments.
1640 Quote "like this" in comments, when quoting English phrases rather
1643 * scripts/xsparse.c (get_var, read_xheader, main):
1644 * src/compare.c (diff_archive):
1645 * src/extract.c (prepare_to_extract):
1646 * src/tar.c (request_stdin, tar_set_quoting_style, doc, options)
1647 (set_subcommand_option, report_textual_dates, parse_opt)
1648 (decode_options, main):
1649 * src/xheader.c (decx):
1650 Quote 'like this' in diagnostics.
1651 * doc/tar.texi (list, warnings, override)
1652 (Selecting Archive Members, quoting styles, after, hard links)
1653 (Sparse Recovery, Multi-Volume Archives, label):
1654 Adjust documentation to match new output.
1655 * tests/backup01.at, tests/incr01.at, tests/incr04.at:
1656 * tests/label04.at, tests/label05.at, tests/link03.at:
1657 * tests/listed02.at, tests/multiv03.at, tests/multiv05.at:
1658 * tests/rename01.at, tests/rename02.at, tests/rename03.at:
1660 Adjust tests to match new quoting behavior.
1662 2012-01-18 Paul Eggert <eggert@cs.ucla.edu>
1664 tar: port --overwrite symlink test to GNU/Hurd
1666 Problem reported by Pino Toscano in
1667 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00040.html>.
1668 * gnulib.modules: Add fcntl-h, which defines
1669 HAVE_WORKING_O_NOFOLLOW.
1670 * src/extract.c (open_output_file): Use HAVE_WORKING_O_NOFOLLOW,
1671 not O_NOFOLLOW, when testing whther O_NOFOLLOW works.
1673 This file is a placeholder. It will be replaced with the actual
1675 by make dist. Run make ChangeLog if you wish to create it
1678 2012-01-11 Paul Eggert <eggert@cs.ucla.edu>
1680 tar: fix core dump with --index-file=bad_path
1682 * src/tar.c (decode_options): Exit cleanly if index file won't
1684 Problem reported by Khanh-Dang Nguyen Thu Lam in
1685 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00018.html>.
1687 2012-01-06 Paul Eggert <eggert@cs.ucla.edu>
1689 tar: don't assume O_NONBLOCK is benign on regular files
1691 On Data Migration Facility (DMF), High Peformance Storage System
1693 and presumably other file systems based on hierarchical storage,
1695 a regular file with O_NONBLOCK can cause later reads to fail with
1696 errno == EAGAIN. We need the O_NONBLOCK to avoid some security
1698 Work around the problem by using fcntl to clear the O_NONBLOCK
1699 flag if I/O fails with that errno value.
1700 Problem reported by Vitezslav Cizek in
1701 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00000.html>.
1702 * src/common.h (blocking_read, blocking_write): New decls.
1703 * src/misc.c (blocking_read, blocking_write): New functions.
1704 * src/compare.c (process_rawdata):
1705 * src/create.c (dump_regular_file):
1706 * src/extract.c (extract_file):
1707 * src/sparse.c (sparse_scan_file, sparse_extract_region):
1709 2011-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
1711 Fix --keep-old-files option.
1713 The regression was introduced by 8f390db9. This patch implements
1715 option --skip-old-files, which silently skips members which
1717 writing over existing files, and restores --keep-old-files to
1722 * configure.ac: Update.
1723 * doc/tar.texi: Document the changes.
1724 * src/common.h (SKIP_OLD_FILES): New old_files mode.
1725 * src/extract.c (maybe_recoverable): Restore KEEP_OLD_FILES
1727 Handle SKIP_OLD_FILES.
1728 * src/tar.c: New option --skip-old-files.
1729 * tests/extrac18.at: New file.
1730 * tests/extrac19.at: New file.
1731 * tests/Makefile.am: Add new test cases.
1732 * tests/testsuite.at: Likewise.
1734 2011-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
1736 Warn about existing files in keep-old-files mode (complements
1739 This is controlled by "existing-file" warning code, which is off
1742 * src/common.h (WARN_EXISTING_FILE): New warning code.
1743 (WARN_VERBOSE_WARNINGS): Add WARN_EXISTING_FILE.
1744 * src/extract.c (maybe_recoverable): warn about existing file
1745 if WARN_EXISTING_FILE is set.
1746 * src/warning.c: New warning type: "existing-file"
1748 2011-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
1750 Fix the "Creating directory:" output
1752 * src/list.c (print_for_mkdir): don't use unquoted name length for
1753 computing its output width.
1755 2011-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
1757 Fix operation of --verify in conjunction with --listed-incremental
1759 * src/common.h (clear_directory_table): New proto.
1760 * src/incremen.c (clear_directory_table): New function.
1761 * src/compare.c (diff_dumpdir): Take a pointer to struct
1762 tar_stat_info as argument.
1764 (diff_archive): Update call to diff_dumpdir.
1765 (verify_volume): Call clear_directory_table.
1767 2011-10-18 Paul Eggert <eggert@cs.ucla.edu>
1769 * doc/tar.texi (Option Summary, absolute): Document -P better,
1771 by describing how it deals with symbolic links on extraction.
1773 2011-09-28 Paul Eggert <eggert@cs.ucla.edu>
1775 2011-09-27 Paul Eggert <eggert@cs.ucla.edu>
1777 * src/tar.c (stat_on_signal): Use SA_RESTART if available.
1779 2011-09-20 Paul Eggert <eggert@cs.ucla.edu>
1781 * doc/tar.texi: Remove front- and back-cover texts.
1783 These are no longer needed for this manual, according to the
1784 GNU maintainers guide. Update copyright date to 2011.
1786 2011-09-19 Sergey Poznyakoff <gray@gnu.org.ua>
1790 * scripts/tar-snapshot-edit: License under GPLv3+.
1791 Remove trailing whitespace.
1793 2011-09-19 Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
1797 * doc/snapshot.texi: Clarify the use of nfs field in 0 and
1799 Give more precise information about which versions of tar
1803 2011-09-19 Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
1805 Upgrade tar-snapshot-edit script.
1807 * scripts/tar-snapshot-edit: Update Perl syntax to work
1808 correctly with more recent versions of Perl. (The original
1809 code worked with in the v5.8 timeframe but not with
1810 Perl v5.10.1 and later.)
1811 Add a "-c" option to check the snapshot file for invalid
1813 Handle NFS indicator character ("+") in version 0 and 1 files.
1814 Preserve the original header/version line when editing version 1
1816 Tweak output formatting.
1817 * doc/tar-snapshot-edit.texi: Update documentation.
1819 2011-08-13 Paul Eggert <eggert@cs.ucla.edu>
1821 tar: --owner and --group names and numbers
1823 The --owner and --group options now accept operands of the form
1824 NAME:NUM, so that you can specify both symbolic name and numeric
1825 ID for owner and group. Also, in these options, NAME no longer
1826 needs to be present in the current host's user and group
1827 databases; this implements Debian enhancement request 136231
1828 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136231> reported
1829 by Mark W. Eichin, communicated by Thayne Harbaugh to bug-tar in
1830 <http://lists.gnu.org/archive/html/bug-tar/2011-08/msg00001.html>.
1831 * NEWS, doc/tar.texi (Option Summary, override): Document
1833 * src/common.h (group_name_option, owner_name_option): New decls.
1834 * src/create.c (start_header): Don't assume owner and group names
1835 are in current host database.
1836 * src/tar.c (parse_owner_group): New function, for parsing
1838 (parse_opt): Use it.
1839 (decode_options): Initialize owner_name_option, group_name_option.
1840 * tests/owner.at: New file, to test this enhancement.
1841 * tests/Makefile.am (TESTSUITE_AT): Add it.
1842 * tests/testsuite.at: Include it.
1844 2011-08-13 Paul Eggert <eggert@cs.ucla.edu>
1848 * .gitignore: Add rmt.
1849 * lib/.gitignore: New file.
1851 2011-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
1853 Fix the --exclude-backups option.
1855 * src/tar.c (add_exclude_array): Take exclude option filags in its
1857 (parse_opt): Register backup_file_table with the EXCLUDE_WILDCARDS
1859 * tests/exclude07.at: New testcase.
1860 * tests/Makefile.am (TESTSUITE_AT): Add testsuite.at.
1861 * tests/testsuite.at: Include exclude07.at.
1863 2011-06-08 Paul Eggert <eggert@cs.ucla.edu>
1865 tar: simplify birthtime calculations
1867 * src/extract.c (same_birthtime): Remove.
1868 (extract_link, apply_delayed_links): Go back to using
1870 instead of same_birthtime, as this is a bit simpler. This fix
1872 on an up-to-date gnulib.
1874 2011-06-08 Paul Eggert <eggert@cs.ucla.edu>
1876 tar: use birthtime rather than ctime when checking identity
1878 Without this fix, tar would sometimes mishandle the extraction of
1879 hard links to symbolic links. Problem reported in
1880 <http://lists.gnu.org/archive/html/bug-tar/2011-06/msg00000.html>
1882 * src/extract.c (struct delayed_link): Change ctime member
1884 (same_birthtime): New function.
1885 (create_placeholder_file, extract_link, apply_delayed_links):
1886 Use it to compare birthtimes (when available) instead of ctime.
1888 2011-05-26 Paul Eggert <eggert@cs.ucla.edu>
1890 * doc/tar.texi (Old Options): Clarify distinction from short
1893 Adjust other parts of the manual to use examples that parse the
1894 same regardless of whether "-" is in front of the option clump.
1896 <http://lists.gnu.org/archive/html/bug-tar/2011-05/msg00022.html>.
1898 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1902 * tests/sparse04.at: Use the -f option.
1904 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1908 * NEWS, configure.ac: Update.
1909 * po/POTFILES.in: Remove paxexit.c (see bb971a1e).
1911 2011-03-08 Paul Eggert <eggert@cs.ucla.edu>
1913 --atime-preserve=replace: fix correctness and performance bugs
1915 reported by Eric Blake in
1916 <http://lists.gnu.org/archive/html/bug-tar/2011-03/msg00000.html>.
1917 * src/compare.c (diff_file): Do not restore atime of size-zero
1919 * src/create.c (dump_file0): Likewise. Also, do not restore atime
1920 when fd is zero, because that indicates a file we haven't opened.
1922 2011-02-23 Paul Eggert <eggert@cs.ucla.edu>
1924 * doc/tar.texi: Adjust example commands and output for accuracy.
1926 The original problem was reported by Michael Witten in
1927 <http://lists.gnu.org/archive/html/bug-tar/2011-02/msg00033.html>.
1929 2011-02-16 Paul Eggert <eggert@cs.ucla.edu>
1931 tar: if (p) free (p); -> free (p);
1933 There is no longer (since SunOS 4) any need to guard against
1934 free (NULL), so replace each "if (p) free (p);" with "free (p);".
1935 From Jim Meyering in
1936 <http://lists.gnu.org/archive/html/bug-tar/2011-01/msg00026.html>.
1937 * src/incremen.c (scan_directory, read_directory_file): As above.
1938 (try_purge_directory): Likewise.
1939 * src/list.c (read_header): Likewise.
1940 * src/misc.c (assign_string): Likewise.
1942 2010-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
1944 Correctly store long sparse file names in PAX archives.
1946 * src/sparse.c (pax_dump_header_1): Make sure the created header
1948 shorter than NAME_FIELD_SIZE bytes.
1949 * tests/sparse04.at: New testcase.
1950 * tests/Makefile.am (TESTSUITE_AT): Add sparse04.at.
1951 * tests/testsuite.at: Include sparse04.at.
1954 2010-12-07 Paul Eggert <eggert@cs.ucla.edu>
1956 tests: make the truncate test smaller and less buggy (tiny change)
1958 Reported by Solar Designer in
1959 <http://lists.gnu.org/archive/html/bug-tar/2010-12/msg00003.html>.
1960 * tests/truncate.at: Use a smaller test case, and make its
1961 race condition less likely.
1963 2010-11-27 Paul Eggert <eggert@cs.ucla.edu>
1965 tests: skip SIGPIPE-dependent tests in environments ignoring
1968 Problem reported by Sven Joachim in
1969 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00043.html>.
1970 * tests/remfiles01.at: Use AT_SIGPIPE_PREREQ.
1971 * tests/sigpipe.at: Likewise.
1972 * tests/testsuite.at (AT_SIGPIPE_PREREQ): New macro.
1974 2010-11-25 Paul Eggert <eggert@cs.ucla.edu>
1976 tar: work around NetBSD and Tru64 symlink incompatibility
1979 Problem reported by Bruno Haible in
1980 <http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00306.html>.
1981 * src/extract.c (maybe_recoverable): Also treat EFTYPE (if
1983 and ENOTSUP like ELOOP.
1985 2010-11-24 Paul Eggert <eggert@cs.ucla.edu>
1987 tar: adjust to paxutils change: paxexit.c -> paxexit-status.c
1989 * lib/Makefile.am (libtar_a_SOURCES): paxexit.c renamed to
1992 2010-11-24 Paul Eggert <eggert@cs.ucla.edu>
1994 tar: remove unused function dir_removed_diag
1996 * src/common.h (dir_removed_diag): Remove unused decl.
1997 * src/misc.c (dir_removed_diag): Remove unused function.
1999 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
2001 tar: work around FreeBSD symlink incompatibility with POSIX
2003 * src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for
2004 FreeBSD. Problem reported by Christian Weisgerber in
2005 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00080.html>.
2007 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
2009 * src/names.c: tar: fix bug with --one-file-system
2010 --listed-incremental
2012 Problem (and idea for fix) reported by Martin Weigel
2013 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00071.html>.
2014 * src/common.h (is_individual_file): Remove decl.
2015 * src/create.c (dump_file0): Replace "is_individual_file (p)"
2017 * src/incremen.c (procdir): Replace "!is_individual_file
2018 (name_buffer)" with "st->parent". Fix bug with --one-file-system
2019 and --listed-incremental.
2020 * src/names.c (individual_file_table, register_individual_file):
2021 (is_individual_file): Remove. All uses removed.
2023 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
2025 tests: new test listed04 for --one-file-system
2026 --listed-incremental
2028 * tests/Makefile.am (TESTSUITE_AT): Add listed04.at.
2029 * tests/listed04.at: New file.
2030 * tests/testsuite.at: Include it.
2032 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
2034 scripts: fix option parsing
2036 Problem reported by Dennis Wydra in
2037 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00082.html>.
2038 * scripts/backup.in: Accept "-l LEVEL". Be more systematic about
2039 backslashes inside ``; it shouldn't matter for modern shells but
2040 it might matter for older ones.
2041 * scripts/restore.in: Likewise.
2042 * scripts/backup.in: Adjust implementation of -t/--time to match
2043 the new implementation of -l/--level.
2045 2010-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
2047 Issue a warning if the archive being compared contais transformed
2050 * src/common.h (transform_program_p): New proto.
2051 * src/transform.c (transform_program_p): New function.
2052 * src/compare.c (verify_volume): Warn if the archive contains
2053 transformed file names.
2055 2010-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
2059 * doc/tar.texi: Reword the description of decompress-program.
2061 2010-11-15 Paul Eggert <eggert@cs.ucla.edu>
2063 tar: fix --verify option, which broke in 1.24
2065 * NEWS: Document this.
2066 * src/compare.c (verify_volume): Decode the header before invoking
2067 diff_archive, as diff_archive no longer does this as of the
2068 2010-06-28 commit. Also, don't try to invoke diff_archive on a
2070 * tests/Makefile.am (TESTSUITE_AT): Add verify.at.
2071 * tests/testsuite.at: Include verify.at.
2072 * tests/verify.at: New file.
2074 2010-11-08 Paul Eggert <eggert@cs.ucla.edu>
2076 Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/tar
2078 2010-11-08 Jim Meyering <meyering@redhat.com>
2080 tests: avoid spurious failure when VERSION_CONTROL envvar is set
2082 * tests/backup01.at: Unset VERSION_CONTROL. Otherwise,
2083 when set to e.g., 'always', it would cause this test to fail.
2085 2010-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
2089 * configure.ac: Version 1.25
2090 * NEWS: Describe the changes.
2092 2010-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
2094 Run alternative decompression programs if the principal one is
2097 Some compression programs are able to handle various compression
2099 (e.g. `gzip' can decompress files created by `compress', `xz'
2101 to handle lzma, etc.) Tar tries to use such programs for
2103 if the principal decompressor cannot be started.
2105 * src/buffer.c (compress_type): Swap ct_none and ct_tar.
2106 (archive_compression_type): New static variable.
2107 (zip_magic): Remove program and option fields.
2108 (zip_program): New structure and static.
2109 (compress_program): Remove macro.
2110 (find_zip_program): New static function.
2111 (first_decompress_program,next_decompress_program): New functions.
2112 (open_compressed_archive): Set archive_compression_type instead of
2113 use_compress_program_option.
2114 * src/common.h (first_decompress_program)
2115 (next_decompress_program): New functions.
2116 (WARN_DECOMPRESS_PROGRAM): New flag.
2117 (WARN_VERBOSE_WARNINGS): Include WARN_DECOMPRESS_PROGRAM.
2118 * src/warning.c (warning_args): Add "decompress-program".
2119 (warning_types): Add WARN_DECOMPRESS_PROGRAM.
2120 * src/system.c (run_decompress_program): New function.
2121 (sys_child_open_for_uncompress): Use run_decompress_program
2122 instead of calling execlp directly.
2124 2010-11-02 Paul Eggert <eggert@cs.ucla.edu>
2126 tests: fix some issues with signals, timestamps, "test" typo
2128 * tests/extrac17.at: Add --warning=no-timestamp, to avoid
2129 bogus warning due to NFS clock skew.
2130 * tests/remfiles01.at: Discard diagnostics that some shells
2131 generate about broken pipes.
2132 * tests/sigpipe.at: Likewise.
2133 * tests/remfiles01.at: Fix typo: "test $EC" was written where
2134 "test $EC -ne 0" was intended.
2136 2010-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
2138 Fix extraction of device nodes.
2140 * src/extract.c (extract_node): Do not mask out node type.
2141 The bug was introduced in commit ea964cce.
2143 2010-10-28 Paul Eggert <eggert@cs.ucla.edu>
2145 tar: don't cross struct member boundaries with OLDGNU_MAGIC
2147 * src/create.c (write_gnu_long_link, start_header): Access
2148 header->buffer + offsetof (struct posix_header, magic), instead of
2149 header->header.magic, when reading or writing the OLDGNU_MAGIC
2150 pattern. The code violates the C standard without this change,
2151 and GCC warns about this if fortify checking is enabled. It's not
2152 a bug on traditional (i.e., non-debugging) platforms, but it does
2153 violate the C standard so it should be fixed. Problem originally
2154 reported by John Emil Karlson in
2155 <http://lists.gnu.org/archive/html/bug-tar/2010-04/msg00023.html>.
2156 * src/list.c (decode_header): Likewise.
2158 2010-10-28 Paul Eggert <eggert@cs.ucla.edu>
2160 tests: port to sh variants that squirrel away file descriptors
2162 OpenBSD /bin/sh, and some other sh variants, squirrel away file
2163 descriptors before closing them. For example, for "cat 3<&-" they
2164 first dup file descriptor 3 to a fd that is 10 or greater, then
2165 close 3 (because if "cat" had been a builtin command like ":" then
2166 they would have wanted to avoid the fork and restore the fd after
2167 ":" finished); and they treat ordinary (forking) commands the same
2168 as builtin commands. This approach fails after "ulimit -n 10".
2169 Work around this deficiency by closing the file descriptors before
2170 invoking ulimit. Problem reported by Christian Weisgerber in
2171 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00041.html>;
2172 solution suggested by Jilles Tjoelker in
2173 <http://article.gmane.org/gmane.comp.shells.dash/415>.
2175 * tests/extrac11.at (scarce file descriptors): Close file
2176 descriptors before invoking ulimit -n.
2178 2010-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
2180 Transform file names when updating and appendig to archives.
2182 This complements 28e91b48.
2184 * src/common.h (transform_stat_info): New prototype.
2185 * src/list.c (transform_stat_info): Remove static qualifier.
2186 * src/update.c (update_archive): Call transform_stat_info.
2187 * tests/Makefile.am (TESTSUITE_AT): Add append03.at
2188 * tests/testsuite.at: Include append03.at
2190 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
2192 tests: port to Solaris diff
2194 * tests/extrac13.at: Don't assume that "diff -c" outputs nothing
2195 when there are no differences. This is not true on Solaris,
2196 where it outputs "No differences encounted".
2198 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
2200 tar: fix -x --overwrite bug (no --dereference, ! O_NOFOLLOW)
2202 This bug was discovered on Solaris 8. On older hosts lacking
2203 O_NOFOLLOW, tar -x --overwrite (without --dereference) follows
2204 symbolic links, causing the "extract over symlinks" test to fail.
2206 * src/extract.c (open_output_file): If O_NOFOLLOW is needed but
2207 does not work, check for a symlink separately.
2209 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
2211 tar: don't use "((" in shell scripts
2213 * tests/extrac11.at: Replace "((" with "( (" in shell scripts, as
2214 "((" is not portable to the Korn shell, and POSIX 1003.1-2008 says
2215 that "((" is not portable.
2217 2010-10-26 Sergey Poznyakoff <gray@gnu.org.ua>
2219 Make sure name matching occurs before name transformation.
2221 The commit 9c194c99 altered that order.
2223 * src/list.c (transform_stat_info): New function. Split off from
2225 (read_and): Call transform_stat_info right before do_something,
2226 and after deciding if we should proceed with this member name,
2227 so that name matching occurs before name transformation.
2229 * tests/extrac17.at: New file.
2230 * tests/Makefile.am (TESTSUITE_AT): Add extrac17.at
2231 * tests/testsuite.at: Include extrac17.at.
2233 2010-10-26 Paul Eggert <eggert@cs.ucla.edu>
2235 tar: don't assume stdin is open when testing fd limits
2237 * tests/extrac11.at: Redirect stdin from /dev/null, in case
2238 the parent 'make' is running with stdin closed.
2240 2010-10-26 Sergey Poznyakoff <gray@gnu.org.ua>
2242 Further fixes in bootstrap.
2244 * bootstrap: Restore the default for gnulib_path
2245 (symlink_to_dir): Re-apply 67cad07.
2247 2010-10-26 Paul Eggert <eggert@cs.ucla.edu>
2249 tar: fix bug with -C and extracting directories
2251 Problem reported by Denis Excoffier in
2252 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00034.html>.
2254 * src/extract.c (extract_dir): Use mkdirat, not mkdir.
2255 * tests/extrac16.at: New file, to test for this bug.
2256 * tests/Makefile.am (TESTSUITE_AT): Add it.
2257 * tests/testsuite.at: Include it.
2259 This file is a placeholder. It will be replaced with the actual
2261 by make dist. Run make ChangeLog if you wish to create it
2264 2010-10-25 Sergey Poznyakoff <gray@gnu.org.ua>
2268 * configure.ac, NEWS: Version 1.24
2269 * bootstrap: Restore tar-specific code lost during last
2270 sync from gnulib (241b72ffad).
2271 * src/misc.c (chdir_do): Remove unused automatic variable.
2273 2010-10-16 Paul Eggert <eggert@cs.ucla.edu>
2275 tar: use more-accurate diagnostic when intermediate mkdir fails
2277 Without this change, if tar tried to extract a file A/B/C, noticed
2278 that A/B didn't exist, attempted to mkdir A/B, and the mkdir
2279 failed, it did not diagnose the mkdir failure, but simply reported
2280 the failure to open A/B/C. This sometimes led to confusion
2281 because it wasn't clear what tar was trying to do, in particular
2282 that tar tried to mkdir A/B. With this patch, tar issues two
2283 diagnostics in this case: one for A/B and the other for A/B/C.
2284 Problem reported by Hauke Laging in
2285 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00020.html>.
2286 * gnulib.modules: Remove faccessat.
2287 * src/extract.c (make_directories): New arg INTERDIR_MADE.
2288 Diagnose mkdir failure. Return 0 on success, nonzero on failure,
2289 as opposed to nonzero iff some directory was created. All callers
2290 changed. Simplify the code when mkdir fails, by checking whether
2291 the desired file exists unless errno==EEXIST: this is more robust.
2292 * tests/extrac15.at: New test, to check this.
2293 * tests/Makefile.am (TESTSUITE_AT): Add it.
2294 * tests/testsuite.at: Include it.
2296 2010-10-16 Paul Eggert <eggert@cs.ucla.edu>
2298 tests: port to NFS file servers with clock skew
2300 Several of the tests assumed that a newly created file cannot
2301 have a time stamp dated in the future. This assumption is not
2302 true when files are served by a remote host whose clock is
2303 slightly in advance of ours. Fix the problems that I observed
2304 when running "make check" a couple of times on such a server.
2306 * tests/backup01.at: Use --warning=no-timestamp to suppress
2307 clock-skew warnings.
2308 * tests/chtype.at, tests/comprec.at, tests/exclude06.at:
2309 * tests/extrac01.at, tests/extrac03.at, tests/extrac05.at:
2310 * tests/extrac06.at, tests/extrac08.at, tests/extrac13.at:
2311 * tests/extrac14.at, tests/incr01.at, tests/incr03.at,
2313 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at:
2314 * tests/pipe.at, tests/rename02.at, tests/rename03.at:
2315 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
2316 * tests/sparse01.at:
2319 2010-10-12 Paul Eggert <eggert@cs.ucla.edu>
2321 gnulib: sync from latest gnulib, notably bootstrap and
2324 * bootstrap: Sync from gnulib.
2325 * doc/.gitignore: Rename getdate.texi to parse-datetime.texi.
2326 * doc/Makefile.am (tar_TEXINFOS): Likewise.
2327 * doc/tar.texi (Top): Adjust to renaming of getdate to
2329 * gnulib.modules: Likewise. Also, remove ftruncate (now
2331 And add inttostr (we missed this dependency).
2332 * src/tar.c: Include parse-datetime.h, not getdate.h. All calls
2333 to get_date replaced with parse_datetime.
2335 2010-09-24 Paul Eggert <eggert@cs.ucla.edu>
2337 tar: -x -C symlink fix
2339 * src/misc.c (chdir_do): Don't use O_NOFOLLOW when opening the
2340 argument to -C. This is for consistency with "tar -c -C FOO", and
2341 matches the new documentation.
2342 * tests/extrac14.at: New file.
2343 * tests/Makefile.am (TESTSUITE_AT): Add it.
2344 * tests/testsuite.at: Include it.
2346 2010-09-24 Paul Eggert <eggert@cs.ucla.edu>
2348 tar: --dereference consistency
2350 This closes another race condition, that occurs when overwriting a
2351 symlink with a regular file.
2352 * NEWS (--dereference consistency): New section.
2353 * doc/tar.texi (Option Summary): Describe new --deference
2355 (dereference): Likewise. Remove discussion that I didn't follow,
2356 even before --dereference was changed.
2357 * src/common.h (deref_stat, set_file_atime): Adjust signatures.
2358 * src/compare.c (diff_file, diff_multivol): Respect
2360 instead of rolling our own flags. This implements the new
2363 (diff_file, diff_dumpdir): Likewise, for fstatat_flags.
2364 * src/create.c: Adjust to set_file_atime signature change.
2365 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
2367 * src/incremen.c (try_purge_directory): Likewise.
2368 * src/misc.c (maybe_backup_file): Likewise.
2369 * src/extract.c (file_newer_p): New arg STP. All callers changed.
2370 (maybe_recoverable): New arg REGULAR. All callers changed.
2371 Handle the case of overwriting a symlink with a regular file,
2372 when --overwrite is specified but --dereference is not.
2373 (open_output_file): Add O_CLOEXEC, O_NOCTTY, O_NONBLOCK for
2374 consistency with file creation. Add O_NOFOLLOW if
2375 overwriting_old_files && ! dereference_option.
2376 * src/incremen.c (update_parent_directory): Use fstat, not
2378 there's less to go wrong.
2379 * src/misc.c (deref_stat): Remove DEREF arg. All callers changed.
2380 Instead, use fstatat_flags.
2381 (set_file_atime): Remove ATFLAG arg. All callers changed.
2382 Instead, use fstatat_flags.
2383 * src/names.c, src/update.c: Adjust to deref_stat signature
2385 * src/tar.c (get_date_or_file): Use stat, not deref_stat, as this
2386 is not a file to be archived.
2387 * tests/Makefile.am (TESTSUITE_AT): Add extrac13.at.
2388 * tests/extrac13.at: New file.
2389 * tests/testsuite.at: Include it.
2391 2010-09-20 Paul Eggert <eggert@cs.ucla.edu>
2393 tar: do not crash with --listed-incremental
2395 Problem reported by Frantisek Hanzlik in
2396 <https://bugzilla.redhat.com/635318> via Kamil Dudka in
2397 <http://lists.gnu.org/archive/html/bug-tar/2010-09/msg00066.html>.
2398 I don't understand this code either, but Sergey can take a look at
2399 this patch, and perhaps install a better one, when he has
2401 * src/incremen.c (append_incremental_renames): Don't actually
2403 anything to DIR if DIR is null.
2405 2010-09-19 Paul Eggert <eggert@cs.ucla.edu>
2407 tar: prefer openat-style functions
2409 This change replaces traditional functions like 'open' with the
2410 POSIX.1-2008 functions like 'openat'. Mostly this is an internal
2411 refactoring change, in preparation for further changes to close
2413 * gnulib.modules: Add faccessat, linkat, mkfifoat, renameat,
2416 * src/Makefile.am (tar_LDADD): Add $(LIB_EACCESS).
2417 * tests/Makefile.am (LDADD): Likewise.
2418 * src/common.h (chdir_fd): New extern var.
2419 * src/compare.c (diff_file, diff_multivol): Use openat instead
2421 * src/create.c (create_archive, restore_parent_fd): Likewise.
2422 * src/extract.c (create_placeholder_file): Likewise.
2423 * src/names.c (collect_and_sort_names): Likewise.
2424 * src/update.c (append_file): Likewise.
2425 * src/compare.c (diff_symlink): Use readlinkat instead of
2427 * src/compare.c (diff_file): Use chdir_fd instead of AT_FDCWD.
2428 * src/create.c (subfile_open, dump_file0): Likewise.
2429 * src/extract.c (fd_chmod, fd_chown, fd_stat, set_stat):
2430 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
2432 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
2433 (extract_link, apply_delayed_links):
2434 Use fstatat rather than stat or lstat.
2435 * src/misc.c (maybe_backup_file, deref_stat): Likewise.
2436 * src/extract.c (make_directories): Use mkdirat rather than mkdir.
2437 Use faccessat rather than access. This fixes a minor permissions
2438 bug when tar is running setuid (who would want to do that?!).
2439 (open_output_file): Use openat rather than open.
2440 In the process, this removes support for Masscomp's O_CTG files,
2441 which aren't compatible with openat's signature. Masscomp! Wow!
2442 That's a blast from the past. As far as I know, that operating
2443 system hasn't been supported for more than 20 years.
2444 (extract_link, apply_delayed_links):
2445 Use linkat rather than link.
2446 (extract_symlink, apply_delayed_links):
2447 Use symlinkat rather than symlink.
2448 (extract_node): Use mknodat rather than mknod.
2449 (extract_fifo): Use mkfifoat rather than mkfifo.
2450 (apply_delayed_links): Use unlinkat rather than unlink or rmdir.
2451 * src/misc.c (safer_rmdir, remove_any_file): Likewise.
2452 * src/unlink.c (flush_deferred_unlinks): Likewise.
2453 * src/extract.c (rename_directory): Use renameat rather than
2455 * src/misc.c (maybe_backup_file, undo_last_backup): Likewise.
2456 * src/misc.c: Don't include <save-cwd.h>; no longer needed now
2457 that we're using openat etc.
2458 (struct wd): Add member fd. Remove members err and fd. All uses
2460 (CHDIR_CACHE_SIZE): New constant.
2461 (wdcache, wdcache_count, chdir_fd): New vars.
2462 (chdir_do): Use openat rather than save_cwd. Keep the cache up
2463 to date. This code won't scale well, but is good enough for now.
2464 * src/update.c (update_archive): Use openat + fdopendir +
2465 streamsavedir rather than savedir.
2467 This file is a placeholder. It will be replaced with the actual
2469 by make dist. Run make ChangeLog if you wish to create it
2472 2010-09-18 Paul Eggert <eggert@cs.ucla.edu>
2474 tar: add utimens.h includes
2476 * src/extract.c: Include <utimens.h>, needed for fdutimens
2478 * src/misc.c: Likewise.
2480 2010-09-18 Paul Eggert <eggert@cs.ucla.edu>
2482 tar: switch to gnulib fdutimensat module
2484 * gnulib.modules: Add fdutimensat.
2485 * src/common.h (fd_utimensat): Remove decl.
2486 * src/extract.c (set_stat): Call fdutimensat, not fd_utimensat.
2487 * src/misc.c (set_file_atime): Likewise.
2488 (fd_utimensat): Remove.
2490 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
2492 tar: extract permissions for . last
2494 * src/common.h (must_be_dot_or_slash): New decl.
2495 * src/extract.c (mark_after_links): New function, taking code
2496 that used to be in create_placeholder_file.
2497 (create_placeholder_file): Use it.
2498 (delay_set_stat): Always delay setting status for . and /.
2499 * src/misc.c (must_be_dot_or_slash): Now extern.
2500 * tests/extrac12.at: New file.
2501 * tests/Makefile.am (TESTSUITE_AT): Add it.
2502 * tests/testsuite.at: Likewise.
2504 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
2506 tar: don't check for getdtablesize; use AC_CHECK_FUNCS_ONCE
2508 * configure.ac: Don't check for getdtablesize; no longer needed.
2509 Use AC_CHECK_FUNCS_ONCE rather than AC_CHECK_FUNCS, for
2512 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
2514 tar: extract symlink attributes, close some symlink-related races
2516 * NEWS: Describe symlink-extraction improvements.
2517 * src/extract.c (enum permstatus): Remove.
2518 (fchmod, fchown): Define dummy replacement macros if the system
2519 does not supply them.
2520 (implemented): New function.
2521 (struct delayed_set_stat): Remove members invert_permissions,
2522 permstatus. They were too confusing, and tried to do too much
2523 in too-little space. Instead, add members current_mode,
2524 current_mode_mask, interdir, atflag. All users changed.
2525 (struct delayed_link): Add members mode, atime, mtime, to support
2526 platforms such as BSD where symlinks have these attributes.
2528 (fd_chmod): Renamed from fdchmod. New argument atflag. Check for
2529 operation not supported at run-time, not at configure-time. Put
2530 fd argument first. All callers changed.
2531 (fd_chown): Likewise, renaming from fdchown.
2532 (fd_stat): Likewise, renaming from fdstat.
2533 (set_mode): Remove args stat_info, cur_info, invert_permissions,
2534 permstatus. Add args mode, mode_mask, current_mode,
2536 atflag. All callers changed. Close some races. Use an easier-to
2537 understand method for computing permissions. Work around POSIX
2538 incompatibility in Linux fchmodat. Support extraction of symlink
2539 modes, if the OS allows it.
2540 (set_stat): Remove args cur_info, invert_permissions, permstatus.
2541 Add args current_mode, current_mode_mask, interdir, atflag.
2542 All callers changed. Close some races. Support extraction of
2543 attributes on symlinks, if the OS allows it.
2544 (delay_set_stat): Remove args invert_permissions, permstatus.
2545 Add args current_mode, current_mode_mask, mode, atflag.
2546 The ST arg can be null now, indicating that it's an intermediate
2547 directory. All callers changed.
2548 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
2550 (extract_dir): Also be paranoid if only --same-permissions, due
2551 to semantics of setgid and setuid directories on some hosts.
2552 This closes a race on those hosts. Simplify calculation of
2553 delay_set_stat arguments; the old code was truly strange and
2554 probably wrong in some border cases.
2555 (extract_dir, extract_file, extract_node, extract_fifo): Don't
2557 unspecified behavior in mode arg of open, mknod, etc. Instead,
2558 mask out those bits when creating the file, and add them later via
2560 (open_output_file): file_name is now const. Add arg current_mode,
2561 current_mode_mask. All callers changed. When overwriting
2563 refuse to overwrite something that is not a regular file, since
2564 we're extracting a regular file.
2565 (extract_file): Remove the FIXME comment. Whatever the protection
2566 issues were, they should be fixed now. As a result of all
2568 API changes, we now use fchmod etc. rather than chmod etc.,
2571 (create_placeholder_file, apply_delayed_links): Record desired
2572 mode and times for symlinks, for OSes that support that.
2574 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2576 tar: tar -x without --incremental no longer sets atime again
2578 * src/extract.c (set_stat): Use UTIME_OMIT rather than UTIME_NOW.
2579 The UTIME_NOW was there only to emulate the previous behavior of
2580 using the current time, and the previous behavior was there only
2581 because before we started assuming POSIX.1-2008 there was no
2582 portable way to get the effect of UTIME_NOW.
2584 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2586 tar: another --atime-preserve race fix
2588 * src/common.h (set_file_atime): Add parentfd arg.
2589 * src/compare.c (diff_file): Use it.
2590 * src/create.c (dump_file0): Likewise. This closes yet another
2591 race condition with symbolic links.
2592 * src/misc.c (set_file_atime): Add parentfd arg.
2594 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2596 tar: --atime-preserve fixes for races etc.
2598 This patch fixes a race condition in the --atime-preserve=replace
2599 option, which might cause tar to improperly follow a symbolic
2602 It also drops the use of the _FIOSATIME ioctl of Solaris 2.x
2603 and later, which loses resolution on time stamps. Modern Solaris
2604 systems support full-resolution time stamps in the kernel, and
2605 it's not worth the hassle of testing this call, useful only in
2606 no-longer-supported Solaris variants.
2608 Also, it undoes a change I recently introduced to the --compare
2609 option, which caused it to not follow symbolic links unless the
2610 --dereference option was also used. Quite possibly this change is
2611 a good idea, but the old behavior was documented and the change
2612 should not have been installed casually.
2614 * configure.ac: Don't check for stropts.h and sys/filio.h.
2615 * gnulib.modules: Add futimens, utimensat. Remove futimens.
2616 * src/common.h (fd_utimensat): New decl.
2617 * src/compare.c (diff_file, diff_multivol):
2618 Don't use open_read_flags: those are for --create only.
2619 * src/create.c (dump_file0): Adjust to set_file_atime changes.
2620 Pass fstatat_flags to set_file_atime, so that symbolic links are
2621 not followed inadvertantly.
2622 * src/extract.c: Don't include utimens.h.
2623 (set_stat): Use fd_utimensat ant UTIME_NOW rather than fdutimens.
2624 * src/misc.c: Don't include utimens.h, stropts.h, sys/filio.h.
2625 (fd_utimensat): New function.
2626 (set_file_atime): Use it. New arg atflag, controlling symlink
2627 handling. All callers changed.
2629 2010-09-14 Paul Eggert <eggert@cs.ucla.edu>
2631 * configure.ac: tar: close some race conditions when extracting
2633 * configure.ac: Check for fchmod and fchown. Don't check
2635 * src/extract.c (fdchmod, fdchown, fdstat): New functions.
2636 (set_mode, set_stat): New arg FD. All callers changed.
2637 This avoids some race conditions between closing a regular file
2638 and setting its metadata, and it's a bit faster.
2640 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2642 tar: don't worry about fdopendir closing its argument
2644 * NEWS: Don't mention dirfd; no longer needed.
2645 * gnulib.modules: Remove dirfd.
2646 * src/create.c (get_directory_entries): Remove the code dealing
2647 with dirfd failures, as the new fdopendir replacement doesn't
2648 close its argument so we don't need to call dirfd. See
2649 <http://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00208.html>
2650 and gnulib commit 970c9038e4cca46e1b037ae0a6d574dfae6a7327.
2652 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2654 * NEWS: Fix wording typo in previous change.
2656 Reported by Jim Meyering.
2658 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2660 tar: live within system-supplied limits on file descriptors
2662 * NEWS: Note the change. Mention dirfd and fdopendir.
2663 * gnulib.modules: Add dirfd and fdopendir. The code was already
2664 using fdopendir; dirfd is a new need.
2665 * src/common.h (open_searchdir_flags, get_directory_entries):
2666 (subfile_open, restore_parent_fd, tar_stat_close): New decls.
2667 (check_exclusion_tags): Adjust signature to match code change.
2668 * src/create.c (IMPOSTOR_ERRNO): New constant.
2669 (check_exclusion_tags): First arg is now a struct tar_stat_info
2670 const *, not an fd. All callers changed.
2671 (dump_regular_file, dump_file0): A zero fd represents an unused
2672 slot, so play it safe if the fd member is zero here. A negative
2673 fd represents the negation of an errno value, so play it safe and
2674 do not assign -1 to fd merely because an open fails.
2675 (open_failure_recover, get_directory_entries, restore_parent_fd):
2676 (subfile_open): New functions. These help to recover from file
2677 descriptor exhaustion.
2678 (dump_dir, dump_file0): Use them.
2679 (dump_file0): Use tar_stat_close instead of rolling our own close.
2680 * src/incremen.c (scan_directory): Use get_directory_entries,
2681 subfile_open, etc., to recover from file descriptor exhaustion.
2682 * src/names.c (add_hierarchy_to_namelist): Likewise.
2683 (collect_and_sort_names): A negative fd represents the negation
2684 of an errno value, so play it safe and do not assign -1 to fd.
2685 * src/tar.c (decode_options): Set open_searchdir_flags.
2686 Add O_CLOEXEC to all the open flags.
2687 (tar_stat_close): New function, which knows how to deal with
2688 new convention for directory streams and file descriptors.
2689 Diagnose 'close' failures.
2690 (tar_stat_destroy): Use it.
2691 * src/tar.h (struct tar_stat_info): New member dirstream.
2692 fd now has the negative of an errno value, not merely -1, if
2693 the file could not be opened, so that failures to reopen
2695 are better-diagnosed later.
2696 * tests/Makefile.am (TESTSUITE_AT): Add extrac11.at.
2697 * tests/testsuite.at: Likewise.
2698 * tests/extrac11.at: New file.
2700 2010-09-08 Paul Eggert <eggert@cs.ucla.edu>
2702 tar: improve documentation of reliability and security issues
2704 * doc/tar.texi (Reliability and security, Reliability):
2705 (Permissions problems, Data corruption and repair, Race
2707 (Security, Privacy, Integrity, Live untrusted data):
2708 (Security rules of thumb): New nodes.
2710 2010-09-06 Paul Eggert <eggert@cs.ucla.edu>
2712 tar: more reliable directory traversal when creating archives
2714 * NEWS: Document this.
2715 * gnulib.modules: Add openat, readlinkat.
2716 * src/common.h (open_read_flags, fstatat_flags): New global
2718 (cachedir_file_p, dump_file, check_exclusion_tags,
2720 Adjust to new signatures, described below.
2721 (name_fill_directory): Remove.
2722 * src/compare.c (diff_file, diff_multivol): Use open_read_flags.
2723 * src/create.c (struct exclusion_tag): Exclusion predicates
2725 a file descriptor, not a file name.
2726 (add_exclusion_tag): Likewise. All uses changed.
2727 (cachedir_file_p): Likewise.
2728 (check_exclusion_tags): The directory is now a file descriptor,
2729 not a file name. All uses changed. Use openat for better
2731 (file_dumpable_p): Arg is now a struct stat, not a struct
2732 tar_stat_info. All uses changed. Check the arg's file types too.
2733 (dump_dir0, dump_dir, dump_file0, dump_file): Omit top_level and
2734 parent_device args, since st->parent tells us that now. All uses
2736 (dump_dir): Likewise. Also, omit fd arg for similar reasons.
2737 Apply fdsavedir to a dup of the file descriptor, since we need a
2738 file descriptor for openat etc. as well, and fdsavedir (perhaps
2739 unwisely) consumes its file descriptor when successful.
2740 Do not consume st->fd when successful; this simplifies the caller.
2741 (create_archive): Allocate a file descriptor when retraversing
2742 a directory, during incremental dumps.
2743 (dump_file0): Use fstatat, openat, and readlinkat for better
2745 When opening a file, use the result of fstat on the file
2747 rather than the fstatat on the directory entry, to avoid some race
2748 conditions. No need to reopen the directory since we now
2750 close it. Change "did we open the file?" test from 0 <= fd to
2751 0 < fd since fd == 0 now represents uninitialized.
2752 (dump_file): Now accepts struct tar_stat_info describing parent,
2753 not parent_device. Also, accept basename and fullname of entry.
2755 * src/incremen.c (update_parent_directory): Accept struct
2756 tar_stat_info for parent, not name. All callers changed.
2757 Use fstatat for safer directory traversal.
2758 (procdir): Accept struct tar_stat_info, not struct stat and
2759 dev_t, for info about directory. All callers changed.
2760 (scan_directory): Accept struct tar_stat_info, not name,
2761 device, and cmdline, for info about directory. All callers
2762 changed. Do not consume the file descriptor, since caller
2763 might need it. Use fstatat and openat for safer directory
2764 traversal; also, use fstat after opening to double-check.
2765 (name_fill_directory): Remove.
2766 * src/names.c (add_hierarchy_to_namelist): Accept struct
2767 tar_stat_info instead of device and cmdline. All callers changed.
2768 When descending into a subdirectory, use openat and fstat for
2769 safer directory traversal.
2770 (collect_and_sort_names): Use open and fstat for safer directory
2771 traversal. Set up struct tar_stat_info for callee's new API.
2772 * src/tar.c (decode_options): Initialize open_read_flags
2774 (tar_stat_destroy): Close st->fd if it is positive (not zero!).
2775 * src/tar.h (struct tar_stat_info): New members parent, fd.
2776 * src/update.c (update_archive): Adjust to dump_file's API change.
2777 * tests/filerem02.at: Ignore stderr since its contents now depend
2778 on the file system implementation.
2780 2010-09-05 Paul Eggert <eggert@cs.ucla.edu>
2782 tar: remove lint discovered by Sun C compiler
2784 * src/common.h (WARN_ALL): Don't mask with 0xffffffff; on a 32-bit
2785 host, 0xffffffff is of type 'unsigned int', which makes WARN_ALL
2786 an unsigned int value that is too large to fit into an int, and
2787 the C standard says that this has undefined behavior. The mask is
2788 not needed, so omit it.
2790 2010-09-04 Paul Eggert <eggert@cs.ucla.edu>
2792 tar: restore macros that are used in some cases
2794 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
2795 Restore these macros, undoing the previous change to this file.
2796 The macros are used after all, in some cases. Sorry about that.
2798 2010-09-03 Paul Eggert <eggert@cs.ucla.edu>
2800 tar: remove unused macros
2802 * src/create.c (UINTMAX_TO_CHARS): Remove; no longer used.
2803 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
2805 * src/incremen.c (DIR_IS_NEW): Comment out; not used.
2806 Mark this with a FIXME, since it looks like it should be used.
2808 2010-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
2810 Fix --remove-files in update/append mode.
2812 * src/update.c (update_archive): Call finish_deferred_unlinks when
2815 2010-08-26 Paul Eggert <eggert@cs.ucla.edu>
2817 tar: avoid assumptions about root access and chmod -w in test
2820 * tests/extrac07.at, tests/extrac09.at, tests/listed03.at: Use
2821 AT_UNPRIVILEGED_PREREQ, since this test requires non-root
2823 * tests/extrac07.at: Don't use "chmod -w", as POSIX says it's not
2824 portable to start a chmod permissions-list with "-" as it may be
2825 confused with an option. Use "chmod a-w" instead.
2827 2010-08-26 Paul Eggert <eggert@cs.ucla.edu>
2829 tar: fix bug with -C and delayed setting of metadata
2831 * src/common.h (chdir_current): New decl.
2832 * src/extract.c (struct delayed_set_stat, struct delayed_link):
2833 New member change_dir.
2834 (delay_set_stat, create_placeholder_file): Set it.
2835 (apply_nonancestor_delayed_set_stat, apply_delayed_links): Use it.
2836 (extract_link): Check that the links are all relative to the same
2838 (extract_archive): Restore the current directory after
2839 apply_nonancestor_delayed_set_stat has possibly changed it.
2840 * src/misc.c (chdir_current): New external var; this used to
2841 be the private static variable 'previous' inside chdir_dir.
2843 * tests/Makefile.am (TESTSUITE_AT): New test extrac10.at.
2844 * tests/extrac10.at: New file.
2845 * tests/testsuite.at: Include it.
2847 2010-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
2849 Don't apply file transformations to volume names.
2851 * src/list.c (decode_header): Don't apply file transformations
2853 * tests/xform01.at: New testcase.
2854 * tests/xform-h.at (xform): Rename macro to xformtest. Use
2856 * tests/Makefile.am, tests/testsuite.at: Add xform01.at
2858 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2860 tar: optimize -c --sparse when file is entirely sparse
2862 * src/sparse.c (sparse_scan_file): If the file is entirely sparse,
2863 that is, if ST_NBLOCKS is zero, don't bother scanning for nonzero
2864 blocks. Idea by Kit Westneat, communicated by Bernd Schubert in
2865 <http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00038.html>.
2866 Also, omit unnecessary lseek at start of file.
2868 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2870 tar: don't assume size of a sparse file chunk fits in size_t
2872 * src/tar.h (struct sp_array): Change numbytes from size_t
2875 * scripts/xsparse.c (struct sp_array): Likewise.
2876 Include <stdint.h>, for SIZE_MAX.
2877 (expand_sparse): Don't try to allocate a buffer bigger than
2879 * src/common.h (SIZE_TO_CHARS, size_to_chars, SIZE_FROM_HEADER):
2880 (size_from_header): Remove decls.
2881 * src/create.c (size_to_chars): Remove.
2882 * src/list.c (size_from_header): Remove.
2883 * src/sparse.c (sparse_extract_region, check_data_region):
2884 (oldgnu_add_sparse, oldgnu_store_sparse_info, pax_decode_header):
2885 Don't assume chunk sizes fit in size_t.
2886 (oldgnu_add_sparse): Check for off_t overflow.
2887 * src/xheader.c (sparse_numbytes_decoder, sparse_map_decoder):
2890 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2892 tar: use ctime, not mtime, when checking placeholders
2894 * src/extract.c (struct delayed_link): Rename member mtime
2896 All uses changed to use ctime rather than mtime.
2898 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2900 tar: add comment to link04.at test
2902 * tests/link04.at: Add explanatory comment at head.
2904 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2906 tar: fix 1.23 Solaris regression related to PRIV_SYS_LINKDIR
2908 The idea was suggested by Petr Sumbera in the thread starting
2910 http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00000.html
2911 * src/extract.c (set_mode): Save the errno of the chmod that
2912 failed, for the benefit of chmod_error_details. Do not bother
2913 retrying chmod unless the mode suggests setuid is the issue.
2914 (extract_archive): Remove redundant call to
2915 priv_set_remove_linkdir.
2916 * src/system.c: Include priv-set.h.
2917 (sys_spawn_shell, sys_child_open_for_compress):
2918 (sys_child_open_for_uncompress, sys_exec_command):
2919 (sys_exec_info_script, sys_exec_checkpoint_script):
2920 Invoke priv_set_restore_linkdir before execv or execlp, so that
2921 the subprocess has the same privileges that tar originally did.
2923 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2925 tar: handle files that occur multiple times but have link count 1
2927 This patch was inspired by the following patch that addressed a
2928 similar problem in GNU coreutils du:
2929 http://git.savannah.gnu.org/gitweb/?p=coreutils.git;h=efe53cc72b599979ea292754ecfe8abf7c839d22
2930 * src/common.h (name_count): New decl.
2931 * src/create.c (trivial_link_count): New static var.
2932 (create_archive): Initialize it.
2933 (dump_hard_link, file_count_links): Use it, so that files with
2934 link count 1 are handled correctly when they are found multiple
2936 * src/names.c (allocated_entries): Renamed from allocated_names,
2937 since the identifier's name was misleading. All uses changed.
2938 (entries): Renamed from names. All uses changed.
2939 (scanned): Renamed from name_index. All uses changed.
2940 (name_count): New var.
2941 (name_add_name): Increment it.
2942 * tests/link04.at: New file.
2943 * tests/testsuite.at: Add it.
2944 * tests/Makefile.am (TESTSUITE_AT): Likewise.
2946 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2948 tar: use nlink_t for link counts
2950 * src/create.c (struct link): nlink is now of type nlink_t,
2953 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2955 tar: don't export names that aren't used elsewhere
2957 * src/common.h (file_dumpable_p, gid_to_chars, major_to_chars):
2958 (minor_to_chars, mode_to_chars, uid_to_chars, uintmax_to_chars):
2959 (string_to_chars, dumpdir_creat0, dumpdir_create, dumpdir_free):
2960 (dumpdir_locate, dumpdir_next, dumpdir_first, gid_from_header):
2961 (major_from_header, minor_from_header, mode_from_header):
2962 (time_from_header, uid_from_header, quote_copy_string,
2964 (xheader_init, transform_header_name):
2965 Remove declarations; these are no longer exported from their
2967 (GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS):
2968 (UID_TO_CHARS, UINTMAX_TO_CHARS, UNAME_TO_CHARS, GNAME_TO_CHARS):
2969 Move to src/create.c, since no other module uses these.
2970 (GID_FROM_HEADER, MAJOR_FROM_HEADER, MINOR_FROM_HEADER):
2971 (MODE_FROM_HEADER, TIME_FROM_HEADER, UID_FROM_HEADER):
2972 Move to src/extract.c, since no other module uses these.
2973 (dumpdir_t, dumpdir_iter_t): Remove; no longer used.
2974 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars):
2975 (mode_to_chars, uid_to_chars, uintmax_to_chars, string_to_chars):
2976 (file_dumpable_p): Now static.
2977 * src/incremen.c (dumpdir_create0, dumpdir_create, dumpdir_free):
2978 (dumpdir_locate, dumpdir_next, dumpdir_first): Now static.
2979 (scan_directory, write_directory_file_entry):
2980 Use struct dumpdir_iter * rather than dumpdir_iter_t.
2981 * src/list.c (gid_from_header, major_from_header,
2983 (mode_from_header, time_from_header, uid_from_header):
2984 (transform_member_name): Now static.
2985 * src/misc.c (quote_copy_string): #if 0 out, as it's not used
2987 * src/system.c (wait_for_grandchild): Now static.
2988 * src/tar.c (request_stdin): Now static.
2989 * src/xheader.c (xheader_init): Now static.
2991 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2993 tar: fix misspelled identifier "set_comression_program_by_suffix"
2995 * src/suffix.c (set_compression_program_by_suffix): Renamed from
2996 set_comression_program_by_suffix.
2997 * src/buffer.c, src/common.h, src/tar.c: All uses changed.
2999 2010-08-20 Paul Eggert <eggert@cs.ucla.edu>
3001 tar: change interdir_made from int to bool
3003 * src/extract.c (maybe_recoverable, create_placeholder_file):
3004 Change interdir_made from int * to bool *, since the flag has just
3005 two values 0 and 1. All uses changed. This does not affect tar's
3008 2010-08-20 Paul Eggert <eggert@cs.ucla.edu>
3010 tar: remove trailing white space from source files
3012 * ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README:
3013 * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi:
3014 * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el:
3015 * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi:
3016 * doc/value.texi, lib/Makefile.am, scripts/backup-specs:
3017 * scripts/dump-remind.in, scripts/tar-snapshot-edit,
3019 * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c:
3020 * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c:
3021 * src/tar.h, src/update.c, src/warning.c, src/xheader.c:
3022 * tests/append01.at, tests/append02.at, tests/atlocal.in:
3023 * tests/delete03.at, tests/exclude.at, tests/exclude06.at:
3024 * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at:
3025 * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at:
3026 * tests/incr01.at, tests/incr02.at, tests/incr03.at,
3028 * tests/label02.at, tests/label03.at, tests/label04.at:
3029 * tests/label05.at, tests/link02.at, tests/link03.at:
3030 * tests/listed01.at, tests/listed02.at, tests/long01.at:
3031 * tests/longv7.at, tests/multiv01.at, tests/multiv02.at:
3032 * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at:
3033 * tests/multiv07.at, tests/multiv08.at, tests/options.at:
3034 * tests/options02.at, tests/remfiles03.at, tests/rename01.at:
3035 * tests/rename02.at, tests/rename03.at, tests/rename04.at:
3036 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
3037 * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at:
3038 * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at:
3039 * tests/star/README, tests/star/gtarfail2.at:
3040 * tests/star/multi-fail.at:
3041 * tests/star/pax-big-10g.at, tests/star/quicktest.sh:
3042 * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at:
3043 * tests/update01.at, tests/update02.at, tests/volsize.at:
3045 Remove trailing spaces and tabs from lines, and remove
3046 trailing empty lines from files. This makes it a bit easier
3047 to share code among coreutils and other projects that do this.
3049 2010-08-19 Paul Eggert <eggert@cs.ucla.edu>
3051 tar: update licenses to latest versions from www.gnu.org
3053 * COPYING: Update to latest version; this is just minor
3055 * doc/fdl.texi: Update from GFDL 1.2 to 1.3.
3056 * doc/tar.texi: Adjust to new format of fdl.texi. Omit trailing
3059 2010-07-18 Paul Eggert <eggert@cs.ucla.edu>
3061 * src/misc.c (struct wd): Fix comment to match code.
3063 2010-07-18 Paul R. Eggert <eggert@cs.ucla.edu>
3065 tar: no need to report getcwd error if never using the result
3067 * src/misc.c (struct wd): Rename 'saved' to 'err', with new
3069 (chdir_arg, chdir_do): Adjust to new semantics. Do not report an
3070 error merely because save_cwd fails; report an error only if
3071 save_cwd's result is needed later.
3072 * tests/extrac09.at: New file, to test for bug that was fixed.
3073 * tests/testsuite.at: Include it.
3074 * tests/Makefile.am (TESTSUITE_AT): Add it.
3076 2010-07-18 Paul R. Eggert <eggert@cs.ucla.edu>
3078 tar: go back to absolutifying filenames in normalize_filename
3081 * src/misc.c (normalize_filename): For now, go back to making
3082 filenames absolute, even though this causes 'tar' to fail when
3083 getcwd fails. However, do not attempt to resolve ".." as this
3084 does not work with symlinks. Also, do the right thing with
3085 leading file system prefixes and on hosts where // != /.
3087 2010-07-17 Sergey Poznyakoff <gray@gnu.org.ua>
3089 Allow for size suffixes in -L and --record-size options.
3091 * src/tar.c (TAR_SIZE_SUFFIXES): New define.
3092 (parse_opt): Allow for size suffixes in arguments to
3093 -L and --record-size options.
3094 * NEWS, doc/tar.texi: Update.
3096 2010-07-15 Paul R. Eggert <eggert@cs.ucla.edu>
3098 tar: don't crash if getcwd fails
3100 * src/extract.c: Don't include xgetcwd.h.
3101 (extract_dir): stat "." rather than statting getcwd's output.
3102 * src/misc.c (normalize_filename_x): Rewrite so as not to resolve
3103 /../, which can't be done reliably in the presence of symlinks.
3104 Don't reject valid names such as ".".
3105 (normalize_filename): Don't make it absolute; that way, we don't
3106 have to invoke xgetcwd which might fail. Don't bother to realloc
3107 at the end, since that uses time and now saves little space.
3108 (chdir_do): Don't crash if xgetcwd fails.
3109 * tests/Makefile.am (TESTSUITE_AT): Add listed03.at.
3110 * tests/listed03.at: New file.
3111 * tests/testsuite.at: Include listed03.at.
3113 2010-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
3115 Keep a detailed map of archive members stored in the record
3118 A separate map (bufmap) provides information for creating
3119 multi-volume continuation headers.
3121 * src/buffer.c (bufmap): New struct.
3122 (bufmap_head, bufmap_tail, inhibit_map): New variables.
3123 (mv_begin_write): New function.
3124 (mv_begin): Rename to mv_begin_read. Rewrite using mv_begin_write.
3125 All callers changed.
3126 (mv_total_size): Remove.
3127 (bufmap_locate, bufmap_free, bufmap_reset): New functions.
3128 (_flush_write): Update bufmap.
3129 (close_archive): Free bufmap.
3130 (add_chunk_header): Take a bufmap argument.
3131 (gnu_add_multi_volume_header): Likewise.
3132 (add_multi_volume_header): Likewise.
3133 (_gnu_flush_write): Rewrite using bufmap.
3134 (real_s_name, real_s_totsize)
3136 (save_name, save_totsize, save_sizeleft): Removed. All
3138 (mv_size_left): Update bufmap_head.
3140 (multi_volume_sync): Remove.
3142 * src/common.h (mv_begin_write): New prototype.
3143 (mv_begin): Rename to mv_begin_read.
3144 * src/create.c: Use mv_begin_write instead of mv_begin.
3145 Remove calls to mv_size_left and mv_end.
3146 * src/sparse.c: Likewise.
3148 * tests/multiv07.at: Close stdin.
3149 * tests/spmvp00.at: Update AT_KEYWORDS.
3150 * tests/spmvp10.at: Likewise.
3152 * tests/multiv08.at: New testcase.
3153 * tests/Makefile.am, tests/testsuite.at: Add multiv08.at.
3155 2010-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
3159 * NEWS, configure.ac: Version 1.23.90
3160 * doc/tar.texi: Document the use of lbzip2.
3162 2010-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
3164 Fix exclusion of long file names when extracting from pax format
3167 * src/list.c (read_and): Call decode_header before attempting
3169 (list_archive): Remove call to decode_header.
3171 * src/compare.c (diff_archive): Remove call to decode_header.
3172 * src/extract.c (extract_archive): Likewise.
3174 * test/exclude06.at: New test case.
3175 * tests/testsuite.at: Include exclude06.at.
3176 * tests/Makefile.am (TESTSUITE_AT): Add exclude06.at.
3178 2010-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
3182 * src/buffer.c (magic): Split the character constant to help
3183 cc recognize character boundaries (7 is a valid hex character).
3185 2010-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
3189 * src/buffer.c (magic): Fix xz magic.
3191 2010-06-16 Paul Eggert <eggert@cs.ucla.edu>
3193 Remove some lint, found by gcc -W etc.
3195 * src/common.h (label_notfound): New decl.
3196 * src/buffer.c (set_volume_start_time, compress_type):
3197 (guess_seekable_archive, open_compressed_archive, init_buffer):
3198 (_flush_write, archive_is-dev, increase_volume_number):
3199 (change_tape_menu, try_new_volume, add_chunk_header):
3200 (multi_volume_sync):
3201 Declare as 'static' if it's not exported.
3202 Use function prototype (void) rather than old-style ().
3203 * src/checkpoint.c (expand_checkpoint_string): Likewise.
3204 * src/incremen.c (dirlist_replace_prefix, makedumpdir,
3207 * src/list.c (print_volume_label): Likewise.
3208 * src/misc.c (normalize_filename_x): Likewise.
3209 * src/names.c (make_name, free_name, check_name_alloc,
3212 * src/tar.c (tar_list_quoting_style, add_exclude_array):
3213 (set_stat_signal): Likewise.
3214 * src/transform.c (new_transform,
3215 _single_transform_name_to_obstack):
3216 (_transform_name_to_obstack): Likewise.
3217 * src/unlink.c (dunlink_alloc): Likewise.
3219 * src/buffer.c (struct zip_magic): Use const when appropriate.
3220 * src/incremen.c (obstack_code_rename,
3221 write_directory_file_entry):
3223 * src/sparse.c (COPY_STRING): Likewise.
3224 * src/system.c (dec_to_env, time_to_env, oct_to_env, str_to_env):
3225 (chr_to_env): Likewise.
3226 * src/tar.c (tar_list_quoting_style, set_stat_signal): Likewise.
3228 * src/extract.c (extract_node): Don't return garbage.
3230 * src/names.c: Remove old-style declarations of getgrnam etc.
3231 All modern systems declare these, and it's not worth the hassle
3232 of ignoring the warnings on modern systems for old-style decls.
3234 2010-05-17 Sergey Poznyakoff <gray@gnu.org.ua>
3238 * src/incremen.c (make_directory): Retain the slash if it is the
3239 only character in a filename.
3241 2010-04-02 Sergey Poznyakoff <gray@gnu.org.ua>
3243 Recode NEWS back to UTF-8
3245 2010-04-01 Sergey Poznyakoff <gray@gnu.org.ua>
3247 Fix the gzip.at test case.
3249 * tests/gzip.at: Suppress gzip error output, as it can differ
3250 depending on its version etc. Bug reported by Ludovic Courtès.
3252 2010-03-28 Sergey Poznyakoff <gray@gnu.org.ua>
3254 New option --full-time.
3256 * src/common.h (full_time_option): New global.
3257 * src/tar.c (FULL_TIME_OPTION): New constant.
3258 (options): New option --full-time.
3259 (parse_opt): Handle the --full-time option.
3260 * src/list.c (simple_print_header): Pass full_time_option
3261 as the 2nd argument to tartime.
3262 * doc/tar.texi: Update.
3265 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
3267 Minor fixes in the testsuite.
3269 * tests/extrac07.at: Fix a typo (invalid number
3270 of arguments before format list).
3271 * tests/link02.at: Use `ln' instead of `link'.
3272 * tests/link03.at: Likewise.
3274 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
3278 * src/names.c (collect_and_sort_names): Remove
3279 entry from the table before freeing it.
3281 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
3283 Fix dead loop on extracting existing symlinks with the -k option.
3285 * src/extract.c (create_placeholder_file)
3286 (extract_link, extract_symlink)
3287 (extract_node, extract_fifo): Handle all possible
3288 return values from maybe_recoverable. This complements
3289 8f390db92fc. Reported by Ico Doornekamp <bug-tar@zevv.nl>.
3292 2010-03-20 Sergey Poznyakoff <gray@gnu.org.ua>
3294 Fix undesired error exit on receiving SIGPIPE.
3296 * src/tar.c: Do not ignore SIGPIPE.
3297 * tests/sigpipe.at: New testcase.
3298 * tests/Makefile.am, tests/testsuite.at: Add sigpipe.at
3299 * tests/remfiles01.at: Fix error code expectation.
3302 2010-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
3306 Tar --remove-files relied on canonicalize_file_name,
3307 which replaces symlinks in file name components with
3308 the directories they point to. Due to this, tar
3309 effectively ignored existence of symbolic links and
3310 was unable to remove a directory that contained any
3311 (Alexander Kozlov <akozlov@nada.kth.se>, 2010-03-15).
3313 * gnulib.modules: Remove canonicalize.
3314 * src/misc.c (normalize_filename): Rewrite
3315 from scratch. The function operates only on
3316 its input string, it makes no attempt to test
3317 components for existence or to resolve symbolic
3319 * tests/Makefile.am (TESTSUITE_AT): Add remfiles03.at.
3320 * tests/testsuite.at: Likewise.
3321 * tests/remfiles03.at: New test case.
3324 2010-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
3328 * src/buffer.c (check_label_pattern): Initialize result.
3329 * tests/remfiles01.at: Skip if run with root privileges.
3331 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
3333 Fix `--test-label' and `--label -r' behavior.
3335 * doc/tar.texi (Including a Label in the Archive): Revise
3339 * src/buffer.c (open_archive): Check volume label on
3340 ACCESS_UPDATE as well.
3341 * src/list.c (test_archive_label): Rewrite to match the
3343 * src/names.c (regex_usage_warning): Return int.
3344 (names_notfound): Rewrite the conditional.
3345 (label_notfound): New function.
3347 * tests/label03.at: New testcase.
3348 * tests/label04.at: New testcase.
3349 * tests/label05.at: New testcase.
3350 * tests/Makefile.am: Add new testcases.
3351 * tests/testsuite.at: Likewise.
3353 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
3357 * doc/tar.texi: Consistently use lowercase `see' within sentences.
3358 More fixes spotted by Denis Excoffier.
3361 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
3363 Shut up a gcc warning message.
3365 * src/tar.c (tar_help_filter): Use a separate const
3366 variable to hold returns from gettext. Reported by
3367 Peter Breitenlohner.
3369 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
3373 * src/names.c (collect_and_sort_names): Initialize prev_name.
3374 Reported by Dmitry V. Levin.
3376 2010-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
3380 * configure.ac, NEWS: Update version number.
3382 2010-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
3388 * doc/snapshot.texi, doc/snapshot.texi,
3389 doc/sparse.texi, doc/tar-snapshot-edit.texi,
3390 doc/tar.texi: Spellchecked and proof-read. Thanks
3392 * gnulib.modules: Remove utime.
3394 2010-03-08 Kamil Dudka <kdudka@redhat.com>
3396 Fix possible overflow in code_timespec (tiny change)
3398 * src/misc.c (code_timespec): ignore invalid values of ns
3400 2010-03-08 Sergey Poznyakoff <gray@gnu.org.ua>
3402 Minor fix in the testsuite.
3404 * tests/extrac05.at: Skip test if creating
3407 2010-03-08 Sergey Poznyakoff <gray@gnu.org.ua>
3409 Fix eventual memory override and fd exhaustion in create.c Both
3410 bugs reported by Kamil Dudka.
3412 * src/create.c (check_exclusion_tags): Do not keep
3413 pointer to a location within tagname: it may change
3414 after xrealloc. Use byte offset instead.
3415 (dump_file0): Close fd before returning without
3416 dumping the directory.
3418 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
3422 * doc/tar.texi: Improve some wording.
3424 2010-03-02 Antonio Diaz Diaz <ant_diaz@teleline.es>
3428 * configure.ac: Add TAR_COMPR_PROGRAM(lzip)
3429 * doc/tar.texi: Reflect lzip support.
3430 * src/buffer.c (compress_type) <ct_lzip>: New constant.
3431 (magic): Add magic for lzip.
3432 * src/suffix.c (compression_suffixes): Add lz.
3433 * src/tar.c: New option --lzip.
3435 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
3439 * tests/exclude05.at: Rewrite awk invocation to avoid
3440 overflowing awk's file table on Solaris.
3442 2010-03-02 Eric Blake <ebb9@byu.net>
3444 Fix large file support.
3446 * scripts/xsparse.c (read_map): Use fseeko.
3447 * src/incremen.c (write_directory_file): Likewise.
3449 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
3453 * src/buffer.c (seek_archive): Rewrite size computation
3454 to prevent it from reaching negative values. Based on
3455 report by Denis Excoffier <Denis.Excoffier@free.fr>.
3457 2010-02-25 Sergey Poznyakoff <gray@gnu.org.ua>
3459 Supply more information to the --to-command script.
3461 * src/system.c (stat_to_env): Pass information about the current
3462 volume in variables TAR_ARCHIVE, TAR_VOLUME, TAR_BLOCKING_FACTOR,
3464 * doc/tar.texi: Document new environment variables.
3466 * configure.ac: Version number 1.22.91.
3468 2010-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
3472 * src/names.c (regex_usage_warning): Fix warning message.
3474 2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
3478 2010-02-05 OndÅ™ej VaÅ¡Ãk <ovasik@redhat.com>
3480 Bugfix (tiny change)
3482 * src/xheader.c (xheader_read): Remove unnecessary call
3485 2010-01-26 Sergey Poznyakoff <gray@gnu.org.ua>
3487 Enable silent build mode.
3489 * configure.ac: Require automake 1.11, autoconf 2.63. Enable
3492 * lib/Makefile.am (rmt-command.h): Silent the rule.
3494 2010-01-25 Sergey Poznyakoff <gray@gnu.org.ua>
3496 Read POSIX multivolume archives split at the header boundary.
3498 * src/common.h (read_header_mode): New enum.
3499 (read_header): Change type of the 3rd argument.
3500 * src/list.c (read_header): Change type of the 3rd argument.
3501 All callers updated.
3502 * src/buffer.c (try_new_volume): Allow for volumes split at the
3503 extended/ustar header boundary. This is against POSIX specs, but
3504 we must be able to read such archives anyway.
3506 * tests/multiv07.at: New test case.
3507 * tests/Makefile.am: Add multiv07.at
3508 * tests/testsuite.at: Likewise.
3510 * src/compare.c: Update calls to read_header.
3511 * src/delete.c: Likewise.
3512 * src/update.c: Likewise.
3514 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3519 * doc/tar.texi: Update.
3520 * src/create.c (finish_header): Minor change.
3522 2010-01-24 Rob Vermaas <rob.vermaas@gmail.com>
3524 Bugfix (tiny change).
3526 * src/tar.c (format_default_settings)[REMOTE_SHELL]: Fix
3529 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3533 * src/incremen.c (read_incr_db_01)
3534 (read_directory_file): Initialize bufsize to 0.
3535 Suggested by noordsij@cs.helsinki.fi.
3537 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3539 Improve handling of --test-label.
3541 * src/list.c (print_volume_label): New function.
3542 (print_header): Call print_volume_label.
3543 (test_archive_label): New function.
3544 * src/buffer.c (VOLUME_LABEL_APPEND): Remove.
3545 (VOLUME_TEXT, VOLUME_TEXT_LEN): New macros
3546 (drop_volume_label_suffix): New function.
3547 (check_label_pattern): Use drop_volume_label_suffix.
3548 * src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND.
3549 (test_label_option): Remove.
3550 (drop_volume_label_suffix): New proto.
3551 (test_archive_label): New proto.
3552 * src/names.c (all_names_found): Remove test for
3554 * src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND.
3555 (set_subcommand_option): Improve diagnostics.
3556 (parse_opt): Set subcommand if --test-label is given.
3557 (main): Handle TEST_LABEL_SUBCOMMAND.
3559 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3561 Fix listing of volume labels (in particular in PAX archives).
3563 * src/buffer.c (match_volume_label): Call set_volume_label.
3564 (check_label_pattern): Get label string
3566 (match_volume_label): Handle volume labels stored in
3568 * src/common.c (print_header,read_header): Change signature.
3569 (read_header_primitive): Remove prototype.
3570 * src/list.c (recent_global_header): New static.
3571 (list_archive): Always print volume labels.
3572 (read_header_primitive): Remove.
3573 (read_header): Change the signature (all callers updated)
3574 Save the recent global header.
3575 (volume_label_printed): New static.
3576 (simple_print_header): New function (ex-print_header).
3577 (print_header): Change the signature (all callers updated).
3578 For POSIX formats, print first volume header (if set).
3579 * src/xheader.c (xheader_write_global): Write the data
3580 accumulated in xhdr->stk even if keyword_global_override_list
3582 (xheader_read): On unexpected EOF, report error instead of
3584 (XHDR_PROTECTED, XHDR_GLOBAL): New defines.
3585 (struct xhdr_tab): Remove `protected' with `flags'. All uses
3587 (decg): If XHDR_GLOBAL bit is set, call the keyword's decode
3588 method instead of adding it to `kwl'.
3590 * src/compare.c: Update calls to read_header.
3591 * src/create.c: Likewise.
3592 * src/delete.c: Likewise.
3593 * src/update.c: Likewise.
3594 * src/extract.c: Likewise.
3595 (extract_volhdr): Do not print "Reading <label>" statement,
3597 it is inconsistent: it is not printed if the volume begins with a
3598 member continued from the previous volume.
3600 * tests/label01.at: New testcase.
3601 * tests/label02.at: New testcase.
3602 * tests/Makefile.am, tests/testsuite.at: Add new testcases.
3604 2010-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
3606 Fix prefix length calculation in ustar mode.
3608 * src/create.c (split_long_name): Fix prefix length
3610 (write_ustar_long_name): Improve ustar mode compatibility
3611 with the Sun version.
3613 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3615 Rewrite update algorithm.
3617 * src/common.h (namebuf_t): New typedef.
3618 (namebuf_create, namebuf_free)
3619 (namebuf_name): New prototypes.
3620 (remname): New prototype.
3621 * src/misc.c (struct namebuf): New structure.
3622 (namebuf_create, namebuf_free)
3623 (namebuf_name): New functions.
3624 * src/create.c (dup_dir0): Remove is_avoided_name
3625 checks. This is taken care of in update_archive.
3626 * src/incremen.c (scan_directory): Use namebuf
3627 to produce full file names.
3628 * src/names.c (nametail): Remove extra level of
3629 indirection. All uses updated.
3630 (avoided_name_table, add_avoided_name)
3631 (is_avoided_name): Remove.
3632 * src/update.c (update_archive): Change algorithm.
3633 Instead of adding unmodified files to the avoided_name
3634 table, create namelist so that it contains only
3637 * tests/Makefile.am: Add update01.at, update02.at
3638 * tests/testsuite.at: Likewise.
3639 * tests/update.at (AT_KEYWORDS): Add update00.
3641 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3645 * src/tar.c (main): Ignore SIGPIPE.
3646 * src/system.c (sys_child_open_for_compress)
3647 (sys_child_open_for_uncompress): Reset SIGPIPE
3648 in child to default.
3649 * tests/remfiles01.at: Avoid race conditions.
3650 * tests/remfiles02.at: Likewise.
3652 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3656 * src/buffer.c (_open_archive): Call guess_seekable_archive
3657 only if the call to open_compressed_archive succeeded.
3659 2009-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
3661 Improve previous changes.
3663 * acinclude.m4: Fix typos.
3664 * gnulib.modules: Add xvasprintf.
3665 * src/common.h: Include xvasprintf.h.
3666 * src/tar.c (options): Remove docstrings for --gzip, --bzip2,
3667 --compress, --lzop, --lzma and --xz.
3668 (tar_help_filter): Generate these using actual values of
3669 *_PROGRAM constants.
3670 (format_default_settings): Use xasprintf.
3671 (parse_opt): Use *_PROGRAM defines instead of hardcoded
3674 2009-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
3676 Allow installers to specify alternative program names for
3677 compression programs.
3679 This adds --with-gzip, --with-bzip2 etc. switches to the
3681 one can do, e.g. ./configure --with-bzip2=lbzip2 and have
3683 whenever user calls `tar --bzip2'.
3685 * acinclude.m4: New file.
3686 * configure.ac: Add TAR_COMPR_PROGRAM invocations for
3687 the supported compressors.
3688 * src/buffer.c (magic): Use *_COMPRESSOR defines instead
3689 of hardcoded program names.
3690 * src/suffix.c (compression_suffixes): Likewise.
3692 2009-10-09 Sergey Poznyakoff <gray@gnu.org.ua>
3696 * src/buffer.c (magic): Fix `xz' entry: add the name of the
3698 * src/suffix.c (compression_suffixes, nsuffixes): Mark as static.
3700 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3702 Provide a way to explicitly set mtime for extended header
3705 * src/tar.c (struct textual_date): ts is a copy of the structure,
3706 not a pointer to it. Date is a copy as well, hence the `const' is
3708 (get_date_or_file): Return 0/1 depending on success/failure.
3709 Copy timestamp to the `ts' member. Store a copy of the string
3711 (report_textual_dates): Report only if verbose_option is set,
3712 but always free the list.
3713 (expand_pax_option): New function.
3714 (parse_opt): Preprocess the argument to xheader_set_option with
3716 (decode_options): Call report_textual_dates unconditionally.
3717 * src/xheader.c (exthdr_mtime_option, exthdr_mtime)
3718 (globexthdr_mtime_option, globexthdr_mtime): New statics.
3719 (xheader_set_keyword_equal): handle exthdr.mtime and
3721 (xheader_write): Override `t' argument if a corresponding
3722 exthdr.mtime or globexthdr.mtime option is set.
3724 * doc/tar.texi: Document the changes.
3726 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3728 Use file's mtime as mtime for its extended header.
3730 This makes two pax archives binary equivalent if they
3731 have the same contents and care is taken to make extended
3732 headers otherwise reproducible, e.g. by using:
3734 --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0
3736 Proposed by Michael D. Adams <mdmkolbe@gmail.com>.
3738 * src/common.h (start_private_header): Take time_t as 3rd param.
3739 (xheader_write): Likewise.
3740 * src/create.c (start_private_header): Take time_t as 3rd param.
3741 All callers updated.
3742 (write_extended): Use file's mtime as mtime for its extended
3744 Use current time stamp as mtime for global headers.
3745 (xheader_write): Take time_t as 3rd param.
3747 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3749 Fix bugs in handling the --remove-files option.
3751 Make sure the files are deleted only if they were succesfully
3755 * src/exit.c: New file.
3756 * src/unlink.c: New file.
3757 * src/Makefile.am (tar_SOURCES): Add exit.c and unlink.c.
3758 * src/common.h: Include progname.h
3759 (program_name): Remove global.
3760 (records_written): New extern.
3761 (queue_deferred_unlink, finish_deferred_unlinks): New prototypes.
3762 (fatal_exit_hook): New extern.
3763 * src/create.c (create_archive): Call finish_deferred_unlinks.
3764 (dump_hard_link, dump_file0): Don't actually unlink the file,
3765 queue it to deferred_unlinks instead.
3766 * src/delete.c (records_written): Remove extern: declared in
3768 * src/extract.c (extract_archive): Set fatal_exit_hook.
3769 (fatal_exit, xalloc_die): Move to exit.c
3770 * src/system.c (sys_wait_for_child): Exit immediately
3771 if the child dies or exits with a non-zero status.
3772 (sys_child_open_for_compress)
3773 (sys_child_open_for_uncompress): Use set_program_name,
3774 instead of setting program_name directly.
3775 * src/tar.c (main): Use set_program_name,
3776 instead of setting program_name directly.
3778 * tests/Makefile.am (TESTSUITE_AT): Add remfiles01.at
3780 * tests/testsuite.at: Likewise.
3781 * tests/gzip.at: Reflect the above changes.
3783 2009-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
3785 Fix bug in OLDGNU format creation.
3787 See tests/append02.at for a detailed description
3789 * src/common.h (MODE_FROM_HEADER): Take additional argument.
3790 (mode_from_header): Likewise.
3791 * src/create.c (mode_to_chars): Store all mode bits if
3792 using OLDGNU_FORMAT. This reverses f4e4adea80a.
3793 * src/list.c (decode_header): Use header mode field
3794 to discern between GNU and OLDGNU formats.
3795 (mode_from_header): Store unrecognized mode bits (from 10th up)
3796 in the location pointed to by the third parameter.
3797 * tests/append02.at: Update documentation and references.
3799 2009-09-16 Sergey Poznyakoff <gray@gnu.org.ua>
3801 Restore extra help output.
3803 * src/tar.c (tar_list_quoting_styles): Change first argument to
3805 (format_default_settings): New function.
3806 (show_default_settings)
3807 (show_default_settings_fs): Removed.
3808 (tar_help): Removed.
3809 (tar_help_filter): New function.
3810 (argp): Set help_filter.
3811 (parse_opt): Fix error message.
3813 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3815 Improve command line option handling.
3817 * gnulib.modules: Add argp-version-etc and progname,
3818 use getopt-gnu instead of getopt.
3819 * src/tar.c (HANG_OPTION, USAGE_OPTION)
3820 (VERSION_OPTION): Remove.
3821 (options): Remove corresponding options. Let argp
3823 (parse_opt): Likewise.
3824 (_argp_hang): Removed.
3825 (tar_authors): New variable.
3826 (decode_options): Call argp_version_setup.
3827 Do not use ARGP_NO_HELP flag in the call to argp_parse.
3829 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3831 Avoid overwriting exit_status with a value indicating less
3832 important condition.
3834 * src/tar.c (set_exit_status): New function.
3835 * src/common.h (set_exit_status): New prototype.
3836 * src/compare.c: Use set_exit_status instead of
3837 exit_status assignments.
3838 * src/create.c: Likewise.
3839 * src/misc.c: Likewise.
3841 * src/system.c (wait_for_grandchild): Use auto variable
3842 instead of the global exit_status.
3843 * src/incremen.c (scan_directory): Use file_removed_diag
3844 instead of stat_diag.
3846 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3848 Automatic detection of seekable archives.
3850 * src/buffer.c (guess_seekable_archive): New function.
3851 (_open_archive): Call guess_seekable_archive for archives
3853 (new_volume): Likewise.
3854 * src/common.h (seek_option): New global.
3855 * src/tar.c (options): New option --no-seek.
3856 (parse_opt): --seek and --no-seek set seek_option,
3857 not seekable_archive.
3858 (decode_options): Initialize seek_option to -1.
3861 * doc/tar.texi: Update.
3863 2009-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
3867 * tests/extrac08.at: Ensure a predictable umask value.
3868 * tests/xform-h.at (xform): do not depend on file name
3871 2009-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
3873 Fix interaction between --listed-incremental and -C
3875 * src/incremen.c (read_directory_file): Execute eventual -C dir
3876 after opening the snapshot file.
3877 (collect_and_sort_names): Remove call to chdir_do
3878 * tests/incr05.at, tests/incr06.at: Use relative file names for
3881 2009-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
3883 Update for new exclude module from gnulib. Add testcases by
3886 * src/names.c (is_pattern): Remove.
3887 (regex_usage_warning): Use fnmatch_pattern_has_wildcards
3890 * src/tar.c: New option --exclude-backups.
3891 (vcs_file_table, backup_file_table): New globals.
3892 (add_exclude_array): New function.
3893 * tests/exclude01.at, tests/exclude02.at,
3894 tests/exclude03.at, tests/exclude04.at,
3895 tests/exclude05.at: New testcases. Supplied by Phil Proudman.
3896 * tests/Makefile.am (TESTSUITE_AT): Add new tests.
3897 * tests/testsuite.at: Add new tests.
3900 2009-08-10 Sergey Poznyakoff <gray@gnu.org.ua>
3902 Remove src/version.c (reappeared after migration to Git)
3904 2009-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
3908 * src/misc.c (file_removed_diag): Set exit code to
3911 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3915 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3917 Fix handling of files removed during incremental dumps.
3919 Changes to src/create.c and src/incremen.c are partially
3920 based on patch from Alexander Peslyak <solar at openwall.com>.
3922 The new testcases require paxutils commit f653a2b or later.
3924 * src/common.h (struct name): New member `cmdline'.
3925 (dump_file): Change type of the 2nd argument to bool.
3926 (file_removed_diag, dir_removed_diag): New prototypes.
3927 (addname): New argument `cmdline'.
3928 (name_from_list): Change return value.
3929 * src/create.c (dump_dir0, dump_dir): top_level is bool.
3930 (create_archive): Update calls to name_from_list.
3931 Take advantage of the name->cmdline to set top_level argument
3932 during incremental backups.
3933 (dump_file0): top_level is bool.
3934 Do not bail out if a no-top-level file disappears during
3936 backup, use file_removed_diag instead.
3937 (dump_filed): top_level is bool.
3938 * src/incremen.c (update_parent_directory): Silently ignore
3939 ENOENT. It should have already been reported elsewhere.
3940 (scan_directory): Use dir_removed_diag to report missing
3942 * src/misc.c (file_removed_diag, dir_removed_diag): New functions.
3943 * src/names.c (name_gather): Set ->cmdname.
3944 (addname): Likewise. All uses updated.
3945 (name_from_list): Return struct name const *. All uses updated.
3947 * tests/filerem01.at: New testcase.
3948 * tests/filerem02.at: New testcase.
3949 * tests/Makefile.am, tests/testsuite.at: Add filerem01.at,
3951 * tests/grow.at, test/truncate.at: Use new syntax for genfile
3955 * doc/tar.texi: Minor fix.
3957 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3959 Optimize searches for directory structures by keeping a pointer
3960 to struct directory in struct name.
3962 * src/common.h (struct name): New member `directory' replaces
3963 dir_contents. Rearrange members.
3964 (rebase_directory): Change signature.
3965 (scan_directory): Change signature.
3966 (name_fill_directory)
3967 (directory_contents, safe_directory_contents): New prototypes.
3968 (append_incremental_renames): Change signature.
3969 (replace_prefix): New proto.
3970 * src/compare.c (diff_dumpdir): Use directory_contents +
3973 * src/incremen.c (replace_prefix): Move to misc.c
3974 (rebase_directory): Rewrite.
3975 (scan_directory): Return pointer to struct directory.
3976 (directory_contents, safe_directory_contents): New functions.
3977 (get_directory_contents): Remove.
3978 (name_fill_directory): New function.
3979 (append_incremental_renames): Rewrite. This also fixes a memory
3981 * src/names.c (name_gather, addname): Reflect changes in struct
3983 (add_hierarchy_to_namelist): Rewrite using name_fill_directory and
3985 (rebase_child_list): Update call to rebase_directory.
3986 (collect_and_sort_names): Optimize
3988 * src/misc.c (replace_prefix): New function.
3989 * src/names.c (add_hierarchy_to_namelist): Use new
3990 get_directory_contents.
3992 * tests/incr05.at: New test case.
3993 * tests/incr06.at: New test case.
3994 * tests/Makefile.am, test/testsuite.at: Add incr05.at and
3997 * doc/Makefile.am (check-options): Improve rule.
3998 * doc/tar.texi, NEWS: Update.
4000 2009-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
4004 * src/common.h (rebase_directory): New prototype.
4005 * src/incremen.c (rebase_directory): Use replace_prefix.
4006 * src/names.c (collect_and_sort_names): Abort if
4009 2009-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
4011 Improve listed incremental dumps.
4013 The modified algorithm tries to avoid dumping the same
4014 directory twice and ensures the order of the directories
4015 in the resulting archive is the same, whatever their order
4016 on the command line. It also fixes the operation of
4017 --listed-incremental -C.
4019 * gnulib.modules: Add canonicalize
4020 * src/common.h (incremental_level): New global.
4021 (check_exclusion_tags): first argument is const.
4022 (get_directory_contents): Add third argument.
4023 (zap_slashes, normalize_filename): New prototypes.
4024 (chdir_count): New prototype.
4025 (WARN_VERBOSE_WARNINGS): New define.
4026 (WARN_ALL): Exclude WARN_VERBOSE_WARNINGS.
4027 * src/compare.c (diff_dumpdir): Update the call to
4028 get_directory_contents.
4029 * src/create.c (check_exclusion_tags): First argument is const.
4030 Use ISSLASH and DIRECTORY_SEPARATOR instead of referring to '/'.
4032 * src/incremen.c (struct directory): New member `caname'.
4033 (hash_directory_name): Rename to
4034 hash_directory_canonical_name. Operate
4035 on the canonical name.
4036 (compare_directory_names): Rename to
4037 compare_directory_canonical_names.
4038 Operate on the canonical name.
4039 (make_directory): Take two arguments.
4040 (free_directory): Free caname.
4041 (attach_directory): Create caname.
4042 (find_directory): Use caname for lookups.
4043 (PD_VERBOSE): Remove.
4044 (PD_FORCE_INIT): New define.
4045 (procdir): First argument is const.
4046 Reinitialize directory if PD_FORCE_INIT bit is set.
4047 Do not use PD_VERBOSE or verbose_option for issuing warnings.
4048 Rely on WARNOPT instead.
4050 (scan_directory): Take three arguments. The third one is a boolean
4051 which is true if the directory is explicitly mentioned on
4054 (get_directory_contents): Remove. Use scan_directory instead.
4055 All callers updated.
4056 (read_directory_file): Truncate the file if --level=0 is given.
4057 * src/misc.c: Include canonicalize.h
4058 (zap_slashes, normalize_filename): New functions.
4059 (chdir_count): New function.
4060 * src/names.c (add_hierarchy_to_namelist): Take three arguments,
4062 get_directory_contents and scan_directory.
4063 (collect_and_sort_names): Allow at most one -C, before file name
4065 Read directory file after eventual changing to another directory.
4066 Avoid adding the same directory under different pathnames to
4068 * src/tar.c: New option --level.
4070 * tests/incr03.at, tests/incr04.at, tests/listed01.at,
4071 tests/listed02.at, tests/rename01.at, tests/rename02.at,
4072 tests/rename03.at: Update for new tar behavior.
4073 * tests/multiv01.at: Do not use --listed-incremental.
4075 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
4077 Forgotten to push src/warning.c
4079 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
4081 Implement the --warning option.
4083 * src/warning.c: New file.
4084 * src/Makefile.am: Add warning.c
4085 * src/common.h: Provide definitions for warning classes.
4086 (warning_option): New global.
4087 (WARNOPT): New define.
4088 (set_warning_option): New prototype.
4089 * src/tar.c: New option `--warning'.
4090 * src/compare.c: When applicable WARNOPT instead of WARN.
4091 * src/create.c: Likewise.
4092 * src/extract.c: Likewise.
4093 * src/incremen.c: Likewise.
4094 * src/list.c: Likewise.
4096 * NEWS, doc/tar.texi: Update.
4098 2009-08-05 Carl Worth <cworth@cworth.org>
4100 Fix descriptions of some options (tiny change)
4102 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
4104 Fix backup handling and restoring file modes of existing
4107 * NEWS, THANKS: Update
4108 * src/extract.c (extract_dir): reset status to 0 if the
4109 directory already exists.
4110 * src/misc.c (maybe_backup_file): Assign before_backup_name
4111 and clear after_backup_name before checking if we really need
4113 * tests/backup01.at: New testcase.
4114 * tests/extrac08.at: New testcase.
4115 * tests/Makefile.am, tests/testsuite.at: Add extrac08.at and
4118 2009-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
4120 Fix hard links recognition with -c --remove-files
4122 * src/create.c (dump_hard_link): Always look up in the link table
4123 if remove_files_option is set. Patch suggested by Theodore Ts'o
4125 (check_links): Remove extra newline from the warning message.
4126 * tests/link02.at, tests/link03.at: New testcases.
4127 * tests/Makefile.am (TESTSUITE_AT): Add link02.at and link03.at
4128 * tests/testsuite.at: Include link02.at and link03.at
4130 2009-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
4132 Fix handling of hard link targets by -c --transform
4134 * src/create.c (file_count_links): Transform link target
4136 * tests/xform-h.at: New test case.
4137 * tests/Makefile.am (TESTSUITE_AT): Add xform-h.at.
4138 * tests/testsuite.at: Add xform-h.at
4140 2009-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
4144 * src/extract.c (file_newer_p): Do not report error on ENOENT
4146 2009-06-19 Sergey Poznyakoff <gray@gnu.org.ua>
4148 Remove rebox.el (reappeared after migration to Git)
4150 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
4152 Remove files that were removed in CVS, but reappeared after
4155 2009-06-18 David Bartley <dtbartle@csclub.uwaterloo.ca>
4157 Fix Solaris bug where chmod fails if we don't have
4160 * gnulib.modules: Add priv-set.
4161 * src/extract.c (set_mode, extract_archive): Restore
4162 PRIV_SYS_LINKDIR on chmod failure.
4163 * src/tar.c (main): Drop PRIV_SYS_LINKDIR on startup.
4165 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
4167 Ensure default behavior for SIGPIPE
4169 * src/tar.c (main): Install default handler for SIGPIPE.
4170 Proposed by Bastian Blank.
4172 2009-06-18 Eric Blake <ebb9@byu.net>
4174 Follow autoconf recommendation for TESTSUITEFLAGS.
4176 * tests/Makefile.am (check-local, installcheck-local): Honor
4179 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
4181 Fix handling of sub-subprocess returns.
4183 * src/system.c (wait_for_grandchild): New function.
4184 (sys_child_open_for_compress)
4185 (sys_child_open_for_uncompress): Use wait_for_grandchild
4186 to manage grandchild return.
4188 2009-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
4190 Report record size only if the archive refers to a device.
4192 * Makefile.am (INCLUDES): Add ../lib, for rmt-command.h
4193 * src/buffer.c (short_read): Report the actual record size
4194 only if the archive descriptor refers to a device.
4195 * tests/pipe.at, tests/shortrec.at,
4196 tests/sparsemvp.at: Reflect the above change.
4197 * NEWS, configure.ac: Version 1.22.90
4199 2009-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
4201 Do not issue errors on existing files when given the -k option
4203 * Makefile.am (dist-hook): Fix rule.
4204 * src/extract.c (maybe_recoverable): Return three-state value.
4205 (extract_dir): Skip extraction if maybe_recoverable indicates so.
4206 (extract_file): Likewise.
4208 2009-05-12 Eric Blake <ebb9@byu.net>
4210 Avoid undefined behavior
4212 * src/xheader.c (xheader_set_keyword_equal): Pass correct type to
4214 * src/transform.c (run_case_conv): Likewise.
4216 2009-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
4218 Remove src/Makefile.in
4220 2009-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
4224 * bootstrap (symlink_to_dir): Fix symlink calculation.
4225 * doc/tar.texi: Minor fixes by Victor Villa and Stepan Kasal.
4227 2009-03-07 Sergey Poznyakoff <gray@gnu.org.ua>
4233 Currently the ChangeLog is generated automatically from the Git
4234 revision history, but from 1997 to 2009 the ChangeLog file was
4235 maintained by hand, under CVS. This file records the older log.
4237 Copyright 1997-2001, 2003-2009, 2013 Free Software Foundation, Inc.
4239 This file is part of GNU tar.
4241 GNU tar is free software; you can redistribute it and/or modify
4242 it under the terms of the GNU General Public License as published by
4243 the Free Software Foundation; either version 3 of the License, or
4244 (at your option) any later version.
4246 GNU tar is distributed in the hope that it will be useful,
4247 but WITHOUT ANY WARRANTY; without even the implied warranty of
4248 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4249 GNU General Public License for more details.
4251 You should have received a copy of the GNU General Public License
4252 along with this program. If not, see <http://www.gnu.org/licenses/>.
4254 2009-03-05 Sergey Poznyakoff <gray@gnu.org.ua>
4256 * src/incremen.c: --no-recursive works with --incremental.
4258 2009-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
4262 * src/buffer.c, src/suffix.c: Add support for xz compression.
4263 * src/tar.c: New option --xz, for compression/decompression using xz.
4264 Re-assign -J as a short equivalent of --xz.
4266 2009-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
4268 * doc/tar.texi: Fix typo.
4270 2008-12-29 Sergey Poznyakoff <gray@gnu.org.ua>
4272 * bootstrap.conf: Include size_max.
4273 * gnulib.modules: Remove memset, rmdir. Replace strdup with
4274 strdup-posix. Patch by Eric Blake.
4275 * src/tar.c: Implement -I as a shorthand for --use-compress-program.
4276 * doc/tar.texi: Document -I.
4277 * tests/pipe.at, tests/shortrec.at: Account for eventual 'Record
4279 * tests/testsuite.at (AT_TAR_CHECK_HOOK): New define
4280 (AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros.
4282 2008-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
4284 * src/xheader.c: Remove duplicate inclusion of fnmatch.h. Reported
4287 2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
4289 Do not try to drain the input pipe before closing the
4292 * src/buffer.c (close_archive): Remove call to
4293 sys_drain_input_pipe. Pass hit_eof as the second
4294 argument to sys_wait_for_child.
4295 * src/common.h (sys_drain_input_pipe): Remove
4296 (sys_wait_for_child): Declare second argument.
4297 * src/system.c (sys_drain_input_pipe): Remove.
4298 (sys_wait_for_child): Take two arguments. The second one helps to
4299 decide whether to tolerate child termination on SIGPIPE.
4301 2008-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
4303 * src/buffer.c (_write_volume_label): Fix typo, which prevented
4304 `-V label -M' from working.
4306 2008-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
4308 * NEWS, configure.ac: Version 1.20.91
4309 * doc/tar.texi: Document transformation scope flags.
4310 * src/common.h (transform_symlinks_option): Remove in favor of
4311 transformation scope flags.
4312 (XFORM_REGFILE, XFORM_LINK, XFORM_SYMLINK, XFORM_ALL): New macros.
4313 (transform_name, transform_member_name, transform_name_fp): Take
4314 an additional argument, specifying scope flags.
4315 * src/create.c: Reflect changes to transform_name.
4316 * src/extract.c (extract_link, extract_symlink): Remove calls to
4317 transform_member_name. It is done in read_header.
4318 * src/list.c (decode_xform): Reflect change in data type of 2nd
4320 (transform_member_name): 2nd arg is int.
4321 (decode_header): Transform file name and link target names.
4322 * src/tar.c: Remove --transform-symlinks.
4323 * src/transform.c (struct transform): New member `flags'.
4324 (transform_flags): New variable.
4325 (parse_transform_expr): Parse transformation scope flags. Allow to
4326 set global flags using `flags=' syntax.
4327 (_transform_name_to_obstack, transform_name_fp)
4328 (transform_name): Take an additional argument, specifying scope
4331 2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
4333 * THANKS: Add Ed Leaver.
4334 * src/buffer.c (short_read): Remove !read_full_records condition,
4335 which was always false on a first record and thus disabled record
4336 size autodetection. Thanks Ed Leaver for the patch.
4337 (_gnu_flush_read): Handle blocking_factor == 1.
4338 * tests/sparsemv.at: Reflect changes to buffer.c.
4339 * tests/sparsemvp.at: Likewise.
4340 * tests/volsize.at: Likewise.
4343 2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
4345 * src/common.h (transform_symlinks_option): New global.
4346 * src/create.c (dump_file0): Transform symlink targets only if
4347 explicitly required. Thanks Cyril Strejc for reporting the
4349 * src/tar.c (parse_opt): New options --transform-symlinks and
4350 --no-transform-symlinks. New alias --xform to the --transform
4352 * doc/tar.texi: Document --transform-symlinks
4356 * src/names.c (name_gather): Use xzalloc.
4357 * src/buffer.c (short_read): Move record size detection before
4360 2008-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
4362 * src/tar.c (options): Add --lzop option.
4364 2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
4366 * src/checkpoint.c (checkpoint_compile_action): Add missing
4369 2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
4372 * doc/tar.texi: Update.
4373 * src/tar.c: New option --no-null.
4375 2008-09-23 Sergey Poznyakoff <gray@gnu.org.ua>
4377 * src/common.h (filename_terminator): Remove global.
4378 * src/tar.c (filename_terminator): New static.
4379 * src/names.c (name_next_elt): Do not depend on
4380 filename_terminator, this was a leftover from 1.13.
4382 2008-09-18 Sergey Poznyakoff <gray@gnu.org.ua>
4384 * doc/tar.texi: Remove incorrect example.
4386 2008-09-07 Sergey Poznyakoff <gray@gnu.org.ua>
4388 * src/incremen.c (dumpdir_create0): Eliminate gcc warning.
4389 (attach_directory): Bugfix - add missing return statement.
4390 * THANKS: Add Enric Hernandez
4392 2008-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
4394 * src/incremen.c (struct directory): New member `next'. Change
4396 (dirhead, dirtail): New statics.
4397 (make_directory): Reflect changes to struct directory.
4398 (free_directory, attach_directory): New functions.
4399 (dirlist_replace_prefix): New function.
4400 (note_directory): Use attach_directory, instead of make_directory,
4401 (find_directory, find_directory_meta): Use free_directory.
4402 (procdir): Replace directory prefixes in directory list to avoid
4403 marking subdirectories as renamed after renaming their parent
4405 (append_incremental_renames): Iterate over directory list, not
4406 hash table, to preserve logical ordering of renames.
4407 * tests/rename04.at, tests/rename05.at: New test cases.
4408 * tests/Makefile.am, tests/testsuite.at: Add rename04.at and
4410 * tests/atlocal.in (decho): New function.
4411 * tests/multiv06.at: Use decho instead of echo2.
4412 * tests/incremental.at: Raise wait interval to 2 seconds.
4414 2008-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
4416 * src/tar.c (decode_options): Do not allow volume length less
4418 * src/buffer.c (_gnu_flush_write): Compensate for the effect
4419 of eventual flush_archive occurring in the middle of buffer
4421 Increment records_written only if _flush_write was able to write
4423 * tests/multiv06.at: New testcase.
4424 * tests/Makefile.am, test/testsuite.at: Add tests/multiv06.at
4426 2008-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
4428 * configure.ac, NEWS: Version 1.20.90
4429 * doc/tar.texi: Document -J, --no-auto-compress, etc.
4430 * src/buffer.c (ct_tar): New constant.
4431 (magic): Add lzop support. Proposed by Kevin Day
4432 <thekevinday@gmail.com>.
4433 (check_compressed_archive): Do not use autodetect if the
4434 compression program was specified explicitly.
4435 Fall back to analyzing archive name, if the autodetection fails.
4436 * src/suffix.c: Add .lzo
4437 * src/tar.c: New options --lzop and --no-auto-compress.
4438 New short option -J (alias for --lzma).
4440 * src/buffer.c (try_new_volume): Print more information with error
4442 (_gnu_flush_write): Improve error checking. Adjust
4443 real_s_sizeleft before calling new_volume to avoid creating
4444 malformed multivolume headers.
4445 * tests/delete05.at, tests/gzip.at, tests/ignfail.at,
4446 tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
4447 tests/shortfile.at: Update to match new diagnostic wording
4452 2008-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
4454 * doc/tar.texi (exclude): Document support for new VCS.
4457 * tests/multiv05.at: Fix typos.
4458 * tests/volsize.at: Remove a TZ dependency.
4460 2008-06-14 Dan Drake <dan@dandrake.org> (tiny change)
4462 * src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and
4465 2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
4467 * src/tar.c (main): Reword the "delayed error" message. New
4468 wording proposed by Karl Berry.
4470 2008-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
4472 * configure.ac: Raise version number to 1.20
4473 * src/compare.c (diff_dumpdir): const.
4474 * src/common.h (dumpdir_t,dumpdir_iter_t): New data types.
4475 (dumpdir_create0,dumpdir_create,dumpdir_free,dumpdir_locate)
4476 (dumpdir_first,dumpdir_next): New functions.
4477 * src/incremen.c (dumpdir_create0,dumpdir_create,dumpdir_free)
4478 (dumpdir_first,dumpdir_next): New functions.
4479 (dumpdir_locate): Rewrite using binary search.
4480 (struct directory): Change members char *contents, *icontents to
4481 struct dumpdir *dump, *idump. All references updated.
4482 (note_directory): Last arg is const.
4483 * src/names.c (add_hierarchy_to_namelist): buffer is const.
4484 * tests/incr03.at, tests/incr04.at, tests/rename02.at,
4485 tests/rename03.at: Insert calls to sleep between creation of files
4486 and adding them to the archive.
4488 2008-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
4490 * src/create.c (dump_file0): Count links only for actually dumped
4493 2008-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
4495 * NEWS: Document --no-check-device and --check-device.
4496 * doc/rendition.texi: Change the way FIXME-*refs are handled in
4498 * doc/intern.texi, doc/tar.texi: Update.
4499 * doc/untabify.el: New file.
4500 * doc/Makefile.am (EXTRA_DIST): Add untabify.el
4501 (untabify, final, check-format, check-refs, check-fixmes)
4502 (check-unrevised, all-check-docs, check-docs): New rules.
4504 * src/common.h (check_device_option): New global.
4505 * src/incremen.c (procdir): Use boolean and instead of bitwise
4506 one. Patch by Jean-Louis Martineau.
4507 Compare device numbers only if check_device_option is set.
4508 * src/tar.c: New command line options --no-check-device and
4509 --check-device. Proposed by Jean-Louis Martineau.
4510 (parse_opt): Hanlde new options.
4511 (decode_options): Initialize check_device_option to true.
4515 2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
4517 * bootstrap: Use rsync to get translations.
4518 * doc/tar.texi: Minor change.
4519 * lib/.cvsignore: Update
4520 * po/.cvsignore: Update
4521 * src/system.c: Remove include setenv.h.
4522 * tests/atlocal.in (STAR_DATA_URL): Update.
4523 * tests/star/README: Update URL.
4525 2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
4527 * doc/tar.texi: Fix a typo. Reported by Denis Excoffier.
4529 2008-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
4532 * configure.ac: Version 1.19.90
4533 * po/POTFILES.in: Add missing files.
4534 * src/compare.c (verify_volume): Honor --ignore-zeros.
4535 Proposed by Jan-Benedict Glaw.
4536 * tests/shortfile.at (AT_KEYWORDS): Add shortfile0.
4538 2008-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
4541 * src/create.c (dump_file0): Apply transform_name to symlink
4544 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
4546 * src/transform.c: Support multiple --transform options. Support
4547 semicolon-separated lists of replace expressions.
4548 * NEWS, tar.texi: Document changes to the --transform option.
4550 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4552 * doc/tar.texi: Update Back-Cover text to reflect new GNU wording.
4554 2007-12-17 Paul Eggert <eggert@cs.ucla.edu>
4556 Exit with nonzero status if a close fails on an archive.
4557 Problem (and initial trivial fix)
4558 * src/buffer.c (close_archive, new_volume): close_error, not
4561 2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
4563 * src/buffer.c (check_compressed_archive): Do not bail out if the
4564 file is too short, set boolean flag, passed as an argument
4565 instead. This fixes a bug introduced on 2007-08-24. See also
4568 * tests/Makefile.am, tests/testsuite.at: Add shortupd.at.
4569 * tests/shortupd.at: New test.
4571 2007-11-12 Jim Meyering <meyering@redhat.com>
4573 Don't read from name[-1].
4574 * src/incremen.c (make_directory): Handle namelen == 0, since
4575 find_directory_meta calls make_directory ("").
4577 2007-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
4579 * bootstrap (checkout): Use URL of the gnulib CVS mirror.
4580 * gnulib.modules: Add fseeko and snprintf.
4582 2007-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
4584 * src/checkpoint.c: New actions: bell and ttyout
4585 * src/system.c (sys_exec_info_script)
4586 (sys_exec_checkpoint_script): pass the current blocking factor in
4587 TAR_BLOCKING_FACTOR environment variable.
4588 * doc/tar.texi: Update
4591 2007-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
4593 * doc/Makefile.am: Use texi2html and the CVS version of gendocs.sh
4594 to create HTML versions of the manual.
4595 * doc/gendocs_template: Likewise.
4596 * doc/tar.texi: Document --hard-dereference and
4597 --checkpoint-action options. Improve documentation of
4600 2007-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
4603 * configure.ac: Version 1.19.1
4604 * po/POTFILES.in: Add src/checkpoint.c
4605 * src/Makefile.am (tar_SOURCES): add checkpoint.c
4606 * src/checkpoint.c: New file - checkpoint handling.
4607 * src/buffer.c (checkpoint, do_checkpoint): Remove.
4608 (_flush_write, simple_flush_read, _gnu_flush_read): Use
4610 * src/common.h (enum checkpoint_style): Remove.
4611 (checkpoint_style): Remove.
4612 (DEFAULT_CHECKPOINT): New define.
4613 (hard_dereference_option): New variable.
4614 (sys_exec_checkpoint_script): New declaration.
4615 * src/create.c (file_count_links): do nothing if
4616 hard_dereference_option is set.
4617 * src/system.c (sys_exec_checkpoint_script): New function.
4618 (sys_exec_info_script): Restore SIGPIPE handler.
4619 * src/tar.c: (parse_opt): New options --hard-dereference,
4620 --checkpoint-action.
4621 (decode_options): Call checkpoint_finish_compile.
4623 * src/system.c (sys_exec_info_script): Initialize buf. Problem
4624 reported by Bengt-Arne Fjellner.
4626 2007-10-18 Jim Meyering <jim@meyering.net>
4628 Avoid compiler warnings.
4629 * src/list.c (read_header_primitive): Define two locals, to
4630 avoid incorrect "may be used uninitialized" warnings.
4631 * src/incremen.c (procdir): Remove decl of unused local, "len".
4633 2007-10-18 Sergey Poznyakoff <gray@gnu.org.ua>
4635 * doc/tar.texi (gzip): Remove compression patent
4636 warning. According to Brett Smith, the patent is
4639 2007-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
4641 * src/suffix.c: New file. Compress format detection by archive
4642 suffix (when creating). Suggested by Jean-Pierre Demailly.
4643 * src/Makefile.am: Add suffix.c
4644 * src/buffer.c (magic): Add an entry for new lzma format. Proposed
4646 * src/common.h (set_comression_program_by_suffix): New prototype.
4647 * src/tar.c: New options --auto-compress (-a) and --lzma
4648 * THANKS: Add Lasse Collin and Jean-Pierre Demailly.
4650 * doc/tar.texi: Update
4652 2007-10-12 Paul Eggert <eggert@cs.ucla.edu>
4654 * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1
4655 warning about "comparison is always true due to limited range of
4656 data type" when char is unsigned.
4658 2007-10-11 Paul Eggert <eggert@cs.ucla.edu>
4660 Adjust to recent gnulib changes.
4661 * configure.ac: Dont' check for strerror, since gnulib now does this.
4662 * .cvsignore: Add m4, tar-[0-9]*.
4663 * lib/.cvsignore: Adjust to various gnulib file name changes.
4664 Add .deps, rmt-command.h.
4666 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
4668 * configure.ac, NEWS: Raise version number to 1.19
4669 * tests/star/README: Update
4671 2007-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
4673 * src/create.c (dump_regular_file): Fix file padding in case of
4674 truncation to zero size.
4677 2007-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
4679 * tests/T-null.at: Use AT_DATA for sample output.
4681 2007-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
4683 * src/incremen.c (try_purge_directory): Ensure that arguments to T
4686 2007-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
4688 * src/incremen.c (obstack_code_rename): Apply safer_name_suffix to
4689 name arguments before storing them in T and R records. Reported by
4692 2007-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
4694 * configure.ac: Raise version number to 1.18.90
4697 * doc/snapshot.texi: Document version 2.
4698 * doc/dumpdir.texi: Update.
4700 Implement --exclude-tag* and --exclude-cache* options for listed
4701 incremental archives.
4702 New option --exclude-vcs to exclude VCS-specific files and
4706 * doc/tar.texi: Document --exclude-vcs option
4707 * src/common.h (exclusion_tag_warning, check_exclusion_tags): New
4709 * src/create.c (exclusion_tag_warning, check_exclusion_tags):
4710 Remove static qualifier.
4711 (check_exclusion_tags): account for dirname without terminating
4713 (dump_dir0): exclusion_tag_all is handled elsewhere.
4714 * src/incremen.c (struct directory): New member tagfile
4715 (make_directory): Initialize tagfile to NULL
4716 (procdir): New argument: entry
4717 Hanlde exclusion tags.
4718 (makedumpdir): Take into account directory->tagfile.
4719 (scan_directory): Hanlde exclusion tags.
4720 * src/tar.c: New option --exclude-vcs
4721 (exclude_vcs_files): New function
4723 2007-09-14 Paul Eggert <eggert@cs.ucla.edu>
4725 * AUTHORS: Remove unnecessary information. Just list the
4727 * THANKS: Remove info duplicated from AUTHORS.
4729 2007-08-25 Jim Meyering <jim@meyering.net>
4731 Don't include <getline.h>. No longer needed.
4732 * src/incremen.c: Don't include <getline.h>. No longer needed.
4733 * src/buffer.c: Likewise.
4734 * src/system.c: Likewise.
4735 * src/tar.c: Likewise.
4737 Avoid shadowing and unused-variable warnings.
4738 * src/create.c (check_exclusion_tags): Remove declaration of unused
4740 * src/compare.c (diff_dumpdir): Rename stat->stat_data to avoid
4741 shadowing the syscall.
4742 * src/buffer.c (do_checkpoint): Don't shadow the write syscall.
4743 (try_new_volume): Avoid shadowing "access".
4744 * src/tar.c (decode_options): Rename index->idx to avoid shadowing.
4745 (find_argp_option): Rename option->o to avoid shadowing.
4746 * src/incremen.c (scan_directory): Rename local, dir_name->dir,
4747 to avoid shadowing the function.
4748 (get_directory_contents): Likewise.
4749 * src/system.c (global_pid): Rename from "pid", to avoid being
4751 * src/extract.c (apply_nonancestor_delayed_set_stat):
4752 Rename st->sb to avoid shadowing another local.
4754 2007-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
4756 * configure.ac, NEWS: Raise version number to 1.18.1
4758 * src/buffer.c (check_compressed_archive): Detect files smaller
4760 * tests/shortfile.at: New test case for the above change.
4761 * tests/testsuite.at, tests/Makefile.am: Add shortfile.at
4763 2007-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
4765 * bootstrap: Gnulib initialization destroyed paxutils m4 files.
4766 Initialize paxutils structure after that of gnulib.
4768 2007-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
4770 * src/names.c (contains_dot_dot): Fix double-dot recognition in
4771 case of duplicate /. Patch by Dmitry V. Levin.
4773 * bootstrap (symlink_to_gnulib): Make sure the target directory
4774 exists and create it if it does not.
4776 * doc/tar.texi: Fix a typo.
4778 2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
4780 * bootstrap: Update for the change of the TP URL
4782 2007-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
4784 Relicense under GPLv3
4786 2007-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
4788 * tests/testsuite.at (AT_TAR_MKHIER): Skip test if genfile is
4789 unable to create the file
4790 * tests/lustar01.at: Likewise
4792 2007-06-21 Eric Blake <ebb9@byu.net>
4794 Resolve testsuite failures 40-42 on cygwin.
4795 * tests/testsuite.at (AT_TAR_MKHIER): Skip tests when long
4796 file names cannot be created.
4798 2007-06-16 Sergey Poznyakoff <gray@gnu.org.ua>
4800 * doc/Makefile.am (tar_TEXINFOS): Add tar-snapshot-edit.texi
4801 * doc/tar-snapshot-edit.texi: New file
4802 * doc/tar.texi (Fixing Snapshot Files): New appendix
4804 * scripts/tar-snapshot-edit: New file
4805 * tests/extrac07.at: Add back write permissions on dir
4807 2007-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
4809 * tests/exclude.at: Sort the output.
4811 2007-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
4813 * configure.ac, NEWS: Raise version number to 1.17
4815 * doc/tar.texi, doc/intern.texi: Replace: s/filename/file name/;
4816 s/(ASCII|ID|BSD)/@acronym{&}/;s/"[^"]+"/``&''/
4817 Use `path' only when it refers to search paths, use
4818 `file name' otherwise.
4819 Fix various errors (based on patch by Benno Schulenberg)
4821 * doc/tar.texi (Operation Summary): Restore alphabetical order of
4824 2007-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
4826 Fix bug, introduced on 2007-03-30.
4828 * src/common.h (xform_type): New data type
4829 (transform_member_name): Last argument is of xform_type type
4832 * src/extract.c: Update calls to transform_member_name
4833 * src/list.c (decode_xform): Exempt symbolic links from component
4834 stripping and name suffix normalization.
4836 * tests/extrac07.at: Update
4838 2007-05-30 Sergey Poznyakoff <gray@gnu.org.ua>
4840 * src/xheader.c (decx): Unknown pax keywords produce a warning,
4843 2007-05-29 Paul Eggert <eggert@cs.ucla.edu>
4845 * src/misc.c (set_file_atime): Use gl_futimens, not futimens,
4846 due to gnulib change.
4848 2007-05-19 Sergey Poznyakoff <gray@gnu.org.ua>
4850 * src/common.h (buffer_write_global_xheader): New function
4851 (struct xheader): Move definition to tar.h
4852 (extended_header): Remove global
4853 (xheader_init): New function
4854 (xheader_decode_global,xheader_store,xheader_read)
4855 (xheader_write_global,xheader_write,xheader_string_begin)
4856 (xheader_string_add,xheader_string_end): Take xhdr as first
4858 * src/tar.h (struct xheader): New definition
4859 (struct tar_stat_info): New member xhdr (extended header).
4861 * src/xheader.c (xheader_init): New function
4862 (xheader_decode_global,xheader_store,xheader_read)
4863 (xheader_write_global,xheader_write,xheader_string_begin)
4864 (xheader_string_add,xheader_string_end): Take xhdr as first
4867 * src/buffer.c (buffer_write_global_xheader): New function
4868 Update to use new xheader calls.
4870 * src/compare.c, src/create.c, src/delete.c, src/list.c,
4871 src/sparse.c, src/tar.c, src/update.c: Global extended_header
4872 removed, use new xheader calls instead.
4874 * tests/T-null.at: Minor fix
4875 * tests/atlocal.in (tarball_prereq): Discard eventual md5sum
4878 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua>
4880 * src/create.c (dump_file0): Original ctime cannot be used as a
4881 directory change indicator if --remove-files is given.
4883 2007-04-12 Paul Eggert <eggert@cs.ucla.edu>
4885 Adjust to latest Gnulib.
4886 * lib/.cvsignore: Add dirfd.c, dirfd.h, float+.h, mbscasecmp.c,
4887 stdio.h, stdio_.h, stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
4888 Remove exit.h, getcwd.h, mempcpy.h, memrchr.h, mkdtemp.h, stpcpy.h,
4889 strcase.h, strchrnul.h, strdup.h, strndup.h, strnlen.h, time_r.h,
4891 * m4/.cvsignore: Remove localedir.h. Sort.
4893 2007-04-03 Paul Eggert <eggert@cs.ucla.edu>
4895 * src/common.h (closeopen): Remove decl.
4896 * src/misc.c: Don't include <sys/time.h>, <sys/resource.h>; no longer
4898 (get_max_open_files, closeopen): Remove. All callers removed.
4899 (chdir_dir): Use a different technique, which doesn't rely on closing
4901 * src/tar.c (main): Don't call closeopen.
4903 2007-04-04 Sergey Poznyakoff <gray@gnu.org.ua>
4906 * doc/tar.texi: Update
4907 * src/system.c (sys_exec_info_script): Store the
4908 inter-communication fd in the environment variable TAR_FD
4910 2007-04-03 Sergey Poznyakoff <gray@gnu.org.ua>
4912 * src/tar.c (main): Move closeopen after decode_options to
4913 allow shell process substitution to work.
4914 * tests/extrac07.at: Expect a warning on stderr.
4916 2007-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
4918 * src/common.h (transform_name_fp): Change signature
4919 (transform_member_name): New function
4920 * src/extract.c (extract_link, extract_symlink): Use
4921 transform_member_name instead of safer_name_suffix so that
4922 --transform and --strip-components affect links as well.
4923 * src/list.c (transform_member_name): New function
4924 (decode_header): Use transform_member_name
4925 * src/names.c (all_names_found): Remove check for matching_flags.
4929 * bootstrap (slurp): Remove any occurrences of $bt from the
4931 * src/incremen.c: Do not include mkdtemp.h
4933 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4935 Adjust to recent gnulib changes.
4936 * lib/.cvsignore: Add fchownat.c, rmt-command.h, strerror.c, string.h,
4937 string_.h, sys, sys_time_.h, unistd_.h, wchar_.h, wctype_.h.
4938 Remove localedir.h, size_max.h, xsize.h.
4939 * src/xheader.c: Don't include stpcpy.h; no longer needed, now that
4940 gnulib string.h defines stpcpy on all platforms.
4942 2007-01-23 Sergey Poznyakoff <gray@gnu.org.ua>
4944 * doc/tar.texi: Document --exclude-caches* and --exclude-tag*
4946 * src/common.h (exclude_caches_option): Remove
4947 (enum exclusion_tag_type): New data type
4948 (add_exclude_tag): Rename to add_exclusion_tag
4949 (cachedir_file_p): New prototype
4950 * src/create.c (struct exclude_tag): rename to exclusion_tag
4951 (check_exclusion_tags): New function
4952 (cachedir_file_p): New function (from check_cache_directory)
4953 (dump_dir0,dump_file0): Use check_exclusion_tags
4954 * src/tar.c: New options --exclude-caches-all,
4955 --exclude-caches-under, --exclude-tag-all, --exclude-tag-under
4956 * tests/exclude.at: New file
4957 * tests/Makefile.am (TESTSUITE_AT): Add exclude.at
4958 * tests/testsuite.at: Add exclude.at
4960 2007-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
4962 * gnulib.modules: Require strerror
4963 * doc/gendocs_template: Fix typos
4964 * scripts/xsparse.c (expand_sparse): use ftruncate to handle the
4966 * src/sparse.c (sparse_skip_file,pax_dump_header_1)
4967 (pax_decode_header): Keep track of the number of bytes
4969 * configure.ac: Version 1.16.2
4972 2007-01-04 Sergey Poznyakoff <gray@gnu.org.ua>
4974 * src/compare.c (diff_dumpdir): Compare directory contents using
4975 dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
4976 incremental directory table in the inconsistent state and trigger
4978 (read_and_process): Process dumpdirs no matter what the archive
4980 * src/incremen.c (list_dumpdir): Minor fixes.
4982 * src/compare.c (read_and_process): Fix type of "size"
4984 2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
4986 * tests/T-null.at: Skip the test if genfile is not able to create
4987 the filename with an embedded newline.
4989 2006-12-12 Paul Eggert <eggert@cs.ucla.edu>
4991 Port to Forte Developer 7 C 5.4 and C99.
4992 * src/common.h (add_exclude_tag): Add decl; C99 requires this
4993 and Forte warns about it.
4994 * src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
4996 * src/misc.c (get_max_open_files): Rewrite to avoid code that
4997 Forte C complains about as being unreachable.
4998 * src/xheader.c (mtime_code): Rewrite to avoid Forte error
4999 reported by Trond Hasle Amundsen.
5001 * src/incremen.c (compare_dirnames): Rewrite to avoid casts.
5002 * src/utf8.c (string_ascii_p): Likewise.
5003 * src/xheader.c (mtime_coder, volume_size_coder, volume_offset_coder):
5006 2006-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
5008 * bootstrap: Add paxutils files to dot_ignore.
5010 * configure.ac: Raise version number to 1.16.1
5011 * bootstrap (slurp): Create .(cvs|git)ignore if not present
5012 * po/.cvsignore, m4/.cvsignore: Remove automatically generated
5015 2006-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
5018 * Makefile.am (distclean-local): Fixed
5019 * doc/tar.texi: Update documentation of --exclude-tag
5020 * src/create.c (dump_dir0): Move checks for exclude tags to
5022 (dump_dir): Move calls to ensure_slash to dump_file0
5023 * src/extract.c (extract_file): Call skip_member if open fails.
5024 Patch proposed by Jan-Benedict Glaw <jbglaw@lug-owl.de>
5025 * tests/truncate.at: Use genfile instead of dd, because on some
5026 systems /dev/zero is not available.
5028 2006-12-04 Paul Eggert <eggert@cs.ucla.edu>
5030 * NEWS: Fix some race conditions with tar -x --same-owner.
5031 * src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
5032 S_IRWXG | S_IRWXO might be masked out.
5033 (set_mode): Set the mode if some bits were masked out originally.
5034 (set_stat): Don't chmod before chown, as that might temporarily
5035 grant permissions that we don't want to grant. The chmod was
5036 there only to work around broken hosts, so add a comment advising
5037 users not to use those broken hosts instead.
5038 (repair_delayed_set_stat, extract_dir):
5039 Remember to mask out current umask before inverting permissions.
5040 (extract_dir): If the owner might change, or if the mode has
5041 special bits, create the directory 700 at first, but restore it later.
5042 (open_output_file): New arg mode; all uses changed.
5043 (extract_file, extract_node, extract_fifo): If the owner might
5044 change, omit group and other bits at first, but restore them after
5047 2006-12-04 Jim Meyering <jim@meyering.net>
5049 * doc/tar.texi (Long Options): Remove doubled word.
5051 2006-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
5053 * src/xheader.c (xheader_read): Remove unused variable
5055 * po/POTFILES.in: Remove src/mangle.c
5057 * bootstrap: Implement --update-po and .bootstrap
5059 * src/create.c (dump_dir0): Implement --exclude-tag option
5060 * src/tar.c: Likewise
5061 * doc/tar.texi (exclude): Document --exclude-tag
5063 2006-11-29 Paul Eggert <eggert@cs.ucla.edu>
5065 * NEWS: Remove support for mangled names.
5066 * doc/tar.texi (verbose tutorial): Likewise.
5067 * src/Makefile.am (tar_SOURCES): Remove mangle.c.
5068 * src/common.h (extract_mangle): Remove decl.
5069 * src/extract.c (extract_mangle_wrapper): Remove.
5070 (prepare_to_extract): Remove support for mangled names.
5071 * src/list.c (read_and, print_header): Likewise.
5072 * src/mangle.c: Remove.
5073 * src/tar.h (GNUTYPE_NAMES): Remove.
5075 Port to latest gnulib. There were a lot of changes, so the
5076 simplest way to get this up and running was to switch to coreutils
5077 bootstrap procedure. I noticed one feature missing after this
5078 merge: the ability to update a single .po file. I can add that
5080 * README-cvs, bootstrap.conf: New files.
5081 * lib/.cvsignore: Remove Makefile.am, printf-parse.c, vasnprintf.c.
5082 Add fstatat.c, gnulib.mk, openat-proc.c, same-inode.h, stat_.h,
5083 tempname.c, tempname.h, uinttostr.c.
5084 * lib/printf-parse.c, lib/vasnprintf.c: New files, from coreutils,
5085 to override gnulib, so that we don't need xsize.h.
5086 * bootstrap: Replace with coreutils bootstrap, except add support
5088 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Remove, as gl_EARLY now
5090 (gl_EARLY, gl_INIT): Add.
5091 (tar_GNULIB): Remove.
5092 * gnulib.modules: Add configmake.
5093 * lib/Makefile.tmpl: Remove, replacing with....
5094 * lib/Makefile.am: New file.
5095 * src/Makefile.am (tar.o): Remove dependency: Automake does this
5097 * src/tar.c: Include <configmake.h> and <rmt-command.h>, not
5100 2006-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
5102 * src/xheader.c (mtime_coder): Treat non-null data as a pointer to
5103 struct timespec, overriding st->mtime
5104 * src/create.c (start_header): Pass mtime as a call-specific data
5107 * tests/truncate.at: Do not use 'k' modifier in dd options.
5108 * tests/append02.at: Do not depend on command timing.
5110 2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
5112 * src/tar.c (enum read_file_list_state.file_list_skip): New value
5113 (read_name_from_file): Skip zero-length entries
5115 * tests/T-empty.at: New test case
5116 * tests/T-null.at: New test case
5117 * tests/extrac07.at: New test case
5118 * tests/Makefile.am: Add new test cases.
5119 * tests/testsuite.at: Add new test cases.
5120 * tests/extrac02.at: Add more keywords
5121 * tests/extrac04.at: Likewise
5122 * tests/extrac06.at: Likewise
5123 * tests/shortrec.at: Do not assume tar's default archive is stdout
5125 2006-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
5127 * src/extract.c, src/xheader.c: Call last_component instead of
5128 base_name. The latter returns a malloced string since 2006-03-11.
5130 2006-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
5132 * NEWS, configure.ac: Version 1.16
5133 * Makefile.am (distclean-local): New rule
5135 2006-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
5137 * src/tar.c: Fix help output formatting. Thanks Benno
5140 2006-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
5142 * Makefile.am (dist-hook): Create a cpio archive.
5145 2006-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
5147 * doc/tar.texi (Synopsis): Document tar exit codes.
5148 * src/create.c (dump_regular_file,dump_file0): Set exit_status to
5149 TAREXIT_DIFFERS if the file being dumped was truncated or
5151 * src/tar.c: Do not attempt to close stderr after call to
5153 * tests/grow.at: New test case
5154 * tests/Makefile.am: New test grow.at
5155 * tests/testsuite.at: Likewise
5156 * tests/truncate.at (AT_KEYWORDS): Keyword `filechange'
5157 Test tar exit status.
5159 * src/buffer.c (_open_archive): Make sure stdlis is set to stderr
5160 when we are writing archive to stdout (unless --index-file is
5161 used). Bug introduced on 2006-07-06.
5162 * tests/Makefile.am: New test verbose.at
5163 * tests/testsuite.at: Likewise
5164 * tests/indexfile.at (AT_KEYWORDS): Add stdout keyword
5165 * tests/verbose.at: New test case
5167 2006-10-02 Sergey Poznyakoff <gray@gnu.org.ua>
5169 * THANKS: Add Joerg Weilbier
5170 * src/buffer.c (new_volume): Initialize current_block
5171 * src/xheader.c (xheader_string_end): Fix diagnostic message.
5172 * tests/multiv05.at: New testcase.
5173 * tests/Makefile.am, tests/testsuite.at: Add multiv05.at
5175 2006-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
5177 * bootstrap: Use ${package} instead of hardcoding package name
5178 * doc/tar.texi: Minor fix
5179 * src/tar.c (doc0, doc1, initialize_argp_doc): Removed. Rely on
5180 the new argp method instead.
5182 2006-09-12 Sergey Poznyakoff <gray@gnu.org.ua>
5184 * README: Fix a typo
5186 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
5188 Adjust to latest gnulib.
5189 * lib/.cvsignore: Add at-func.c, configmake.h, fchmodat.c,
5190 fcntl.h, fcntl_.h, inttypes_.h, lstat.c, lstat.h.
5191 * tests/testsuite.at (AT_TAR_MKHIER): Use install-sh -d
5192 rather than the no-longer-included mkinstalldirs.
5194 2006-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
5196 * src/incremen.c (try_purge_directory): Initialize struct st. Fix
5197 condition for selecting candidates for removal.
5198 * README-alpha: List texinfo among build prerequisites for the CVS
5201 * bootstrap (intl_files_to_remove): Do not remove m4/inttypes-h.m4
5202 and m4/inttypes-pri.m4
5204 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5206 * bootstrap: Set XGETTEXT_OPTIONS to flag our printf-format functions,
5207 so that translators are warned about strings that are formats but
5208 don't look like formats. This might help prevent core dumps.
5209 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
5210 Suggested by Eric Blake to avoid problems like
5211 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
5212 (AM_GNU_GETTEXT_VERSION): Upgrade from 0.12.1 to 0.15. The gettext
5213 manual says we should use the version number normally expected of
5214 maintainers, neither more nor less.
5216 * bootstrap (get_translations):
5217 Don't exclude ky.po; it is working again.
5219 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
5221 * bootstrap (get_translations):
5222 Don't exclude ja.po; it is working again.
5223 Don't remove all old .po files if we're merely updating one.
5224 * po/.cvsignore: Add Makevars.
5226 2006-08-07 Paul Eggert <eggert@cs.ucla.edu>
5228 * src/tar.c: Work around limitation imposed by gettext 0.15
5229 by concatenating strings with "\v" after translation.
5230 (doc): Remove, splitting into:
5231 (doc0, doc1): New constants.
5232 (argp): Don't use doc; just initialize to NULL.
5233 (initialize_argp_doc): New function.
5234 (decode_options): Use it.
5236 * bootstrap: Redo po file retrieval to match Bison's method,
5237 since the translation project changed its index format.
5238 Don't use --assume-autoconf; it's now replaced
5239 by looking in configure.ac.
5240 (m4/codeset.m4, m4/intdiv.m4, m4/inttypes-pri.m4, m4/isc-posix.m4):
5241 (m4/lcmessage.m4, m4/onceonly_2_57.m4, m4/gettext.m4, m4/glibc21.m4):
5242 (m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4):
5243 (m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4):
5244 Don't rename to ..._gl.m4, as this is no longer needed.
5245 (m4/geteext.m4): Patch to remove the need for intl/*.
5246 Use autopoint manually, then remove the intl files,
5247 then undo changes to gnulib files that autoreconf made,
5248 and then run aclocal/autoconf/autoheader/automake.
5249 This makes our bootstrap procedure closer to Bison's.
5250 (po/Makevars): Generate automatically.
5251 * configure.ac (AC_PREREQ): Update from 2.59 to 2.60.
5252 (gl_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Remove.
5253 * gnulib.modules: Add inttypes, stdint.
5254 * lib/.cvsignore: Add close-stream.c, close-stream.h,
5255 stdint.h, stdint_.h.
5256 * po/Makefile: Remove; now automatically generated.
5258 * src/incremen.c (read_incr_db_01): Check input strings more
5259 carefully. Do not pass arbitrary char values to isspace, as
5260 this has undefined behavior. Likewise for assigning arbitrary
5261 uintmax_t values to other types.
5262 (read_negative_num, read_unsigned_num, read_timespec):
5263 New functions, to check input values a bit more carefully.
5264 (read_num): Use read_unsigned_num. New arg MAX_VAL;
5265 all callers changed.
5266 (read_incr_db_2): Use these new functions.
5267 Use a consistent diagnostic for unexpected EOF.
5268 (read_directory_file): Do not assign arbitrary uintmax_t value
5270 (read_timespec, write_directory_file_entry, write_directory_file):
5271 Handle negative time_t values correctly. We don't bother to do
5272 this with pre-2 formats, since presumably the time stamps were
5275 * src/tar.c (doc): Don't use \v in an argument to gettext;
5276 gettext 0.15 rejects this.
5278 2006-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
5280 * src/tar.c (decode_options): Do not require -L with -M -Hpax.
5281 It could be needed in future, but currently it is not.
5282 * src/create.c (to_chars_subst): Update comment regarding OLDGNU
5283 vs. GNU format differences.
5284 (mode_to_chars): Treat OLDGNU_FORMAT same as GNU_FORMAT. Fixes bug
5285 reported by TAMUKI Shoichi <tamuki@linet.gr.jp>, which caused
5286 equivalent `tar cf ...' and `tar rf ...' commands to produce
5289 * tests/append02.at: New test case
5290 * tests/Makefile.am, tests/testsuite.at: Add append02.at
5292 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5294 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5295 it with --assume-autoconf='latest-stable'.
5297 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
5299 Adjust to recent gnulib changes.
5300 * lib/.cvsignore: Remove atexit.c, exit.c, getndelim2.c, getndelim2.h,
5301 pathmax.h, paxconvert.c, paxerror.h, xstrdup.c.
5302 Add inttypes.h, mktime.c, wcwidth.h, xstrndup.c, xstrndup.h.
5303 * src/create.c (start_header): Adjust to API change to mode_adjust.
5305 2006-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
5307 * THANKS: Add Ralf Wildenhues
5310 2006-07-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5312 * doc/dumpdir.texi, doc/snapshot.texi, doc/sparse.texi,
5313 doc/tar.texi: Fix some typos.
5315 2006-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
5317 tar --index-file=FILE --file=- sent the archive to FILE, and
5318 the listing to stderr. Bug reported by Marcin Gryszkalis
5321 * src/buffer.c (_open_archive): Remove stdlis initialization
5322 * src/tar.c (decode_options): Initialize stdlis
5323 * tests/indexfile.at: New test case
5324 * tests/testsuite.at: Include indexfile.at
5325 * tests/Makefile.am (TESTSUITE_AT): Add indexfile.at
5327 2006-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
5329 * doc/Makefile.am (manual): Fix TEXINPUTS
5330 * doc/rendition.texi (FIXME): Do not use deprecated @quote-args.
5331 Do not use @allow-recursion. In its current form the macro is not
5334 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
5336 * bootstrap (update_po): Fix single translation update
5338 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
5340 * configure.ac (AC_CHECK_FUNCS): Check for getdtablesize
5341 * src/common.h (closeopen): New function
5342 * src/misc.c (chdir_arg): Use x2nrealloc to reallocate wd.
5343 (get_max_open_files,closeopen): New functions
5344 (chdir_do): Do not use save_cwd if it was already used more than
5345 max_open_files-4 times to avoid running off the file
5347 * src/tar.c (main): Call closeopen
5348 * doc/tar.texi: Update --directory description
5351 2006-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
5353 * doc/tar.texi: Update. Add cross-references.
5354 * doc/sparse.texi: Add cross-references.
5356 2006-06-25 Sergey Poznyakoff <gray@gnu.org.ua>
5358 * scripts/xsparse.c: A sample utility to expand sparse files
5359 extracted by third-party tars. It is not meant to be installed nor
5360 to be included in the distribution. It is here, so that it can be
5361 obtained either from CVS or from the tar web site.
5362 * doc/Makefile.am (tar_TEXINFOS): Sorted
5363 * doc/tar.texi (Other Tars): New node describing how to extract
5364 GNU-specific member formats using third-party tars.
5365 * src/common.h (sparse_file_p): Remove
5366 * src/sparse.c: Likewise
5367 * src/create.c: Use ST_IS_SPARSE instead of sparse_file_p (update
5369 * src/tar.c: --sparse-version turns on --sparse
5371 2006-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
5373 * src/buffer.c (print_total_stats): Add default case.
5374 * src/common.h (name_init): New prototype.
5375 (xheader_string_end): Return bool.
5376 * src/extract.c (extract_volhdr): Add missing return
5377 * src/incremen.c: Remove not used variables
5378 * src/sparse.c (pax_dump_header_0): Return false if
5379 xheader_string_end fails (for 0.1 formats).
5380 (pax_dump_header): Return meaningful value
5381 * src/transform.c (segm_count): Change type to size_t
5382 * src/xheader.c (xhdr_tab.decoder): pass keyword as a second
5383 argument. All callers changed.
5384 (decode_record): Check for numeric overflow
5385 (xheader_string_end): Return boolean value. Check for possible
5388 2006-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
5390 * doc/sparse.texi: New file
5391 * doc/Makefile.am (tar_TEXINFOS): Add sparse.texi
5392 * doc/intern.texi (Sparse Formats): New node
5393 * doc/tar.texi: Update master menu
5395 * src/common.h (tar_sparse_major,tar_sparse_minor): New globals.
5396 * src/sparse.c: Implement sparse format versioning. Implement new
5397 version (1.0) of PAX sparse format.
5398 (pax_sparse_member_p): Fix condition
5399 (pax_dump_header): A dispatcher function
5400 (pax_dump_header_0,pax_dump_header_1): New functions.
5402 (oldgnu_dump_header): Minor fix: make sure
5403 sparse_header.isextended is set before calling
5404 set_next_block_after
5405 * src/tar.c: New option --sparse-version
5406 * src/tar.h (struct tar_stat_info.sparse_major,sparse_minor): New
5408 * src/xheader.c: Implement new keywords: GNU.sparse.name,
5409 GNU.sparse.major, GNU.sparse.minor, GNU.sparse.realsize
5411 * tests/spmpv00.at, tests/spmvp01.at, tests/spmvp10.at: New
5414 * tests/Makefile.am: Add spmvp00.at, spmpv01.at, spmpv10.at
5415 * tests/shortrec.at: Explicitely give `-f -' to the tar invocation
5416 * tests/sparsemvp.at: Rewritten as an include file.
5417 (TAR_MVP_TEST): New macro
5418 * tests/testsuite.at: Include sparsemvp.at, spmvp00.at,
5419 spmvp01.at, spmvp10.at
5421 2006-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
5423 * doc/tar.texi (Overriding File Metadata): New node
5424 Document --mtime option.
5425 * src/common.h (set_mtime_option,mtime_option): New globals
5426 * src/create.c (start_header): Override mtime if requested
5427 * src/tar.c: Implement new option, --mtime, allowing to set
5428 modification times for all archive members during creation.
5429 (struct tar_args): textual_date_option replaced with a linked list
5430 textual_date. All references updated.
5431 (get_date_or_file,report_textual_dates): New functions.
5432 * configure.ac: Raise version number to 1.15.92
5435 2006-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
5437 * src/common.h (struct name.explicit): Remove
5438 Use variable names in all declarations
5439 (name_scan): Remove second argument
5440 * src/delete.c: Remove second argument from calls to name_scan
5441 * src/update.c: Likewise
5442 * src/incremen.c (procdir): Use is_individual_file to check for
5443 files explicitly specified in the command line. Fixes bug
5444 reported by Dat Head on 19 Jun 2006 (descending into mountpoints
5445 with --one-file-system in use)
5446 * src/misc.c (maybe_backup_file): Second argument is bool
5447 * src/names.c (name_next_elt): Call register_individual_file
5448 (namelist_match): Remove third argument
5449 (name_match): Change return type to bool
5450 (name_scan): Remove second argument
5451 * src/sparse.c (pax_dump_header): Store original sparse file name
5452 in GNU.sparse.name variable. The name field in the ustar header
5453 now contains generated name (%d/GNUSparseFile.%p/%f), so that
5454 non-pax-aware tars won't extract the file under the original
5456 * src/xheader.c (GNU.sparse.name): New variable for storing sparse
5459 2006-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
5461 * doc/Makefile.am (check-options): Expand macros before grepping
5463 * doc/rendition.texi (FIXME) [!PROOF_FOOTNOTED]: Enclose in a
5465 * doc/tar.texi: Define op as codeindex. Use special macros to
5467 Consequently prefer @dfn{long options} over @dfn{mnemonic
5469 Document --unquote, --no-unquote
5470 (Short Option Summary): Build a table of cross-references to the
5471 corresponding long options.
5472 (Using Multiple Tapes,Multi-Volume Archives): Rewritten
5474 * doc/value.texi (xopindex,opsummary): New macros
5476 * doc/Makefile.am (check-options): New goal
5477 * doc/tar.texi: Update
5478 * src/tar.c: Implement --overwrite-dir option (long ago
5481 2006-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
5483 * doc/tar.texi: Document better the --totals option
5485 * src/buffer.c (total_blocks_deleted): New variable
5486 (set_start_time): Set volume_start_time and last_stat_time as well
5487 (set_volume_start_time): New function
5488 (compute_duration): Do not call set_start_time, update
5489 last_stat_time instead. Use it in calculation instead of
5490 start_time, which is now set only once, upon startup.
5491 (print_total_written): Removed.
5492 (print_total_stats): New function for printing byte/speed statistics.
5493 (_open_archive): Detect attempts to update compressed archives.
5494 (_gnu_flush_write): Always update prev_written.
5495 (open_archive): Call set_volume_start_time.
5496 * src/common.h (volume_start_time,last_stat_time): New globals
5497 (print_total_written): Replaced with:
5498 (print_total_stats): New function
5499 * src/delete.c (records_skipped): Remove static qualifier, the
5500 variable is used by print_total_stats in buffer.c
5501 * src/extract.c (check_time): Use volume_start_time when checking
5502 for timestamp plausibility.
5503 * src/tar.c: (options, parse_opt): Allow for optional argument to
5504 the --totals option, which specifies a signal upon delivery of which
5505 the statistics must be output.
5506 (main): Call print_total_stats if total_option is set.
5508 2006-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
5510 * src/xheader.c (xheader_set_single_keyword): Fix typo.
5511 (decode_time): Avoid using gotos.
5513 * doc/mastermenu.el: New file
5514 * doc/Makefile.am (master-menu): New goal
5515 * doc/tar.texi: Update master menu
5517 2006-06-10 Sergey Poznyakoff <gray@gnu.org.ua>
5519 * doc/tar.texi: Remove leftover include
5521 2006-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
5523 * doc/Makefile.am (tar_TEXINFOS): Add intern.texi
5524 (EXTRA_DIST): Remove convtexi.pl, add texify.sed
5525 * doc/intern.texi: New file
5526 * doc/convtexi.pl: Remove
5527 * doc/texify.sed: Auxiliary script to convert ../src/tar.h to
5529 * doc/rendition.texi: Fix typo
5530 * doc/tar.texi: Update
5531 * src/tar.h: Fix indentation, introduce end-of-format marker for
5534 * THANKS: Add Jason Armistead
5535 * doc/tar.texi: Update
5537 * src/buffer.c: Implement more flexible checkpoint style
5538 * src/common.h (checkpoint_option): Change type to unsigned
5539 (checkpoint_style): New variable.
5540 * src/tar.c: --checkpoint takes an optional argument specifying
5541 number of records between two successive checkpoints (proposed
5542 by Jason Armistead on 2004-06-22). Optional dot starting the
5543 argument means "print dots instead of textual checkpoints".
5544 (tar_help): New function
5545 * src/transform.c: Minor fixes.
5547 2006-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
5549 * gnulib.modules: Add mkdtemp
5550 * doc/dumpdir.texi: New file
5551 * doc/Makefile.am (tar_TEXINFOS): Add dumpdir.texi
5552 * doc/tar.texi: Document dumpdir format
5553 * src/incremen.c (dumpdir_locate,obstack_code_rename):
5554 (purge_directory): Re-implement renaming. Introduce
5556 (make_tmp_dir_name): Remove
5558 * src/transform.c (set_transform_expr,_transform_name_to_obstack):
5559 Implement NUMBER flag.
5560 (add_char_segment): Fix length assignment
5562 * doc/tar.texi: Update
5564 2006-06-07 Sergey Poznyakoff <gray@gnu.org.ua>
5566 * src/transform.c (transform_name_fp): Run fun even if
5567 _transform_name_to_obstack returns false.
5568 (_transform_name_to_obstack,set_transform_expr): Implement GNU
5569 extension case conversion operations.
5571 * doc/tar.texi (transform): Document the option.
5573 2006-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
5576 * src/common.h (set_transform_expr): New function
5577 * tests/Makefile.am: Add incr04.at
5578 * tests/testsuite.at: Likewise
5579 * tests/incr04.at: New test case
5580 * tests/long01.at: Fix typo in the comment
5581 * tests/multiv04.at: Use genfile --files-from
5583 (Above changes need new genfile.c from paxutils)
5587 * doc/tar.texi: Update
5588 * src/transform.c: New file
5589 * src/Makefile.am (tar_SOURCES): New module transform.c
5590 * src/common.h (transform_name, transform_name_fp): New functions
5591 (show_stored_names_option): Renamed to
5592 show_transformed_names_option. All uses changed
5593 * src/create.c (dump_file0): Transform file name
5594 * src/extract.c (extract_archive): safer_name_suffix and
5595 stripped_prefix_len are now called by decode_header
5596 * src/list.c (print_header): Update displayable name selection.
5597 * src/tar.c: New option --transform
5598 New option --show-transformed-names generalizes
5599 --show-stored-names. The latter is retained as an alias.
5601 2006-05-31 Sergey Poznyakoff <gray@gnu.org.ua>
5603 * src/incremen.c (make_directory): Fix initialization of struct
5606 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
5608 * doc/tar.texi: Document use of globbing patterns.
5609 * src/tar.c (parse_opt): Add comment before --preserve case.
5611 2006-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
5614 * doc/tar.texi: Update
5615 * configure.ac (AM_INIT_AUTOMAKE): Use tar-ustar option. Raise
5616 version requirement to 1.9
5617 * src/common.h (struct name): Refactored
5618 (warn_regex_usage): New variable.
5619 (dump_file): First argument is const char*.
5620 (name_init,name_add): Removed
5621 (name_add_name,name_add_dir): New functions
5622 (name_next): Return const char*.
5623 * src/create.c: (dump_file,dump_file0): First argument is const
5624 char*. All callers updated.
5625 * src/names.c: Rewritten handling of member names in the command
5626 line. Tar no longer attempts to guess globbing patterns, instead
5627 it relies on --wildcard option.
5628 (init_names): Removed.
5629 (struct name_elt): New structure.
5630 (name_array): Change type to struct name_elt. All references updated
5631 (name_add_name,name_add_dir): New functions
5632 (name_next_elt): New function
5633 (name_next): Rewritten using name_next_elt.
5634 (namelist_match): Rewritten pattern matching using
5636 (names_notfound): Warn if globbing patterns were used without
5638 * src/tar.c (options): Move globbing-related options into a
5639 separate group. Set -l as an alias to --check-links, as required
5641 (struct tar_args): New fields
5642 wildcards,matching_flags,include_anchored
5643 (MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS): New macros
5644 (parse_opt): Use x2nrealloc to grow archive_name_array.
5645 Use MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS to create appropriate
5646 fnmatch options, and name_add_name,name_add_dir to handle member
5647 name and -C arguments.
5648 (decode_options): Likewise
5649 (main): Remove call to init_names.
5651 * tests/append.at, tests/append01.at, tests/extrac01.at,
5652 tests/options.at, tests/options02.at, tests/same-order01.at,
5653 tests/same-order02.at: Make AT_SETUP more readable.
5655 2006-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
5657 * src/buffer.c (change_tape_menu): Fix typo (uninitialized
5658 variable) introduced yesterday.
5660 2006-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
5662 * doc/tar.texi: Use @var{file_name} instead of @var{file name}
5663 * src/buffer.c (change_tape_menu): Break the loop after obtaining
5664 new archive name. Check for empty input line.
5666 2006-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
5668 * tests/atlocal.in (XFAILFILE): New variable
5669 * tests/version.at: Create $XFAILFILE on failure
5670 * tests/testsuite.at (AT_TAR_CHECK): Declare expected failure if
5673 2006-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
5676 * src/buffer.c (read_header0): Use read_header_primitive to avoid
5677 clubbering current_tar_info. All callers updated.
5678 * src/common.h (read_header_primitive): New function
5679 * src/extract.c (extract_volhdr): New function
5680 (prepare_to_extract): Use extract_volhdr as extractor for volume
5682 * src/list.c (read_header_primitive): New function
5683 (read_header): Front end for read_header_primitive
5684 * tests/chtype.at: New file
5685 * tests/volsize.at: New file
5686 * tests/Makefile.am (TESTSUITE_AT): Add chtype.at, volsize.at
5687 (check-full): New target.
5688 * tests/atlocal.in (TEST_DATA_URL,STAR_DATA_URL)
5689 (STAR_TESTSCRIPTS): Provide default values.
5690 (tarball_prereq): New function
5691 * tests/testsuite.at (AT_TARBALL_PREREQ): New defun
5692 (AT_STAR_PREREQ): Rewrite using tarball_prereq
5693 Include chtype.at and volsize.at
5694 * tests/volume.at: Add keywords.
5696 * tests/star/gtarfail.at, tests/star/gtarfail2.at,
5697 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
5698 tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at
5699 (AT_STAR_PREREQ): Provide md5 sum.
5701 * lib/.cvsignore: Update
5703 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
5705 * tests/testsuite.at (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New
5708 * tests/extrac04.at, tests/incr03.at, tests/listed02.at,
5709 tests/pipe.at, tests/rename01.at, tests/rename02.at,
5710 tests/rename03.at, tests/same-order01.at: Call
5711 AT_SORT_PREREQ. Remove fd 2 redirection after calls to sort
5712 * ignfail.at: Call AT_UNPRIVILEGED_PREREQ
5714 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
5716 Listed incremental backups: keep more information about
5717 directories. Handle renamed directories more effectively
5718 (initial implementation, more updates to follow).
5719 Source tree before this point is tagged
5720 alpha_1_15_90_incremental_1.
5723 * configure.ac: Raise version number to 1.15.91
5724 * src/common.h (rename_directory,append_incremental_renames): New
5726 * src/extract.c (rename_directory): New function
5727 * src/incremen.c (struct directory.contents, flags): New members
5728 (nfs,found,new): Remove. Replaced by appropriate bitmask values in
5729 `flags' field. All uses updated.
5730 (directory_meta_table): New table.
5731 (hash_directory): Rename to hash_directory_name
5732 (compare_directories): Rename to compare_directory_names
5733 (hash_directory_meta,compare_directory_meta,find_directory_meta):
5735 (compare_dirents): Removed
5736 (note_directory): Get 7th argument: directory contents.
5738 (dumpdir_locate,makedumpdir): New functions
5739 (scan_directory): Rewritten. Use makedumpdir to create a sorted
5740 dumpdir array. This makes the obstack argument unnecessary. Besides,
5741 ALL_CHILDREN flag is set only for new directories.
5742 (procdir): Change return type to struct directory. Return
5743 immediately if the directory was already initialized. Discover
5744 directory renames using directory_meta_table.
5745 (append_incremental_renames): New function.
5746 (read_directory_file, write_directory_file): Use new snapshot file
5748 * src/names.c (collect_and_sort_names): Update dir_contents of the
5749 first non-fake name entry when in listed incremental mode.
5751 * tests/incr03.at: New testcase
5752 * tests/rename01.at: New testcase
5753 * tests/rename02.at: New testcase
5754 * tests/rename03.at: New testcase
5755 * tests/Makefile.am: Add
5756 incr03.at,rename01.at,rename02.at,rename03.at
5757 * tests/testsuite.at: Likewise.
5758 * tests/listed02.at: Update for the new behavior
5759 * tests/multiv04.at (AT_KEYWORDS): Add missing incremental kw.
5761 2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
5763 * src/buffer.c (try_new_volume): Attempt to continue if the name
5764 is apparently truncated in a GNU format volume.
5766 * tests/comprec.at, tests/delete01.at, tests/delete02.at,
5767 tests/delete04.at, tests/delete05.at, tests/extrac05.at,
5768 tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
5769 tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
5770 tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
5771 this enables extra error checking.
5773 * tests/multiv03.at: Attempt to extract a member with truncated
5774 file name from the archive.
5776 * src/buffer.c (_open_archive): Remove unnecessary argument to
5777 check_compressed_archive.
5779 2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
5781 * tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
5782 tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
5783 system does not support sparse files.
5784 * doc/tar.texi (@copying): Remove the reference to not existing
5787 2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
5789 * src/extract.c (extract_dir): Fix toggling existing directory
5790 permissions (Debian bug #361077). Use parts of patch provided by
5791 Ian Jackson <iwj@ubuntu.com>.
5792 * src/compare.c: Minor changes
5793 * src/incremen.c (directory.new): New member
5794 (note_directory,find_directory: Use make_directory to create
5795 struct directory entries
5796 (procdir): Avoid duplicating directories in the incremental
5798 * tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
5799 * tests/testsuite.at: Include extrac06.at
5801 2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
5803 * tests/atlocal.in (PATH): Add build-aux from the source tree,
5806 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
5808 * THANKS: Add Benno Schulenberg
5810 2006-03-13 Jim Meyering <jim@meyering.net>
5812 * tests/listed02.at: Sort the two lines of stderr from the
5813 first `tar -v --listed-incremental'. They would come out
5814 reversed and provoke a test failure on a tmpfs
5817 2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
5819 * doc/tar.texi: Minor fixes.
5820 * src/tar.c (options): Consistently begin help messages with a
5823 2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
5825 * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
5827 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
5829 * src/buffer.c (record_buffer_aligned): New var.
5830 (init_buffer): Use it to ensure that the buffer is aligned.
5831 This doesn't result in any measurable performance improvement
5832 on my host (Debian GNU/Linux 3.1 stable, with default block size),
5833 but I assume it does help on some hosts.
5835 * lib/.cvsignore: Sort.
5837 2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
5839 * tests/shortrec.at: Use -f - to read from stdin.
5841 2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
5843 * doc/tar.texi: Fix typo: --to-command instead of --to-program
5845 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5847 * tests/multiv04.at (split directory members in a MV archive):
5848 Don't use %X in an awk printf format; this doesn't work with
5849 Solaris 10 /usr/bin/awk. Use %x instead.
5851 2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
5853 * src/create.c (split_long_name): Fix maximum length estimation.
5855 * tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
5857 * tests/atlocal.in: Add build-aux to the PATH
5858 * tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
5859 * tests/longv7.at: Reword test title
5860 * tests/lustar01.at: New test
5861 * tests/lustar02.at: New test
5862 * tests/lustar03.at: New test
5863 * tests/testsuite.at (AT_TAR_MKHIER): New macro
5864 (lustar01.at,lustar02.at,lustar03.at): New tests.
5866 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5868 * bootstrap: Don't claim lib/Makefile.am is generated automatically
5871 Avoid installation glitches on Solaris 8 with Sun C 5.4.
5872 * lib/.cvsignore: Add system-ioctl.h.
5873 * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
5874 * src/buffer.c: Include system-ioctl.h.
5875 * src/compare.c: Likewise.
5876 * src/delete.c: Likewise.
5877 * src/system.c: Include <getline.h>, <setenv.h>.
5878 * src/tar.c: Include <getline.h>.
5880 2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
5882 * src/buffer.c (add_chunk_header): Free st.orig_file_name after
5883 calling finish_header().
5884 (new_volume): Prompt the user for archive name if unable to open
5887 * src/create.c (dump_file0): Restore file_count_links,
5888 accidentally removed on 2005-11-29.
5889 * configure.ac: Raise version number to 1.15.90
5892 2006-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
5894 * src/tar.c (tar_set_quoting_style): Provide second argument to
5895 the format spec: program_invocation_short_name. Reported by Jim
5898 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
5900 * gnulib.modules: Add closeout, exitfial.
5901 * lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
5903 * src/buffer.c: Incluse closeout.h.
5904 (_open_archive): Use freopen rather than fopen, so
5905 that stdlis is always either stdout or stderr. Use
5906 close_stdout_set_file_name to report its name.
5907 * src/tar.c: Include closeout.h and exitfail.h.
5908 (parse_opt, usage): Call close_stdout as appropriate, to check for
5910 (decode_options): Exit with status TAREXIT_FAILURE, not 1.
5911 (main): Set exit_failure, to exit with proper status on memory
5912 allocation failure and the like.
5913 Use close_stdout rather than rolling our own test.
5915 * NEWS: --version now outputs copyright etc., to conform to the
5916 GNU coding standards. Remove --license.
5917 * gnulib.modules: Add version-etc-fsf.
5918 * doc/tar.texi: Document the change.
5919 * lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
5920 * scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
5921 * scripts/backup.in: Remove --license. Change --version to conform
5923 * scripts/restore.in: Likewise.
5924 * scripts/backup.sh.in (license): Output briefer license in the
5925 style of coreutils, for consistency with other changes.
5926 * src/tar.c: Include <version-etc.h>.
5927 (LICENSE_OPTION): Remove.
5928 (options): Remove --license.
5930 (parse_opt): Use version_etc instead of rolling it ourselves.
5932 * tests/version.at (tar --version): Check only the first line of
5935 * ChangeLog, NEWS, src/common.h, src/extract.c, src/incremen.c:
5936 * src/list.c, src/names.c, src/tar.h, src/xheader.c:
5937 Update copyright year to 2006.
5939 2006-02-07 Jim Meyering <jim@meyering.net>
5941 * src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
5943 2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
5945 * src/common.h (get_gnu_dumpdir): Remove prototype
5946 (is_dumpdir): New function
5947 * src/extract.c (prepare_to_extract): Use is_dumpdir member to
5949 * src/incremen.c (get_gnu_dumpdir): Static
5950 (is_dumpdir): New function
5951 (purge_directory): Use is_dumpdir
5952 * src/list.c (list_archive): Use is_dumpdir
5953 Do not wrap skip_member in mv_begin/mv_end, the function itself
5955 (decode_header): Set stat_info->is_dumpdir
5956 (skip_member): Do nothing if skipped is true
5957 * src/tar.h (struct tar_stat_info): New members is_dumpdir and skipped.
5959 2006-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
5961 * src/tar.c (decode_options): Refuse using --delete with
5962 compression options.
5964 2006-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
5967 * configure.ac (DEFAULT_QUOTING_STYLE): New configuration variable
5968 * doc/tar.texi: Initial documentation for --quoting-style,
5969 --quote-chars and --no-quote-chars option.
5970 * src/tar.c: Implement new options --quoting-style, --quote-chars
5971 and --no-quote-chars.
5973 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
5975 * bootstrap: Default to pserver, and switch to cvs.sv.gnu.org,
5976 to accommodate recent changes to the GNU CVS server.
5977 * lib/.cvsignore: Add argp-pin.c, mkdirat.c, openat-priv.h.
5979 2005-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
5981 * src/names.c (name_scan): Take an additional argument requesting
5983 * src/common.h (name_scan): Change prototype.
5984 * src/delete.c, src/incremen.c, src/update.c: Update invocations
5987 2005-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
5989 * src/common.h (struct name): New member `explicit'. Remove unused
5991 * src/incremen.c (procdir): If name_scan() returns something,
5992 check if it was explicitly given in the command line
5993 * src/names.c (addname,add_hierarchy_to_namelist): Initialize
5994 explicit member appropriately.
5996 * src/incremen.c (procdir): If --one-file-system is given and a
5997 directory is found to be on another device, *and* this directory
5998 is explicitly given in the command line, then do not omit it.
6000 2005-12-11 Sergey Poznyakoff <gray@gnu.org.ua>
6003 * doc/tar.texi: Document --delay-directory-restore option.
6004 (Configuring Help Summary): Document usage of ARGP_HELP_FMT
6005 variable to customize help output.
6006 * src/common.h (delay_directory_restore_option): New global.
6007 * src/extract.c (directories_first): Replaced by
6008 delay_directory_restore_option. All uses changed.
6009 * src/tar.c (options,parse_opt): New options
6010 --delay-directory-restore and --no-delay-directory-restore
6012 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
6014 * src/buffer.c (open_archive): Add default case to shut up gcc.
6015 * src/common.h (set_file_atime): Add prototype.
6016 * src/create.c (to_chars_subst): Remove unused variable
6017 Make sure useful result code is returned.
6018 * src/incremen.c (read_directory_file): Fix format string
6019 Thanks Eric Blake for reporting.
6021 2005-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
6023 * doc/tar.texi (Current status): Renamed to 'Changes' and moved to
6025 (Large or Negative Values): Rewritten
6026 * src/common.h (gid_to_chars, major_to_chars, minor_to_chars)
6027 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
6028 (uid_to_chars, uintmax_to_chars): Return bool
6029 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars)
6030 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
6031 (uid_to_chars, uintmax_to_chars): Return bool
6032 (to_chars): Return bool
6033 (start_header): Check return values of conversion routines. Fail
6034 if unable to store data in the header.
6036 2005-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
6038 * doc/tar.texi: Following the discussion with Karl Berry,
6039 discontinue using @value{} substitutions for Texinfo commands.
6040 Properly index all long options. Print a
6041 separate long option index.
6042 * doc/value.texi: Remove @set's
6044 * doc/tar.texi: Update --info-script documentation
6045 Resolve some more FIXMEs.
6046 * scripts/dump-remind.in: Use TAR_VOLUME instead of reading volno
6048 * src/buffer.c (new_volume): Update invocation
6049 (change_tape_menu): New function. Disable '!' command if given
6051 * src/common.h (sys_exec_info_script): Update declaration
6052 (restrict_option): New global
6053 * src/system.c (sys_exec_info_script): The script can supply new
6054 archive name to use by writing it to file descriptor 3.
6055 * src/tar.c (options): Add --restrict option. Use macros for
6057 (license): Print full list of copyright years
6060 2005-12-06 Eric Blake <ebb9@byu.net> (trivial changes)
6062 * configure.ac (DENSITY_LETTER): Fix m4 overquoting.
6063 * .cvsignore: Ignore .bootstrap.
6065 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
6067 * doc/tar.texi: Document --to-command and --info-script
6068 options. Add missing xrefs.
6069 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
6071 * src/common.h (archive_format_string,subcommand_string)
6072 (sys_exec_info_script): New prototypes.
6073 * src/system.c (sys_exec_info_script): New function.
6074 * src/tar.c (archive_format_string): Remove static qualifier.
6075 (subcommand_string): New function.
6077 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
6079 * src/extract.c: Fix restoring of directory timestamps from
6080 incremental archives.
6081 (directories_first): New variable.
6082 (prepare_to_extract): Set directories_first
6083 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
6084 if not extracting from an incremental archive
6085 (extract_dir): Obtain root_device here, to make sure it works
6088 * src/incremen.c (purge_directory): Skip the member and return if
6089 the archive is not in incremental format.
6090 * tests/incr02.at: New testcase
6091 * tests/Makefile.am: Add incr02.at
6092 * tests/testsuite.at: Likewise
6094 * THANKS: Add Guerkan Karaman.
6097 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
6099 * doc/tar.texi (Option Summary): Rewrite the
6100 --atime-preserve=system description in response to Ian Turner's
6103 2005-11-30 Ian Turner <ian@zmanda.com>
6105 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
6108 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
6110 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
6111 * THANKS: Add Ian Turner.
6113 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
6114 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
6115 * doc/tar.texi: Change "modification time" to "data modification
6116 time", "change time" to "status change time", and "filesystem" to
6117 "file system", so that we use terminology consistent with POSIX.
6118 Use American spacing rather than French for sentence ends.
6119 "non-dependable" -> "undependable".
6120 (Option Summary, Attributes): Explain better the pitfalls of the
6121 --atime-preserve option, and suggest read-only mounts,loopback
6122 mounts, and noatime mounts for older systems.
6123 * doc/value.texi (op-atime-preserve-system): Renamed from
6124 op-atime-preserver-system to fix a misspelling.
6125 * src/common.h (enum atime_preserve): Use lower case for enum values.
6126 * src/compare.c: Don't include utimens.h; no longer needed.
6127 (diff_file): Use set_file_atime rather than utimens; avoid closing
6128 diff_handle until after this, so that we can set the file time stamp
6129 via the file descriptor rather than via its name.
6130 * src/create.c: Don't include utimens.h; no longer needed.
6131 (dump_regular_finish): Remove. All callers now do its work inline.
6132 (dump_dir): New arg FD. All callers changed.
6133 Use fdsavedir rather than savedir.
6134 (unknown_file_error): Arg is a const pointer now.
6135 (dump_file0): 2nd arg is a const pointer now.
6136 Treat directories more like files, with respect to --atime-preserve.
6137 For example, also warn if a directory changes while we are dumping it.
6138 Prefer file descriptors to file names when retrieving/setting file
6139 attributes; this saves path-resolution time and allows us to avoid
6140 changing mtime/ctime on Solaris when restoring atime as root.
6141 Use O_DIRECTORY when opening directories, to avoid some race conditions.
6142 Do not reset atime if mtime has changed. Report an error if
6143 we cannot reset atime.
6145 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
6146 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
6148 2005-11-29 Ian Turner <ian@zmanda.com>
6150 First cut at adding support for --atime-preserve=system.
6151 * doc/tar.texi (Option Summary): First cut at documenting it.
6152 All other uses of --atime-preserve changed to --atime-preserve=replace.
6153 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
6155 (op-atime-preserve): Mention METHOD.
6156 * src/common.h (atime_preserve): New enum.
6157 (atime_preserve_option): Now of the enum type rather than bool.
6159 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
6160 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
6162 * src/tar.c (usage): Mention new usage.
6163 (parse_opt): Parse new usage.
6165 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
6167 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
6168 stable), and consistently use tabs rather than spaces.
6170 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
6172 * src/xheader.c: Remove parts of code prematurely introduced
6173 yesterday. Thanks Eric Blake.
6175 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
6177 * src/xheader.c (xheader_format_name): Fix memory leak.
6179 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
6181 * gnulib.modules: Add rpmatch
6182 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
6183 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
6184 * po/POTFILES.in: Add rpmatch.c
6185 * src/tar.c (confirm): Rewritten using rpmatch.
6186 (decode_options): Minor optimizations
6187 (main): Call stdopen() to ensure the first three descriptors are
6190 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
6191 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
6192 tests/star/multi-fail.at: Close stdin so that if something fails
6193 causing tar to ask for the next volume, it won't hang the
6196 * src/buffer.c (flush_write,flush_read): Change data type.
6197 (flush_archive): Compute actual buffer fill level before calling
6199 (close_archive): Call flush_archive again if the first call
6200 resulted in partially filled buffer.
6201 (try_new_volume): Rewritten handling of initial headers.
6202 (add_chunk_header): New function. Write an additional header
6203 before the continuation chunk. The purpose of the header is to
6204 allow third-party tars to extract the member.
6205 (simple_flush_write): Take an argument.
6206 (_gnu_flush_write): Correctly handle partially filled buffers.
6207 * src/common.h (flush_read,flush_write): Functions, again.
6208 (write_extended): Changed declaration
6209 (xheader_format_name): New declaration
6210 * src/create.c (write_extended): Change type and meaning of
6211 the first argument. All callers updated
6212 * src/xheader.c (xheader_format_name): Remove static
6213 qualifier. Change last argument.
6214 Correct buffer size calculation (allocated too much space).
6215 (xheader_write): Increase global_header_count here ...
6216 (xheader_write_global): ... instead of here
6218 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
6219 * tests/multiv01.at: Update
6220 * tests/multiv02.at: Update
6221 * tests/multiv03.at: Update
6222 * tests/sparsemvp.at: Update
6223 * tests/star/multi-fail.at: Update
6225 * scripts/tarcat: Handle archives in pax format. Improve handling
6226 of traditional archives.
6227 * doc/tar.texi (Tarcat): New node
6229 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
6231 Fix splitting of sparse files between the volumes.
6233 * src/buffer.c (try_new_volume): Bugfix. Always check
6234 continued_file_name. If it is absent, the volume is out
6236 (add_multi_volume_header): Create GNU.volume.filename keyword in
6237 the extended header.
6238 * src/sparse.c (sparse_dump_region): Call mv_size_left.
6239 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
6240 * src/system.c: Do not pad compressed output if it goes to
6242 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
6244 * tests/sparsemv.at: New testcase
6245 * tests/sparsemvp.at: New testcase
6246 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
6247 * tests/testsuite.at: Likewise.
6249 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
6251 * src/buffer.c: Rewritten in a more modular fashion to provide
6252 GNU extensions (multi-volume archives and archive labels) in
6254 NOTICE, that some of the aspects (e.g. splitting the archive
6255 on the extended header boundary) are still not solved, others
6256 (splitting a sparse file between the volume) require additional
6257 testing. Wait for the next commit.
6259 (volume_label,continued_file_name,continued_file_size)
6260 (continued_file_offset): New globals.
6261 (save_name,save_totsize,save_sizeleft): Make static
6262 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
6263 (open_archive,flush_write,flush_read): Rewritten
6265 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
6267 (volume_label,continued_file_name,continued_file_size): New
6269 (flush_read,flush_write): Pointers to functions
6270 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
6271 (write_extended): New function.
6273 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
6274 src/list.c: Use mv_.* functions uniformly instead of fiddling
6275 with the global variables.
6276 * src/sparse.c: Use mv_.* functions where necessary.
6277 * src/tar.c (decode_options): Allow to use --multi-volume and
6278 --label with pax archives.
6279 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
6281 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
6282 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
6283 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
6284 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
6285 tests/listed01.at, tests/listed02.at, tests/long01.at,
6286 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
6287 tests/multiv03.at, tests/multiv04.at, tests/options.at,
6288 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
6289 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
6290 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
6291 of related tests in groups.
6293 * doc/tar.texi: Update
6295 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
6297 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
6298 not void *, to avoid create.c warning from GCC "passing argument 3
6299 of 'xheader_store' discards qualifiers from pointer target type".
6300 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
6301 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
6302 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
6303 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
6304 (xheader_store): Likewise.
6305 * src/common.h (xheader_store): Likewise.
6307 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
6308 and Paul Eggert <eggert@cs.ucla.edu>
6310 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
6311 (tar_timespec_cmp): New function. Wrapper over
6312 timespec_cmp using the timespec precision provided by the
6313 current archive format.
6314 * src/common.h (tar_timespec_cmp): New declaration.
6315 * src/compare.c (diff_file): Use tar_timespec_cmp.
6316 * src/extract.c (file_newer_p): Likewise.
6317 * src/update.c (update_archive): Likewise.
6318 * tests/truncate.at: Reverted changes
6319 * tests/update.at: Reverted changes
6321 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
6323 Support for incremental formats in pax archives.
6324 Fixed POSIX compatibility of `sparse' extended header keywords.
6326 * src/common.h (dumpdir_size,get_gnu_dumpdir)
6327 (xheader_string_begin,xheader_string_add)
6328 (xheader_string_end): New functions.
6329 * src/create.c (dump_dir0): Handle incremental backups in pax
6331 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
6332 (purge_directory): Use stat_info.dumpdir instead of getting its
6334 * src/list.c (list_archive): Handle incremental backups in pax
6336 (decode_header): Initialize stat_info.dumpdir
6337 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
6338 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
6339 variable has been explicitly deleted, use GNU.sparse.offset/
6340 GNU.sparse.numbytes variables.
6341 * src/tar.c (decode_options): Incremental options are allowed with
6343 (tar_stat_destroy): Free dumpdir
6344 * src/tar.h (struct tar_stat_info.dumpdir): New member.
6345 * src/xheader.c (xheader_keyword_deleted_p): Remove static
6347 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
6348 values to contain embedded nulls, so take an extra argument
6349 specifying the length of the string.
6350 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
6351 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
6352 (path_decoder,size_decoder,uid_decoder,uname_decoder)
6353 (sparse_size_decoder,sparse_numblocks_decoder)
6354 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
6355 (decode_record): Pass value length to the handler
6356 (run_override_list): Pass value length to the decoder
6357 (xheader_print_n): New function
6358 (xheader_print): Rewritten using xheader_print_n
6359 (xheader_finish): Do not rely om strlen to compute the length of
6360 the collected string: it can contain embedded nulls
6361 (xheader_string_begin,xheader_string_add,xheader_string_end): New
6363 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
6364 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
6365 (xhdr_tab): Add new variables.
6367 * tests/incr01.at: Test gnu, oldgnu, and posix formats
6368 * tests/incremental.at: Likewise
6370 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
6372 * NEWS: Minor language and white space fixes.
6374 * tests/truncate.at: Create files whose time stamps must fall on
6375 1-second boundaries. This prevents tests from failing on hosts
6376 like Solaris 8 that have nanosecond-resolution file time stamps.
6377 * tests/update.at: Likewise.
6379 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
6382 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
6384 * doc/tar.texi: Properly document incremental dumps
6385 * doc/value.texi: Likewise.
6386 * doc/snapshot.texi: Likewise.
6388 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
6390 Improve listed incremental format:
6392 * src/common.h (update_parent_directory): New prototype.
6393 * src/create.c (dump_file): Call update_parent_directory.
6394 * src/incremen.c (struct directory.mtime): New member.
6395 (note_directory): Take additional arguments. All callers updated.
6396 (scan_directory): Updated to use more metadata. In particular,
6397 this allows to correctly detect renamed files.
6398 (read_directory_file,write_directory_file)
6399 (write_directory_file_entry): Support new directory file format.
6400 * tests/listed01.at: Sleep 1 sec before creating second file.
6401 * tests/listed02.at: Never skip the test. It should work on any
6404 * doc/snapshot.texi: New file
6405 * doc/tar.texi: Update.
6406 * doc/Makefile.am: Update.
6408 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
6410 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
6411 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
6413 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
6415 * bootstrap: Fix quoting in help output.
6416 (update_po): Use backward-compatible wget option --cache instead
6417 of deprecated -C to accommodate for wget 1.10.
6418 Changes proposed by Eric Blake
6419 * THANKS: Add Eric Blake
6421 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
6423 * doc/tar.texi: Consistently put two spaces after sentences,
6424 and put commas after "i.e." and "e.g.". This is the usual GNU
6427 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
6428 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
6431 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
6433 * src/compare.c (diff_dumpdir): Pass a valid device number to
6434 get_directory_contents.
6436 * THANKS: Add John Thomas McDole
6438 * bootstrap: If file `.bootstrap' exists in the cwd and is
6439 readable, prepend its contents to the command line
6441 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
6443 * tests/link01.at: Skip test if ln fails (suppose the OS does
6444 not support hard links).
6446 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
6448 * src/tar.c (decode_options): Report error if -A or -r is used
6449 together with compression option.
6451 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
6453 * doc/tar.texi: Use @option and @kbd consistently.
6454 Document new options.
6456 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
6459 * src/common.h (show_stored_names_option): New variable
6460 * src/list.c (print_header): If show_stored_names_option is given,
6461 list member names as stored in the archive. Patch proposed by Erik
6462 Cumps <erik.cumps@icos.be>
6463 * src/tar.c: Implement --show-stored-names option
6465 * src/common.h (test_label_option): New variable;
6466 * src/list.c (print_header): Special handling if test_label_option
6468 * src/names.c (all_names_found): If test_label_option is set
6470 * src/tar.c: New option --test-label tests the archive volume
6471 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
6473 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6475 * tests/Makefile.am (clean-local): Don't attempt to run
6476 $(TESTSUITE) if it doesn't exist. Problem reported by
6479 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6481 Don't filter time stamps through the resolution supported
6482 by struct stat; keep them to full nanosecond resolution.
6483 This affects behavior only on older hosts or file systems
6484 that have lower-resolution time stamps.
6485 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
6486 (OLDER_TAR_STAT_TIME): New macro.
6487 (code_timespec): New function.
6488 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
6489 * src/compare.c (diff_file): Use full time stamp resolution.
6490 * src/create.c (start_header, dump_file0): Likewise.
6491 (start_header, dump_file0): Adjust to new structure layout.
6492 (dump_regular_finish): Simplify by using timespec_cmp.
6493 * src/extract.c (struct delayed_set_stat): Don't store stat info
6494 that we don't need, to save space. All uses changed.
6495 (struct delayed_set_stat, struct delayed_link, file_newer_p):
6496 (create_placeholder_file, extract_link, apply_delayed_links):
6497 Use full time stamp resolution.
6498 (check_time): Use code_timespec rather than rolling our own code.
6499 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
6500 avoid losing time information. All callers changed.
6501 * src/list.c (read_and, decode_header, print_heaeder):
6502 Use full time stamp resolution.
6503 * src/misc.c (code_timespec): New function.
6504 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
6505 separately, for benefit of hosts with lower resolution.
6506 * src/update.c (update_archive): Use full time stamp resolution.
6507 * src/xheader.c (code_time): Use new code_timespec function
6509 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
6510 (mtime_coder, mtime_decoder): Use full time stamp resolution.
6512 Report time stamps to full resolution in environment.
6513 Report memory allocation failures rather than ignoring them.
6514 * src/system.c (time_to_env): New function.
6515 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
6516 (stat_to_env): Report full resolution in time stamps.
6518 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6520 Merge changes from gnulib for file system sub-second time stamps.
6521 * configure.ac: Remove checks for struct stat.st_spare1, struct
6522 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
6523 stat.st_atimensec, as gnulib now does this for us.
6524 Similarly for LIB_CLOCK_GETTIME.
6525 * gnulib.modules: Add stat-time.
6526 * lib/.cvsignore: Add stat-time.h.
6527 * src/common.h: Include stat-time.h.
6528 (timespec_lt): Remove. All callers changed to use timespec_cmp.
6529 (get_stat_atime, get_stat_ctime, get_stat_mtime):
6530 (set_stat_atime, set_stat_ctime, set_stat_mtime):
6531 Remove; now defined by stat-time.h.
6533 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
6535 * src/incremen.c (list_dumpdir): New function. Used to dump
6536 contents of GNUTYPE_DUMPDIR blocks.
6537 * src/common.h (list_dumpdir): Likewise.
6538 * src/list.c (list_archive): Use list_dumpdir() to display
6539 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
6542 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
6544 * lib/.cvsignore: Adjust to current gnulib and modules used.
6545 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
6546 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
6547 strnlen1.h, unistd--.h.
6548 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
6550 Treat fishy-looking hard links like fishy-looking symlinks.
6551 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
6552 member to after_links. All uses changed.
6553 (struct delayed_link): Renamed from struct delayed_symlink.
6554 All uses changed. New member is_symlink.
6555 (delayed_link_head): Renamed from delayed_symlink_head. All uses
6557 (create_placeholder_file): New function, taken from extract_symlink.
6558 (extract_link): Create placeholders for fishy-looking hard links.
6559 (extract_symlink): Move code into create_placeholder_file.
6560 (apply_delayed_links): Renamed from apply_delayed_symlinks.
6561 All uses changed. Create both hard links and symlinks.
6563 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
6565 * README-alpha: Modernize description of software required for
6568 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
6570 * gnulib.modules: Add strdup
6571 * src/incremen.c (purge_directory): Do not dereference symbolic
6572 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
6573 David Brown <davidb@davidb.org>
6574 * tests/incr01.at: New test.
6575 * tests/Makefile.am: Add incr01.at
6576 * tests/testsuite.at: Likewise
6579 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
6581 * src/incremen.c (read_directory_file): Use strtoumax to read
6582 snapshot file contents.
6583 (write_directory_file_entry): Use umaxtostr().
6585 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
6587 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
6588 sparse files to /dev/null with --totals option.
6589 * tests/update.at: Remove dependency on file order.
6591 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6593 * doc/tar.texi: Fix typo.
6595 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6597 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
6599 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6601 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
6602 sparse_select_optab(). All callers updated.
6603 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
6605 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6607 * src/sparse.c (pax_sparse_member_p): Checking member size
6608 vs. file size is not reliable enough. Use sparse_map_avail.
6610 * tests/star/gtarfail.at: Adapt to the new output format
6611 * tests/star/gtarfail2.at: Likewise
6612 * tests/star/multi-fail.at: Likewise
6613 * tests/star/pax-big-10g.at: Likewise
6614 * tests/star/ustar-big-2g.at: Likewise
6615 * tests/star/ustar-big-8g.at: Likewise
6617 * tests/sparse03.at: New test.
6618 * tests/Makefile.am: Add sparse03.at
6619 * tests/testsuite.at: Likewise
6621 * src/xheader.c (size_decoder): Do not set archive_file_size.
6623 Fix bugs introduced yesterday:
6625 * src/sparse.c (tar_sparse_init): Initialize
6627 (sparse_scan_file): Initialize archive_file_size to 0. The
6628 variable keeps size of the file *as stored in the archive*, not
6629 the size reported by stat.
6631 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
6633 A sweep of the sparse code prompted by a bug report by Jim Meyering.
6634 * src/sparse.c: Include <inttostr.h>.
6635 (struct tar_sparse_file): offset and dumped_size are off_t, not
6636 size_t. optab is now const *.
6637 (dump_zeros): Return bool success flag, not off_t.
6638 All callers changed.
6639 Use a constant-zero buffer rather than clearing a buffer each time.
6640 Don't mess up if write fails.
6641 (dump_zeros, check_sparse_region):
6642 Don't assume off_t is no wider than size_t.
6643 (tar_sparse_init): Don't bother clearing a field that is already clear.
6644 (zero_block_p): First arg is const *, not *.
6645 (clear_block, SPARSES_INIT_COUNT): Remove.
6646 (sparse_add_map): First arg is now struct start_stat_info *, not
6647 struct tar_sparse_file *. All callers changed.
6648 Use x2nrealloc to check for size_t overflow.
6649 (parse_scan_file): Cache commonly-used parts of file.
6650 Use an auto buffer, not a static one.
6651 Don't bother clearing the buffer; not needed.
6652 Don't bother clearing items that are already clear.
6653 (oldgnu_optab, star_optab, pax_optab): Now const.
6654 (sparse_dump_region): Don't bother clearing the buffer before
6655 reading into it; just clear the parts that aren't read into.
6656 (sparse_dump_file): Clear the whole local variable 'file'.
6657 (diff_buffer): Remove; now a local var.
6658 (check_sparse_region): Don't bother clearing buffer before
6659 reading into it. Don't assume off_t is promoted to long.
6660 (oldgnu_get_sparse_info, star_get_sparse_info):
6661 Use an auto status, not static.
6662 * src/tar.h (struct tar_stat_info): had_trailing_slash is
6664 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
6665 Rewrite to avoid cast.
6666 (sparse_offset_decoder, sparse_numbytes_decoder):
6667 Diagnose excess entries rather than crashing.
6669 2005-06-22 Jim Meyering <jim@meyering.net>
6671 * src/common.h (timespec_lt): Add a return type: bool.
6673 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
6675 Further improvements inspired by Jim Meyering's fixes.
6677 * NEWS: Better support for full-resolution time stamps.
6678 The -v option now prints time stamps only to 1-minute resolution.
6679 * gnulib.modules: Add utimens.
6680 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
6681 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
6682 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
6683 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
6684 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
6686 * src/buffer.c (set_start_time, compute_duration, start_time):
6687 Use gettime rather than rolling our own code.
6688 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
6689 (newer_ctime_option): Remove.
6690 (timespec_lt): New function.
6691 (OLDER_STAT_TIME): Use it.
6692 (string_to_chars): First arg is char const *, not char *.
6693 (tartime): Time arg is now struct timespec. New bool arg.
6694 All callers changed.
6695 (code_ns_fraction): New decl.
6696 (sys_stat_nanoseconds): Remove decl.
6697 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
6698 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
6699 * src/compare.c: Include utimens.h rather than rolling our own.
6700 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
6702 (diff_dumpdir, diff_multivol): Prototype.
6703 (diff_file): Support higher-resolution time stamps.
6704 * src/create.c: Include utimens.h rather than rolling our own.
6705 (MAX_OCTAL_VAL): New macro.
6706 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
6707 the destination is already zeroed.
6708 (string_to_chars): First arg is char const *.
6709 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
6710 for minor device number.
6711 (write_header_name, dump_hard_link, dump_file0):
6712 Simplify test for old GNU format.
6713 (start_header): Put in placeholders for uid, etc., even when
6714 using extended headers, for benefit of older "tar" implementations.
6715 Don't assume uintmax_t is wider than 32 bits.
6716 Output extended header for mtime if needed.
6717 (dump_regular_finish, dump_file0):
6718 Support extended time stamp resolution.
6719 * src/extract.c: Include utimens.h rather than rolling our own.
6720 (check_time): Support extended time stamp resolution.
6721 * src/list.c: Include <inttostr.h>.
6722 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
6723 * src/xheader.c: Include <inttostr.h>.
6724 Do not include <xstrtol.h>.
6725 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
6726 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
6727 (BILLION, LOG10_BILLION): New constants.
6728 (to_decimal): Remove; superseded by inttostr. All callers changed
6730 (xheader_format_name): Don't assume pids and uintmax_t values
6731 fit in 63 bytes (!) when printed.
6732 (decode_record): Don't bother to check for ERANGE; an out of range
6733 value must be treater than len_max anyway.
6734 If the length is out of range, output it in the diagnostic.
6735 (format_uintmax): Remove; all callers changed to use umaxtostr.
6736 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
6737 (out_of_range_header): New function.
6738 (decode_time): Use it.
6739 (code_time): Accept struct timespec, not time_t and unsigned long.
6740 All callers changed. Size sbuf properly, and remove unnecessary check.
6741 Don't assume time stamps can fit in 199 bytes.
6742 Handle negative time stamps. Handle fractional time stamps
6743 more consistently. Don't output unnecessary trailing zeros.
6744 (decode_time): Yield struct timespec, not time_t and unsigned long.
6745 All callers changed.
6746 Handle negative time stamps. Truncate towards minus infinity
6747 consistently. Improve overflow checks, and output a better
6748 diagnostic on overflow.
6749 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
6750 (decode_num): New function, for better diagnostics.
6751 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
6752 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
6753 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
6754 (sparse_offset_decoder, sparse_numbytes_decoder):
6755 Use decode_num, etc., instead of xstrtoumax, etc.
6757 2005-06-21 Jim Meyering <jim@meyering.net>
6759 Carefully crafted invalid headers can cause buffer overrun.
6760 Invalid header fields go undiagnosed.
6761 Some valid time strings are ignored.
6763 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
6764 of `calloc'. Use xcalloc instead.
6765 (decode_time, gid_decoder, size_decoder, uid_decoder):
6766 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
6767 Ensure that the result of calling xstrtoumax is no larger than
6768 the maximum value for the target type. Upon any failure, exit with
6770 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
6771 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
6772 (decode_time): Rewrite to accept time strings like
6773 1119018481.000000000. Before, such strings were always ignored.
6775 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6777 * src/create.c (dump_file0): Check for is_avoided_name()
6778 first. Fixes bug reported by Martin Lohmeier
6779 <martin@mein-horde.de>
6780 * tests/update.at: New file
6781 * tests/Makefile.am (TESTSUITE_AT): Add update.at
6782 * tests/testsuite.at: Likewise
6784 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6786 * configure.ac (AC_STRUCT_ST_BLKSIZE)
6787 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
6789 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
6791 * src/names.c (excluded_name): excluded_filename ->
6792 excluded_file_name, because the name was changed in gnulib.
6794 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6796 * src/tar.c (read_name_from_file,update_argv): Automatically
6797 detect nul-terminated list files.
6800 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6802 * scripts/backup.sh.in: Bugfixes.
6804 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6806 * scripts/backup.in: Minor fixes
6807 * scripts/backup.sh.in (mt_begin,mt_rewind)
6808 (mt_offline,mt_status): Use $MT to invoke mt
6809 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
6811 * doc/tar.texi: Document new backup scripts behavior
6813 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6815 * lib/.cvsignore: Updated
6816 * lib/Makefile.tmpl: Add new paxutils files
6817 * po/POTFILES.in: Likewise
6818 * src/buffer.c: Update invocations of safer_name_suffix()
6819 * src/create.c: Likewise
6820 * src/extract.c: Likewise
6821 * src/xheader.c: Likewise
6822 * src/common.h: Include paxlib.h instead of paxerror.h
6823 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
6824 imported from paxutils
6825 * src/names.c (hash_string_hasher,hash_string_compare)
6826 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
6827 (safer_name_suffix): Moved to paxutils
6829 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6831 * bootstrap (copy_files): Accept optional third argument: a prefix
6832 to be appended to destination file names.
6833 Import paxutils/paxlib files.
6834 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
6836 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
6838 * po/POTFILES.in: Likewise.
6839 * src/common.h: Remove defines and declarations imported from
6841 * src/misc.c: Likewise
6842 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
6844 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
6846 * src/misc.c (remove_any_file): Fix typo in previous change.
6848 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
6850 Port to Solaris 10's treatment of unlinking directories.
6851 * gnulib-modules: Add unlinkdir.
6852 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
6853 * src/common.h (we_are_root): Remove extern decl; it's now static.
6854 * src/extract.c (we_are_root): Now static.
6855 * src/misc.c: Include <unlinkdir.h>.
6856 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
6858 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
6859 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
6860 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
6861 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
6862 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
6863 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
6864 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
6865 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
6866 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
6867 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
6868 src/xheader.c, tests/Makefile.am, tests/append.at,
6869 tests/append01.at, tests/comprec.at, tests/delete01.at,
6870 tests/delete02.at, tests/delete03.at, tests/delete04.at,
6871 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
6872 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
6873 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
6874 tests/link01.at, tests/listed01.at, tests/listed02.at,
6875 tests/long01.at, tests/longv7.at, tests/multiv01.at,
6876 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
6877 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
6878 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
6879 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
6880 tests/testsuite.at, tests/truncate.at, tests/version.at,
6881 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
6882 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
6883 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
6884 tests/star/ustar-big-8g.at:
6885 Update FSF postal mail address.
6887 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6891 * bootstrap: Install files from paxutils/doc
6892 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
6893 * doc/tar.texi (Genfile): New appendix
6894 * src/compare.c (diff_file): diff_handle was not initialized
6895 * src/create.c (dump_regular_file): Correctly pad archive members
6896 that shrunk during archiving. Repored by Frank Heckenbach.
6897 * src/extract.c (file_newer_p): Return false if file does not
6899 (prepare_to_extract): Correct warning wording.
6900 * tests/truncate.at: New test case
6901 * tests/Makefile.am: Add truncate.at
6902 * tests/testsuite.at: Likewise.
6904 * doc/.cvsignore: Updated
6905 * lib/.cvsignore: Updated
6906 * tests/.cvsignore: Updated
6908 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
6910 * tests/multivol04.at: Tell awk to read from /dev/null.
6912 Adjust to recent gnulib changes.
6913 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
6914 * src/common.h (initial_umask): New var.
6915 * src/create.c (start_ueader): Use it, and adjust to new modechange
6917 (hash_link): unsigned -> size_t parameters and result.
6918 * src/incremen.c (hash_directory): Likewise.
6919 * src/names.c (hash_string_hasher): Likewise.
6920 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
6922 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6924 * tests/Makefile.am: Add shortrec.at.
6926 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
6928 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
6929 (short_read): Don't warn about short reads; they're normal.
6930 * tests/shortrec.at: New file.
6931 * tests/testsuite.at: Include it.
6933 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
6934 it is sometimes left behind as a garbage file (maybe due to the
6937 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6939 * src/list.c: Handle Solaris 'X' type flag
6940 * src/tar.h (SOLARIS_XHDTYPE): New define
6942 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
6944 * src/tar.c: Minor fixes to text messages. Proposed by Benno
6946 * src/extract.c: Likewise
6947 (extract_file): Assign orig_file_name
6948 to save_name uniformly over the program. This fixes matching
6949 directory names at the start of an archive volume.
6950 * src/buffer.c (flush_write): Warn when the name of the archive
6951 straddling volume boundary is longer than 100 characters. Earlier
6952 behavior was to issue a fatal error.
6953 (struct zip_magic): Reverted part of changes from 2005-04-04.
6954 They make the maintenance too costly. Removing `unsigned'
6955 qualifier from `magic' member should be enough.
6956 * src/compare.c (diff_init): Read directory file if in listed
6957 incremental. This prevents spurious 'Contents differ' diagnostics.
6958 (diff_archive): Minor fixes to text messages
6959 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
6960 to save_name uniformly over the program. This fixes matching
6961 directory names at the start of an archive volume.
6962 * src/create.c: Assign orig_file_name
6963 to save_name uniformly over the program. This fixes matching
6964 directory names at the start of an archive volume.
6965 * src/list.c: Likewise
6967 * tests/multiv03.at: Modified to match the new behavior
6968 * tests/multiv04.at: New file. Test splitting directory members between
6969 the archive volumes.
6970 * tests/Makefile.am: Add multiv04.at
6971 * tests/testsuite.at: Likewise.
6973 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
6975 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
6976 for reasons discussed in the thread beginning at
6977 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
6978 * .cvsignore: Remove config; add build-aux.
6980 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
6981 The unsigned char * pointer ran afoul of pedantic C compilers, and
6982 we didn't need pointers anyway. Put the size field before the
6983 data to avoid unnecessary padding. All uses changed.
6984 (magic) Make it const, since it doesn't change. All uses changed.
6986 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
6988 * src/xheader.c (decode_record): Don't dump core when given
6989 a corrupted extended header. Problem reported by Jim Meyering.
6990 Also, check for other ways that the header might be invalid,
6991 e.g., missing newline at end. Do not allow keys with nulls.
6992 Allow blanks before and after length, as POSIX requires.
6993 Do not allow leading "-" in length. Check for length overflow.
6994 (xheader_decode, xheader_decode_global): Let decode_record
6995 check for exhaustion of record.
6996 (xheader_read): Null-terminate the extended record;
6997 decode_record relies on this.
6999 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7001 * bootstrap (TP_URL): Change from
7002 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
7003 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
7004 some redirection glitches.
7005 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
7006 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
7007 * lib/.cvsignore: Add intprops.h (new gnulib file).
7009 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7011 * src/list.c (print_header): Print UID/GID in case of
7012 empty user/group name. This could occur when dumping
7013 files belonging to non-existing users and when listing
7015 Reported by Igor Lautar.
7017 * src/create.c: Correctly parse empty uname/gname
7018 * src/sparse.c (sparse_scan_file): Bugfix. offset had
7021 * scripts/backup.in: Use `head -n 1'. Provide missing
7022 argument to ${MT_STATUS}. Proposed by Jan Merka.
7023 * scripts/backup.sh.in: Likewise. Fixed typo in
7024 MT_OFFLINE assignment.
7025 * scripts/restore.in (restore_fs): Use root_fs
7027 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7029 * src/create.c: Replace strdup with xstrdup
7030 * src/names.c: Likewise
7031 * src/tar.c: Likewise
7033 * tests/append01.at: Added reference to bug-tar archive
7034 * tests/listed02.at: Use -print with find.
7036 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7038 * THANKS: Added Tim Adye. Fixed UTF.
7039 * src/list.c (read_header): Removed assignment to
7040 oldgnu_header.isextended. It was breaking append mode.
7042 * tests/append01.at: New test.
7043 * tests/Makefile.am: Added append01.at
7044 * tests/testsuite.at: Likewise
7046 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7048 * gnulib.modules: New file. List of required gnulib
7050 * bootstrap: Merge list of required modules from
7051 paxutils with that from tar proper.
7052 * src/tar.c: Various fixes in help and diagnostic messages.
7054 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7056 * src/common.h (EXTRACT_OVER_PIPE): New macro
7057 * src/compare.c: Code clean up.
7058 * src/extract.c (extract_archive): Do not check for
7059 EXTRACT_OVER_PIPE, decode_options() does this.
7060 * src/misc.c (exec_error,fork_error,dup2_error)
7061 (pipe_error): Removed unneeded functions.
7062 * src/system.c (sys_exec_command): Use xclose, xpipe,
7063 xfork, xdup2 and exec_fatal.
7064 * src/tar.c (options): Improved sorting. Document --backup=off.
7065 (decode_options): Clear backup_option if necessary.
7067 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7069 Initial implementation of --to-command option proposed
7072 * bootstrap: Get setenv module from gnulib
7073 * src/buffer.c: Do not use 8-bit chars in comments
7074 * src/common.h (to_command_option)
7075 (ignore_command_error_option): New globals
7076 (sys_exec_command,sys_wait_command): New commands
7077 * src/extract.c (extract_file): Handle to_command_option
7078 Fix error recovery: decrease `size' by `written', not
7079 by `count', otherwise tar misses the next header
7080 Do not diagnose write error if to_command_option
7081 is set, since the command may have exited prematurely.
7082 It would be better to check for sigpipe, though.
7083 (prepare_to_extract): Handle to_command_option
7084 * src/misc.c (exec_error, fork_error, dup_error)
7085 (pipe_error): New functions
7086 * src/system.c (sys_exec_command)
7087 (sys_wait_command): New functions
7088 * src/tar.c: Handle new options --to-command,
7089 --ignore-command-error
7090 * THANKS: Added Hansjoerg Lipp
7092 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
7094 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
7095 All uses changed. Fix typo that sometimes suppressed all "Archive
7096 contains obsolescent base-64 headers" warnings, not just the first
7098 (tar_checksum): Accept only octal checksums, since they aren't
7099 supposed to overflow into weird formats.
7101 Adjust to gnulib changes.
7102 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
7103 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
7104 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
7105 this file). Sort entries.
7107 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7109 * src/extract.c: Further rewrite.
7110 * src/buffer.c: Removed unused variables.
7111 * src/list.c: Likewise
7112 * src/tar.c (update_argv): Changed type to void
7114 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
7115 * src/create.c (start_private_header,write_header_name)
7116 (dump_hard_link): Restore compatibility with 1.13.25
7117 * src/extract.c (extract_archive): Rewritten
7118 * src/list.c: Add translators' comments
7119 * src/tar.c (options) Minor spelling fix
7120 * tests/star/quicktest.sh: Determine path to the tar executable.
7122 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7124 * po/POTFILES.in: Added tests/genfile.c
7125 * src/buffer.c (short_read): Use ngettext()
7126 (new_volume): use quote().
7127 * src/create.c: Use quote()
7128 * src/extract.c: Likewise
7129 * src/xheader.c: Likewise
7130 * src/misc.c: Add comments to translators
7132 * tests/same-order01.at: sort ls output
7133 * tests/sparse01.at (RE_CHECK): Added missing space
7135 * tests/sparse02.at: Test extracting sparse files over a pipe.
7136 * tests/Makefile.am: Added sparse02.at
7137 * tests/testsuite.at: Likewise
7138 * tests/listed02.at: Skip the test on filesystems that do not
7139 update ctime of a file when renaming it. To be reverted when
7140 the new incremental mode is ready.
7141 * tests/sparse01.at: Extract and compare sparse file
7143 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7145 * src/sparse.c: Extract sparse files even if the output
7148 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7150 * bootstrap: Add a comment to lib/Makefile.am saying that this
7151 is an autogenerated file.
7152 Exit with code 1 if any of autotools fails.
7153 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
7154 * tests/Makefile.am: Add append.at
7156 * m4/.cvsignore: Ignore all *.m4 files
7158 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7160 Rewritten handling of -T (--files-from) option. Now it
7161 inserts the file names immediately into argv array which allows
7163 1) any valid tar options (including another -T) to be used in the file
7164 2) any number of -T options to be given in command line
7166 * configure.ac: Raised version number to 1.15.2
7167 * src/common.h: Include obstack.h
7168 (files_from_option): Removed
7169 (unquote_option): New variable
7170 (stat_fatal): New function
7171 (name_close): Removed function.
7172 * src/incremen.c: Remove inclusion of obstack.h
7173 * src/xheader.c: Likewise.
7174 * src/misc.c (stat_fatal): New function
7175 * src/names.c (name_file): Removed variable.
7176 (read_name_from_file): Removed function. All callers changed.
7177 (name_close): Removed function. All callers changed.
7178 * src/tar.c: New options --unquote (--no-unquote) and
7180 (add_file_id,read_name_from_file,update_argv): New functions
7181 (parse_opt): Rewritten handling of -T option. Handle hidden
7182 --HANG option for debugging purposes.
7183 (decode_options): Init unquote_option to true. Init argv_stk.
7184 Remove unneeded references to files_from_option
7186 * doc/tar.texi: Document new options.
7187 Moved rendition macros and option value definitions into
7189 * doc/rendition.texi: New file
7190 * doc/value.texi: New file
7191 * doc/Makefile.am: Updated
7193 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
7195 * tests/testsuite.at (RE_CHECK): Use "join - file", not
7196 "join file -", to work around a bug in Solaris 8 join.
7197 Problem reported by Tomohiro Suzuki.
7199 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7201 * src/list.c (read_header): Fixed calculation of the
7202 size for GNU long name/link. Tar was reading one block
7203 more if name_size was divisible by 512. Thanks Josef
7205 * tests/long01.at: New file. Test listing of GNU long names
7207 * tests/pipe.at: Sort tar output.
7208 * tests/Makefile.am: Added long01.at
7209 * tests/testsuite.at: Likewise.
7210 * THANKS: Added Josef Bauer
7211 * lib/.cvsignore: Updated
7212 * m4/.cvsignore: Updated
7215 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7217 * directory: Updated for 1.15.1
7218 * doc/Makefile.am: Use gendocs.sh to generate web documentation
7219 * doc/gendocs_template: Template file for gendocs.sh
7220 * doc/tar.texi: Updated docs for --[no-]same-permissions
7221 * src/tar.c: Reworded docstrings for --[no-]same-permissions
7223 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7225 * bootstrap: Create m4/paxutils.m4
7226 * configure.ac: Call tar_PAXUTILS
7227 * tests/options02.at: Test that tar correctly handles non-option
7228 arguments interspersed with options.
7229 * tests/Makefile.am: Add options02.at
7230 * tests/testsuite.at: Likewise
7231 * tests/listed02.at: Do not create useless directory
7233 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7235 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
7236 Mike Frysinger <vapier@gentoo.org> for reporting.
7238 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
7240 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
7241 needless sed command. Problem reported by Paul Jarc.
7243 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
7245 Accommodate latest gnulib.
7246 * doc/.cvsignore: Add getdate.texi.
7247 * bootstrap: Do not treat alloca-opt specially; this is no
7248 longer needed (and breaks builds) with latest gnulib.
7250 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7252 * src/tar.c (main): Reverted recent changes (#ifdef).
7254 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7256 * configure.ac: Raise version number to 1.15.1
7258 * NEWS: Entry for 1.15.1
7259 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
7260 broke extraction from stdin.
7261 * src/list.c (from_header, tar_checksum): Changed declaration.
7262 All callers updated.
7263 * src/common.h: Likewise
7264 * src/tar.c (main): Protect invocation of setlocale by
7267 * tests/comprec.at: New test
7268 * tests/pipe.at: New test
7269 * tests/Makefile.am (comprec.at,pipe.at): New tests
7270 * tests/testsuite.at: Likewise
7271 * tests/gzip.at: Use AT_GZIP_PREREQ
7272 * tests/star/pax-big-10g.at: Likewise
7273 * tests/star/ustar-big-2g.at: Likewise
7274 * tests/star/ustar-big-8g.at: Likewise
7276 * tests/extrac04.at: Discard stderr from sort, on some
7277 systems it spits out lots of irrelevant info.
7278 * tests/listed02.at: Likewise
7280 * doc/index.html.in: Rewritten in xhtml to follow recent
7284 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7286 Released version 1.15. Sources up to this point are
7287 tagged release_1_15.
7289 * configure.ac: Raised version number to 1.15
7291 * directory: Updated
7292 * bootstrap (update_po): Give -r to wget. Always remove index.html
7293 Ignore alloca-opt module (it duplicates alloca)
7295 * tests/Makefile.am: Distribute star/quicktest.sh
7296 * tests/star/README: Document quicktest.sh
7297 * tests/star/qucktest.sh: Removed.
7298 * tests/star/quicktest.sh: New file.
7300 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7303 * doc/tar.texi: Document auto-detection of compressed archive
7305 * src/tar.c (decode_options): Ignore --seek if used with --delete.
7306 Delete.c is based on the assumption that the archive is being
7307 actually read, not lseeked.
7309 * tests/delete05.at: New file
7310 * tests/extrac02.at: Fixed typo in AT_SETUP
7311 * tests/Makefile.am: Added delete05.at
7312 * tests/testsuite.at: Likewise.
7314 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7316 * src/delete.c (delete_archive_members): Bugfix: when
7317 attempting to delete an nonexistent member, the last
7318 blocking_factor blocks were zeroed.
7320 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7322 * TODO: Mention sub-second resolution, lutimes, lchmod.
7324 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
7326 Adjust to recent gnulib changes.
7327 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
7328 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
7329 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
7330 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
7331 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
7332 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
7334 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
7335 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
7336 pathmax.m4, realloc.m4.
7338 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7340 * configure.ac: Raised version number to 1.14.91
7341 * scripts/tarcat: New file
7342 * scripts/Makefile.am: Added tarcat
7343 * src/buffer.c (hit_eof): Changed type to boolean
7344 (read_full_records,reading_from_pipe): New variables
7345 (check_compressed_archive,open_compressed_archive): New functions
7346 (open_archive): Autodetect compressed archives and act accordingly.
7347 Set reading_from_pipe. This fixes controversial set of changes
7348 introduced 2004-05-11,2004-03-22.
7349 * src/list.c (tar_checksum): New function
7350 (read_header): Use tar_checksum().
7351 * src/common.h (tar_checksum): New function
7353 * tests/star/README: Updated
7357 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7359 * src/tar.c (decode_options): Fixed -o semantics. Thanks
7360 Jean Delvare <khali@linux-fr.org>
7362 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7364 * bootstrap: Add localcharset
7365 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
7366 makefile snippet from localcharset uses '+=' on them.
7367 * src/Makefile.am (LDADD): Add LIBICONV
7368 * src/list.c (decode_header): Set uname/gname to NULL if their
7369 header counterparts are empty
7370 * src/tar.c (options): Use OPTION_NO_TRANS
7371 * src/utf8.c: Use locale_charset() from gnulib
7373 * tests/star/README: Updated
7378 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7380 * THANKS: Added Bryan Ford
7381 * doc/Makefile.am (.text): Fixed rule
7382 * po/POTFILES.in: Added argp-help.c
7384 2004-10-04 Bryan Ford <baford@mit.edu>
7386 * src/tar.c: New option --exclude-caches, to exclude
7387 cache directories automatically on archive creation.
7388 Cache directories are directories containing a
7389 standardized tag file, as specified at:
7390 http://www.brynosaurus.com/cachedir/spec.html
7391 * src/common.h: New variable exclude_caches_option.
7392 * src/create.c: New function check_cache_directory(),
7393 called from dump_dir0() if exclude_caches_option is set,
7394 to check for a cache directory tag and exclude the directory
7395 if such a tag is found.
7396 * doc/tar.texi: Updated accordingly.
7398 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7400 * doc/tar.texi: Minor fix
7401 * src/tar.c (options): Minor fix
7403 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7406 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
7407 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
7408 * src/extract.c: Normalized use of remove_any_file().
7409 * src/misc.c: Likewise.
7410 * src/tar.c (parse_opt): Emit warning if -l option is used.
7411 (show_default_settings): REMOTE_SHELL may be undefined
7413 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7415 Test suite rewritten in autotest.
7417 * configure.ac: Updated for autotest
7418 * src/tar.c (argp_program_version): Modified.
7419 * tests/Makefile.am: Rewritten for autotest.
7421 * tests/.cvsignore: Updated
7422 * tests/append.at: New file
7423 * tests/atlocal.in: New file
7424 * tests/delete01.at: New file
7425 * tests/delete02.at: New file
7426 * tests/delete03.at: New file
7427 * tests/delete04.at: New file
7428 * tests/extrac01.at: New file
7429 * tests/extrac02.at: New file
7430 * tests/extrac03.at: New file
7431 * tests/extrac04.at: New file
7432 * tests/extrac05.at: New file
7433 * tests/gzip.at: New file
7434 * tests/ignfail.at: New file
7435 * tests/incremental.at: New file
7436 * tests/link01.at: New file
7437 * tests/listed01.at: New file
7438 * tests/listed02.at: New file
7439 * tests/longv7.at: New file
7440 * tests/multiv01.at: New file
7441 * tests/multiv02.at: New file
7442 * tests/multiv03.at: New file
7443 * tests/old.at: New file
7444 * tests/options.at: New file
7445 * tests/recurse.at: New file
7446 * tests/same-order01.at: New file
7447 * tests/same-order02.at: New file
7448 * tests/sparse01.at: New file
7449 * tests/testsuite.at: New file
7450 * tests/version.at: New file
7451 * tests/volume.at: New file
7452 * tests/star/gtarfail.at: New file
7453 * tests/star/gtarfail2.at: New file
7454 * tests/star/multi-fail.at: New file
7455 * tests/star/pax-big-10g.at: New file
7456 * tests/star/ustar-big-2g.at: New file
7457 * tests/star/ustar-big-8g.at: New file
7459 * tests/preset.in: Removed
7460 * tests/before: Removed
7461 * tests/after: Removed
7462 * tests/version.sh: Removed.
7463 * tests/append.sh: Removed.
7464 * tests/delete01.sh: Removed.
7465 * tests/delete02.sh: Removed.
7466 * tests/delete03.sh: Removed.
7467 * tests/delete04.sh: Removed.
7468 * tests/extrac01.sh: Removed.
7469 * tests/extrac02.sh: Removed.
7470 * tests/extrac03.sh: Removed.
7471 * tests/extrac04.sh: Removed.
7472 * tests/extrac05.sh: Removed.
7473 * tests/gzip.sh: Removed.
7474 * tests/incremen.sh: Removed.
7475 * tests/ignfail.sh: Removed.
7476 * tests/link01.sh: Removed.
7477 * tests/listed01.sh: Removed.
7478 * tests/listed02.sh: Removed.
7479 * tests/longv7.sh: Removed.
7480 * tests/multiv01.sh: Removed.
7481 * tests/multiv02.sh: Removed.
7482 * tests/multiv03.sh: Removed.
7483 * tests/old.sh: Removed.
7484 * tests/options.sh: Removed.
7485 * tests/same-order01.sh: Removed.
7486 * tests/same-order02.sh: Removed.
7487 * tests/volume.sh: Removed.
7488 * tests/recurse.sh: Removed.
7489 * tests/sparse01.sh: Removed.
7490 * tests/star/gtarfail.sh: Removed.
7491 * tests/star/gtarfail2.sh: Removed.
7492 * tests/star/multi-fail.sh: Removed.
7493 * tests/star/ustar-big-2g.sh: Removed.
7494 * tests/star/ustar-big-8g.sh: Removed.
7495 * tests/star/pax-big-10g.sh: Removed.
7497 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7499 * bootstrap: Install genfile.c from paxutils
7500 * tests/genfile.c: Removed. Integrated into
7502 * tests/mksparse.c: Removed. Integrated into
7503 (paxutils) genfile.c
7504 * tests/Makefile.am: Removed mksparse
7505 * tests/sparse01.sh: Use genfile instead of mksparse
7507 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7509 Started merging with cpio into paxutils. Sources before
7510 this point are tagged alpha-1_14_90
7512 * Makefile.am: Updated for use with paxutils
7513 * README-alpha: Likewise
7514 * bootstrap: Likewise
7515 * configure.ac: Likewise
7516 * lib/Makefile.tmpl: Likewise
7517 * po/POTFILES.in: Likewise
7518 * src/Makefile.am: Likewise
7519 * src/buffer.c: Likewise
7520 * src/common.h: Likewise
7521 * src/compare.c: Likewise
7522 * src/create.c: Likewise
7523 * src/delete.c: Likewise
7524 * src/extract.c: Likewise
7525 * src/incremen.c: Likewise
7526 * src/list.c: Likewise
7527 * src/mangle.c: Likewise
7528 * src/misc.c: Likewise
7529 * src/names.c: Likewise
7530 * src/sparse.c: Likewise
7531 * src/system.c: Likewise
7532 * src/tar.c: Likewise
7533 * src/update.c: Likewise
7534 * src/utf8.c: Likewise
7535 * src/xheader.c: Likewise
7537 * src/system.h: Removed
7538 * src/rmt.c: Removed
7539 * src/rmt.h: Removed
7540 * src/rtapelib.c: Removed
7542 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7544 * tests/listed02.sh: Do not depend on any particular ordering
7547 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7549 * doc/tar.texi: Document the use of -C option in
7550 file lists. Document --seek option.
7551 * configure.ac: New option --with-rmt. New configuration variable
7552 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
7553 * src/Makefile.am: Install rmt into rmtdir
7554 * src/tar.c (usage): Minor fix.
7558 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7560 * configure.ac: Raised version number to 1.14.90
7561 * src/common.h (is_individual_file): New prototype
7562 * src/create.c (dump_file0): Fix bug introduced
7564 * src/names.c (register_individual_file)
7565 (is_individual_file): New functions.
7566 * tests/listed01.sh: Use genfile instead of dd.
7567 * tests/listed02.sh: New file.
7568 * tests/Makefile.am: Added listed02.sh
7572 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7574 * src/sparse.c (sparse_add_map): Fixed improper initializations
7575 of sparse_map_size. We assume that whatever number it contains
7576 describes adequately the current size of sparse_map. The only
7577 number we need to reset is sparse_map_avail.
7578 * src/compare.c (verify_volume): Call set_next_block_after
7579 if read_header returns HEADER_FAILURE
7580 Destroy and reinitialize content of current_stat_info and
7581 extended_header after each iteration (bug reported by
7582 John L. Males <jlmales@yahoo.com>).
7583 Issue a warning if the created archive contains some members
7584 whose file names were stripped off their leading prefixes.
7585 This is a temporary fix of the issue reported by Bdale Garbee
7586 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
7587 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
7589 * src/names.c (removed_prefixes_p): New function.
7591 * src/buffer.c: When computing write rate do not take
7592 into account the time needed to verify the archive(s).
7593 The bug reported by John L. Males <jlmales@yahoo.com>
7594 (set_start_time,compute_duration): New functions.
7595 (print_total_written): Use the result of compute_duration().
7596 (close_archive): Call compute_duration.
7597 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
7598 * src/list.c (decode_header): Fixed initialization
7599 of stat_info->is_sparse
7600 * src/tar.c (main): Call set_start_time().
7602 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
7603 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
7608 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7610 * src/tar.c: Fix copy-n-paste errors in the license
7612 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7614 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
7615 Use ROOT_FS with -C option. Do not send mail
7616 if ADMINISTRATOR is set to NONE.
7617 * scripts/backup.sh.in (test_root): Append / to
7618 ROOT_FS if it does not already end in it.
7619 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
7620 New option -a (--all). Do not start restore unless
7621 -a or patterns are given.
7622 (restore_fs,restore_files): Fixed use of --listed option.
7623 * doc/tar.texi: Updated
7626 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7628 * src/tar.c (find_argp_option): Fixed typo
7630 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
7632 Merge argp, getopt, xalloc changes from gnulib.
7633 * bootstrap (gnulib_modules): Add xalloc-die.
7634 Remove code to test for patches; we don't have patches now.
7635 Set LC_ALL=C so that file names sort consistently.
7636 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7637 lib-ld.m4, lib-prefix.m4, po.m4 too.
7639 * patches/getopt.diff: Remove; gnulib now works unpatched.
7640 * configure.ac (_getopt_long_only_r): Remove check.
7641 gl_ARGP now does this for us.
7642 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
7644 * src/extract.c: Adjust to changes to gnulib xalloc module.
7645 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
7646 (xalloc_die): New function.
7648 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7652 * src/buffer.c (flush_write): Limit filenames
7653 of the members that straddle multivolume archive
7654 boundary to 100 characters.
7655 (flush_read): Use strncmp when comparing multivolume member
7657 * tests/multiv03.sh: New file
7658 * tests/Makefile.am: Added multiv03.sh
7660 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7662 * src/list.c (read_and): Call decode_header before
7663 calling skip_member()
7664 (skip_member): Use is_sparse field to determine if the
7665 member is a sparse file.
7667 * tests/Makefile.am: Added extrac05.sh
7668 * tests/extrac05.sh: New file
7669 * tests/append.sh: Rearranged leading comments. Added explicit
7670 references to report messages wherever available.
7671 * tests/delete01.sh: Likewise
7672 * tests/delete02.sh: Likewise
7673 * tests/delete03.sh: Likewise
7674 * tests/delete04.sh: Likewise
7675 * tests/extrac01.sh: Likewise
7676 * tests/extrac02.sh: Likewise
7677 * tests/extrac03.sh: Likewise
7678 * tests/extrac04.sh: Likewise
7679 * tests/gzip.sh: Likewise
7680 * tests/ignfail.sh: Likewise
7681 * tests/incremen.sh: Likewise
7682 * tests/link01.sh: Likewise
7683 * tests/listed01.sh: Likewise
7684 * tests/longv7.sh: Likewise
7685 * tests/multiv01.sh: Likewise
7686 * tests/multiv02.sh: Likewise
7687 * tests/old.sh: Likewise
7688 * tests/options.sh: Likewise
7689 * tests/recurse.sh: Likewise
7690 * tests/same-order01.sh: Likewise
7691 * tests/same-order02.sh: Likewise
7692 * tests/sparse01.sh: Likewise
7693 * tests/version.sh: Likewise
7694 * tests/volume.sh: Likewise
7696 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7698 * bootstrap: Extended --update-po option to take an
7699 optional argument specifying the po file to update.
7700 * src/create.c: Improved compatibility with 1.13.25
7701 * tests/link01.sh: New file.
7702 * tests/Makefile.am: Added link01.sh
7704 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
7708 * patches/argp.diff: Remove; no longer needed.
7710 * lib/.cvsignore: Add stat-macros.h.
7711 Remove addext.c, malloc.c, realloc.c.
7713 * src/extract.c: Include <getcwd.h>.
7714 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
7715 * src/extract.c (make_directories):
7716 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
7717 * src/misc.c (must_be_dot_or_slash): Likewise.
7718 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
7720 * src/tar.c (parse_opt): Likewise.
7721 * src/incremen.c (purge_directory): Fix format buffer typos in warning
7723 * src/tar.c (options): Add missing initializers to pacify gcc.
7724 (decode_options): Remove unused var.
7726 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
7728 * bootstrap (gnulib_modules): Add getpagesize.
7729 * configure.ac (valloc): Remove check; valloc no longer used.
7730 * lib/.cvsignore: Add getpagesize.h.
7731 * m4/.cvsignore: Add getpagesize.m4.
7732 * src/buffer.c (record_buffer): New var.
7733 (open_archive): Don't use valloc; on older or buggy hosts, you can't
7734 free the result. Use page_aligned_alloc instead.
7735 * src/compare.c (diff_init): Likewise.
7736 * src/buffer.c (open_archive): Record the pointer to be freed
7738 (close_archive): Free record_buffer.
7739 * src/common.h (page_aligned_alloc): New decl.
7740 * src/misc.c (quote_n, quote): Remove these redundant functions.
7741 (ptr_align): New function, from coreutils/src/system.h.
7742 (page_aligned_alloc): New function.
7743 * src/system.h (valloc): Remove.
7745 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
7747 * src/extract.c (extract_archive): Do not report an error
7748 when hard-linking X to X when X exists. Problem reported by
7750 * lib/.cvsignore: Add fchown-stub.c.
7752 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7755 * src/common.h (root_device): New global.
7756 (gnu_restore): Renamed to purge_directory().
7757 * src/extract.c (extr_init): Save the device number
7759 (extract_archive): Renamed gnu_restore() to purge_directory().
7760 * src/incremen.c (gnu_restore): Renamed to purge_directory().
7761 Do not attempt to purge the directory if it is on a different
7762 device and one_file_system_option is set.
7764 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7766 * doc/tar.texi: The actual default for exclude patterns
7767 is --no-anchored. Fixed.
7768 * src/tar.c (options): Likewise.
7769 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
7771 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7773 * doc/tar.texi: Fixed several inconsistencies.
7774 * src/tar.c: Fixed docstring for --checkpoint option.
7776 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7778 * src/buffer.c (seek_archive): New function
7779 * src/common.h (seek_archive): New function
7780 (seekable_archive): New global.
7781 * src/list.c (skip_file): Use seek_archive() if
7783 * src/tar.c (struct fmttab): Accept 'pax' as alias
7785 (options): New option -n (--seek).
7786 * src/update.c: Determine type of the archive before
7791 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7793 * bootstrap: New option --update-po
7794 * src/tar.c: New option -H (short alias to --format)
7795 * doc/tar.texi: Document -H option
7796 * src/names.c (safer_name_suffix): Fixed bug introduced
7799 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7801 * bootstrap: Apply patches from patch subdirectory
7803 * patches/argp.diff: New file
7804 * patches/getopt.diff: New file
7805 * configure.ac: Check for _getopt_long_only_r and
7806 force using included version of getopt if the function
7808 * src/tar.c: Use argp for command line parsing.
7809 * src/system.h: Minor formatting fix
7810 * m4/.cvsignore: Updated
7811 * lib/.cvsignore: Updated
7812 * doc/tar.texi: Minor fix.
7813 * src/extract.c: Fix improper use of 'path' term
7814 * src/incremen.c: Likewise
7815 * src/list.c: Likewise
7816 * src/misc.c: Likewise
7817 * src/names.c: Likewise
7818 * src/rmt.h: Likewise
7819 * src/rtapelib.c: Likewise
7820 * src/update.c: Likewise
7821 * src/xheader.c: Likewise
7822 * tests/star/README: Minor fix
7824 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7826 * configure.ac: Raised version number to 1.14.1
7827 * src/tar.c: Renamed --strip-path to --strip-components
7828 Changed improper use of _() to ngettext().
7829 * src/extract.c: Renamed strip_path_option to strip_components_option
7830 * src/common.h: Likewise.
7832 * doc/tar.texi: Updated
7834 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7836 * src/system.c (sys_child_open_for_uncompress): Do not
7837 set read_full_records_option: the compressed archive is
7838 likely not to contain integer number of records. Should
7839 the user wish to use reblocking, he may always give tar
7840 -B option. This is a minor improvement over the change
7842 * src/buffer.c (open_archive): Removed assignment to
7843 read_full_records_option.
7845 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
7846 as the format argument, rather than a possibly-translated variable
7847 string. Patch provided by Jim Meyering <jim@meyering.net>
7848 * src/tar.c (decode_options): Fixed typo in the comment.
7849 * tests/star/README: Minor correction
7851 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7853 * directory: New file. GNU directory entry for tar.
7854 * doc/Makefile.am: Rewritten. Added rules for generating
7855 documentation for the project's website.
7856 * doc/.cvsignore: Updated
7857 * doc/index.html.in: New file.
7859 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7861 * configure.ac: Raised version number to 1.14
7863 * tests/after: Added copyleft statement
7864 * tests/before: Added copyleft statement
7865 * tests/preset.in: Added copyleft statement
7867 Tar 1.14 is released. Sources up to this point are tagged
7870 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7872 * configure.ac: Fixed prerequisite headers for sys/buf.h
7874 * src/system.h: Likewise.
7875 * tests/after (compare): Fixed argument quoting under eval
7876 * tests/before: Quote TAR_ARCHIVE_FORMATS
7878 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7883 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
7884 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
7885 the pathname of the rmt utility.
7886 New option --enable-backup-scripts.
7887 * doc/tar.texi: Updated
7888 * scripts/Makefile.am: Install the scripts only if requested
7890 * scripts/backup.in: Fixed --version output.
7891 Fixed initialization of the listing files and printing
7892 the time of the last previous level dump.
7893 * scripts/restore.in: Fixed --version output.
7894 * src/Makefile.am (localedir.h rule): Generate correct
7895 DEFAULT_RMT_COMMAND variable.
7896 * src/common.h (rmt_command_option): New variable.
7897 * src/list.c (read_and): Print block number before
7898 issuing 'Skipping to next header' diagnostics, if
7899 requested by block_number_option.
7900 * src/rtapelib.c: Use rmt_command_option instead of
7901 hardcoded "/etc/rmt".
7902 * src/tar.c: New option --rmt-command.
7903 (decode_options): Handle --rmt-command. Initialize
7904 rmt_command_option to DEFAULT_RMT_COMMAND.
7906 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7908 * doc/tar.texi: Further update.
7910 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7912 * configure.ac: Minor fix
7913 * scripts/Makefile.am: Updated
7914 * scripts/backup-specs: Updated
7915 * scripts/backup.in: Minor fixes
7916 * scripts/backup.sh: Removed
7917 * scripts/backup.sh.in: New file. Source for backup.sh
7918 * scripts/restore.in: New file
7919 * scripts/.cvsignore: Updated
7920 * scripts/WARNING: Removed
7921 * doc/tar.texi: Updated
7924 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7926 * src/names.c (name_gather): Bugfix: Honor single -C with
7928 * tests/same-order01.sh: New file
7929 * tests/same-order02.sh: New file
7930 * tests/Makefile.am: Updated
7932 * tests/append.sh: Added copyleft header
7933 * tests/delete01.sh: Likewise
7934 * tests/delete02.sh: Likewise
7935 * tests/delete04.sh: Likewise
7936 * tests/extrac01.sh: Likewise
7937 * tests/extrac02.sh: Likewise
7938 * tests/extrac03.sh: Likewise
7939 * tests/extrac04.sh: Likewise
7940 * tests/gzip.sh: Likewise
7941 * tests/ignfail.sh: Likewise
7942 * tests/incremen.sh: Likewise
7943 * tests/multiv01.sh: Likewise
7944 * tests/old.sh: Likewise
7945 * tests/options.sh: Likewise
7946 * tests/recurse.sh: Likewise
7947 * tests/version.sh: Likewise
7948 * tests/volume.sh: Likewise
7949 * tests/star/gtarfail.sh: Likewise
7950 * tests/star/gtarfail2.sh: Likewise
7951 * tests/star/multi-fail.sh: Likewise
7952 * tests/star/pax-big-10g.sh: Likewise
7953 * tests/star/qucktest.sh: Likewise
7954 * tests/star/ustar-big-2g.sh: Likewise
7955 * tests/star/ustar-big-8g.sh: Likewise
7957 * doc/.cvsignore: Updated
7959 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7961 * configure.ac: Check whether date accepts +format argument
7962 (for backup scripts).
7963 * scripts/level-0: Removed
7964 * scripts/level-1: Removed
7965 * scripts/weekly.new: Removed
7966 * scripts/dump-remind: Removed
7967 * scripts/backup.in: New file
7968 * scripts/backup.sh: New file
7969 * scripts/dump-remind.in: New file
7970 * scripts/backup-specs: Updated
7971 * scripts/Makefile.am: Updated for new directory contents.
7972 * scripts/.cvsignore: Updated
7974 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7977 * doc/tar.texi: Updated
7978 * src/tar.c: --utc implies -vv
7980 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7982 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
7983 does not define it if it fails to find iconv.h.
7985 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7987 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
7988 and parts of configure.ac
7989 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
7990 * lib/Makefile.am: Removed
7991 * lib/Makefile.tmpl: New file.
7992 * lib/.cvsignore: Updated
7993 * m4/.cvsignore: Updated
7994 * src/xheader.c: Include stpcpy.h
7996 * src/create.c: Produce an error, not warning, if the
7997 filename is too long.
7998 * tests/longv7.sh: Synchronized with the recent changes.
8000 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8002 * configure.ac: Fixed test for iconv_t
8003 * src/rmt.h: Bugfix by Jürgen Weigert
8004 * THANKS: Add Jürgen Weigert
8005 * tests/star/README: Fixed typo
8007 2004-04-04 Paul Eggert <eggert@twinsun.com>
8009 Merge getdate documentation changes from coreutils.
8011 * doc/getdate.texi: Update from coreutils CVS.
8012 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
8014 Merge recent gnulib changes, and remove some lint.
8016 Improve support for nanosecond-resolution time stamps.
8017 * bootstrap: Add gettime, timespec modules.
8018 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
8019 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
8021 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
8022 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
8023 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
8024 * src/common.h (newer_mtime_option): Now a struct timespec, not
8025 time_t. All uses changed.
8026 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
8027 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
8028 * src/incremen.c (scan_path): Likewise.
8029 * src/list.c (read_and): Likewise.
8030 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
8031 whether newer_mtime_option is initialized.
8032 * src/tar.c (decode_options): Likewise.
8033 * src/tar.c (decode_options): Adjust to new signature for get_date.
8035 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
8036 result of safe_read, full_write, and similar functions.
8037 Detect safe_read error by comparing to SAFE_READ_ERROR;
8038 detect full_write error by comparing to 0.
8040 * src/common.h (write_error_details, sys_write_archive_buffer):
8042 * src/misc.c (write_error_details): Likewise.
8043 * src/rmt.c (main): Likewise.
8044 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
8045 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
8046 * src/sparse.c (sparse_scan_file, sparse_dump_region,
8047 check_sparse_region, check_data_region): Likewise.
8048 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
8049 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
8050 * src/update.c (append_file): Likewise.
8052 * src/buffer.c (clear_read_error_count): Use explicit (void)
8053 to indicate a function with no arguments.
8054 * src/create.c (check_links): Likewise.
8055 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
8056 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
8057 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
8058 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
8060 * src/utf8.c (get_input_charset): Likewise.
8061 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
8062 xheader_decode_global, extended_header_init): Likewise.
8063 * tests/mksparse.c (usage): Likewise.
8065 * src/buffer.c (new_volume): Rename local variables to avoid
8067 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
8068 sparse_file_p, sparse_member_p, sparse_fixup_header,
8069 sparse_dump_file, sparce_extract_file, sparse_skip_file,
8070 sparse_diff_file): Likewise.
8071 * src/compare.c (diff_archive): Likewise.
8072 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
8073 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
8075 * src/extract.c (repair_delayed_set_stat): Likewise.
8076 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
8078 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
8079 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
8080 sparse_dump_file, sparse_file_p, sparse_member_p,
8081 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
8082 check_data_region, sparse_diff_file): Likewise.
8083 * src/system.c (sys_stat_nanoseconds): Likewise.
8084 * src/xheader.c (xheader_format_name): Likewise.
8086 * src/common.h (enum old_files): Remove comma before }; not portable.
8088 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
8089 * src/rmt.c (usage): Likewise.
8090 * src/xheader.c (xheader_set_single_keyword): Likewise.
8091 * tests/genfile.c (usage): Likewise.
8092 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
8095 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
8097 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
8098 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
8099 langtab.charset, charset_lookup): Likewise.
8101 * src/common.h (name_init): Remove unused args. All callers changed.
8102 * src/names.c (name_init): Likewise.
8104 * src/common.h (usage, xheader_write, xheader_write_global,
8105 sys_reset_uid_gid): New decls.
8107 * src/compare.c (report_difference, process_noop): Add
8108 __attribute__ ((unused)) for unused attributes.
8109 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
8111 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
8112 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
8113 path_coder, size_coder, uid_coder, uname_coder,
8114 sparse_numblocks_coder): Likewise.
8116 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
8117 dump_file0): Now static.
8118 * src/utf8.c (charset_lookup): Likewise.
8119 * src/xheader.c (xheader_protected_pattern_p,
8120 xheader_protected_keyword_p, xheader_set_single_keyword,
8121 xheader_keyword_deleted_p, xheader_keyword_override_p,
8122 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
8124 * tests/genfile.c (usage): Likewise.
8125 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
8128 * src/create.c (hash_link): Rewrite to avoid cast.
8130 * src/extract.c (file_newer_p): Use parameter, not global var.
8131 * src/misc.c (write_error_details): Likewise.
8133 * src/extract.c (prepare_to_extract): Remove directory arg; not
8134 used. All callers changed.
8136 * src/misc.c (close_fatal): Remove; not used.
8137 * src/system.c (sys_utimes): Likewise.
8139 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
8141 * src/rmt.c (main): Update copyright date to 2004.
8142 * src/tar.c (decode_options): Likewise.
8144 * src/rtapelib.c (get_status_string): Don't lose errno when
8145 skipping the error messages.
8146 (get_status): Report an error if atol returns a negative number.
8148 * src/utf8.c (struct langtab, langtab, charset_lookup,
8149 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
8151 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
8152 Use macros, not definitions, to avoid type clashes with system
8154 (charset_lookup): Local var is now auto, not static.
8155 (utf8_convert): Use ICONV_CONST instead of const, to avoid
8158 * src/utf8.c (langtab): Initialize all elements of struct, to
8160 * src/xheader.c (xhdr_tab): Likewise.
8162 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
8164 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
8166 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
8169 * configure.ac: Raised version number to 1.13.94
8170 * src/system.h: Protect inclusion of <sys/time.h>
8172 Declare time() if HAVE_DECL_TIME is 0
8173 * tests/.cvsignore: Added mksparse
8175 * tests/sparse01.sh: New file
8176 * tests/multiv02.sh: New file
8177 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
8178 * tests/longv7.sh: Added missing call to 'after'
8180 * src/common.h: Added missing prototypes
8181 * src/compare.c (diff_archive): Use is_sparse member
8182 instead of GNUTYPE_SPARSE.
8183 * src/create.c: Removed unused variables
8184 * src/extract.c (extract_archive): Use sparse_member_p instead
8186 Removed unused variables
8187 * src/list.c (decode_header): Use sparse_fixup_header to correct
8189 (print_header): Do not rely on GNUTYPE_SPARSE type.
8190 Use st->stat.st_size to print real file size.
8191 (skip_member): Assign stat_info.file_name to save_name. This fixes
8192 bug reported by Mads Martin Joergensen <mmj@suse.de>
8193 Use sparse_skip_file() to skip sparse members.
8194 * src/rtapelib.c: include "common.h"
8195 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
8196 (struct tar_sparse_optab.fixup_header): New member
8197 (tar_sparse_member_p): New function.
8198 (tar_sparse_init): Return true if decode_header is not provided
8199 (tar_sparse_fixup_header)
8200 (sparse_member_p,sparse_fixup_header)
8202 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
8203 (star_fixup_header, pax_sparse_member_p): New function
8204 (pax_decode_header): Remove
8205 * src/system.h: Include <sys/time.h> and <utime.h> when available
8206 * src/tar.c (usage): Prototype moved to common.h
8207 * src/tar.h (struct tar_stat_info.is_sparse): New member
8208 * src/utf8.c (utf8_convert): Changed prototype
8209 (get_input_charset): Removed unused variable
8210 * src/xheader.c: include <fnmatch.h>
8211 (size_decoder): Assign to both st->archive_file_size and
8213 (st->stat.st_size): Assign to st->stat.st_size
8214 (sparse_numbytes_decoder): Removed unused variable
8215 * src/.cvsignore: Added .gdbinit
8216 * THANKS: Added Mads Martin Joergensen
8218 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8220 * src/create.c (write_long_name): Do not allow more than
8221 NAME_FIELD_SIZE-1 characters in a file name for V7 format
8223 * tests/longv7.sh: New file.
8224 * tests/Makefile.am: Add longv7.sh
8226 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8228 * src/buffer.c (open_archive): Clear read_full_records_option
8229 if reading from a pipe.
8230 (short_read): Display warning about the deduced record size
8232 * tests/star/pax-big-10g.sh: Updated to match the above changes.
8233 * tests/star/ustar-big-2g.sh: Likewise.
8234 * tests/star/ustar-big-8g.sh: Likewise.
8236 * configure.ac: Added gl_FUNC_STRTOULL
8237 * src/create.c (start_header): Check for GNU_FORMAT
8238 if incremental_option is set.
8239 * src/xheader.c (to_decimal): New function.
8240 (xheader_format_name): Use to_decimal() instead of snprintf.
8241 * tests/listed01.sh: Use genfile instead of dd
8242 * tests/multiv01.sh: Likewise.
8244 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8246 * src/list.c (read_and): Stop processing the archive after
8247 encountering a single zero record. Many old archives contain
8248 arbitrary garbage after it.
8249 The warning is issued anyway.
8251 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8253 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
8254 conversion buffer was not null terminated. Fix provided
8255 by Leland Lucius <llucius@tiny.net>
8256 * THANKS: Added Leland Lucius
8257 * src/utf8.c (utf8_convert): Indentation fix.
8259 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8261 * src/buffer.c (flush_read): Bugfix: the
8262 condition at line 714 included
8264 || (status > 0 && !read_full_records_option)
8266 which is grossly wrong, since even if new_volume() below succeeds,
8267 the subsequent call to rmtread will overwrite the chunk of data
8268 already read in the buffer and thus spoil everything.
8269 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
8271 * tests/star/multi-fail.sh: New test.
8272 * tests/Makefile.am: Added multi-fail.sh
8273 * tests/star/README: Updated
8275 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8278 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
8279 * src/common.h (utc_option): new global
8280 (enum old_files.KEEP_NEWER_FILES): New element
8281 * src/extract.c: Handle --keep-newer-files option
8282 * src/list.c (tartime): Print UTC if --utc was given.
8283 * src/tar.c: New options: --utc and keep-newer-files
8285 * tests/Makefile.am: Added new tests
8286 * tests/after: Rewritten
8287 * tests/before: Rewritten
8288 * tests/preset.in: Rewritten
8289 * tests/delete03.sh: Accommodate for the new testsuite logic
8290 * tests/gzip.sh: Likewise
8291 * tests/incremen.sh: Likewise
8292 * tests/listed01.sh: Likewise
8293 * tests/multiv01.sh: Likewise
8294 * tests/old.sh: Likewise
8295 * tests/options.sh: Likewise
8296 * tests/version.sh: Likewise
8297 * tests/volume.sh: Likewise
8299 * tests/star: New directory
8300 * tests/star/README: New file
8301 * tests/star/gtarfail.sh: New file
8302 * tests/star/gtarfail2.sh: New file
8303 * tests/star/pax-big-10g.sh: New file
8304 * tests/star/qucktest.sh: New file
8305 * tests/star/ustar-big-2g.sh: New file
8306 * tests/star/ustar-big-8g.sh: New file
8308 2004-02-26 Paul Eggert <eggert@twinsun.com>
8310 * doc/tar.texi (dircategory Individual utilities): Append period,
8311 as suggested by Karl Berry.
8313 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8315 * src/list.c (decode_header): Call xheader_decode before
8316 the assignment to current_stat_info.archive_file_size.
8318 2004-02-23 Paul Eggert <eggert@twinsun.com>
8320 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
8322 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8327 * tests/before: Move testing of the prerequisite archive formats
8328 to the separate function 'prereq'. Do not expect any arguments
8329 * tests/delete03.sh: Use prereq() instead of passing arguments
8331 * tests/incremen.sh: Likewise.
8332 * tests/listed01.sh: Likewise.
8333 * tests/multiv01.sh: Likewise.
8335 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8337 Added UTF-8 support. Finished global extended header
8341 * configure.ac: Detect libiconv
8342 * src/utf8.c: New file. Conversions to and from utf-8.
8343 * src/Makefile.am: Added utf8.c
8344 * src/create.c (write_header_name) In pax format, use
8345 "path" keyword if the file name is not ASCII
8346 (start_header): Likewise for uname and gname.
8347 * src/list.c: Decode encountered global headers.
8348 * src/xheader.c: Use keywords from the global
8350 Correctly handle UTF-8 conversions.
8351 (xheader_list_destroy): New function.
8352 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
8353 missing gettext markers
8354 (decode_record): Rewritten using caller-provided handler and
8356 * tests/listed01.sh: Give credit to Andreas Schuldei.
8358 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8360 * src/create.c (dump_file0): The conditional at line
8361 1296 prevented incremental backups on individual files
8362 from working, as reported by Andreas Schuldei
8363 <andreas@schuldei.org>.
8365 This is due to the condition
8367 (0 < top_level || !incremental_option)
8369 Removing it makes incremental backups work for individual
8370 files as well as for directories. On the other hand, it does
8371 not affect other functionality, as shown by the reasoning below:
8373 To begin with, the two parts of this condition are mutually
8374 superfluous, because
8376 1) when top_level < 0, incremental_option == 1
8377 so the condition yields false
8378 2) when top_level >= 0, incremental_option == 0
8379 so the condition yields true.
8381 In other words, it is completely equivalent to
8383 (!incremental_option)
8385 Now, let's consider the effect of its removal. There are two cases:
8387 1) when incremental_option==1
8388 This means incremental backup in progress. In this case dump_file
8389 is invoked only for directories or for files marked with 'Y' by
8390 get_directory_contents. The latter are those that did not meet the
8391 condition in incremen.c:242, which is exactly the same condition
8392 as this at create.c:1296. So, for these files the check
8393 (!incremental_option) is useless, since the rest of the
8394 conditional will yield false anyway. On the other hand, if
8395 dump_file is invoked on a directory, the conditional will yield
8396 false due to !S_ISDIR assertion, so these will be processed as usual.
8398 Thus, for this case the extra condition (!incremental_option) is
8399 irrelevant, and its removal won't alter the behavior of tar,
8400 *except* that it will enable incremental backups on individual
8401 files, which is the wanted effect.
8403 2) when incremental_option==0
8404 In this case the condition yields true and its removal does not
8405 affect the functionality.
8408 * configure.ac: Raised patchlevel to 93
8409 * src/incremen.c: Minor stylistic fixes.
8410 * tests/listed01.sh: New test. Check listed incremental
8411 backups on individual files.
8412 * tests/Makefile.am: Added listed01.sh
8414 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8416 * src/common.h (simple_finish_header,start_private_header): New
8418 (xheader_ghdr_name): Changed declaration
8419 * src/create.c (start_private_header): Removed static qualifier.
8420 (write_extended): Removed superfluous last argument. Use
8422 (simple_finish_header): New function.
8423 (finish_header): Use simple_finish_header() to break recursive
8424 dependency between this function and write_extended().
8425 * src/tar.c (assert_format): Do not bail out if several
8426 --format arguments are given. This is a common case when
8427 TAR_OPTIONS are used.
8428 (decode_options): New option --show-defaults displays the
8429 compiled-in defaults.
8430 Use POSIX format if no --format option was given and
8431 --pax-option was specified.
8432 Do not allow to use --pax-option unless the archive format is
8433 set to POSIX (or reading subcommand is requested).
8435 * src/update.c (update_archive): Write global extended header if
8437 * src/xheader.c (xheader_format_name): Bugfix.
8438 (xheader_xhdr_name): Changed the default extended header name
8439 to '%d/PaxHeaders.%p/%f', as POSIX requires.
8440 (xheader_ghdr_name): Removed unused argument.
8441 (xheader_write,xheader_write_global): New function.
8442 (xheader_decode): Modified to honor overrides whatever
8443 the current archive format is.
8445 * src/delete.c (delete_archive_members): Call xheader_decode
8447 * src/list.c (decode_header): Likewise.
8448 * src/incremen.c (sort_obstack): Fixed typo in the comment
8450 * doc/tar.texi: Document new default for extended
8453 * tests/before: Accept an optional list of allowed archive
8454 formats. Exit with the status 77 if the current archive
8455 format does not match any of them.
8456 * tests/delete03.sh: Require gnu, oldgnu or posix format
8457 * tests/incremen.sh: Require gnu or oldgnu format
8458 * tests/multiv01.sh: Likewise
8460 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8462 * doc/tar.texi (Option Summary): Documented --pax-option
8463 * src/tar.c: Likewise.
8465 * src/create.c (to_chars): Added a comment.
8466 * src/tar.h: Comment to GNU_FORMAT
8468 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8471 * configure.ac: Added stpcpy
8472 * bootstrap: Likewise
8473 * lib/Makefile.am: Likewise
8474 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
8476 * src/create.c (write_extended): Call xheader_xhdr_name
8477 instead of using hardcoded "././@PaxHeader" name.
8478 * src/tar.c: New option --pax-option (equivalent to -o option
8480 * src/xheader.c: Implement pax -o option. Fixed misleading
8481 heading comment (introduced 2003-09-02).
8482 * src/incremen.c: Minor fixes
8483 * m4/.cvsignore: Updated
8485 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8487 * src/incremen.c: Removed accumulator stuff in favor of obstack.
8488 (get_directory_contents): Split into two functions
8489 * src/update.c: Minor changes
8490 * doc/tar.texi: Fixed typo
8492 2004-02-15 Paul Eggert <eggert@twinsun.com>
8494 Fix Debian bug 230872, originally reported by Jeff King in
8495 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
8497 * doc/tar.texi (posix compliance): Remove. The whole section
8498 was a misunderstanding of what POSIXLY_CORRECT is supposed to
8499 mean. The GNU Coding Standards says that POSIXLY_CORRECT
8500 is for disabling extensions that are incompatible with POSIX:
8501 it is not for disabling compatible extensions. All references
8502 to this section removed.
8503 (posix): This format is created only if the posix format is
8504 specified; it is no longer created if gnu format is specified
8505 and POSIXLY_CORRECT is set.
8506 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
8507 POSIX does not specify the behavior of tar, so we should
8508 not worry about POSIXLY_CORRECT here.
8510 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8512 * Makefile.am: Removed m4
8513 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
8515 * README-alpha: Updated
8516 * bootstrap: Updated TP URL, improved help output. Default
8517 to :ext:anoncvs and set CVS_RSH, unless already set.
8518 * m4/Makefile.am: Removed
8520 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8522 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
8523 Use $option instead of $1 so all options will be parsed.
8525 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8527 Started rewriting buffer.c ...
8529 * bootstrap: New option --no-po
8530 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
8531 (time_to_start_writing): Changed data type
8532 (file_to_switch_to): Removed. Variable never assigned to.
8533 (open_archive) Moved option compatibility checks to tar.c
8534 Other minor changes.
8535 * src/common.h (maybe_backup_file): Changed return type
8536 * src/misc.c: Likewise.
8537 * src/create.c: Updated invocations of safer_name_suffix
8538 * src/extract.c: Likewise
8539 * src/delete.c: Updated assignment to write_archive_to_stdout
8540 * src/tar.c (decode_options): More option compatibility checks
8541 (moved from buffer.c)
8542 * src/update.c (time_to_start_writing): Changed data type.
8543 * tests/recurse.sh: New test case.
8544 * tests/mksparse.c: New file.
8545 * tests/Makefile.am: Added recurse.sh and mksparse.c
8547 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8549 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
8550 Martin Simmons for the patch.
8551 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
8552 <pius@pld-linux.org> for the patch.
8554 2003-12-26 Paul Eggert <eggert@twinsun.com>
8556 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
8557 and translation website.
8559 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
8560 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
8561 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
8562 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
8563 files are replaced by autoreconf. Also, there seems to be a bug
8564 in gettext/autoconf/automake if we try to omit these files after
8565 autoreconf has replaced them, even though the gettext manual says
8566 they're optional. So give up and just include them for now, even
8567 though they make 'configure' longer and slower.
8569 Change translation URL from
8570 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
8571 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
8572 accommodate translator website revamp.
8574 Fail if autoreconf fails.
8576 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
8577 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
8578 ignore files now supplied by gettext 0.13.1.
8580 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8582 Synchronized with the backup repository on Mirddin
8584 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8586 * configure.ac: Check for varios members of struct stat
8587 that may represent file modification times with a subsecond
8589 Check for utimes (for future use)
8590 * src/buffer.c (short_read): Issue a warning on short reads.
8591 * src/common.h (sys_stat_nanoseconds): New function
8592 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
8593 * src/list.c (read_and): Treat only two successive zero
8594 filled blocks as an EOF indicator. Issue a warning if
8595 a single one is encountered.
8596 * src/system.c (sys_stat_nanoseconds): New function
8597 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
8599 * src/xheader.c (code_time,decode_time): Support for subsecond
8601 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
8602 (mtime_coder,mtime_decoder): Update invocations of code_time and
8604 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
8605 (sparse_numblocks_decoder,sparse_offset_decoder)
8606 (sparse_numbytes_decoder): Updated
8608 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8610 * src/names.c (safer_name_suffix): Reverted change made
8611 2003-11-14. Reason: Discussion with Paul Eggert and
8612 Jean-Louis Martineau. See also ChangeLog entry from
8614 * tests/delete03.sh: Likewise.
8615 * tests/extrac04.sh: Likewise.
8616 * tests/multiv01.sh: Likewise.
8618 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8620 * src/incremen.c (write_directory_file): Use sys_truncate
8621 * src/list.c (print_header): Use archive_file_size member
8622 when printing real file size.
8623 * src/sparse.c (sparse_scan_file): Correctly handle files with
8625 (sparse_dump_region,sparse_extract_region): Allow for zero size
8628 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8630 * configure.ac: Raised version number to 1.13.92
8631 * src/list.c (decode_header): Discern between pax and ustar
8633 Initialize current_stat_info.archive_file_size.
8635 NOTE: Modifications from this date on are temporarily
8636 stored on local CVS on mirddin. This repository will
8637 be synchronized with Savannah as soon as the latter
8638 becomes operational again.
8640 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8643 * src/sparse.c: Initial implementation of GNU/pax sparse
8645 * src/common.h (xheader_store): Changed prototype.
8646 * src/create.c: Update calls to xheader_store
8647 * src/extract.c (extract_archive): Check reported size vs.
8648 archive file size to determine if we have to do with a
8650 * src/tar.c (usage): Cleaned up the sample argument to --newer
8652 (decode_options): Allow --sparse for POSIX_FORMAT archives.
8653 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
8655 Implemented GNU.sparse.* keywords.
8657 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8659 * configure.ac: Check for setlocale. Thanks Bruno Haible for
8662 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8664 * src/create.c (write_gnu_long_link): Use oldgnu
8665 magic with @LongLink blocks.
8667 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8669 * src/tar.h: Support for star sparse format.
8670 * src/sparse.c: Likewise.
8672 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8674 * src/sparse.c (sparse_diff_file): New function
8675 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
8676 (sys_compare_uid_gid): Removed.
8677 (sys_compare_links,report_difference): Changed prototype
8678 (sparse_diff_file): New function
8679 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
8680 (sys_compare_uid_gid): Removed.
8681 (sys_compare_links): Changed declaration
8682 * src/compare.c (diff_archive): Use sparse_diff_file.
8684 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8686 Rewritten sparse file handling.
8688 * src/sparse.c: New file. Provides a universal framework
8689 for various methods for sparse files handling.
8690 * src/Makefile.am: Added sparse.c
8691 * src/common.h (struct sp_array,sparsearray,sp_array_size)
8692 (init_sparsearray,fill_in_sparse_array): Removed
8693 (enum dump_status): New data type
8694 (pad_archive,close_diag,open_diag,read_diag_details)
8695 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
8697 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
8699 (print_header): Changed prototype declaration.
8700 * src/tar.h (struct sp_array): Declaration from common.h
8701 (struct tar_stat_info): New members archive_file_size,
8702 sparse_map_avail,sparse_map.
8703 * src/create.c: Major rewrite.
8704 * src/extract.c: Use new sparse file interface.
8705 * src/compare.c (diff_sparse_files): Temporary placeholder.
8707 * src/buffer.c: Minor changes
8708 * src/tar.c: Likewise.
8709 * src/list.c: Likewise.
8710 * src/misc.c (close_diag,open_diag,read_diag_details)
8711 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
8712 diagnostics functions.
8713 * src/incremen.c: Use new diagnostics functions.
8714 * src/names.c: Likewise.
8716 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8718 * configure.ac: Fixed check for setsockopt
8720 * src/create.c: Do not zero-terminate name field if
8721 the name is exactly 100 characters long.
8722 (write_ustar_long_name): Fixed checking for unsplittable
8725 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8727 * src/create.c (start_header): Removed debugging hook
8728 (dump_file): Fixed handling of linkname field.
8729 * src/names.c (safer_name_suffix): If the input
8730 file name ends with a slash, output one should do so
8732 * doc/tar.texi: Documented --format=ustar
8734 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8736 * src/tar.h (archive_format): USTAR_FORMAT: New type.
8737 * src/create.c: Added POSIX.1-1988 support.
8738 * src/names.c (safer_name_suffix): Skip leading ./
8739 * src/tar.c: New option --format=ustar forces
8740 POSIX.1-1988 archive format.
8741 * tests/delete03.sh: Updated.
8742 * tests/extrac04.sh: Updated.
8743 * tests/multiv01.sh: Updated.
8745 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8747 * src/list.c (read_and): Initialize current_stat_info
8748 and extended_header at the start of the loop.
8749 * src/names.c (all_names_found): Check if the argument
8750 contains valid filename. Fixes coredump on `not_a_tar_file'
8751 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
8752 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
8753 Fixes `pax-big-10g' bug.
8755 2003-11-12 Paul Eggert <eggert@twinsun.com>
8757 Fix some C compatibility bugs reported by Joerg Schilling.
8759 * src/common.h (stripped_prefix_len): Fix misspelling
8760 "stripped_path_len" in declaration.
8761 * src/rmt.c (main): Use "return FOO;" rather than
8762 "exit (FOO);"; we no longer have to worry about
8763 pre-ANSI hosts that mishandled returned values from "main".
8764 * src/tar.c (main): Likewise. This avoids warnings on some
8766 * src/system.c: Include signal.h, for 'kill'.
8767 * src/system.h (DEV_BSIZE): Remove.
8768 (DEFAULT_ST_BLKSIZE): New macro.
8769 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
8770 * src/tar.c (enum): Remove comma just before }.
8772 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8774 * src/list.c (decode_header): Initialize st_atime and
8777 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8779 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
8780 Bunk <bunk@fs.tum.de> for reporting.
8781 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
8782 <martin@xemacs.org> for spotting.
8784 2003-11-04 Paul Eggert <eggert@twinsun.com>
8786 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
8789 2003-10-26 Paul Eggert <eggert@twinsun.com>
8791 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
8792 Bug reported by Christian Weisgerber.
8794 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8798 * src/tar.c (decode_options): Removed superfluous archive format
8800 * doc/tar.texi: Documented new features.
8802 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8805 * THANKS: Added Wojciech Polak
8806 * configure.ac: Added checks for missing functions. Raised
8807 version number to indicate alpha release.
8808 * lib/Makefile.am: Added missing headers
8809 * lib/waitpid.c: Added missing includes.
8810 * src/extract.c: Likewise.
8811 * src/names.c: Removed spurious includes.
8812 * src/xheader.c: Likewise.
8813 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
8814 macro overriding broken mkdir prototypes.
8816 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8818 * configure.ac: Check for dev_t and ino_t.
8819 * m4/Makefile.am: Added missing files.
8820 * src/system.c: New file.
8821 * src/Makefile.am: Added system.c
8822 * src/common.h: Prototypes for functions from system.c
8823 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
8824 * src/buffer.c: Moved system dependencies to system.c
8825 * src/compare.c: Likewise.
8826 * src/create.c: Likewise.
8827 * src/delete.c: Likewise.
8828 * src/extract.c: Likewise.
8829 * src/rtapelib.c: Likewise.
8831 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8833 Implemented --occurrence option.
8836 * src/tar.c: New option --occurrence.
8837 * src/common.h (occurrence_option): New global
8838 (struct name): Changed `found' member to `uintmax_t
8840 (names_done): Removed
8841 (all_names_found): Changed prototype.
8842 (ISFOUND,WASFOUND): New macros
8843 * src/delete.c (delete_archive_members): Honor --occurrence
8845 * src/list.c (read_and): Likewise.
8846 * src/names.c: Count number of occurrences of each name in the
8848 (name_match): Honor --occurrence option.
8849 (names_done): Removed
8850 (all_names_found,names_notfound): Rewritten.
8852 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8854 * src/tar.c: Removed extra precaution regarding
8855 subcommand_option == CAT_SUBCOMMAND
8856 * lib/Makefile.am: Updated
8858 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8860 * src/common.h (names_done): New function.
8861 * src/names.c: Likewise.
8862 * src/list.c (read_and): Use all_names_found() as `while'
8864 * src/tar.c: New option --first-copy
8867 2003-09-24 Paul Eggert <eggert@twinsun.com>
8869 * src/rmt.c (main): Don't translate Copyright string; international
8870 law says the word "Copyright" should be in English.
8871 * src/tar.c (decode_options): Likewise.
8873 2003-09-22 Paul Eggert <eggert@twinsun.com>
8875 * doc/tar.texi (extracting untrusted archives): New section.
8877 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
8878 Return size_t, not pointer, so that we don't have to worry about
8879 violating the C standard by converting char const * to char *.
8880 All callers changed.
8881 * src/names.c (stripped_path_len): Likewise. Strip file system
8882 prefix, too. Count adjacent slashes as if they were one slash;
8883 that is the POSIX standard.
8885 2003-09-17 Paul Eggert <eggert@twinsun.com>
8887 * README-alpha: Document maintainer tool assumptions a bit. GNU
8888 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
8889 Debian bug 211447. Fix minor misspellings/whitespace nits.
8891 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
8892 gl_USE_SYSTEM_EXTENSIONS.
8894 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
8895 * m4/.cvsignore: Add restrict.m4, time_r.m4.
8897 2003-09-17 Paul Eggert <eggert@twinsun.com>
8899 * bootstrap: Don't use "for option; do";
8900 Solaris 8 /bin/sh doesn't like that.
8902 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8904 * README-alpha: Updated
8905 * bootstrap: Updated
8907 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8909 * README-alpha: Updated
8910 * bootstrap: Updated
8911 * po/POTFILES.in: Added src/xheader.c
8912 * src/common.h (cut_path_elements): Added proto.
8914 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8916 * src/buffer.c: Use ngettext where appropriate.
8917 * src/compare.c: Likewise.
8918 * src/create.c: Likewise.
8919 * src/misc.c: Likewise.
8920 * src/tar.c: Likewise.
8921 * src/update.c: Likewise.
8923 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8925 * .cvsignore: Added *.shar.gz
8928 * src/common.h (strip_path_elements): New variable.
8929 * src/extract.c (extract_archive): Implemented --strip-path
8930 * src/names.c (cut_path_elements): New function.
8931 * src/tar.c: New option --strip-path=NUM.
8932 (decode_options) Assign boolean values to bool variables.
8934 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8936 * src/delete.c: Fixed deletion from the POSIX archives.
8937 * src/list.c (read_header): Minor change.
8938 * src/tar.c (main): Do not check for volume_label_option
8939 if subcommand_option is not CREATE_SUBCOMMAND.
8940 * src/xheader.c (xheader_decode): Store the header as
8941 well (for eventual delete).
8943 * tests/incremen.sh: Explicitly request GNU format. This will
8944 disappear when GNU extended header keywords are working.
8945 * tests/multiv01.sh: Likewise
8946 * tests/volume.sh: Likewise
8948 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8950 * src/create.c: Support for "linkpath" extended keyword.
8951 * src/xheader.c (decode_record): Reversed the return
8954 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8956 * configure.ac: Allow to redefine the default output format.
8957 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
8958 (archive_format_string): New function.
8959 (usage): Updated help output.
8964 2003-09-02 Paul Eggert <eggert@twinsun.com>
8966 * src/common.h (destroy_stat, xheader_decode, xheader_store,
8967 xheader_read, xheader_finish, xheader_destroy): Add decls;
8970 * src/create.c (write_extended): Remove unused local 'bufsize'.
8972 * src/delete.c (delete_archive_members): Handle case of
8973 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
8974 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
8975 occurs, as it's not possible.
8976 * src/update.c (update_archive): Likewise.
8978 Use "const" when possible in new code.
8979 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
8980 (fmttab): Now const. All uses changed.
8981 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
8982 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
8983 decode_record, xheader_store, xheader_print, code_string, code_time,
8984 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
8985 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
8986 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
8987 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
8988 uid_coder, uid_decoder, uname_coder, uname_decoder):
8989 Use pointers to const when possible.
8990 (xhdr_tab): Now const.
8992 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
8993 (set_archive_format): Report an error if no format name matches,
8994 instead of returning an undefined value.
8996 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
8997 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
8998 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
8999 uid_decoder, uname_decoder): Remove unused keyword arg.
9002 * src/tar.c (set_archive_format): Now static.
9003 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
9005 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
9006 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
9007 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
9008 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
9009 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
9010 Remove forward decls; no longer needed.
9011 (xhdr_tab): Move to end, so that the forward decls aren't needed.
9012 Add a forward declaration.
9014 Use 'bool' in new code, when appropriate.
9015 * src/xheader.c (decode_record): Return bool, not int.
9016 * src/common.h (read_header): Since it accepts bool, change
9017 all callers to use false and true rather than 0 and 1.
9019 * src/xheader.c (decode_record): Fix misspelling in diagnostic
9020 "extended headed" -> "extended header".
9022 GNU coding style fixes.
9023 * src/xheader.c (decode_record, xheader_decode):
9024 Do not use decls like "char *p, *q;".
9027 (xheader_store): Avoid parentheses around object operand of sizeof.
9029 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
9031 * src/create.c (start_header): Store long file names
9032 in "path" keyword of an extended header if in POSIX
9034 (finish_header): print header before calling write_extended().
9035 * src/list.c (list_archive): Always decode the header. This
9036 is necessary so the extended header is processed and the correct
9037 filename is printed no matter what the state of verbose_option.
9038 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
9039 for the time being).
9041 2003-09-01 Paul Eggert <eggert@twinsun.com>
9043 Update from gnulib, and correct fnmatch to fnmatch-gnu.
9044 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
9046 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
9048 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
9049 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
9050 copying rules from gnulib module descriptions.
9051 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
9052 Update from gnulib modules alloca, fnmatch, getline, stdbool.
9053 * m4/.cvsignore: Add utimes-null.m4. Sort.
9055 2003-09-01 Sergey Poznyakoff
9057 Added initial support for creating POSIX headers.
9059 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
9060 (string_to_chars): New functions
9061 (struct xheader): Changed structure
9062 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
9064 * src/create.c (string_to_chars): New function.
9065 (write_extended): New function
9066 (start_header): Create extended POSIX headers if necessary.
9067 (finish_header): Likewise.
9068 * src/list.c (print_header): Take user/group from
9070 * src/names.c (gid_to_gname,gname_to_gid)
9071 (uid_to_uname,uname_to_uid): Changed prototypes.
9072 * src/tar.c: New option --format.
9073 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
9074 (struct extra_header): Removed unused structure.
9075 (union block.extra_header): Removed unused member.
9076 * src/xheader.c: Implemented coder functions.
9077 * bootstrap: Added obstack.
9078 * lib/.cvsignore: Likewise.
9079 * configure.ac: Added 'gl_OBSTACK'
9080 * m4/Makefile.am: Added new files.
9081 * m4/.cvsignore: Likewise.
9082 * TODO: Minor formatting change
9084 2003-08-31 Sergey Poznyakoff
9086 Added initial support for POSIX extended and STAR headers
9087 (only for listing/extracting).
9089 * src/xheader.c: New file.
9090 * src/Makefile.am: Added xheader.c
9091 * src/tar.h (struct star_header): New datatype
9092 (XHDTYPE,XGLTYPE): New defines
9093 (enum archive_format:STAR_FORMAT): New member
9094 (struct tar_stat_info): New datatype.
9095 (union block.star_header): New member.
9096 * src/common.h (orig_file_name,current_file_name)
9097 (current_trailing_slash,current_link_name): Removed variables.
9098 (current_stat_info): New variable
9099 (current_stat): Removed
9100 (extended_header): New variable
9101 (decode_header): Changed prototype.
9102 * src/list.c (decode_header): Added initial support for POSIX extended
9104 (skip_member): Check oldgnu_header only if current_format is set
9106 * src/buffer.c: Use current_stat_info
9107 * src/compare.c: Likewise.
9108 * src/create.c: Likewise.
9109 * src/delete.c: Likewise.
9110 * src/incremen.c: Likewise.
9111 * src/mangle.c: Likewise.
9112 * src/update.c: Likewise.
9113 * src/extract.c: Likewise.
9114 (make_directories): Improved check for the existence of the directory
9115 * src/tar.c (destroy_stat): New function.
9117 2003-08-29 Paul Eggert <eggert@twinsun.com>
9119 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
9120 was worth (e.g., different users in en_GB disagree about -ize
9122 * po/en_GB.po: Remove.
9124 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
9128 * src/tar.c: Removed support for the obsolete command line
9130 * doc/tar.texi: Removed references to the obsolete command
9133 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
9137 * doc/tar.texi: Updated
9138 * src/common.h (check_links_option): New variable
9139 (orig_file_name): New variable
9140 (check_links): New proto.
9141 * src/create.c (struct link.nlink): New member
9142 (link_table): Static for the module.
9143 (dump_file): Update `link' member when adding new links
9145 (check_links): New function.
9146 * src/list.c (print_header): Use orig_file_name.
9147 * src/tar.c: New option --check-links. Changed semantics of
9148 -o to comply to UNIX98 when extracting and to its previous
9149 semantics otherwise.
9150 (main): Call check_links if --check-links. was given.
9152 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
9154 * src/list.c (print_header): Revised
9155 * NEWS: Started the entry for 1.13.26
9156 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
9158 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
9160 * .cvsignore: Added to the repository.
9161 * doc/.cvsignore: Likewise.
9162 * lib/.cvsignore: Likewise.
9163 * m4/.cvsignore: Likewise.
9164 * po/.cvsignore: Likewise.
9165 * scripts/.cvsignore: Likewise.
9166 * src/.cvsignore: Likewise.
9167 * tests/.cvsignore: Likewise.
9169 * lib/Makefile.am: Added exitfail.[hc]
9170 * src/misc.c (chdir_do): Fixed call to restore_cwd
9171 * src/buffer.c (flush_read): Fixed behavior on short
9172 reads right after opening the new archive (multiv01.sh test).
9173 (new_volume): Special handling for "-".
9174 * src/list.c (print_header): Print trailing slash if
9175 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
9176 * tests/multiv01.sh: Minor changes.
9177 * m4/Makefile.am: Added missing files.
9179 2003-07-05 Paul Eggert <eggert@twinsun.com>
9181 Finish the checkin begin yesterday.
9183 * NEWS: Document the user-visible changes installed in the last
9186 * TODO: New file (actually, resurrected; but with new contents).
9188 * src/list.c (read_and): Give full type for procedure arg.
9189 (read_header): Strip trailing slashes, setting current_trailing_slash.
9190 (tartime): Avoid int overflow when printing year (!).
9191 (print_header): New arg specifying block ordinal. All uses changed.
9192 Print link as 'h' type. Give labels for long links and names.
9194 * src/misc.c (contains_dot_dot): Moved to names.c
9195 (must_be_dot_or_slash): New function.
9196 (safer_rmdir): Use it.
9197 (remove_any_file): Now takes enum as option, not boolean.
9198 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
9199 to unlink a directory.
9200 (deref_stat): Accept bool, not int.
9202 * src/names.c (namelist_match): Allow partial matches only if
9204 (hash_string_hasher): Renamed from hash_avoided_name.
9205 (hash_string_compare): Renamed from compare_avoided_anames.
9206 (hash_string_insert, hash_string_lookup): New functions.
9207 (add_avoided_name, is_avoided_name): Use them.
9208 (safer_name_suffix): New function.
9209 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
9211 * src/rmt.c: Don't include print-copyr.h.
9212 (prepare_input_buffer): New arg FD.
9213 Do not read more than INT_MAX bytes at once,
9214 since it breaks on some brain damaged Tru64 hosts.
9216 when retrying instead of subtracting 1024; for speed.
9217 (main): Use gettext to translate (C), not print_copyright.
9219 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
9220 now that gnulib handles this.
9221 Include <stddef.h> and <limits.h> unconditionally, now that we assume
9223 Assume that offsetof is defined in stddef.h.
9224 Do not include <sys/param.h>.
9225 (realloc, lseek): Do not declare.
9226 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
9227 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
9228 declarations, since we now assume C89 or better.
9229 (PARAMS): Remove, as we now assume C89. All uses changed.
9230 (bindtextdomain, textdomain): Include <gettext.h> to define.
9231 Include <unlocked-io.h>.
9232 (valloc): Define if not defined, and if valloc is not declared.
9233 (xstrdup): Remove decl.
9235 * src/tar.c: Do not include <print-copyr.h>.
9236 Include <getdate.h>.
9237 (get_date): Remove decl.
9238 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
9239 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
9240 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
9241 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
9242 (long_options, decode_options): Use them.
9243 (OVERWRITE_DIR_OPTION): Remove.
9244 (long_options): New options --index-file, --no-overwrite-dir.
9245 Remove --overwrite-dir option.
9246 (usage): Use PACKAGE_BUGREPORT.
9247 (decode_options): Terminate new argv properly.
9248 Use PACKAGE_NAME, PACKAGE_VERSION.
9249 If verbose, report how we grokked any textual date option.
9250 (main): Add support for index-file.
9252 * tests/Makefile.am: Convert to UTF-8.
9253 (AUTOMAKE_OPTIONS): Remove.
9254 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
9255 (INCLUDES): Remove ../intl.
9256 (LDADD): Don't link libtar.a twice.
9258 * tests/genfile.c: Convert to UTF-8.
9259 Don't include <print-copyr.h>.
9260 (DEFAULT_PATTERN): Renamed from DEFAULT.
9261 (ZEROS_PATTERN): Renamed from ZEROS.
9262 (main): Use gettext to translate (C), not print_copyright.
9264 2003-07-04 Paul Eggert <eggert@twinsun.com>
9266 Revamp to meet current standards of autoconf, automake,
9267 gettext, and gnulib, and incorporate new translations.
9269 * config/config.guess, config/config.sub, config/depcomp,
9270 config/install-sh, config/mdate-sh, config/missing,
9271 config/mkinstalldirs, config/texinfo.texi:
9272 Moved here from parent directory, or from doc.
9273 * config.hin: Renamed from config.h.in.
9274 * config/config.rpath: New file.
9276 * intl: Remove this subdirectory.
9278 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
9280 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
9281 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
9282 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
9283 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
9284 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
9285 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
9288 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
9289 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
9290 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
9291 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
9292 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
9293 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
9294 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
9295 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
9296 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
9297 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
9298 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
9299 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
9300 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
9301 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
9302 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
9303 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
9304 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
9305 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
9306 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
9308 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
9309 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
9310 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
9311 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
9312 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
9313 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
9314 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
9315 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
9316 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
9317 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
9318 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
9319 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
9320 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
9321 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
9322 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
9323 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
9324 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
9325 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
9327 Upgrade to latest version from external source. The file "bootstrap"
9328 now grabs these automatically, so we needn't keep track of them
9329 in this change long any longer.
9331 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
9332 (SUBDIRS): Remove intl.
9333 * PORTS: Update for star, Macintosh.
9334 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
9335 Bison 1.875, gettext 0.12.1.
9336 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
9337 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
9338 (AC_CONFIG_AUX_DIR): New.
9339 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
9341 (AC_PREREQ): Bump from 2.52 to 2.57.
9342 (AC_GNU_SOURCE): New.
9343 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
9344 we no longer support K&R C.
9346 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
9347 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
9348 (AC_MBSTATE_T): Remove.
9349 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
9350 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
9351 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
9352 (AM_STDBOOL_H): Add.
9353 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
9354 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
9355 (AC_CHECK_TYPE): Remove ssize_t.
9356 (gt_TYPE_SSIZE_T): Add.
9357 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
9358 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
9359 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
9360 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
9361 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
9362 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
9363 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
9364 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
9365 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
9366 napms, poll, select, strstr, usleep.
9367 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
9368 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
9369 (AM_GNU_GETTEXT): Use external and need-ngettext options.
9370 (AM_GNU_GETTEXT_VERSION): New.
9371 (AC_OUTPUT): Remove intl/Makefile.
9373 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9374 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
9375 * doc/fdl.texi: Update to current GNU version.
9376 * doc/gettext.texi: Update to current coreutils version,
9377 plus a copyright notice.
9378 * doc/tar.texi: Switch to new method for doing copyright notices.
9379 Use @acronym instead of @sc where appropriate.
9380 Remove empty examples. Give a few more examples.
9382 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9383 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
9384 are built up in pieces with +=.
9385 (noinst_HEADERS, INCLUDES): Remove.
9386 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
9387 (libtar_a_LIBADD): Use $ rather than @.
9388 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
9390 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
9391 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
9392 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
9393 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
9394 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
9395 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
9396 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
9397 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
9398 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
9399 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
9400 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
9401 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
9402 prereq.m4, xstrtoimax.m4.
9404 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
9405 be translated, since it's not a user-visible tool.
9407 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9409 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9410 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
9411 consistency with coreutils.
9412 (LDADD): Link LIBINTL after libtar.a, since
9413 it's now external and should stand by itself.
9415 * src/buffer.c (print_total_written): Adjust to new human.h
9417 (child_open_for_compress): Do not increase size to BLOCKSIZE.
9418 (open_archive): Open index file name.
9419 Strip trailing slashes from file names.
9420 (flush_write): Set size to 0 if not saving names.
9421 (flush_write, flush_read): Use safer_name_suffix rather than
9424 * src/common.h: Include <quote.h>.
9425 (absolute_names_option, atime_preserve_option, backup_option,
9426 block_number_option, checkpoint_option, dereference_option,
9427 force_local_option, ignore_failed_read_option, ignore_zeros_option,
9428 incremental_option, interactive_option, multi_volume_option,
9429 numeric_owner_option, one_file_system_option, recursive_unlink_option,
9430 read_full_records_option, remove_files_option, same_order_option,
9431 show_omitted_dirs_option, sparse_option, starting_file_option,
9432 to_stdout_option, totals_option, touch_option, verify_option,
9433 dev_null_output, now_verifying, we_are_root): Now bool, not int.
9434 (current_trailing_slash, index_file_name, recent_long_name_blocks,
9435 recent_long_link_blocks): New vars.
9436 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
9437 (OVERWRITE_OLD_DIRS): Remove.
9438 (enum remove_option): New enum.
9439 (remove_any_file): Use it as option arg, not int.
9440 (is_avoided_name, contains_dot_dot): Return bool, not int.
9441 (safer_name_suffix): New decl.
9443 * src/compare.c (now_verifying): Now bool, not int.
9444 (fill_in_sparse_array): Move to extract.c. Now returns bool;
9445 all callers changed to test for failure.
9446 (diff_sparse_files): Take size from current_stat, not from param.
9447 (diff_archive): Do not count trailing slashes in archives.
9448 (verify_volume): Test for header failure after loop, not before.
9450 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
9451 All callers changed.
9452 (start_header): Clear devmajor and devminor fields, too.
9453 (finish_header): New arg block_ordinal.
9454 (init_sparsearray): Now extern. Set sp_array_size to
9455 SPARSES_IN_OLDGNU_HEADER if it is zero.
9456 (dump_file): Keep link table as a hash.
9457 Do not count "file changed as we read it" as a failure.
9459 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
9460 Move extern decl to common.h.
9462 * src/extract.c (we_are_root): Now bool, not int.
9463 (check_time): Warn about implausibly old time stamps.
9464 (set_stat): Use utimbuf, not stat_info.
9465 (prepare_to_extract): New arg DIRECTORY.
9466 (fill_in_sparse_array): Moved here from compare.c.
9467 (extract_sparse_file): Now returns off_t, giving size left.
9468 Truncate file at end.
9469 (extract_archive): Use safer_name_suffix rather than rolling our own.
9470 Use fill_in_sparse_array rather than rolling our own.
9471 Strip trailing slashes more effectively.
9472 Check for unsafe names.
9474 * src/incremen.c (struct directory): nfs and found are now of type
9476 (gnu_restore): Now takes directory name as argument, not offset
9477 of directory name in a global. All uses changed.
9478 (CURRENT_FILE_NAME): Remove.
9481 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
9484 2002-09-30 Paul Eggert <eggert@twinsun.com>
9486 * src/rmt.c (prepare_input_buffer): Renamed form
9487 prepare_record_buffer. All uses changed. Do not assume that
9488 size_t is the same width as int.
9490 2002-03-29 Paul Eggert <eggert@twinsun.com>
9492 * src/incremen.c (get_directory_contents):
9493 If ignore_failed_read_option, only warn about
9494 get_directory_contents failures. Fix suggested by
9497 2002-01-31 Mark W. Eichin <eichin@thok.org>
9499 * src/buffer.c (child_open_for_compress): Don't try to read
9500 past the end of the buffer.
9502 2001-10-11 Jim Meyering <meyering@lucent.com>
9504 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
9505 and quote_n (1, ... to avoid clobbering a buffer.
9507 2001-09-26 Paul Eggert <eggert@twinsun.com>
9509 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
9511 * src/buffer.c (flush_read): Don't diagnose partial blocks before
9512 end of file; just ignore them silently.
9514 * src/list.c (read_header): Don't keep around extended name
9515 and link info indefinitely; keep it only for the next file.
9516 This fixes a bug introduced in 1.13.24, and removes the need
9517 for some static variables. Set recent_long_name and
9518 recent_long_link to zero if there were no long links; this
9519 avoids a violation of ANSI C rules for pointers in delete.c.
9520 * THANKS: Add Christian Laubscher.
9522 2001-09-26 Jim Meyering <meyering@lucent.com>
9524 * doc/tar.texi (Remote Tape Server): is know -> is known
9526 2001-09-25 Paul Eggert <eggert@twinsun.com>
9528 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
9529 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
9530 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
9531 want to distinguish EINVAL and EILSEQ.
9533 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
9535 * src/extract.c (maybe_recoverable):
9536 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
9538 2001-09-22 Paul Eggert <eggert@twinsun.com>
9540 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
9542 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
9545 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
9546 * PORTS: Add copyright notice, 'star' reference.
9547 * README-alpha: Add copyright notice, autoconf 2.52 patch.
9548 * THANKS: Add Christophe Kalt.
9549 * config.sub: Upgrade to 2001-09-14 version.
9551 * configure.ac (ALL_LINGUAS): Add ko.
9552 * po/ko.po: Resurrected file.
9554 * doc/convtexi.pl: Add coding advice for Emacs.
9556 * doc/getdate.texi: Add copyright notice.
9558 * doc/mdate-sh: Upgrade to automake 1.5 version.
9560 * doc/tar.texi (extracting files): Mention --to-stdout.
9561 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
9562 (Overwrite Old Files): Likewise.
9564 * lib/Makefile.am (noinst_HEADERS):
9565 Remove copysym.h. Add print-copyr.h, unicodeio.h.
9566 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
9568 * lib/copysym.c, lib/copysym.h: Remove.
9569 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
9570 lib/unicodeio.h: New files.
9572 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9573 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
9575 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9576 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9578 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
9579 * m4/isc-posix.m4: Remove.
9581 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
9583 * po/POTFILES.in: Add copyright notice.
9585 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
9587 * tests/Makefile.am (LDADD): Likewise.
9589 * src/buffer.c (write_archive_buffer, close_archive):
9590 If an archive is a socket, treat it like a FIFO.
9591 (records_read, records_written): New vars.
9592 (write_archive_to_stdout): Now bool, not int.
9593 (open_archive, flush_write, flush_read): Keep records_read and
9594 records_written up to date.
9596 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
9597 (write_archive_to_stdout): Now bool, not int.
9598 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
9599 (read_header): Now takes bool arg. Existing callers modified
9600 to pass 0, unless otherwise specified.
9602 * src/delete.c (records_read): Remove; now a global.
9603 (acting_as_filter): Now bool, not int.
9604 (recent_long_name, recent_long_link, recent_long_name_blocks,
9605 recent_long_link_blocks, records_read, records_written): New decls.
9606 (records_skipped): New var.
9607 (move_archive): Don't divide by zero if arg is 0.
9608 Use the above vars to compute how far to move.
9609 (write_recent_blocks): New function.
9610 (delete_archive_member): Pass 1 to read_header, so that it doesn't
9611 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
9612 Keep track of how many records have been skipped.
9613 Let the buffer code count records.
9614 When copying a header, copy any extended headers that came before it.
9616 * src/extract.c (extract_archive): When marking a directory to be
9617 updated after symlinks, stat all directories after it in the
9618 delayed-set-stat list too, since they will be checked after
9619 symlinks. Add support for --overwrite-dir.
9621 * src/list.c (recent_long_name, recent_long_link,
9622 recent_long_name_blocks, recent_long_link_blocks): New vars.
9623 (read_and): Pass 0 to read_header.
9624 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
9625 headers into new vars. Null-terminate incoming symbolic links.
9627 * src/rmt.c: Include print-copyr.h, not copysym.h.
9628 (main): Use print_copyright, not copyright_symbol.
9629 * src/tar.c (decode_options): Likewise.
9630 (OVERWRITE_DIR_OPTION): New constant.
9631 (long_options, usage, decode_options): Add --overwrite-dir.
9633 * src/tar.h: Put copyright notice into documentation.
9635 * tests/Makefile.am (TESTS): Add delete03.sh.
9636 * tests/delete03.sh: New file.
9638 * tests/genfile.c: Include print-copyr.h, not copysym.h.
9639 (main): Use print_copyright, not copyright_symbol.
9640 Include <argmatch.h>.
9641 (pattern_strings): Remove.
9642 (pattern_args, pattern_types): New constants.
9643 (main): Use XARGMATCH, not argmatch.
9645 2001-09-20 Jim Meyering <meyering@lucent.com>
9647 * lib/xstrtol.c (strtoimax): Guard declaration with
9648 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
9649 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
9650 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
9651 (strtoumax): Likewise, for completeness (it wasn't necessary).
9652 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
9653 Check for declaration of strtoimax.
9654 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
9655 Check for declaration of strtoumax.
9657 2001-09-16 Paul Eggert <eggert@twinsun.com>
9659 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
9661 2001-09-14 Paul Eggert <eggert@twinsun.com>
9663 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
9665 * README-alpha: Describe automake patch.
9667 * configure.ac (LIBOBJS):
9668 Remove automake 1.4 workaround, as we're using 1.5 now.
9669 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
9671 * lib/copysym.c: Include stddef.h, for size_t.
9672 Include langinfo.h if needed.
9673 Use locale_charset only if USE_INCLUDED_LIBINTL;
9674 if not, use nl_langinfo (CODESET) if available.
9676 2001-09-13 Paul Eggert <eggert@twinsun.com>
9678 * config.guess, config.sub: Sync with canonical versions.
9680 * configure.ac (jm_PREREQ_XGETCWD): Add.
9682 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
9683 (libtar_a_SOURCES): Add copysym.c.
9684 * copysym.c, copysym.h: New files.
9686 * lib/error.c: Sync with fileutils version.
9688 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
9689 * m4/getcwd.m4: New file.
9690 * m4/uintmax_t.m4: Remove.
9692 * m4/gettext.m4 (AM_WITH_NLS):
9693 Fix bug with calculating version of Bison 1.29.
9694 Reported by Karl Berry.
9696 * src/Makefile.am (datadir): Remove.
9698 * src/rmt.c: Include copysym.h.
9699 (main): Use copyright_symbol to translate copyright notice,
9701 * src/tar.c: Likewise.
9702 * tests/genfile.c: Likewise.
9704 * src/system.h (MB_LEN_MAX): New symbol.
9706 2001-09-11 Paul Eggert <eggert@twinsun.com>
9708 * src/extract.c (struct delayed_set_stat): New member
9710 (delay_set_stat): Initialize it to 0.
9711 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
9712 taking an extra stat ourselves. All callers changed.
9713 (set_stat): Likewise.
9714 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
9715 If false, stop when encountering a struct whose 'after_symlinks'
9716 member is true. Otherwise, go through all structures but check
9717 them more carefully. All callers changed.
9718 (extract_archive): When extracting a deferred symlink, if its parent
9719 directory's status needs fixing, then mark the directory as needing
9720 to be fixed after symlinks.
9721 (extract_finish): Fix status of ordinary directories, then apply
9722 delayed symlinks, then fix the status of directories that are
9723 ancestors of delayed symlinks.
9725 * src/rtapelib.c (rexec):
9726 Remove declaration; it ran afoul of prototypes on Crays.
9727 Reported by Wendy Palm of Cray.
9729 2001-09-06 Paul Eggert <eggert@twinsun.com>
9731 * lib/strtoimax.c (HAVE_LONG_LONG):
9732 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
9733 (strtoimax): Use sizeof (long), not
9734 sizeof strtol (ptr, endptr, base),
9735 to work around bug in IBM C compiler.
9737 2001-09-04 Paul Eggert <eggert@twinsun.com>
9739 * lib/xgetcwd.c: Include "xalloc.h".
9740 (xgetcwd): Do not return NULL when memory is exhausted; instead,
9741 report an error and exit.
9743 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
9744 (jm_PREREQ): Use it.
9746 2001-09-03 Paul Eggert <eggert@twinsun.com>
9748 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
9749 (jm_PREREQ_XGETCWD): New macro.
9751 * lib/exclude.c (fnmatch_no_wildcards):
9752 Fix typo that caused us to do case-folding
9753 search even when that was not desired. This occurred only in the
9756 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
9757 Do not include xalloc.h.
9758 (INITIAL_BUFFER_SIZE): New symbol.
9759 Do not use xmalloc / xrealloc, since the caller is responsible for
9760 handling errors. Preserve errno around `free' during failure.
9761 Do not overrun buffer when using getwd.
9763 * lib/xgetcwd.c (xgetcwd):
9764 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
9765 to decide whether to use getcwd (NULL, 0).
9767 2001-09-02 Paul Eggert <eggert@twinsun.com>
9769 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
9771 2001-09-01 Jim Meyering <meyering@lucent.com>
9773 * exclude.c: Use `""', not `<>' to #include non-system header files.
9774 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
9775 and strncasecmp as r-values. Unixware didn't have declarations.
9777 2001-08-31 Jim Meyering <meyering@lucent.com>
9779 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
9780 Use an initial, malloc'd, buffer of length 128 rather than
9781 a statically allocated one of length 1024.
9783 2001-08-30 Paul Eggert <eggert@twinsun.com>
9785 * lib/utime.c: Include full-write.h.
9786 * lib/xstrtol.c (strtoimax): New decl.
9788 2001-08-29 Paul Eggert <eggert@twinsun.com>
9790 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
9792 * src/create.c (dump_file): Relativize link names before dumping.
9793 This fixes a bug reported by Jose Pedro Oliveira.
9795 * src/create.c (dump_file): Use offsetof when computing sizes for
9796 struct hack; this avoids wasted space in some cases.
9797 * src/incremen.c (note_directory, find_directory): Likewise.
9798 * src/names.c (name_gather, addname): Likewise.
9800 * src/extract.c (extract_archive): Use strcpy, not memcpy,
9801 for consistency with other code that does similar things.
9802 * src/names.c (name_gather): Likewise.
9804 * src/names.c (read_name_from_file, name_next, name_gather,
9805 add_hierarchy_to_namelist): Avoid quadratic behavior when
9806 reallocating buffers. Check for buffer size overflow.
9807 (addname): Avoid unnecessary clearing of memory.
9809 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
9811 * src/extract.c (delay_set_stat): Fix off-by-one error in file
9812 name size allocation that caused core dumps.
9814 2001-08-28 Paul Eggert <eggert@twinsun.com>
9816 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
9818 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
9819 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
9820 (daddr_t): Remove; no longer used.
9821 (jm_PREREQ_HUMAN): Add.
9823 * acconfig.h: Remove; no longer needed.
9825 * config.guess, config.sub:
9826 New files, from automake 1.5. Gettext 0.10.39 needs them.
9827 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
9829 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
9830 (SUBDIRS): Put intl before lib, as gettext requires.
9832 * ABOUT-NLS: Upgrade to gettext 0.10.39.
9833 * intl: Upgrade entire directory to gettext 0.10.39.
9834 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
9835 New files, from gettext 0.10.39.
9836 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
9837 Upgrade to gettext 0.10.39,
9838 * po/Makefile.in.in: Likewise, except fix a typo in its copying
9840 * po/cat-id-tbl.c, po/stamp-cat-id:
9841 Remove; no longer used by gettext 0.10.39.
9842 * po/ChangeLog: New file.
9844 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
9845 $(srcdir)/tar.texi: Likewise.
9846 * doc/freemanuals.texi: New file.
9847 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
9848 `fileds' -> `fields'
9849 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
9851 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
9852 (noinst_HEADERS): Add quote.h.
9853 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
9855 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
9857 * lib/full-write.c, lib/savedir.c: Comment fix.
9859 * lib/pathmax.h: Remove.
9861 * lib/quote.c, lib/quote.h: New files.
9863 * lib/xgetcwd.c: Don't include pathmax.h.
9864 Include stdlib.h and unistd.h if available.
9866 (xmalloc, xstrdup, free): Remove decls.
9867 (xgetcwd): Don't assume sizes fit in unsigned.
9868 Check for overflow when computing sizes.
9869 Simplify reallocation code.
9871 * lib/xmalloc.c: Quote failure tests.
9873 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
9875 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
9876 similar to strtol.c.
9877 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
9878 (verify): New macro.
9879 (strtoumax, uintmax_t, strtoull, strtol): Remove.
9880 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
9881 (strtoimax): Renamed from strtoumax. All uses of unsigned values
9882 changed to signed values. Check sizes at compile-time, not
9883 run-time. Prefer strtol to strtoll if both work.
9886 * lib/xstrtol.h (xstrtoimax): New decl.
9888 * m4/Makefile.am (EXTRA_DIST):
9889 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
9890 longlong.m4, xstrtoimax.m4.
9892 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
9893 Remove; now done by autoconf.
9894 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
9895 Use AC_CHECK_TYPE instead of merely looking for the header.
9897 * m4/uintmax_t.m4: Use shorter comment.
9899 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
9900 Quote first arg of AC_DEFUN.
9901 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
9902 is needed to parse the include file.
9903 Simplify logic behind the args to AC_REPLACE.
9905 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
9907 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
9910 Use "Copyright %d" to simplify the translator's job in the future.
9911 Advise translator about circle-C.
9912 * src/tar.c: (decode_options): Likewise.
9913 * tests/genfile.c (main): Likewise.
9915 2001-08-28 Jim Meyering <meyering@lucent.com>
9917 * lib/argmatch.c: Include "quote.h".
9918 (argmatch_invalid): Quote the context.
9920 * lib/dirname.c (dir_name): Fix typo on PC platforms.
9922 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
9923 Use single-quote for local .h files.
9925 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
9927 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
9930 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
9931 invoking mktime the last time.
9933 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
9935 * lib/rename.c: Major rewrite by Volker Borchert to use system
9936 rename function, but to work around problems with trailing
9939 * lib/strtoll.c: New file, from glibc.
9940 * lib/strtoul.c: Update from glibc.
9942 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
9943 Add support for signed numbers, too.
9944 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
9946 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
9948 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
9949 (main): Use generic names in debugging output.
9950 * lib/strtoimax.c: Plus add the following changes of my own:
9951 (main): Use accurate names in debugging output.
9953 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
9956 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
9957 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
9958 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
9959 m4/utime.m4, m4/utimes.m4:
9960 Quote the first argument in each use of AC_DEFUN.
9962 * m4/getline.m4: Don't use string.h.
9964 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
9966 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
9968 2001-08-27 Paul Eggert <eggert@twinsun.com>
9970 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
9972 The biggest change is the new --exclude semantics and options.
9973 The basic idea was suggested by Gerhard Poul; thanks!
9975 * NEWS: Describe new --exclude semantics and options, and bug fixes.
9976 * README: ignfail.sh fails on some NFS hosts.
9977 * NEWS, README, lib/xstrtol.h: Add copyright notice.
9979 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
9980 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
9981 Remove; the automake bug has been fixed.
9982 * acinclude.m4: Remove.
9984 * configure.ac: Renamed from configure.in.
9985 (AC_PREREQ): Bump from 2.13 to 2.52.
9986 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
9987 1997-05-30) has an encoding error.
9988 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
9989 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
9991 * doc/fdl.texi: Update to current GNU version.
9993 * doc/tar.texi: Put leading '*' in direntry.
9994 Accommodate new gfdl sectioning.
9995 New option --recursion (the default) that is the inverse of
9998 New options --anchored, --ignore-case, --wildcards,
9999 --wildcards-match-slash, and their negations (e.g., --no-anchored).
10000 Along with --recursion and --no-recursion, these control how exclude
10001 patterns are interpreted. The default interpretation of exclude
10002 patterns is now --no-anchored --no-ignore-case --recursion
10003 --wildcards --wildcards-match-slash.
10005 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
10007 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
10008 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
10009 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
10010 Include if available.
10011 (<xalloc.h>): Include
10012 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
10013 (verify): New macro. Use it to verify that EXCLUDE macros do not
10014 collide with FNM macros.
10015 (struct patopts): New struct.
10016 (struct exclude): Use it, as exclude patterns now come with options.
10017 (new_exclude): Support above changes.
10018 (new_exclude, add_exclude_file):
10019 Initial size must now be a power of two to simplify overflow checking.
10020 (free_exclude, fnmatch_no_wildcards): New function.
10021 (excluded_filename): No longer requires options arg, as the options
10022 are determined by add_exclude. Now returns bool, not int.
10023 (excluded_filename, add_exclude):
10024 Add support for the fancy new exclusion options.
10025 (add_exclude, add_exclude_file): Now takes int options arg.
10026 Check for arithmetic overflow when computing sizes.
10027 (add_exclude_file): xrealloc might modify errno, so don't
10028 realloc until after errno might be used.
10030 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
10032 (free_exclude): New decl.
10033 (add_exclude, add_exclude_file): Now takes int options arg.
10034 (excluded_filename): No longer requires options arg, as the options
10035 are determined by add_exclude. Now returns bool, not int.
10037 * lib/prepargs.c: Include <string.h>; required for C99 since
10041 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
10043 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
10044 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
10046 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
10047 Remove inttypes_h.m4, largefile.m4, mktime.m4.
10049 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
10050 subsumed by Autoconf 2.50.
10052 * m4/error.m4: Upgrade to serial 2.
10054 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
10055 remove test for GNU C library. It's not correct, as some
10056 older glibcs are buggy.
10058 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
10060 * m4/prereq.m4: Upgrade to serial 20, but then:
10061 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
10062 (jm_PREREQ_EXCLUDE): New macro.
10063 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
10066 * m4/realloc.m4: Upgrade to serial 4.
10068 * m4/strerror_r.m4: Revert to serial 1002.
10070 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
10072 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
10074 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
10075 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
10076 it is now subsumed by autoconf. Add inttypes.h.
10078 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10079 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
10081 * src/buffer.c (new_volume): Stop if the script exits with an error.
10083 * src/common.h (excluded_with_slash, excluded_without_slash):
10084 Remove, replacing by:
10085 (excluded): New decl.
10086 (link_error): New decl.
10087 (excluded_name): Now returns bool.
10090 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
10091 Support hard links to symbolic links.
10093 (struct delayed_symlink): Remove 'names' member, replacing it with
10094 'sources' and 'target' member. All uses changed.
10096 (struct string_list): New type.
10098 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
10099 for struct hack; this avoids wasted space in some cases.
10101 (extract_archive): Fix test for absolute pathnames and/or "..".
10102 Use link_error to report errors for links.
10103 Remove redundant trailing '/' at "really_dir", for all uses, not
10104 just before invoking mkdir.
10105 If overwriting old files, do not worry so much about existing
10107 Fix mode computation in the case where the directory exists.
10109 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
10110 link, make a copy of the symbolic link.
10112 * src/incremen.c (get_directory_contents):
10113 If ignore_failed_read_option, only warn about
10116 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
10117 However, check for error even for '-' or '+' case.
10119 (print_header): Try parsing uids and gids as unsigned integers first,
10120 and as a uid_t or gid_t only if that fails. This adds support for
10121 listing positive uids and gids that are greater than UID_MAX and
10124 * src/misc.c (link_error): New function.
10126 * src/names.c (collect_and_sort_names):
10127 If ignore_failed_read_option, only warn about
10130 (excluded_name): Now returns bool. Simplify, as the fancy
10131 features are now all in excluded_filename.
10133 * src/rtapelib.c (base_name): Remove decl, as system.h now
10136 * src/system.h: Include stddef.h if available.
10137 (offsetof): Declare if stddef.h doesn't.
10139 Include <dirname.h>.
10140 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
10142 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
10143 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
10144 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
10145 WILDCARDS_MATCH_SLASH_OPTION):
10148 (long_options, usage, decode_options): Add support for --anchored,
10149 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
10150 --no-wildcards-match-slash, --recursion, --wildcards,
10151 --wildcards-match-slash.
10153 (decode_options): Implement the new way of interpreting exclude
10156 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
10158 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
10159 just print error messages suggesting alternatives.
10161 (add_filtered_exclude): Remove.
10163 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
10165 * tests/extrac04.sh (out): Remove
10166 directory/subdirectory/file1, as the new semantics for
10167 --exclude exclude it.
10169 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
10171 2001-08-12 Paul Eggert <eggert@twinsun.com>
10173 * lib/addext.c (<errno.h>): Include.
10174 (errno): Declare if not defined.
10175 (addext): Work correctly on the Hurd, where pathconf returns -1 and
10176 leaves errno alone, because there is no limit. Also, work even if
10177 size_t is narrower than long.
10179 2001-07-08 Paul Eggert <eggert@twinsun.com>
10181 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
10183 2001-05-10 Paul Eggert <eggert@twinsun.com>
10185 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
10186 Include <backupfile.h> and <dirname.h> after size_t is defined.
10187 (addext): Use base_len to trim redundant trailing slashes instead of
10188 doing it ourselves.
10190 * lib/backupfile.c (ISSLASH, base_name):
10191 Remove decls; now in dirname.h.
10192 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
10194 (find_backup_file_name): Rename locals to avoid new functions.
10195 Use base_len instead of rolling it ourselves.
10196 Work even if dirlen is 0.
10197 Use a dir of '.' if given the empty string.
10200 Do not include <stdio.h>, <assert.h>; no longer needed.
10201 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
10202 Include <string.h>, <dirname.h>.
10203 (base_name): Allow file names ending in slashes, other than names
10204 that are all slashes. In this case, return the basename followed
10207 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
10208 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
10209 (dir_len): Renamed from dirlen.
10210 All callers changed.
10212 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
10214 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
10216 2001-02-16 Paul Eggert <eggert@twinsun.com>
10218 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
10219 Do not declare or define if HAVE_MBRTOWC,
10220 since the test for HAVE_MBRTOWC now requires proper declarations.
10222 * lib/alloca.c (malloc): Undef before defining.
10224 2001-02-13 Paul Eggert <eggert@twinsun.com>
10226 * src/compare.c (read_and_process): Use off_t for size.
10227 From Maciej W. Rozycki.
10229 2001-01-26 Paul Eggert <eggert@twinsun.com>
10231 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
10233 2001-01-12 Paul Eggert <eggert@twinsun.com>
10235 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
10237 * lib/savedir.h (savedir): Remove size arg.
10239 * doc/tar.texi: Add @setchapternewpage odd.
10240 Remove -I as an alias for -T, for now.
10242 Update copyright. Remove "Published by".
10243 Dates beginning with / or . are taken to be file names.
10245 * src/tar.c (<time.h>): Do not include;
10246 (time): Do not declare.
10247 (usage): Remove -I as an alias for -T.
10248 (OPTION_STRING): Remove -I.
10249 (decode_options): Dates that look like an absolute path name,
10250 or that start with '.', are presumed to be file names whose
10252 Remove 'I' as an alias for 'T'.
10255 * src/extract.c (<time.h>): Do not include; system.h now does this.
10256 (make_directories): Skip filesystem prefixes.
10257 Don't assume '/' is the only separator.
10258 (extract_sparse_file): Use new full_write semantics.
10259 On write error, return instead of invoking skip_file.
10260 Do not free sparsearray; caller does this now.
10261 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
10263 (extract_archive): Don't assume file name lengths fit in int.
10264 Report what got stripped from member name; it might be more than '/'.
10265 Use new full_write semantics.
10266 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
10267 mkdir to ignore it.
10268 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
10270 * src/buffer.c (<time.h>): Do not include; system.h now does this.
10271 (time): Remove decl; likewise.
10272 (child_open_for_uncompress): Use new full_write semantics.
10273 (flush_write): Use ISSLASH instead of testing for '/'.
10274 (flush_read): Likewise.
10276 * src/rmt.h (_remdev): Look for / anywhere in Path.
10278 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
10279 Don't assume '/' is the only separator.
10280 (safer_rmdir): Don't assume '/' is the only separator.
10282 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
10284 * lib/dirname.h (dirlen): New decl.
10286 * src/incremen.c (get_directory_contents):
10287 Remove path_size arg; all callers changed.
10288 Don't assume '/' is the only directory separator.
10289 (gnu_restore): Work even if file name length doesn't fit in int.
10291 * lib/addext.c (ISSLASH): New macro.
10292 (addext): Trim any redundant trailing slashes.
10294 * src/names.c (name_next):
10295 Don't assume '/' is the only directory separator.
10296 (namelist_match): Likewise.
10297 (add_hierarchy_to_namelist): Remove dirsize arg.
10298 Do not assume '/' is the only directory separator.
10299 (new_name): Likewise.
10301 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
10302 (libtar_a_SOURCES): Add dirname.c.
10304 * src/create.c (relativize):
10305 New function, with much of old start_header's guts.
10306 Handle filesystem prefixes.
10307 (start_header): Use this new function.
10308 (init_sparsearray): Don't bother to zero out the new array;
10310 (deal_with_sparse): Fix array allocation bug.
10311 (create_archive): Don't assume '/' is the only separator.
10312 (dump_file): Likewise.
10313 Don't worry about leading / in symlink targets.
10315 * lib/savedir.c (savedir):
10316 Remove size arg; it wasn't portable. All callers changed.
10318 * lib/utime.c (utime_null): Adjust to new full_write convention.
10320 * configure.in (YACC): Avoid portability problem with Ultrix sh.
10322 * lib/backupfile.c: Include <dirname.h>.
10323 (ISSLASH): New macro.
10324 (find_backup_file_name): Use dirlen to calculate directory lengths.
10325 (max_backup_version): Strip redundant trailing slashes.
10327 * src/common.h: Include <full-write.h>.
10328 (get_directory_contents): No longer has size arg.
10329 (gnu_restore): Arg is size_t, not int.
10331 * src/system.h: Include <time.h>.
10332 (time): Declare if not defined.
10334 * lib/full-write.c: Include full-write.h, not safe-read.h.
10335 full_write returns size_t, with short writes meaning failure.
10336 All callers changed.
10338 * src/rtapelib.c: Include full-write.h.
10340 * src/rmt.c: Include full-write.h.
10341 (main): Update copyright.
10343 * doc/getdate.texi: Mention that only English is supported.
10344 Show how to use "date" so that the output is acceptable to getdate.
10345 Mention Z as an abbreviation for UTC.
10347 * lib/full-write.h: New file.
10349 * src/list.c: system.h now does time.h stuff.
10352 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
10354 Do not include string.h, strings.h, or assert.h; no longer needed.
10355 (strrchr, memrchr, malloc): Remove decls; no longer needed.
10356 Include <xalloc.h>.
10357 (base_name): New decl.
10358 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
10359 (dir_name_r): Remove.
10360 (dirlen): New function.
10361 (dir_name): Use dirlen instead of dir_name_r.
10362 (<string.h>, <strings.h>): Include only if test program.
10363 (main): Use "return 0", not "exit (0)".
10365 2000-12-08 Paul Eggert <eggert@twinsun.com>
10367 * lib/dirname.h: New file.
10369 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
10371 * lib/fnmatch.c: Do not comment out all the code if we are using
10372 the GNU C library, because in some cases we are replacing buggy
10373 code in the GNU C library itself.
10375 2000-10-30 Paul Eggert <eggert@twinsun.com>
10377 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
10379 2000-10-29 Paul Eggert <eggert@twinsun.com>
10381 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
10383 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
10385 2000-10-28 Paul Eggert <eggert@twinsun.com>
10387 * doc/tar.texi: --no-recursion now applies to extraction, too.
10388 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
10389 * src/names.c (namelist_match, excluded_name):
10390 Do not match subfiles of a directory
10391 if --no-recursion is specified.
10392 * src/tar.c (NO_RECURSE_OPTION): Remove.
10393 (long_options): Have getopt set the --no-recursion flag.
10394 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
10395 Remove case for NO_RECURSE_OPTION.
10396 * src/common.h (recursion_option):
10397 Renamed from no_recurse_option, with sense
10398 negated, and with FNM_LEADING_DIR being the nonzero value.
10400 * names.c (namelist_match): New function.
10401 (name_match, name_scan): Use it to eliminate duplicate code.
10402 (names_notfound): Remove special case for Amiga.
10404 2000-10-27 Paul Eggert <eggert@twinsun.com>
10406 * src/misc.c (read_error_details, read_warn_details,
10407 read_fatal_details): Don't assume size_t is unsigned long.
10409 * src/buffer.c (flush_read): If read_full_records_option, try to
10410 fill the input buffer, as --delete -f - needs this.
10412 2000-10-24 Paul Eggert <eggert@twinsun.com>
10414 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
10416 * src/buffer.c (check_label_pattern):
10417 Make sure header name is a string before
10418 passing it to fnmatch.
10419 (init_volume_number): Check for global_volno overflow.
10420 (new_volume): Check for global_volno overflow.
10422 * src/tar.c (decode_options):
10423 Check that volume label is not too long to overflow
10424 name in tar header block.
10426 * Makefile.am (EXTRA_DIST): Remove rebox.el.
10428 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
10429 (AC_FUNC_STRERROR_R): Use this instead.
10431 2000-10-23 Paul Eggert <eggert@twinsun.com>
10433 * src/extract.c: Include <time.h>, since we invoke "time".
10435 * lib/prepargs.c (prepend_default_options):
10436 Don't use NULL, for portability.
10438 * m4/fnmatch.m4: Add "working" to message.
10440 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
10442 (getpwuid, getgrgid): Declare only if system headers don't.
10443 (gid_to_gname): Don't invoke setgrent.
10444 (namelist): Now static, not global.
10445 (nametail): New var. All uses of namelast changed to use
10446 nametail, with one extra level of indirection.
10447 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
10448 (name_match): Set nametail too, when setting namelist to null.
10449 (add_hierarchy_to_namelist): Change type of dir arg from char * to
10450 struct name *, so that we don't have to look up the name again
10451 here. Get change_dir from dir rather than as a separate arg. Add
10452 dirsize arg, and pass it along to get_directory_contents. Remove
10453 unnecessary check of directory type.
10454 (new_name): Do not append a slash if PATH already ends in one.
10455 (avoided_names, struct avoided_name): Remove.
10456 (avoided_name_table): New var, replacing avoided_names.
10457 (hash_avoided_name, compare_avoided_names): New function.
10458 (add_avoided_name, is_avoided_name): Use hash table rather than
10461 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
10462 (child_open_for_compress, child_open_for_uncompress,
10463 close_archive): Propagate any failure of the compression process
10465 (open_archive, flush_write, flush_read, close_archive): Do not
10466 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
10467 -1. Instead, allocate an array with the size that's needed.
10468 (open_archive): Don't bother checking S_ISCHR of /dev/null.
10469 (backspace_output): Don't try to backspace past start of archive.
10470 (close_archive): Remove special case for DELETE_SUBCOMMAND.
10472 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
10473 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
10474 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
10475 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
10476 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
10477 WITH_DMALLOC, WITH_REGEX):
10478 Remove; now generated automatically.
10480 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
10481 compatibility for glibc fragments.
10482 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
10483 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
10484 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
10485 that we needn't put an entry into acconfig.h.
10486 (ALL_LINGUAS): Add da.
10487 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
10488 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
10490 (AC_MBSTATE_T): Add.
10491 (RMT): Append $(EXEEXT).
10492 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
10493 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
10494 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
10495 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
10496 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
10497 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
10498 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
10499 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
10500 (EMUL_OPEN3): Remove; no longer needed.
10501 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
10503 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
10505 * src/common.h: Do not include basename.h.
10506 * src/rtapelib.c (base_name): Do not include basename.h;
10507 declare base_name instead.
10509 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
10510 Remove these files.
10511 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
10512 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
10513 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
10514 Adjust to the above changes.
10516 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
10518 * src/open3.c: Remove.
10520 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
10521 (tar_SOURCES): Remove open3.c.
10522 (INCLUDES): Remove -I.., as automake does that.
10523 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
10525 The following changes are to put LOCALEDIR into localedir.h instead
10526 of passing it on the command line.
10528 (DISTCLEANFILES): New macro.
10529 (localedir.h): New rule.
10530 (rmt.o tar.o): Now depend on localedir.h.
10532 * tests/delete02.sh, tests/extrac04.sh: New files.
10534 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
10535 (TESTS): Add extrac04.sh, and restore delete02.sh.
10536 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
10537 (INCLUDES): Remove -I.. as automake does this now.
10539 * src/rtapelib.c (rexec): Don't declare unless using it.
10540 (do_command): Simplify signal-handling code slightly.
10542 * src/delete.c (blocks_needed): Remove. All uses changed to use
10543 blocking_factor - new_blocks.
10544 (acting_as_filter): New var.
10545 (write_record, delete_archive_members): Use acting_as_filter
10546 rather than archive == STDIN_FILENO to detect whether we're acting
10547 as a filter, as open can return STDIN_FILENO in some cases.
10548 (delete_archive_members): Ignore zero blocks if
10549 ignore_zeros_option is nonzero. Fix bug that messed up last
10550 output block: write_eot can't be used here, as it gets confused
10551 when the input is at end of file.
10553 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
10554 symbolic link contents length. Pass directory size to
10555 get_directory_contents.
10557 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
10558 m4/strerror_r.m4: New files.
10559 * m4/signedchar.m4: Remove this file.
10560 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
10561 * m4/Makefile.am (EXTRA_DIST): Likewise.
10563 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
10565 * po/da.po: New translation file.
10567 * src/mangle.c (extract_mangle):
10568 Fix diagnostic with wrong number of %s'es.
10570 * lib/fnmatch.c (fnmatch):
10571 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
10572 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
10574 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
10575 fall off a device's end. Detect this.
10577 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
10579 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
10580 include <pathmax.h> and directory include files like <dirent.h>;
10581 no longer used. Include <savedir.h> instead.
10582 (closedir, signed_char): remove macro; no longer used.
10583 (bool, false, true): Include <stdbool.h> if you have the include
10584 file, otherwise define.
10587 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
10588 opendir_warn, readdir_error): Remove; no longer needed.
10589 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
10590 before deciding whether we're trying to remove ".".
10591 (remove_any_file): Try unlink first if we are not root. Use
10592 savedir when recursively removing directories, to avoid exhausting
10594 (savedir_error, savedir_warn, symlink_error): New functions.
10596 * src/list.c: (read_and): Do not invoke
10597 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
10598 responsible for that. Do not invoke apply_delayed_set_stat; our
10599 caller is now responsible for that.
10600 (read_header): Use signed char instead of signed_char. Prevent
10601 later references to current_header from mistakenly treating it as
10603 (from_header): Quote invalid base-64 strings in diagnostics.
10604 (time_from_header): Do not warn about future timestamps in
10605 archive; check_time now does that.
10606 (print_header): Quote unknown file types.
10607 (skip_member): New function, replacing skip_extended_headers and
10608 now skipping the whole member instead of just the extended
10609 headers. All callers changed. This makes the code handle
10610 extended headers uniformly, and fixes some bugs.
10612 * src/update.c (update_archive): Use skip_member.
10614 * src/extract.c (we_are_root): Now global.
10615 (struct delayed_symlink): New type.
10616 (delayed_symlink_head): New var.
10617 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
10618 not apply_delayed_set_stat.
10619 (set_mode, set_stat): Pointer args are now const pointers.
10620 (check_time): New function.
10621 (set_stat): Warn if setting a file's timestamp to be the future.
10622 (make_directories): Do not save and restore errno.
10623 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
10624 intermediate directories.
10625 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
10626 not in caller. Extract potentially dangerous symbolic links more
10627 carefully, deferring their creation until the end, and using a
10628 regular file placeholder in the meantime. Do not remove trailing
10629 / and /. from file names. Do not bother checking for ".." when
10630 checking whether a directory loops back on itself, as loopbacks
10631 can occur with symlinks too. Also, in that case, do not bother
10632 saving and restoring errno; just set it to EEXIST.
10633 (apply_nonancestor_delayed_set_stat): A prefix is a potential
10634 ancestor if it ends in slash too (as well as ending in a char just
10636 (apply_delayed_set_stat): Remove.
10637 (apply_delayed_symlinks, extract_finish): New functions.
10639 * doc/fdl.texi: New file.
10640 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
10641 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
10642 * doc/tar.texi: Add Free Documentation License. New section
10643 "Overwrite Old Files", and revamp that section to make it easier to
10644 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
10645 documentation into getdate.texi. Fix several minor typos. Describe
10646 TAR_OPTIONS. Describe incompatibility between incremental backups and
10647 --atime-preserve. Describe incompatibility between --verify and other
10648 options. Mention that tar normally removes symbolic links rather than
10649 following them, when extracting a file of the same name.
10651 * THANKS: Add gpoul. Change skip's address.
10653 * po/POTFILES.in: Add lib/human.c.
10655 * src/common.h (namelist, namelast): Remove decls.
10656 (we_are_root, extract_finish, skip_member, savedir_error,
10657 savedir_warn, symlink_error, gnu_list_name): New decls.
10658 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
10659 skip_extended_headers, is_dot_or_dotdot, closedir_error,
10660 closedir_warn, opendir_error, opendir_warn, readdir_error,
10661 readdir_warn): Remove decls.
10662 (get_directory_contents): New off_t arg.
10663 (addname): Now returns struct name *.
10665 * src/tar.h, tests/genfile.c: Fix comments.
10667 * src/create.c: Include hash.h.
10668 (gnu_list_name): Remove decl.
10669 (struct link): Remove "next" member.
10670 (linklist): Remove.
10671 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
10672 consistency with other diagnostics.
10673 (deal_with_sparse): Check for I/O error when closing the file.
10674 (create_archive): Do not allocate an array of size PATH_MAX, as
10675 PATH_MAX might be (size_t) -1. Instead, allocate an array with
10676 the size that's needed.
10677 (hash_link, compare_links): New functions.
10678 (dump_file): Do not exhaust open file descriptors when descending
10679 deeply into a directory, by using savedir rather than
10680 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
10681 Hash the set of links already created, instead of using a linked
10682 list. Fix some bugs in outputting sparse files which caused the
10683 sparse tables to be incorrect. When a file unexpectedly shrinks,
10684 output zeros rather than garbage. Do not allocate an array of
10685 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
10686 allocate an array with the size that's needed.
10688 * src/incremen.c: Include hash.h.
10689 (struct directory): Remove "next", "dir_text". Change "name" to
10690 be char[1] with struct hack, not const char *. Add "found".
10691 (directory_list): Remove. Replaced by directory_table.
10692 (directory_table): New var.
10693 (nfs_string): Renamed from nfs.
10694 (hash_directory, compare_directories): New functions.
10695 (note_directory): Now returns struct directory *. First arg is
10696 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
10697 Remove text arg. New "found" arg, basically corresponding to the
10698 old text arg not being null. All callers changed.
10699 (note_directory, find_directory): Use hash table rather than
10701 (get_directory_contents): New arg "device". Use savedir to do the
10702 hard work. Save the nfs-ness of stat_data, since it might change
10703 under us. Use note_directory instead of find_directory to save
10704 some work. When adding an "A" record, do it with
10705 add_to_accumulator instead of cheating with strcat.
10706 (read_directory_file): Use "+" flag before device to indicate
10707 whether it was NFS. Fix typo in checking for strtoul error.
10708 (write_directory_file_entry): New function.
10709 (write_directory_file): Use it, and use the hash routines to
10710 traverse the directory table.
10711 (gnu_restore): Use savedir rather than opendir/readdir.
10713 * src/tar.c: Include localedir.h, prepargs.h.
10714 (long_options): Now static.
10715 (long_options, usage, decode_options): -j is now short for
10716 --bzip2, and -I is now an alias for -T.
10717 (decode_options, main): argv is not const pointer now.
10718 (decode_options): Invoke prepend_default_options to support
10719 TAR_OPTIONS. In diagnostic, mention the string that was the
10720 invalid blocking factor, tape length, group, owner, or record
10721 size. --delete is no longer incompatible with -f -, undoing
10723 (main): Invoke extract_finish at end of extraction.
10725 * src/rmt.c: Include localedir.h.
10726 (main): Update copyright date to 2000.
10728 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
10729 following changes: Use @sc where appropriate. Document the ranges of
10730 supported times more precisely. Add Eggert to getdate authors.
10731 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
10732 zone names, as it wasn't correct and people shouldn't be relying on it
10733 anyway. Relative items also account for non-DST adjustments. Fix
10736 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
10738 * tests/ignfail.sh: opendir -> savedir in diagnostics.
10740 * tests/preset.in: Set LANGUAGE to the empty string, for some
10741 brain damaged host.
10743 2000-10-20 Paul Eggert <eggert@twinsun.com>
10745 * m4/fnmatch.m4: Mention the GNU C library.
10747 2000-10-19 Paul Eggert <eggert@twinsun.com>
10749 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
10752 2000-10-17 Paul Eggert <eggert@twinsun.com>
10754 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
10755 (CHAR_BIT): Remove.
10757 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
10758 (CHAR_BIT): Define if not defined.
10760 2000-09-09 Paul Eggert <eggert@twinsun.com>
10762 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
10764 2000-08-07 Paul Eggert <eggert@twinsun.com>
10766 * lib/xmalloc.c: Memory exhausted -> memory exhausted
10768 * lib/xalloc.h (xalloc_msg_memory_exhausted):
10769 change to array from char *.
10771 2000-08-06 Paul Eggert <eggert@twinsun.com>
10773 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
10774 compatibility with glibc 2.1.3 strftime.c.
10776 2000-07-31 Paul Eggert <eggert@twinsun.com>
10778 * lib/quotearg.c (quotearg_n_options):
10779 Don't make the initial slot vector a constant,
10780 since it might get modified.
10782 * lib/quotearg.c: Add support for more than one preallocated slot.
10784 2000-07-30 Paul Eggert <eggert@twinsun.com>
10786 * lib/quotearg.c (quotearg_n_options):
10787 Preallocate a slot 0 buffer, so that the caller
10788 can always quote one small component of a "memory exhausted" message
10791 2000-07-23 Paul Eggert <eggert@twinsun.com>
10794 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
10795 mbstate_t is always defined.
10797 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
10798 some GCC installations, and this configuration error is likely to be
10801 2000-07-22 Paul Eggert <eggert@twinsun.com>
10804 When the system forces us to redefine mbstate_t, shadow its mbsinit
10805 function. From Bruno Haible.
10807 2000-07-14 Paul Eggert <eggert@twinsun.com>
10809 * lib/xmalloc.c: Simplify exhausted message.
10811 * lib/quotearg.h: Update copyright date; from Jim Meyering.
10813 2000-07-13 Paul Eggert <eggert@twinsun.com>
10815 * lib/quotearg.h (enum quoting style):
10816 New constant clocale_quoting_style.
10819 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
10820 Add support for clocale_quoting_style, undoing previous change to
10821 locale_quoting_style.
10823 2000-07-10 Paul Eggert <eggert@twinsun.com>
10826 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
10827 since otherwise we don't need it.
10828 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
10829 since we don't do multibytes in that case.
10830 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
10831 invoke multibyte primitives.
10833 * m4/mbstate_t.m4 (AC_MBSTATE_T):
10834 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
10835 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
10836 and mbstate_t, to a single-part test that simply defines mbstate_t.
10838 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
10839 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
10840 to decide whether to define the BeOS workaround macro;
10841 this adjusts to the change to AC_MBSTATE_T.
10843 * m4/strerror_r.m4: New file.
10845 2000-07-05 Paul Eggert <eggert@twinsun.com>
10847 * lib/quotearg.c: Use double-quote to quote.
10849 * lib/quotearg.c (N_): New macro.
10850 (gettext_default): New function.
10851 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
10852 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
10855 * lib/quotearg.c (struct quoting_options):
10856 Simplify quote_these_too dimension.
10857 From Bruno Haible <haible@clisp.cons.org>.
10859 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
10860 Test for mbstate_t only if the test
10861 for an object-type mbstate_t fails.
10863 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
10865 2000-07-03 Paul Eggert <eggert@twinsun.com>
10867 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
10868 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
10870 * lib/quotearg.c (mbrtowc):
10871 Assign to *pwc, and return 1 only if result is nonzero.
10872 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
10874 2000-07-02 Paul Eggert <eggert@twinsun.com>
10876 * lib/quotearg.c (mbstate_t):
10877 Do not define; it should be defined with AC_CHECK_TYPE.
10879 2000-06-26 Paul Eggert <eggert@twinsun.com>
10881 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
10882 a bug in glibc 2.1.3.
10884 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
10886 2000-06-19 Paul Eggert <eggert@twinsun.com>
10888 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
10889 inclusion of wctype.h to work around solaris2.6 namespace pollution.
10890 (ISPRINT): Likewise.
10891 Reported by Tom Tromey.
10893 2000-06-15 Paul Eggert <eggert@twinsun.com>
10895 * lib/human.c (adjust_value): New function.
10896 (human_readable_inexact): Apply rounding style even when printing
10897 approximate values.
10899 * lib/human.c: Avoid shadowing warnings.
10902 2000-06-14 Paul Eggert <eggert@twinsun.com>
10904 * lib/human.c (human_readable_inexact): Allow an input block size
10905 that is not a multiple of the output block size, and vice versa.
10907 * lib/getdate.y (get_date): Apply relative times after time zone
10908 indicator, not before.
10910 2000-05-31 Paul Eggert <eggert@twinsun.com>
10912 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
10913 and thus don't need AC_CANONICAL_HOST.
10915 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
10916 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
10917 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
10918 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
10919 changed. Instead of inspecting the output of getconf, try to
10920 compile the test program without and with the macro definition.
10921 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
10922 getconf. Instead, check for the needed flags by compiling test
10925 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
10927 * config.guess, config.sub: Remove these files, for similar reasons.
10929 2000-05-03 Paul Eggert <eggert@twinsun.com>
10931 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
10932 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
10933 bug. This avoids a clash when files like regex.c that define
10936 2000-05-02 Paul Eggert <eggert@twinsun.com>
10938 * m4/largefile.m4 (AC_SYS_LARGEFILE):
10939 Define _GNU_SOURCE if this is needed to make
10940 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
10941 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
10943 * lib/quotearg.c (mbrtowc, mbstat_t):
10944 Add definitions if !HAVE_MBSTATE_T_OBJECT.
10945 (<wctype.h>): Include if HAVE_WCTYPE_H.
10946 (iswprint): Define to 1 if we lack it
10948 2000-04-18 Paul Eggert <eggert@twinsun.com>
10950 * m4/mbstate_t.m4: New file.
10952 2000-04-17 Bruno Haible <haible@clisp.cons.org>
10954 * tests/ignfail.sh: Test for uid 0 along with user "root".
10956 2000-04-05 Paul Eggert <eggert@twinsun.com>
10958 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
10959 Don't use -n32 on IRIX if the installer said
10962 2000-02-28 Paul Eggert <eggert@twinsun.com>
10964 * lib/quotearg.c (ALERT_CHAR): New macro.
10965 (quotearg_buffer_restyled): Use it.
10967 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10969 * src/list.c (tartime): Fix off-by-one error when copying year if
10972 2000-02-18 Paul Eggert <eggert@twinsun.com>
10974 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
10975 (textint): New typedef.
10976 (parser_control): Changed from struct parser_control to typedef
10977 (for consistency). Member year changed from int to textint. All
10979 (YYSTYPE): Removed; replaced by %union with int and textint
10981 (tID): Removed; not used.
10982 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
10983 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
10984 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
10985 (tSNUMBER, tUNUMBER): Now of type <textintval>.
10986 (date, number, to_year): Use width of number in digits, not its
10987 value, to determine whether it's a 2-digit year, or a 2-digit
10989 (yylex): Store number of digits of numeric tokens. Return '?' for
10990 unknown identifiers, rather than (unused) tID.
10992 2000-01-16 Paul Eggert <eggert@twinsun.com>
10994 * lib/quotearg.c (quotearg_buffer_restyled):
10995 Do not quote alert, backslash, formfeed,
10996 and vertical tab unnecessarily in shell quoting style.
10998 2000-01-15 Paul Eggert <eggert@twinsun.com>
11001 Change quoting to be compatible with future autoconf versions.
11003 2000-01-11 Paul Eggert <eggert@twinsun.com>
11005 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
11007 2000-01-07 Paul Eggert <eggert@twinsun.com>
11009 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
11011 Fix bug with fnmatch.h dependency, as follows:
11012 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
11013 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
11015 * src/common.h (apply_nonancestor_delayed_set_stat):
11016 Renamed from apply_delayed_set_stat.
11017 (apply_delayed_set_stat, decode_mode, chmod_error_details,
11018 chown_error_details, close_warn, closedir_warn, mkdir_error,
11019 read_error_details, read_fatal_details, read_warn_details,
11020 seek_error_details, seek_warn_details, utime_error,
11021 write_error_details, write_fatal_details): New decls.
11023 Make diagnostic messages more regular.
11024 * src/create.c (dump_file): Quote file names with colons if possible.
11025 * src/compare.c (diff_archive): Likewise.
11026 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
11027 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
11028 * src/mangle.c (extract_mangle): Likewise.
11029 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
11031 * src/buffer.c (archive_write_error, flush_archive, close_archive,
11032 new_volume, xclose):
11033 Use error message functions to report errors consistently.
11034 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
11035 * src/create.c (finish_sparse_file, dump_file): Likewise.
11036 * src/extract.c (set_mode, set_stat, extract_sparse_file,
11037 extract_archive): Likewise.
11038 * src/list.c (list_archive): Likewise.
11039 * src/update.c (append_file): Likewise.
11040 * src/compare.c (diff_init, diff_sparse_files):
11041 Use xalloc_die to report memory exhaustion.
11042 * src/incremen.c (gnu_restore): Likewise.
11043 * src/list.c (read_header): Likewise.
11044 * src/mangle.c (extract_mangle): Likewise.
11045 * src/misc.c (maybe_backup_file): Likewise.
11046 * src/tar.c (decode_options): Likewise.
11047 * src/compare.c (read_and_process, fill_in_sparse_array,
11048 diff_sparse_files):
11049 Use consistent terminology for unexpected-EOF message.
11050 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
11051 * src/list.c (list_archive, read_header, skip_file,
11052 skip_extended_headers): Likewise.
11053 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
11054 (xdup2): Regularize messages with rest of tar.
11056 * src/buffer.c (flush_read): Don't read past EOF.
11058 * src/extract.c (extr_init):
11059 If we run out of memory, invoke apply_delayed_set_stat.
11060 (prepare_to_extract): Don't complain if we can't remove ".".
11061 (apply_delayed_set_stat): New function.
11062 (apply_nonancestor_delayed_set_stat):
11063 Renamed from apply_delayed_set_stat. All uses changed.
11064 Don't remove head if it doesn't apply.
11066 * src/create.c (find_new_file_size):
11067 Return size instead of storing through pointer.
11068 All callers changed.
11069 (deal_with_sparse): Don't keep reading after read errors.
11070 (finish_sparse_file): Just abort if there is an internal error.
11071 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
11072 Don't restore access times on directories during incremental dumps
11073 until after dealing with the directory.
11074 If ignoring failed reads, count closedir, read, and unknown
11075 file errors as warnings, not errors.
11076 Fix buffer overrun problem when dumping sparse files.
11078 * src/list.c (read_and):
11079 Invoke apply_nonancestor_delayed_set_stat on file names
11080 after handling them.
11081 (decode_mode): Remove; moved to misc.c.
11083 * src/misc.c (safer_rmdir): New function.
11084 (remove_any_file): Use it to avoid problems with rmdir(".").
11085 (maybe_backup_file): Regularize diagnostics.
11086 (undo_backup_file): Likewise.
11087 (decode_mode): Moved here from list.c.
11088 (chmod_error_details, chown_error_details, close_fatal,
11089 close_warn, closedir_warn, mkdir_error, read_error_details,
11090 read_warn_details, read_fatal_details, seek_error_details,
11091 seek_warn_details, utime_error, write_error_details,
11092 write_fatal_details): New functions.
11094 * src/delete.c (save_record): Remove static variable (now local).
11095 (move_archive): Don't position before start of archive.
11096 (write_record): Abort if count is zero at inopportune time.
11099 * src/tar.c (decode_options): --delete and -f - are now
11100 incompatible, since we didn't have time to fix their bugs.
11102 * tests/Makefile.am (TESTS): Remove delete02.sh.
11103 * tests/ignfail.sh: Adjust to new quoting scheme again.
11105 2000-01-06 Paul Eggert <eggert@twinsun.com>
11107 * lib/getdate.y: Sync tm_diff with the GNU C Library.
11108 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
11109 (tm_diff): Renamed from difftm. All uses changed.
11110 Replace body with that taken from GNU C Library 2.1.3pre1.
11111 (get_date): Prefer tm_gmtoff to tm_diff if available.
11113 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
11115 * tests/incremen.sh: Invoke stat on newly created file so that its
11116 ctime is updated on Nextstep.
11118 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
11120 * lib/getdate.y (get_date):
11121 Fix typo when checking for time_t overflow in time zone calculations.
11123 1999-12-13 Paul Eggert <eggert@twinsun.com>
11125 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
11127 * README-alpha: New file.
11128 * README: New sections for gzip and bzip2, Solaris.
11129 Remove mention of BACKLOG.
11131 * configure.in (AC_C_BACKSLASH_A): Add.
11132 (AC_CHECK_HEADERS): Add wchar.h.
11133 (AC_CHECK_FUNCS): Add mbrtowc.
11134 (AC_FUNC_CLOSEDIR_VOID): Add.
11136 * tests/Makefile.am (TESTS): Add delete02.sh.
11137 (POSTPONED_TESTS): Remove.
11138 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
11141 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
11143 * tests/ignfail.sh (err): Adjust to new quoting scheme.
11145 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
11147 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
11149 * src/tar.c ("quotearg.h"): New include.
11150 (usage): Now has __attribute__ ((noreturn)).
11151 (confirm): Report errno if we can't open tty.
11152 (confirm, decode_options):
11153 Quote arbitrary strings in diagnostics.
11154 (OVERWRITE_OPTION): New constant.
11155 (long_options, usage, decode_options): New --overwrite option.
11156 (decode_options): --keep-old-files, --overwrite, and --unlink-first
11157 are now mutually exclusive.
11158 Don't assume that gettext preserves errno.
11159 (main): Set default quoting style to escape_quoting_style.
11161 * src/update.c (<quotearg.h>): New include.
11163 Don't assume that gettext preserves errno.
11164 Quote arbitrary strings in diagnostics.
11165 Check for close error.
11167 * src/names.c (<quotearg.h>): New include.
11168 (name_init, name_next, name_close, names_notfound,
11169 collect_and_sort_names): Don't assume that gettext preserves
11170 errno. Quote arbitrary strings in diagnostics.
11171 (excluded_name): Fix typo that caused empty patterns to be
11174 * src/misc.c (<quotearg.h>): New include.
11175 (quote_copy_string): Quote only newline and backslash; the output is no
11176 longer meant for humans, and is locale-independent.
11177 (contains_dot_dot): New function.
11178 (remove_any_file): Don't use lstat; just rmdir the file and then use
11179 unlink if the rmdir fails because the file isn't a directory.
11180 Check for readdir and closedir errors.
11181 (maybe_backup_file): Report "stat" for stat errors.
11182 (maybe_backup_file, chdir_do):
11183 Quote arbitrary strings in diagnostics.
11184 (maybe_backup_file, undo_last_backup):
11185 Don't assume that gettext preserves errno.
11186 (call_arg_error, call_arg_fatal, call_arg_warn,
11187 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
11188 mknod_error, open_error, open_fatal, open_warn, opendir_error,
11189 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
11190 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
11191 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
11192 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
11194 * src/system.h (__attribute__): New macro.
11195 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
11196 (S_ISDOOR): New macro.
11197 (closedir): New macro, if CLOSEDIR_VOID.
11199 * src/rmt.c, src/rtapelib.c (decode_oflag):
11200 O_APPEND might not be defined.
11202 * src/list.c: (read_and, list_archive):
11203 Quote arbitrary strings in diagnostics.
11204 (from_header): Use locale_quoting_style to quote diagnostics.
11205 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
11207 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
11209 * src/Makefile.am: Use ## for copyright comments.
11211 * src/extract.c (<quotearg.h>): New include.
11212 (enum permstatus): New enum.
11213 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
11214 two mallocs. New members file_name_len, invert_permissions, permstatus.
11215 (extr_init): Remove hack that silently adjusted newdir_umask.
11216 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
11217 Use these args to decide whether and how to set modes.
11218 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
11219 Don't assume that gettext preserves errno.
11220 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
11221 (delay_set_stat, repair_delayed_set_stat): New functions.
11222 (make_directories): Avoid mkdir where last part of path is "..".
11223 Create a struct delayed_set_stat for each directory made.
11224 (prepare_to_extract): Renamed from unlink_destination, and
11225 return 0 immediately if to_stdout_option; all callers changed.
11226 (maybe_recoverable): New parameter interdir_made.
11227 Add support for --overwrite.
11228 (extract_sparse_file, extract_archive):
11229 Quote arbitrary strings in diagnostics.
11230 (extract_archive): By default, warn about ".." in member names, and skip them.
11231 Don't open files with O_NONBLOCK or O_APPEND.
11232 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
11233 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
11234 minus the current umask. Keep track of intermediate directories made,
11235 to avoid looping when making x/../x when x doesn't exist; the
11236 earlier code solved this in a different way that didn't fit well
11237 into the new scheme. Don't extract permissions onto existing
11238 directories unless --overwrite is given. Do not add -wx------
11239 permissions to new directories permanently; just do it temporarily.
11240 Remove no-longer-needed hack with MSDOS and directory time stamps.
11241 (apply_delayed_set_stat): New argument specifies which directories to
11242 fix statuses of. Do not wait until the end of extraction to fix
11243 statuses; instead, fix a directory's status once we exit that directory.
11244 This requires less memory and does the right thing in some cases
11245 where the old method didn't.
11246 (fatal_exit): New function.
11248 * src/incremen.c (<quotearg.h>): New include.
11249 (get_directory_contents, gnu_restore):
11250 Check for readdir and closedir errors.
11251 (get_directory_contents, read_directory_file, gnu_restore):
11252 Quote arbitrary strings in diagnostics.
11253 (get_directory_contents, read_directory_file, write_directory_file):
11254 Don't assume that gettext preserves errno.
11256 * src/create.c (<quotearg.h>): New include.
11257 (start_header): Use `member names' to refer to archive member names, not
11258 `archive names'. Warn about `..' in member names.
11259 (finish_sparse_file, dump_file):
11260 Quote arbitrary strings in diagnostics.
11261 (finish_sparse_file, dump_file):
11262 Don't assume that gettext preserves errno.
11263 (dump_file): Don't use `access' to determine whether a directory is readable;
11264 this isn't reliable if tar is setuid. Use `opendir' instead.
11265 Check for readdir and closedir failures.
11266 Don't dump sockets as if they were fifos; just warn and skip.
11268 * src/delete.c (move_archive):
11269 Don't report fatal error merely because sizes don't fit
11270 into struct mtop values; fall back on lseek instead.
11271 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
11272 Say `reposition' instead of `re-position'.
11273 (delete_archive_members):
11274 Set archive to STDOUT_FILENO before outputting trailing buffer.
11276 * src/compare.c (<quotearg.h>): New include.
11277 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
11278 and `Cannot' others.
11279 (report_difference, diff_archive):
11280 Quote arbitrary strings in diagnostics.
11281 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
11282 Don't assume that gettext preserves errno.
11283 (diff_archive): Don't open regular files with O_NONBLOCK.
11284 Preserve access times of files if --atime.
11286 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
11287 (FATAL_ERROR, USAGE): Don't return 0.
11288 (enum old files): New enum.
11289 (old_files_option): New variable, replacing keep_old_files_option and
11290 unlink_first_option.
11291 (apply_delayed_set_stat): Now takes char const * param.
11292 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
11293 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
11294 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
11295 read_fatal, readdir_error, readdir_warn, readlink_error,
11296 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
11297 truncate_error, truncate_warn, unlink_error, waitpid_error,
11298 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
11301 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
11302 archive_write_error, archive_read_error, flush_archive, close_archive,
11303 init_volume_number, new_volume):
11304 Don't assume that gettext preserves errno.
11306 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
11307 (open_archive): Reject multivolume verify attempts a bit earlier.
11308 Rename local variable `access', in case it's defined by system header.
11310 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
11311 `Could not' sometimes and `Cannot' others.
11313 (open_archive, flush_read, flush_archive, close_archive, new_volume):
11314 Quote arbitrary strings in diagnostics.
11316 (read_error): Set archive to STDOUT_FILENO temporarily when writing
11319 (init_volume_number): Check for input and output errors in volno_file.
11321 (new_volume): Use new fatal_exit function to exit, and new xfork
11324 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
11326 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
11328 * doc/tar.texi: Add --overwrite.
11329 --absolute-names rejects ".." in names.
11331 * lib/quotearg.c: Add support for multibyte characters.
11333 (ISPRINT): New macro.
11334 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
11335 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
11336 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
11337 (quotearg_buffer_restyled): New function, with most of the old
11338 quotearg_buffer's contents.
11339 Major rewrite to support multibyte characters.
11340 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
11342 * m4/c-bs-a.m4: New file.
11344 * lib/Makefile.am: Use ## for copyright notice.
11346 * scripts/Makefile.am: Use ## on copyright notice.
11349 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
11351 1999-12-05 Paul Eggert <eggert@twinsun.com>
11353 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
11354 src/ChangeLog, tests/ChangeLog: Remove these files.
11355 * ChangeLog.1: New file, incorporating the above files, plus old
11357 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
11359 1999-12-05 Dale Worley <worley@ariadne.com>
11361 * src/compare.c (<utime.h>, struct utimbuf): Add.
11362 (diff_archive): Restore access times if --atime.
11363 * doc/tar.texi: Explain that --atime also preserves modification time.
11365 1999-12-04 Gerhard Poul <gpoul@gnu.org>
11367 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
11368 * BACKLOG, TODO: Remove.
11369 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
11370 * README: Bring up to date.
11372 1999-12-03 Paul Eggert <eggert@twinsun.com>
11374 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
11376 * src/compare.c (diff_archive):
11377 Do not set errno to EPIPE; we no longer use perror.
11379 * src/create.c (dump_file):
11380 If a parent directory said that a file should be there but it is
11381 absent, diagnose it as being removed in the meantime.
11382 Do not pass meaningless errno to ERROR when reporting that the
11383 file changed as we read it.
11384 Report that a file changed if its ctime changes; this is more
11385 sensitive than mtime+size, and more accurate.
11387 * src/incremen.c (enum children): New type.
11388 (struct directory): Change old char allnew member to new enum children
11391 (get_directory_contents): When doing an incremental dump that does
11392 not cross filesystem boundaries, dump the mount points, even though
11393 they are in a different filesystem. This is for convenience when
11394 restoring, and for consistency with non-incremental dumps.
11395 This requires a 3-way flag for keeping track of which children we want,
11396 so we use enum children rather than boolean.
11398 * src/open3.c (modes): Remove.
11399 (open3): Remove unportable assumptions about flag encodings.
11400 Use `stat' instead of `access' for testing file existence,
11401 to avoid problems with setuid programs.
11403 * src/names.c (name_next): If file names are given both in the
11404 command line (e.g. via -C) and in a file (via -T), do not
11405 ignore the command-line names.
11407 * m4/uintmax_t.m4: Backport to autoconf 2.13.
11409 * doc/tar.texi: Clarify getdate authorship.
11411 1999-11-23 Paul Eggert <eggert@twinsun.com>
11413 * lib/Makefile.am (DISTCLEANFILES): New macro.
11415 * configure.in (tar_fnmatch_hin):
11416 Remove; it runs afoul of a bug in autoconf 2.13.
11417 Instead, always link fnmatch.h to some file, even if it's a throwaway.
11419 1999-11-19 Paul Eggert <eggert@twinsun.com>
11421 * m4/largefile.m4: Update serial.
11423 1999-11-18 Paul Eggert <eggert@twinsun.com>
11425 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
11426 the QNX shell, which doesn't propagate exit status of failed
11427 commands inside shell assignments.
11429 1999-11-07 Paul Eggert <eggert@twinsun.com>
11431 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
11433 * configure.in (AC_PREREQ): Bump to 2.13.
11434 (ALL_LINGUAS): Add pt_BR, ja.
11435 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
11436 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
11437 for AIX crossbuilds.
11439 * doc/tar.texi: New node create options for --ignore-failed-read.
11440 Remove unused version control symbols.
11441 Modernize texinfo usage.
11443 * src/tar.c (usage): Add examples.
11445 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
11446 Include fnmatch.h when testing fnmatch.
11448 * src/common.h (collect_and_sort_names): New decl.
11450 * src/list.c (from_header):
11451 Handle 32-bit two's complement negative time stamps
11452 even if the leading octal digit is 2 or 3.
11454 * src/extract.c (set_stat): Remove duplicate code.
11456 * src/create.c (to_chars): Remove trailing newline from warning.
11457 (dump_file): Ignore doors.
11458 (finish_header): Report block numbers with origin 0, not origin 1.
11460 * src/rmt.c: Include getopt.h.
11461 (long_opts): New constant.
11462 (usage): New function.
11463 (main): Implement --help and --version.
11464 Output usage message if arguments are bad.
11466 1999-10-10 Paul Eggert <eggert@twinsun.com>
11468 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
11470 * README: Remove --with-dmalloc.
11471 Add --disable-largefile.
11472 Remove old NeXT dirent problems, or AIX valloc problems.
11473 Remove old union wait advice, and old %lld advice.
11474 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
11476 * doc/tar.texi: Clarify documentation for portable file names.
11478 * configure.in (AM_WITH_DMALLOC): Remove.
11479 (ALL_LINGUAS): Add ja.
11481 * src/tar.c (decode_options):
11482 Invalid dates are now treated as (time_t) -1.
11483 Redo version message to conform to GNU standards.
11485 * src/create.c (dump_file):
11486 Fix typo: last two args to dump_file were interchanged.
11487 * src/update.c (update_archive): Likewise.
11489 * src/common.h (tartime): New decl.
11491 * src/list.c (tartime): Now extern.
11492 (read_and): Invalid headers cause errors, not warnings.
11494 1999-10-03 Paul Eggert <eggert@twinsun.com>
11496 * lib/getdate.y (__attribute__):
11497 Don't use if GCC claims to be before 2.8; this is
11498 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
11500 1999-09-25 Paul Eggert <eggert@twinsun.com>
11502 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
11503 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
11505 * tests/incremen.sh: Add yet another sleep.
11507 1999-09-24 Paul Eggert <eggert@twinsun.com>
11509 * NEWS: A read error now causes a nonzero exit status.
11511 * src/create.c (to_chars): Fix base-256 output.
11513 * src/buffer.c (write_error):
11514 Read error is an error, not just a warning.
11516 1999-09-24 Paul Eggert <eggert@twinsun.com>
11518 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
11520 * src/tar.c (<time.h>): Include.
11521 (time): Declare if not defined.
11522 (confirm): Don't read past EOF.
11523 (long_options, usage): Add --no-same-owner, --no-same-permissions.
11524 (main): Use clock_gettime if available.
11526 * tests/Makefile.am (TESTS): Add incremen.sh
11527 (INCLUDES): Add -I../lib, for fnmatch.h.
11529 * src/update.c (update_archive):
11530 Remove call to name_expand; had no effect.
11531 Use chdir_do to change into directory.
11532 Use deref_stat instead of stat.
11533 Use add_avoided_name to mark names to be avoided; the old method of
11534 setting a bit with the name caused all descendants of that name to
11535 be avoided, in some circumstances.
11537 * tests/incremen.sh: Remove unnecessary sleeps.
11539 * src/names.c (name_next): Go back to using plain chdir.
11540 (name_gather): Use chdir_arg to keep track of arguments to chdir.
11541 (addname): Likewise.
11542 (name_match): Use chdir_do to act on chdir args.
11543 (merge_sort): Moved here from incremen.c.
11544 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
11546 (name_expand): Remove.
11547 (name_from_list): Skip fake names.
11548 Use chdir_do to act on chdir args.
11549 (struct avoided_name): New struct.
11550 (avoided_names): New var.
11551 (add_avoided_name, is_avoided_name): New functions.
11553 * src/system.h (stat, lstat): Define in terms of statx on
11554 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
11555 (UCHAR_MAX): New macro.
11556 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
11558 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
11560 * src/incremen.c (<time.h>): Remove include; no longer used.
11561 (time): Remove decl.
11562 (time_now): Remove.
11563 (get_directory_contents): Use deref_stat.
11564 Consider a subdirectory to be all new only if
11565 listed_incremental_option or if it its timestamp is newer than the
11567 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
11568 (read_directory_file): Now extern. Do not set time_now.
11569 (write_directory_file): Renamed from write_dir_file.
11570 Use start_time instead of time_now.
11571 (compare_names, collect_and_sort_names): Move to names.c.
11573 * src/mangle.c (<time.h>): Remove; not used.
11574 (time): Do not declare.
11576 * src/misc.c (chdir_from_initial_wd): Remove.
11577 (deref_stat): New function.
11578 (struct wd): New struct.
11579 (wd, wds, wd_alloc): New variables.
11580 (chdir_arg, chdir_do): New function.
11582 * src/compare.c (get_stat_data): Use deref_stat.
11584 * src/common.h (name_expand): Remove.
11586 * src/list.c (time): Declare if not defined.
11587 (base_64_digits): Moved here from create.c.
11588 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
11590 (read_and): Don't get time from header unless we need it now;
11591 as getting time can cause duplicate diagnostics if bogus.
11592 Remove "Hmm, " from diagnostic.
11593 Use "Skipping to next header" uniformly.
11594 (from_header): Renamed from from_chars. All uses changed.
11595 Allow different forms for unportable 2's complement numbers.
11596 Don't check for extended forms when parsing checksums.
11597 Parse base-256 output.
11598 (gid_from_header): Renamed from gid_from_chars. All uses changed.
11599 (major_from_header): Renamed from major_from_chars. All uses changed.
11600 (minor_from_header): Renamed from minor_from_chars. All uses changed.
11601 (mode_from_header): Renamed from mode_from_chars. All uses changed.
11602 (off_from_header): Renamed from off_from_chars. All uses changed.
11603 (size_from_header): Renamed from size_from_chars. All uses changed.
11604 (time_from_header): Renamed from time_from_chars. All uses changed.
11605 Warn about future timestamps.
11606 (uid_from_header): Renamed from uid_from_chars. All uses changed.
11607 (uintmax_from_header): Renamed from uintmax_from_chars.
11609 (tartime): New function, incorporating isotime.
11611 (print_header): Use tartime.
11613 * src/create.c (to_chars): Fix typo in decl.
11614 Don't assign through char const *.
11615 Rename name_expand back to collect_and_sort_names.
11617 * src/extract.c (<time.h>): No need to include.
11618 (time): No need to declare.
11619 (now): Remove variable.
11620 (extr_init): Don't initialize `now'.
11621 Increment same_permissions_option and same_owner_option if we_are_root
11622 is nonzero; this supports the new --no-same-owner option.
11623 (set_stat): Use start_time instead of `now'.
11625 * src/create.c (struct link): Remove unused linkcount member.
11626 (base_64_digits): Move to list.c.
11627 (base_8_digits): Remove.
11628 (to_octal): New function, with some of old contents of to_base.
11630 (to_base256): New function.
11631 (to_chars): Use base 256, not base 64, for huge values.
11632 (mode_to_chars): Don't use two's complement in GNU format or POSIX
11634 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
11635 it means we have an incremental dump where we don't know whether this
11636 is a top-level call.
11637 Use deref_stat instead of statx / stat / lstat.
11638 Cast result of alloca.
11639 Check for dates if 0 < top_level, not if listed_incremental_option.
11640 Move multiple-link check after directory check.
11641 Do not dump avoided names.
11642 Dump hard links to symbolic names as links, not as separate
11644 start_header cannot return a null pointer, so don't test for it.
11645 Likewise for find_next_block.
11647 * src/buffer.c, src/common.h (<human.h>): Include.
11648 (read_error): Read error is an error, not just a warning.
11649 (print_total_written): Also print human-readable byte count, and
11651 (open_archive, flush_write): Use start_time, not current time.
11652 (flush_read): Report about garbage bytes ignored at end of archive,
11653 but act on non-garbage bytes (instead of ignoring them).
11654 (new_volume): Use WARN for warnings.
11657 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
11659 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
11661 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
11663 * lib/Makefile.am (noinst_HEADERS):
11664 Rename fnmatch.h to fnmatch.hin; add human.h.
11665 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
11666 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
11668 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
11670 * lib/fnmatch.c (strchrnul):
11671 Define to __strchrnul if _LIBC, to our own replacement otherwise.
11672 Do not define if !_LIBC and if it already exists.
11673 (internal_fnmatch): Use it.
11675 * configure.in (tar_LDADD): New variable, used only when linking tar.
11676 (rmt_LDADD): Similarly, for rmt.
11677 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
11678 fnmatch.c; otherwise, use the system fnmatch.h.
11680 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
11681 Modernize sample backup script.
11683 * THANKS: Martin Goik's email address has changed.
11685 * m4/fnmatch.m4: New file.
11687 1999-09-03 Paul Eggert <eggert@twinsun.com>
11689 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
11690 Use EINVAL instead.
11692 1999-08-29 Paul Eggert <eggert@twinsun.com>
11694 * lib/getdate.y (get_date):
11695 Rename outermost local `probe' to `quarter'.
11696 Rename latter local `tm' to probe_tm.
11697 From: Jim Meyering <meyering@ascend.com>
11698 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
11700 1999-08-28 Paul Eggert <eggert@twinsun.com>
11702 * lib/getdate.y (PC): New macro; use it when possible.
11703 (number): Handle `Nov 11 1996' example correctly.
11704 See Risks Digest 20.55 (1999-08-27)
11705 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
11707 1999-08-23 Paul Eggert <eggert@twinsun.com>
11709 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
11711 Remove minor cases of lint from many source files: this includes
11712 unnecessary casts, uses of NULL, etc.
11714 * configure.in (AC_PROG_YACC): Remove.
11715 (YACC): Always use bison.
11716 (AC_STRUCT_TIMEZONE): Add.
11717 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
11719 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
11722 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
11723 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
11725 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
11727 * src/common.h (merge_sort): Remove decl; no longer exported.
11729 * src/system.h (voidstar): Remove.
11730 (memcpy, memcmp): Cast args.
11731 ("xalloc.h"): Add include.
11732 (xmalloc, xrealloc): Remove decl.
11734 * src/mangle.c (time): Do not declare if defined.
11735 (first_mangle, mangled_num): Remove.
11737 * src/list.c (from_chars): Report out-of-range values more precisely.
11738 (off_from_chars): Do not allow negative offsets.
11739 (uid_from_chars): Allow negative uids.
11741 * src/create.c (linklist): Now static.
11742 (to_chars): Fix wording of message to match from_chars.
11744 * src/misc.c (merge_sort): Move to incremen.c.
11745 * src/incremen.c (merge_sort): Move here from misc.c; now static.
11746 It's too painful to make it both generic and portable.
11747 (read_directory_file): "timestamp" -> "time stamp" in messages.
11749 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
11750 (usage): Fix misspelling.
11751 (OPTION_STRING): -y is now -I.
11752 (decode_options): Use -1, not EOF, for getopt_long result.
11753 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
11754 Handle operands after any "--" argument.
11755 (main): Report any output errors.
11757 * src/rmt.c (main): status is ssize_t, not long.
11759 * src/names.c (name_gather): Handle trailing -C option correctly.
11760 (addname): use memcpy, not strncpy, to copy a string of known length.
11761 (name_match): Handle trailing -C option correctly.
11762 Propagate -C option to following files.
11763 (name_match, name_scan): Remove redundant matching code.
11765 * src/buffer.c (open_archive): Use American spelling in diagnostic.
11767 * lib/getdate.y: Major rewrite. Add copyright notice.
11768 (<stdio.h>): Include only if testing.
11770 (ISLOWER): New macro.
11771 (<string.h>): Include if HAVE_STRING_H, not USG.
11773 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
11775 (EPOCH_YEAR): Renamed from EPOCH.
11776 (table): Renamed from TABLE.
11777 (meridian): Now an anonymous enum.
11778 (struct parser_control): New type.
11779 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
11780 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
11781 (%pure_parser): Added, so that the parser is pure.
11782 (%union): Removed; the type is now just plain int.
11783 All %type directives removed.
11784 (tLOCAL_ZONE): New %token.
11785 (month_day_table): Renamed from MonthDayTable.
11786 (gmtime, localtime, mktime, time): Declare only if not defined.
11787 (meridian_table): New table.
11788 (dst_table): New table.
11789 (units_table): renamed from UnitsTable.
11790 (relative_time_table): Renamed from OtherTable.
11791 (time_zone_table): Renamed from TimezoneTable. Modernized.
11792 (military_table): Renamed from MilitaryTable.
11793 (to_hour): Renamed from ToHour.
11794 (to_year): Renamed from ToYear.
11795 (lookup_zone): New function.
11796 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
11798 (yylex): Now reentrant. All callers changed.
11799 (get_date): Add support for local time zone abbreviations.
11802 1999-08-20 Paul Eggert <eggert@twinsun.com>
11804 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
11806 * src/create.c (to_chars): Generate GNU base-64 representation
11807 if we are generating an old or new GNU format tar file for a
11808 number that can't be represented with the POSIX format.
11810 * configure.in (AC_CHECK_FUNCS): Add fchdir.
11811 (AM_FUNC_GETLINE): Add.
11812 (LIBOBJS): Add getline.o to workaround comment.
11813 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
11814 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
11815 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
11816 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
11817 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
11818 lib/save-cwd.h, m4/getline.m4: New files.
11820 * src/misc.c (<save-cwd.h>): Include.
11821 (chdir_from_initial_wd): New function.
11823 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
11824 (name_gather): Handle `-C x -C y' correctly.
11825 Do not rely on addname to handle -C.
11826 (addname): New CHANGE_DIR parameter. All callers changed.
11827 Remove ugly calls to getcwd; no longer needed.
11828 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
11830 * src/incremen.c (listed_incremental_stream): New var.
11831 (read_directory_file): Remove arbitrary limits on file name length.
11832 Do not attempt to get the working directory; we can bypass this
11833 on fchdir hosts. Open the listed_incremental_option file for both
11834 read and write instead of opening it twice. Check for I/O errors
11835 when doing I/O to this file. Check for invalid data in the file,
11836 and report line numbers of invalid data.
11837 (write_dir_file): Likewise.
11838 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
11839 Do not invoke write_dir_file; that's our caller's responsibility.
11841 * src/list.c (max): New macro.
11842 (isotime): Now takes time_t, not time_t *. Report the decimal values
11843 of times that can't be broken down.
11844 (print_header): Don't assume that major and minor device numbers can
11845 fit into uintmax_t.
11847 * src/common.h (struct name): change_dir is now char const *.
11848 (write_directory_file): Remove unused decl.
11849 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
11850 chars; the old `sizeof (b)' broke when b was a pointer not an array.
11851 (chdir_from_initial_wd): New decl.
11852 (addname): New 2nd arg.
11854 * THANKS: Torsten Lull -> Catrin Urbanneck
11856 1999-08-18 Paul Eggert <eggert@twinsun.com>
11858 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
11859 Don't depend on ac_cv_func variables.
11860 From Albert Chin-A-Young <china@thewrittenword.com>.
11862 1999-08-18 Paul Eggert <eggert@twinsun.com>
11864 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
11866 * m4/signedchar.m4: New file.
11867 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
11868 * src/system.h (signed_char): New macro.
11869 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
11870 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
11872 * src/create.c (write_eot): Write at least two zero blocks.
11874 * src/extract.c (extract_archive): Fix sparse array bug:
11875 we did not find end of array correctly.
11877 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
11878 Don't assume find_next_block yields nonnull.
11879 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
11880 * src/list.c (skip_extended_headers): Likewise.
11882 * src/list.c (read_and, list_archive): Simplify code.
11883 (read_header): Fix computation of signed checksums on machines where
11885 Do not consider a block to be zero unless all its bytes are zero,
11886 even the checksum bytes. Do not attempt to parse the checksum of
11887 a zero block. Fix memory leak with long names and links.
11888 (from_chars): Accommodate a buggy tar that outputs leading NUL
11889 if the previous field overflows.
11891 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
11892 \?, for portability to non-ASCII hosts.
11894 1999-08-16 Paul Eggert <eggert@twinsun.com>
11896 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
11898 * src/extract.c (make_directories): Do not chown intermediate
11899 directories, even if we are root.
11901 * src/list.c (read_header): Fix bugs when interpreting
11902 POSIX-compliant headers that do not contain null bytes in the
11903 header or link names.
11905 1999-08-14 Paul Eggert <eggert@twinsun.com>
11907 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
11909 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
11910 (AC_HEADER_SYS_WAIT): Add.
11911 (AC_REPLACE_FUNCS): Add waitpid.
11912 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
11913 * lib/waitpid.c: New file.
11914 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
11915 * src/system.h (WCOREDUMP): Remove; no longer used.
11916 (WIFSTOPPED): Likewise.
11917 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
11918 * src/buffer.c (child_open_for_compress): Undo previous change.
11919 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
11920 (new_volume): Likewise.
11922 * src/buffer.c, src/extract.c, src/incremen.c (time):
11923 Don't declare if defined.
11924 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
11925 * src/incremen.c (read_directory_file):
11926 Invoke `time' the same way everyone else does.
11927 Check validity of --listed-incremental file contents a bit better.
11928 Do not worry about --after-date-option; tar.c now checks this.
11929 * src/list.c (isotime): Report ??? if localtime returns null.
11930 Don't assume years fit into four digits.
11931 Don't append trailing newline.
11932 (print_header): Report ??? if localtime returns null;
11933 Don't assume years fit into four digits.
11935 * src/compare.c (diff_archive): Do not fall back on absolute name
11936 when --absolute-names is not specified.
11938 * src/create.c (start_header):
11939 Include text of ignored filesystem prefix in warning.
11940 (create_archive): Check for excluded names when doing incremental
11941 pass through directory.
11942 (dump_file): Do not dump old files explicitly given on command line
11943 when using --listed-incremental. Do not strip ./ prefix from names.
11945 * src/tar.c: -g now implies after_date_option = 1.
11946 -g and -N are now incompatible options.
11948 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
11950 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
11952 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
11953 incremental headers as POSIX prefixes.
11955 1999-08-11 Paul Eggert <eggert@twinsun.com>
11957 * NEWS, configure.in: Version 1.13.6.
11959 * configure.in (ALL_LINGUAS): Add pt_BR.
11960 * po/pt_BR.po: New file.
11962 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
11963 Renamed from tar.info and header.texi; adjust actions so that
11964 they work in other directories.
11966 * doc/tar.texi: Add -y and --bzip2.
11967 Patterns containing / now exclude only file names whose prefix match.
11969 * lib/exclude.h (excluded_filename): New option parameter.
11970 (add_exclude_file): New ADD_FUNC parameter.
11971 (excluded_pathname): Remove decl.
11972 * lib/exclude.c (_GNU_SOURCE):
11973 Remove; no longer needed since we don't use FNM_ macros.
11974 (excluded_filename): Renamed from excluded_filename_opts.
11975 (excluded_filename, excluded_pathname): Remove.
11976 (add_exclude_file): New ADD_FUNC parameter.
11978 * po/POTFILES.in: Add lib/quotearg.c.
11980 * src/buffer.c (_GNU_SOURCE): Define.
11981 (<fnmatch.h>): Include unconditionally.
11982 (child_open_for_compress): Dup after closing, to avoid possible file
11983 descriptor exhaustion.
11984 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
11985 (flush_read): Likewise.
11987 * src/common.h (LG_8, LG_64): New macros.
11988 (excluded_with_slash, excluded_without_slash): New vars.
11989 (excluded): Remove.
11990 (base_64_digits): New decl.
11991 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
11992 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
11994 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
11995 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
11997 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
11998 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
11999 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
12000 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
12001 respectively. All definitions and uses changed.
12002 (excluded_name): New decl.
12004 * src/compare.c (diff_archive):
12005 Open files with O_NONBLOCK instead of O_NDELAY.
12007 * src/create.c (base_64_digits): New constant.
12008 (base_8_digits): New macro.
12009 (MAX_VAL_WITH_DIGITS): New macro.
12010 (to_base): First half of old to_oct. Support base 64 too.
12011 (to_chars): Other half of old to_oct, for 64-bit support.
12012 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
12013 (gid_substitute, uid_substitute): Look up names dynamically if
12014 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
12015 (mode_to_chars): Renamed from mode_to_oct.
12016 Support negative values in all the _to_chars functions.
12017 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
12018 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
12019 (dump_file): Inspect entire pathname, not just new file name
12020 component, when deciding whether to exclude it.
12022 * src/extract.c (extract_archive):
12023 Open files with O_NONBLOCK instead of O_NDELAY.
12025 * src/incremen.c (get_directory_contents):
12026 Inspect entire pathname, not just new file name
12027 component, when deciding whether to exclude it.
12029 * src/list.c (<fnmatch.h>): Do not include.
12030 (from_chars): Renamed from from_oct. New parameter specifying
12031 the negative of the minimum allowed value. Support negative
12032 and base-64 values.
12033 (base64_map): New var.
12034 (base64_init): New function.
12035 (print_header): Output numeric uids and gids if numeric_owner_option.
12037 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
12039 * src/names.c (_GNU_SOURCE): Define.
12040 (<fnmatch.h>): Include unconditionally.
12041 (excluded_name): New function, taking over duties of excluded_pathname.
12044 * src/rmt.c (decode_oflag): New function.
12045 (main): Use it to support symbolic open flags.
12047 * src/rtapelib.c (encode_oflag): New function.
12048 (rmt_open__): Do not allow newlines in the path.
12049 Propagate errno correctly.
12050 Decode symbolic open flags, if present.
12052 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
12055 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
12056 New -y or --bzip2 option.
12057 (add_filtered_exclude): New function.
12058 (decode_options): Put excluded patterns with / into
12059 excluded_with_slash, and without / into excluded_without_slash.
12060 Compare newer_mtime_option to its new initial value
12061 TYPE_MINIMUM (time_t) when deciding whether more than one
12062 threshold date was specified.
12064 1999-07-20 Paul Eggert <eggert@twinsun.com>
12066 * NEWS, configure.in: Version 1.13.5.
12068 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
12070 * src/buffer.c (new_volume): Likewise.
12071 * src/incremen.c (read_directory_file): Likewise.
12072 * src/tar.c (decode_options):
12073 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
12076 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
12077 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
12079 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
12080 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
12081 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
12082 Define to 0 if the corresponding S_IF* macro is not defined.
12083 (mkfifo): Do not define if already defined, or if S_IFIFO
12086 * src/compare.c (diff_archive): Use HAVE_READLINK, not
12087 S_ISLNK, to determine whether to invoke readlink.
12088 * src/create.c (dump_file): Likewise.
12090 * src/extract.c (set_mode):
12091 Do not chmod unless we are root or the -p option was given;
12092 this matches historical practice.
12093 (unlink_destination): New function, which checks for unlink failures.
12094 (maybe_recoverable): Stay quiet if -U.
12095 (extract_archive): Use O_EXCL if unlink_first_option.
12096 Report unlink failures.
12097 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
12098 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
12101 * src/incremen.c (get_directory_contents): Depend on
12102 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
12104 * src/list.c: Remove S_IS* ifdefs.
12105 * src/misc.c (maybe_backup_file): Likewise.
12107 * src/misc.c (maybe_backup_file):
12108 "Virtual memory exhausted" -> "Memory exhausted",
12109 to conform to the other places this message is issued.
12111 * src/mangle.c (extract_mangle):
12112 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
12114 * src/rtapelib.c (rmt_open__):
12115 Remove typo that caused us to omit the first char
12118 1999-07-16 Paul Eggert <eggert@twinsun.com>
12120 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
12122 * doc/tar.texi: A path name is excluded if any of its file name
12123 components matches an excluded pattern, even if the path name was
12124 specified on the command line.
12125 * src/create.c (create_archive): Likewise.
12126 * src/list.c (read_and): Likewise.
12127 * src/update.c (update_archive): Likewise.
12128 * lib/exclude.h (excluded_pathname): New decl.
12129 * lib/exclude.c (_GNU_SOURCE): Define.
12130 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
12131 (excluded_filename_opts): New function.
12132 (excluded_pathname): New function.
12134 * lib/Makefile.am (EXTRA_DIST):
12135 xstrtol.c moved here from libtar_a_SOURCES.
12136 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
12137 Remove xstrtoul.c; no longer needed.
12138 * lib/xstrtol.c: Remove.
12140 * src/tar.c (decode_options):
12141 Set newer_time_option to TYPE_MINIMUM, so that
12142 negative timestamps are handled correctly.
12143 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
12144 uniformity (and so that we don't need to have the other fns).
12145 (main): Remove call to init_total_written; no longer needed.
12147 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
12148 checks for unsigned long and long long.
12149 * src/arith.c: Remove.
12150 * src/Makefile.am (tar_SOURCES): Remove arith.c.
12151 * po/POTFILES.in: Remove src/arith.c.
12152 * src/arith.h: Use double, to simplify configuration gotchas.
12153 (tarlong): Now double.
12154 (TARLONG_FORMAT): New macro.
12155 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
12156 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
12157 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
12158 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
12159 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
12160 mult_tarlong, print_tarlong): Remove. All callers replaced with
12163 * src/common.h (init_total_written): Remove decl.
12165 * src/buffer.c (total_written):
12166 Remove; replaced with prev_written + bytes_written.
12167 (prev_written): New var.
12168 (init_total_written): Remove.
12169 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
12171 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
12172 Make sure that we can shift, multiply
12173 and divide unsigned long long values; Ultrix cc can't do it.
12175 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
12176 Check for any unknown bits, not just unknown bits left of the leftmost
12179 * lib/quotearg.c (quotearg_buffer):
12180 Don't quote spaces if C quoting style.
12181 * src/list.c (from_oct):
12182 Use C quoting style for error; omit trailing NULs.
12184 1999-07-14 Paul Eggert <eggert@twinsun.com>
12186 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
12188 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
12189 <inttypes.h> defines strtoumax as a macro (and not as a function).
12190 HP-UX 10.20 does this.
12192 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
12193 * PORTS, README, TODO, doc/tar.texi: Likewise.
12195 1999-07-12 Paul Eggert <eggert@twinsun.com>
12197 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
12198 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
12200 * src/list.c (decode_header):
12201 Do not assume that S_IFBLK and S_IFCHR are defined.
12203 * src/create.c (start_header): Do not assume S_IFMT is defined.
12204 (dump_file): Remove unnecessary check for screwy apollo lossage.
12205 Do not assume S_IFBLK and S_IFCHR are defined.
12207 * src/extract.c (extract_archive):
12208 Test whether S_IFCHR and S_IFBLK are nonzero,
12209 not whether they are defined, for consistency with other tests.
12211 * src/buffer.c (is_regular_file):
12212 Don't succeed on files that we can't access due to
12213 permissions problems.
12214 (open_archive): Fix wording on fatal error message.
12215 Don't bother to stat /dev/null if the archive is not a character
12218 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
12219 Report an error, not a warning, for I/O errors.
12220 (process_rawdata, process_dumpdir, diff_sparse_files):
12221 Change ungrammatical "Data differs" to "Contents differ".
12222 (get_stat_data): Find hidden files on AIX.
12223 Accept file name as argument; all uses changed.
12224 (get_stat_data, diff_archive): Use system error message for
12225 nonexistent files rather than rolling our own.
12226 (diff_archive): Unknown file types are errors, not warnings.
12227 Normalize spelling of message to "File type differs".
12228 Use get_stat_data to get link status, for consistency.
12229 Do not inspect st_rdev for fifos.
12230 Do not assume st_mode values contain only file types and mode bits.
12231 Check for mode changes and device number changes separately.
12233 * src/update.c (append_file):
12234 Open the file before statting it, to avoid a race.
12235 Complain about file shrinkage only when we reach EOF.
12237 1999-07-08 Paul Eggert <eggert@twinsun.com>
12239 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
12241 * configure.in (AC_EXEEXT): Add.
12243 * lib/Makefile.am (noinst_HEADERS):
12244 Add basename.h, exclude.h. Remove full-write.h.
12245 (libtar_a_SOURCES): Add exclude.c.
12247 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
12249 * lib/full-write.c: Include safe-read.h instead of full-write.h.
12250 * lib/safe-read.h (safe_read): New decl.
12251 * src/rmt.c: Include safe-read.h.
12252 * src/rtapelib.c: Include basename.h, save-read.h.
12253 (rmt_open__): Use base_name to compute base name.
12256 Include basename.h, exclude.h; don't include full-write.h.
12257 (exclude_option): Remove decl.
12258 (excluded): New decl.
12259 (add_exclude, add_exclude_file, check_exclude): Remove decls.
12261 * src/list.c (read_and):
12262 Use excluded_filename instead of check_exclude.
12263 Check base name of incoming file name, not entire file name, when
12264 deciding whether to exclude it.
12266 * src/create.c (finish_sparse_file):
12267 Use excluded_filename instead of check_exclude.
12268 Don't bother to stat excluded file names.
12269 * src/incremen.c (get_directory_contents): Likewise.
12271 * src/names.c (exclude_pool, exclude_pool_size,
12272 allocated_exclude_pool_size, simple_exclude_array,
12273 simple_excludes, allocated_simple_excludes,
12274 pattern_exclude_array, pattern_excludes,
12275 allocated_pattern_excludes, add_exclude, add_exclude_file,
12277 Remove; now done in ../lib/exclude.c.
12279 * src/tar.c (decode_options): Initialize `excluded'.
12280 Use new add_exclude_file and add_exclude functions.
12282 1999-07-05 Paul Eggert <eggert@twinsun.com>
12284 * m4/gettext.m4: Use changequote rather than [[ ]].
12286 * lib/safe-read.c: Renamed from lib/full-read.c.
12287 (safe_read): Renamed from full_read. All uses changed.
12288 * lib/safe-read.h, lib/full-write.h: New files.
12289 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
12290 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
12291 * lib/full-write.c: Include full-write.h.
12292 * src/common.h: Include full-write.h, safe-read.h.
12293 * src/system.h: (full_read, full_write): Remove decls.
12295 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
12297 * src/system.h (bindtextdomain, textdomain): undef before
12298 defining, to avoid preprocessor warnings with --disable-nls
12299 on hosts whose locale.h includes libintl.h.
12301 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
12302 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
12303 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
12306 1999-07-02 Paul Eggert <eggert@twinsun.com>
12308 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
12309 * m4/mktime.m4: New file.
12310 * m4/Makefile.am.in, m4/README: Remove these files.
12311 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
12312 remove README, Makefile.am.in.
12313 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
12314 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
12315 not AM_FUNC_MKTIME.
12317 * src/tar.c: Include signal.h.
12318 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
12319 (main): Ensure SIGCHLD is not ignored.
12321 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
12322 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
12323 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
12324 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
12325 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
12326 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
12327 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
12328 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
12329 they don't overlap with char codes. Use an enum instead of a lot
12332 * src/system.h (ISASCII): Remove.
12333 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
12334 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
12335 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
12336 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
12337 LONG_MAX): New macros.
12339 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
12340 (read_directory_file): Cast ISSPACE arg to unsigned char.
12341 * src/misc.c (ISPRINT): Remove; now in system.h.
12342 (remove_any_file): Add brackets to pacify gcc -Wall.
12343 * src/list.c: Don't include <ctype.h>; system.h already does this.
12344 (ISODIGIT, ISSPACE): Remove; now in system.h.
12345 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
12347 (from_oct): Cast ISSPACE arg to unsigned char.
12349 * src/create.c (mode_to_oct): Translate modes from internal to
12351 * src/list.c (mode_from_oct): Translate modes from external to
12352 internal form. Do not complain about unrecognized mode bits.
12353 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
12354 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
12356 * src/extract.c: (extr_init, make_directories, extract_archive):
12357 Do not assume mode bits have traditional Unix values.
12358 * src/list.c (decode_mode): Likewise.
12359 * src/create.c (start_header, dump_file): Likewise.
12360 * src/buffer.c (child_open_for_compress,
12361 child_open_for_uncompress, open_archive, (close_archive): Likewise.
12362 * src/compare.c (diff_archive): Likewise.
12364 * src/extract.c (set_mode): Use %04 not %0.4 format.
12365 (extract_sparse_file): Do not use data_block uninitialized.
12366 Check for lseek failures.
12368 * src/rtapelib.c (rmt_lseek__):
12369 Convert lseek whence values to portable integers on the wire.
12370 * src/rmt.c (main): Likewise. Check for whence values out of range.
12372 * src/create.c (finish_sparse_file): Use lseek whence macros
12373 instead of integers.
12374 * src/buffer.c (backspace_output): Likewise.
12375 * src/compare.c (diff_archive, verify_volume): Likewise.
12376 * src/delete.c (move_archive): Likewise.
12377 * src/extract.c (extract_sparse_file): Likewise.
12379 * src/create.c (dump_file): Do not invoke finish_sparse_file
12380 on a negative file descriptor.
12382 * src/buffer.c: Add braces to pacify gcc -Wall.
12384 * src/compare.c (diff_sparse_files): Report lseek errors.
12386 * configure.in (ALL_LINGUAS): Add cs, es, ru.
12388 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
12390 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
12391 message to be internationalized; \a doesn't work with msgfmt.
12393 * src/tar.c (long_options, main, usage, OPTION_STRING):
12394 Remove -E or --ending-file.
12395 * src/list.c (read_and): Likewise.
12396 * src/common.h (ending_file_option): Likewise.
12397 * src/buffer.c (close_archive): Likewise.
12399 * tests/after: Don't run two commands together in a pipeline,
12400 as some old shells mishandle pipeline exit status.
12402 1999-06-28 Paul Eggert <eggert@twinsun.com>
12404 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
12405 * NEWS: Describe changes since 1.12.
12406 * README: Update bug reporting address; move paxutils ref to NEWS.
12408 Handle EINTR correctly.
12409 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
12410 * lib/full-read.c, lib/full-write.c: New files.
12411 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
12412 Prefer full_read to read and full_write to write.
12413 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
12414 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
12416 * src/extract.c (extract_sparse_file): Likewise.
12417 * src/rmt.c (get_string, main, report_error_message,
12418 report_numbered_error): Likewise.
12419 * src/rmt.h (rmtread, rmtwrite): Likewise.
12420 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
12421 rmt_write__, rmt_ioctl__): Likewise.
12422 * src/update.c (append_file): Likewise.
12423 * src/system.h (full_read, full_write): New decls.
12425 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
12426 lib/xmalloc.c, src/arith.c, src/misc.c.
12428 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
12429 New macros. All uses of STDIN and STDOUT changed.
12430 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
12431 instead of 0 and STDOUT_FILENO instead of 1.
12432 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
12433 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
12435 * src/rmt.c (private_strerror): Avoid const. Translate results.
12437 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
12438 in the presence of NFS clock skew.
12440 1999-06-25 Paul Eggert <eggert@twinsun.com>
12442 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
12444 * src/buffer.c (write_archive_buffer): New function.
12445 (child_open_for_compress, flush_write, flush_read): Use it to write
12447 (open_archive): Report error if fstat of archive fails.
12448 Improve efficiency of check for /dev/null.
12449 Also, fix some corner cases with remote archives and /dev/null checking.
12450 (close_archive): Test for input fifo only if not remote.
12451 Truncate output archive only if it's not remote.
12453 * src/misc.c (remove_any_file):
12454 Don't terminate if you see . or ..; just skip them.
12456 1999-06-18 Paul Eggert <eggert@twinsun.com>
12458 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
12460 Output sizes using a format that's more compatible with
12461 traditional tar (and with GNU Emacs).
12462 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
12463 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
12464 Don't subtract 1 from size.
12465 * src/create.c (to_oct): Prepend leading zeros, not spaces.
12466 Output a trailing NUL unless the value won't fit without it.
12467 (finish_header): No need to append NUL to chksum, now that
12468 to_oct is doing it.
12470 1999-06-16 Paul Eggert <eggert@twinsun.com>
12472 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
12474 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
12475 @INTLLIBS@ might invoke rpl_realloc.
12477 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
12478 (intconv): Remove; use xstrto* fns instead.
12479 ("xstrtol.h"): Include.
12480 (check_decimal): Remove.
12481 (long_options, usage, OPTION_STRING, decode_options):
12482 Remove -y, --bzip2, --unbzip2.
12483 (decode_options): Use xget_version instead of get_version.
12484 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
12485 Replace invocations of check_decimal with xstrtoumax.
12487 * tests/preset.in (echo_n, echo_c): Remove.
12489 * tests/after: Don't rely on $echo_c and $echo_n.
12491 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
12492 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
12493 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
12494 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
12495 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
12496 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
12497 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
12498 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
12499 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
12500 m4/xstrtoumax.m4: New files.
12502 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
12503 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
12504 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
12505 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
12506 (AC_CHECK_FUNCS): Remove lchown.
12507 (AC_REPLACE_FUNCS): Remove basename, dirname.
12508 Add lchown, strtol, strtoul.
12509 (jm_FUNC_MKTIME): Add.
12510 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
12511 are also built via the ANSI2KNR-filtering rules.
12512 Use a no-op line to work around bug in automake 1.4 with malloc and
12514 (AC_OUTPUT): Add m4/Makefile.
12516 * lib/Makefile.am (EXTRA_DIST):
12517 Add lchown.c, malloc.c, mktime.c, realloc.c,
12518 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
12519 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
12520 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
12521 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
12522 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
12524 * src/system.h (uintmax_t): Don't declare; configure now does this.
12526 * src/common.h (backup_type): New decl.
12527 * src/common.h, src/misc.c, src/tar.c:
12528 Move include of backupfile.h to common.h.
12530 * src/misc.c (maybe_backup_file):
12531 Pass backup_type to find_backup_file_name.
12533 * src/list.c (print_header): Change sizes of uform and gform from 11 to
12534 UINTMAX_STRSIZE_BOUND.
12536 * doc/tar.texi: Remove --bzip2.
12537 Fix @xref typos reported by latest makeinfo.
12539 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
12541 (M4DIR, ACINCLUDE_INPUTS): New macros.
12542 ($(srcdir)/acinclude.m4): New rule.
12544 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
12545 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
12546 now generated automatically by autoconf.
12548 1999-05-15 Paul Eggert <eggert@twinsun.com>
12550 * doc/tar.texi: Remove -y.
12552 1999-04-09 Paul Eggert <eggert@twinsun.com>
12554 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
12555 (we were allocating too much storage).
12556 (uintmax_t): Don't declare; configure now does this.
12558 * ABOUT-NLS: Update to gettext 0.10.35 edition.
12560 1999-03-22 Paul Eggert <eggert@twinsun.com>
12562 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
12564 * acinclude.m4 (AC_LFS_FLAGS):
12565 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
12566 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
12567 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
12569 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
12570 New macros; needed for latest GNU xmalloc.c.
12572 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
12573 (libtar_a_SOURCES): Add quotearg.c.
12574 * list.c: Include <quotearg.h>.
12575 (from_oct): Add forward decl.
12576 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
12577 (from_oct): Report an error only if TYPE is nonzero.
12578 Quote any funny characters in bad header.
12580 1999-03-20 Paul Eggert <eggert@twinsun.com>
12582 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
12584 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
12585 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
12587 (AC_LFS): Simplify AIX revision number test.
12589 1999-03-17 Paul Eggert <eggert@twinsun.com>
12591 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
12593 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
12594 Remove; it doesn't work that well
12595 with AC_CANONICAL_HOST.
12596 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
12598 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
12600 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
12602 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
12604 * tar.texi: Fix bug-report addr.
12606 * README: Remove --with-included-malloc.
12607 Upgrade version numbers of build software.
12609 1999-03-07 Paul Eggert <eggert@twinsun.com>
12611 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
12613 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
12614 where bindtextdomain and gettext require -lintl.
12615 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
12616 `no' means it failed.
12617 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
12618 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
12619 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
12620 to add anything to the command line (it's all in config.h).
12621 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
12623 1999-03-01 Paul Eggert <eggert@twinsun.com>
12625 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
12627 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
12629 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
12630 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
12631 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
12632 like OFF_MAX, which are not reliable
12633 (e.g. OFF_MAX in AIX 4.2 is incorrect).
12634 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
12635 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
12637 * src/incremen.c (get_directory_contents):
12638 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
12639 Have statx depend on STX_HIDDEN, not AIX.
12641 * src/create.c (to_oct):
12642 New parameter substitute, giving a substitute value to use
12643 when the original value is out of range. Do not append a space to the
12644 output; modern tars don't. When a value is out of range, specify the
12645 maximum value, not the number of bits.
12646 (GID_NOBODY, UID_NOBODY): New macros.
12647 (gid_to_oct, uid_to_oct): Use them as substitutes.
12648 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
12649 (dump_file): Check whether the file changed as we read it.
12651 * src/rmt.c (main): Remove suspicious AIX/386 code.
12653 1999-02-19 Paul Eggert <eggert@twinsun.com>
12655 * intl/localealias.c (read_alias_file): Don't assume that memcpy
12656 returns a type compatible with char *; it doesn't on SunOS
12657 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
12659 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
12661 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
12662 * doc/tar.texi: Add --bzip2, --unbzip2 options.
12664 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
12666 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
12667 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
12668 * acinclude.m4 (AM_WITH_NLS):
12669 Update to latest gettext version (serial 5).
12670 (AC_LFS_FLAGS): New macro
12671 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
12672 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
12673 Work properly in cross-compilation scenario, by checking for getconf
12674 with AC_CHECK_TOOL and by ditching uname in favor of
12675 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
12677 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
12678 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
12679 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
12680 since getdate.y now uses ANSI code.
12682 * config.guess, config.sub: New files; taken from automake 1.4.
12684 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
12685 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
12686 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
12687 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
12688 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
12689 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
12690 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
12692 1999-02-01 Paul Eggert <eggert@twinsun.com>
12694 * src/tar.c: Update copyright.
12698 1999-02-01 Paul Eggert <eggert@twinsun.com>
12700 * NEWS, configure.in: Version 1.12.64004
12702 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
12704 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
12706 * src/extract.c (extract_archive): Fix bug when extracting sparse
12707 files: they were trashing the tar file header.
12709 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
12710 Add -y or --bzip2 or --bunzip2 option.
12712 1999-01-30 Paul Eggert <eggert@twinsun.com>
12714 * src/names.c (cached_no_such_uname, cached_no_such_gname,
12715 cached_no_such_uid, cached_no_such_gid): New vars.
12716 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
12717 Cache failures, too.
12719 * src/tar.c (decode_options):
12720 Don't pass names longer than UNAME_FIELD_SIZE to
12721 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
12723 1999-01-27 Paul Eggert <eggert@twinsun.com>
12725 * NEWS, configure.in: Version 1.12.64003
12727 * src/buffer.c (backspace_output, close_archive): Cast
12728 rmtlseek position arg to off_t, for benefit of K&R compilers
12730 * src/compare.c (verify_volume): Likewise.
12732 * NEWS, configure.in: Version 1.12.64002
12734 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
12735 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
12736 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
12737 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
12738 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
12739 uid_from_oct): Likewise.
12741 1999-01-25 Paul Eggert <eggert@twinsun.com>
12743 * incremen.sh: Fix timing bug in regression test.
12745 1999-01-22 Paul Eggert <eggert@twinsun.com>
12747 * NEWS, configure.in: Update version
12749 * Makefile.am (localedir): Change to $(datadir)/locale.
12750 (DEFS): New macro, defining LOCALEDIR.
12751 (tar.o, tar._o, rmt.o, rmt._o): Remove.
12752 (INCLUDES): Add -I..
12754 * Makefile.am (localedir): Change to $(datadir)/locale.
12756 1999-01-21 Paul Eggert <eggert@twinsun.com>
12758 * NEWS, README, configure.in: Unofficial version 1.12.64001.
12760 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
12761 * src/Makefile.am (localedir): Likewise.
12762 (DEFS): New macro, defining LOCALEDIR.
12763 (tar.o, tar._o, rmt.o, rmt._o): Remove.
12764 (INCLUDES): Add `-I..'.
12766 * tests/incremen.sh: Fix timing bug.
12768 1999-01-20 Paul Eggert <eggert@twinsun.com>
12770 * NEWS, README, configure.in: Unofficial version 1.12.64000.
12771 `lfs.7' changed to `64000' in version number
12772 to conform to gnits standards.
12774 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
12775 mkinstalldirs, ansi2knr.c: Update to latest public versions.
12777 Rebuild with automake 1.4 and autoconf 2.13, to work around some
12780 1998-12-07 Paul Eggert <eggert@twinsun.com>
12782 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
12784 * src/list.c (read_header):
12785 Accept file names as specified by POSIX.1-1996 section 10.1.1.
12787 1998-11-30 Paul Eggert <eggert@twinsun.com>
12789 * configure.in: Quote the output of uname.
12791 * src/extract.c (set_stat): chmod after chown even when not root;
12792 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
12794 1998-11-15 Paul Eggert <eggert@twinsun.com>
12796 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
12798 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
12799 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
12801 1998-10-28 Paul Eggert <eggert@twinsun.com>
12803 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
12805 * src/system.h (voidstar): Use void * if __STDC__ is defined,
12806 not merely nonzero.
12808 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
12809 On many installations, rexec is disabled.
12811 1998-08-07 Paul Eggert <eggert@twinsun.com>
12813 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
12815 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
12816 for nameless users and groups.
12818 1998-02-17 Paul Eggert <eggert@twinsun.com>
12820 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
12821 * NEWS, README: Add explanation of why this isn't an official version.
12823 1998-02-02 Paul Eggert <eggert@twinsun.com>
12825 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
12826 This is an unofficial version.
12828 1997-12-17 Paul Eggert <eggert@twinsun.com>
12830 * src/incremen.c (ST_DEV_MSB): New macro.
12831 (NFS_FILE_STAT): Use most significant bit of st_dev,
12832 even if it's unsigned.
12834 1997-12-08 Paul Eggert <eggert@twinsun.com>
12836 * src/system.h (ST_NBLOCKS): Fix typo in definition.
12838 1997-11-19 Paul Eggert <eggert@twinsun.com>
12840 * configure.in (HAVE_INTTYPES_H):
12841 Don't ignore cache variable if it's already set.
12843 1997-11-10 Paul Eggert <eggert@twinsun.com>
12845 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
12846 * src/delete.c (records_read): Now off_t.
12847 (move_archive): Don't assume mt_count is of type daddr_t.
12849 1997-10-30 Paul Eggert <eggert@twinsun.com>
12851 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
12852 Set to appropriate values if large file support
12853 needs explicit enabling.
12854 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
12856 New macros to configure.
12857 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
12859 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
12860 major_t, minor_t, ssize_t): New macros.
12862 * src/arith.h (TARLONG_FORMAT):
12863 Fix typo: %uld -> %lu. Use unsigned when long long
12865 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
12866 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
12868 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
12869 2nd arg is now unsigned long.
12871 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
12872 (prepare_record_buffer): Arg is now size_t.
12873 Remove now-useless casts.
12875 (main): Use `long' for status, so that it can store ssize_t.
12876 Use daddr_t, mode_t, size_t, off_t when appropriate.
12877 Convert daddr_t and off_t values ourselves, since they might be longer
12878 than long. Convert other types using `long' primitives.
12879 When processing MTIOCTOP, do not try to pass resulting
12880 count back, since it won't work (it could be too large) and it's
12881 not expected anyway.
12884 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
12885 now-useless casts. Use unsigned long to print *_t types, except use
12886 STRINGIFY_BIGINT for off_t.
12887 (update_archive): Cast -1 to dev_t when necessary.
12889 * src/tar.c (check_decimal):
12890 Now returns 1 if successful, 0 otherwise, and returns
12891 uintmax_t value into new arg. Check for arithmetic overflow.
12892 (decode_options): Avoid overflow if record_size fits in size_t but not int.
12893 Check for overflow on user or group ids.
12895 * src/compare.c (diff_init, process_rawdata, read_and_process,
12896 diff_sparse_files, diff_archive):
12897 Use off_t, pid_t, size_t, ssize_t when appropriate.
12898 Remove now-useless casts. Use unsigned long to print *_t types,
12899 except use STRINGIFY_BIGINT for off_t.
12901 (process_noop, process_rawdata, process_dumpdir, read_and_process):
12902 Size arg is now size_t.
12904 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
12905 when allocating buffer.
12908 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
12909 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
12910 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
12913 (get_status_string, get_status_off): New function.
12914 (get_status): Now returns long, so that it can store ssize_t.
12915 Invoke get_status_string to do the real work.
12916 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
12917 (rmt_lseek__): Now returns off_t, using new get_status_off function.
12918 (rmt_ioctl__): Convert mt_count by hand,
12919 since it might be longer than long.
12921 * src/mangle.c (extract_mangle):
12922 Check for overflow when converting off_t to size_t.
12923 Use off_t, size_t when appropriate. Remove now-useless casts.
12925 * src/system.h (mode_t): Remove; now done by autoconf.
12926 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
12927 Return number of ST_NBLOCKSIZE-byte blocks,
12928 not number of 512-byte blocks;
12929 this also helps to avoid overflow.
12930 (st_blocks): Declare if needed.
12931 (ST_NBLOCKSIZE): New macro.
12932 (<limits.h>, <inttypes.h>): Include if available.
12933 (CHAR_BIT): New macro.
12934 (uintmax_t): New typedef.
12935 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
12936 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
12937 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
12939 * src/names.c (name_init):
12940 Fix typo in error message: FILE* was passed, but char*
12943 (read_name_from_file, name_gather, addname, name_match, name_scan,
12944 add_exclude): Use size_t when appropriate. Remove now-useless casts.
12946 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
12948 * src/extract.c (newdir_umask, current_umask): Now mode_t.
12949 (extract_sparse_file): Args now use off_t.
12951 (set_mode, set_stat, make_directories, extract_sparse_file,
12952 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
12953 now-useless casts. Use unsigned long to print *_t types, except use
12954 STRINGIFY_BIGINT for off_t.
12956 * src/misc.c (quote_copy_string):
12957 Use size_t when appropriate. Remove now-useless casts.
12959 * src/list.c (read_and, list_archive, read_header, decode_mode,
12960 print_header, print_for_mkdir):
12961 Use mode_t, off_t, size_t when appropriate. Remove
12962 now-useless casts. Use unsigned long to print *_t types, except use
12963 STRINGIFY_BIGINT for off_t.
12965 (read_header): Check for overflow when converting header size.
12967 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
12968 const char *. Size arg is now size_t. Now takes new type and maxval
12969 args. Compute result using uintmax_t, not long. Report error if
12970 field does not contain octal number in range.
12971 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
12972 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
12973 uintmax_from_oct): New functions.
12975 (stringify_uintmax_t_backwards): New function.
12977 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
12978 (skip_file): Offset arg is now off_t.
12980 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
12981 real_s_totsize, real_s_sizeleft, current_block_ordinal):
12983 (write_error): Arg is now ssize_t.
12984 (child_pid): Now pid_t.
12985 (available_space_after): Now size_t.
12987 (child_open_for_compress, child_open_for_uncompress, flush_write,
12988 open_archive, flush_write, write_error, flush_read, close_archive):
12989 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
12990 casts. Use unsigned long to print *_t types, except use
12991 STRINGIFY_BIGINT for off_t.
12993 * src/delete.c (records_read): Now daddr_t.
12994 (move_archive): Arg is now daddr_t. Check for overflow when
12996 (move_archive, delete_archive_members): Use daddr_t, off_t when
12997 appropriate. Remove now-useless casts.
12999 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
13000 (rmt_lseek): Now returns off_t.
13002 * src/create.c (to_oct):
13003 Now static. Value arg is now uintmax_t. Accept new args
13004 giving name of type of octal field, for error messages. Report an
13005 error if the value is too large to fit in the field.
13006 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
13007 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
13009 (write_eot, write_long, finish_header, deal_with_sparse,
13010 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
13011 appropriate. Remove now-useless casts. Use unsigned long to print
13012 *_t types, except use STRINGIFY_BIGINT for off_t.
13014 (find_new_file_size): 1st arg is now off_t*.
13015 (finish_sparse_file): Args now use off_t, not long.
13016 Check for lseek error.
13017 (create_archive, dump_file): Cast -1 to dev_t when necessary.
13018 (dump_file): Device arg is now dev_t.
13019 Avoid overflow when testing whether file has holes
13020 by using the new ST_NBLOCKSIZE macro.
13022 * src/incremen.c (struct accumulator, add_to_accumulator,
13023 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
13024 Use size_t for sizes.
13025 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
13026 Use dev_t, ino_t for devices and inodes.
13027 (gnu_restore): Use off_t for file offsets.
13028 (struct directory): Use char for flags. Add new flag `nfs'.
13029 (nfs): New constant
13030 (NFS_FILE_STAT): New macro.
13031 (note_directory): Accept struct stat * instead of
13032 device and inode number. All callers changed.
13033 (note_directory, get_directory_contents):
13034 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
13035 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
13037 * src/common.h (record_size, struct name, struct sp_array,
13038 available_space_after):
13039 Use size_t for sizes.
13040 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
13041 Use off_t for file offsets.
13042 (struct name): dir_contents is now const char *, not char *.
13043 (dump_file, get_directory_contents): Use dev_t for devices.
13044 (to_oct): Remove decl.
13045 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
13046 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
13047 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
13048 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
13049 UINTMAX_FROM_OCT): New macros.
13050 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
13051 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
13052 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
13053 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
13054 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
13055 (print_for_mkdir): 2nd arg is now mode_t.
13059 See ChangeLog.1 for earlier changes.
13065 version-control: never
13066 buffer-read-only: t