1 2013-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
6 * configure.ac: Update.
8 2013-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
12 * src/names.c: Include argp.h
13 * tests/testsuite.at (AT_XATTRS_UTILS_PREREQ)
14 (AT_SELINUX_UTILS_PREREQ,AT_ACLS_UTILS_PREREQ)
15 (AT_CAPABILITIES_UTILS_PREREQ)
16 (AT_XATTRS_PREREQ,AT_SELINUX_PREREQ)
17 (AT_ACLS_PREREQ): Use POSIX-compatible syntax for
19 * tests/incr08.at: Fix find usage.
21 2013-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
23 Xfail the remfiles09b test.
25 * tests/remfiles09b.at: Turn into expected failure.
27 2013-10-05 Nathan Stratton Treadway <nathanst@ontko.com>
31 * scripts/tar-snapshot-edit: Mention --show-snapshot-field-ranges
34 2013-10-05 Pavel Raiskup <praiskup@redhat.com>
38 * configure.ac (RSH): Define as AC_ARG_VAR.
40 2013-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
42 Fix namespace contamination in testsuite.
44 * tests/append01.at: Use m4_pushdef/m4_popdef to define local
46 * tests/delete03.at: Likewise.
47 * tests/exclude06.at: Likewise.
48 * tests/incr04.at: Likewise.
49 * tests/link03.at: Likewise.
50 * tests/long01.at: Likewise.
51 * tests/longv7.at: Likewise.
52 * tests/lustar01.at: Likewise.
53 * tests/lustar02.at: Likewise.
54 * tests/lustar03.at: Likewise.
55 * tests/multiv05.at: Likewise.
56 * tests/sparse04.at: Likewise.
58 2013-10-05 Nathan Stratton Treadway <nathanst@ontko.com>
60 Provide comprehensive testcases for various file removal modes.
62 * tests/Makefile.am: Add new testcases.
63 * tests/testsuite.at: Likewise.
64 * tests/incr09.at: Add description.
65 * tests/remfiles04a.at: New file.
66 * tests/remfiles05.at: Rename to ...
67 * tests/remfiles04b.at: ... this.
68 * tests/remfiles04.at: Rename to ...
69 * tests/remfiles04c.at: ... this.
70 * tests/remfiles05a.at: New file.
71 * tests/remfiles05b.at: New file.
72 * tests/remfiles06.at: Rename to ...
73 * tests/remfiles05c.at: ... this.
74 * tests/remfiles06a.at: New file.
75 * tests/remfiles06b.at: New file.
76 * tests/remfiles06c.at: New file.
77 * tests/remfiles07a.at: New file.
78 * tests/remfiles07b.at: New file.
79 * tests/remfiles07c.at: New file.
80 * tests/remfiles08a.at: New file.
81 * tests/remfiles08b.at: New file.
82 * tests/remfiles08c.at: New file.
83 * tests/remfiles08.at: Rename to ...
84 * tests/remfiles09a.at: ... this.
85 * tests/remfiles09b.at: New file.
86 * tests/remfiles07.at: Rename to ...
87 * tests/remfiles09c.at: ... this.
89 2013-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
93 * src/misc.c: Fix comments, rename wd.cwd to wd.abspath (Nathan
96 * src/tar.c (options): Reword description of the --starting-file
98 --preserve-order options.
99 (decode_options): Both --starting-file and --preserve-order
101 only when used together with an archive reading command. (Pavel
104 2013-10-01 Sergey Poznyakoff <gray@gnu.org.ua>
106 Revamp tar_getcwd/normalize_filename stuff.
108 The changes are based on the discussion with Nathan.
110 * src/common.h (normalize_filename): Take two arguments. All
112 (tar_getcwd): Replaced with ..
113 (tar_getcdpath): New proto.
114 * src/misc.c (normalize_filename): Take two arguments.
115 (chdir_arg): Populate cwd along with creating the
117 (tar_getcwd): Removed.
118 (tar_getcdpath): New function.
120 * tests/incr09.at: New test case.
121 * tests/Makefile.am: Add new tests.
122 * tests/testsuite.at: Likewise.
124 2013-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
128 * tests/remfiles08.at: Restore missing find
130 2013-09-26 Sergey Poznyakoff <gray@gnu.org.ua>
132 Use relative addressing in deferred unlinks.
134 * src/common.h (tar_dirname): New function.
135 * src/misc.c (normalize_filename_x): Make extern.
136 (tar_dirname): New function.
137 (tar_getcwd): Take into account absoulte pathnames.
138 * src/unlink.c (deferred_unlink) <dir_idx>: New member; keeps the
139 value of chdir_current at the moment of structure allocation.
140 (flush_deferred_unlinks): Use chdir_do and relative addressing.
141 (queue_deferred_unlink): Initialize dir_idx.
142 * tests/Makefile.am: Add new tests.
143 * tests/testsuite.at: Add new tests.
144 * tests/remfiles06.at: Fix description.
145 * tests/remfiles07.at: Fix description.
146 * tests/remfiles08.at: New test case.
148 2013-09-25 Nathan Stratton Treadway <nathanst@ontko.com>
150 Improve tar-snapshot-edit
152 Support architecture-specific field ranges for the "-c" function.
153 Better handle negative or larger-than-32-bit field values even
154 when running in 32-bit Perl (for the default "print a summary"
157 2013-09-25 Sergey Poznyakoff <gray@gnu.org.ua>
161 * src/common.h (tar_getcwd): Return pointer is const.
162 * src/misc.c (wd) <cwd>: New member.
163 (chdir_arg): Initialize cwd.
164 (tar_getcwd): Use cwd member to cache the result. Take into
165 account absolute pathnames,
166 (normalize_filename): Don't free the value
167 returned from tar_getcwd.
168 * src/names.c (name_next_elt): Remove leftover call chdir().
169 * tests/Makefile.am: Add new tests.
170 * tests/testsuite.at: Likewise.
172 * tests/incr08.at: New testcase.
173 * tests/remfiles04.at: New testcase.
174 * tests/remfiles05.at: New testcase.
175 * tests/remfiles06.at: New testcase.
176 * tests/remfiles07.at: New testcase.
178 2013-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
180 Fix normalize_filename.
182 The function did not take into account eventual -C options, which
183 in particular led to various problems when using -C and
187 * src/common.h (namebuf_add_dir,namebuf_finish)
188 (tar_getcwd): New prototypes.
189 * src/misc.c (namebuf_add_dir,namebuf_finish)
190 (tar_getcwd): New functions.
191 (normalize_filename): Use tar_getcwd.
193 2013-09-23 Sergey Poznyakoff <gray@gnu.org.ua>
195 Changes for compatibility with Slackware installation scripts.
197 * src/buffer.c (short_read): the "Record size" message
198 is controlled by the WARN_RECORD_SIZE warning_option bit.
199 * src/common.h (keep_directory_symlink_option): New global.
200 (WARN_RECORD_SIZE): New constant.
201 (WARN_VERBOSE_WARNINGS): Add WARN_RECORD_SIZE.
202 * src/extract.c (extract_dir): If keep_directory_symlink_option is
203 set, follow symlinks to directories.
204 * src/suffix.c (compression_suffixes): Add support for txz
206 * src/tar.c (KEEP_DIRECTORY_SYMLINK_OPTION): New constant.
207 (options): New option --keep-directory-symlink.
208 (parse_opt): Handle this option.
209 * src/warning.c: Implement "record-size" warning control.
212 * doc/tar.texi: Document new features.
214 2013-09-21 Sergey Poznyakoff <gray@gnu.org.ua>
216 Fix error message (complements 0ea6e686)
218 * src/tar.c (set_subcommand_option): Mention --delete in the
221 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
223 Improve the incr07 test
225 2013-09-15 Nathan Stratton Treadway <nathanst@ontko.com>
227 Implement the --show-snapshot-field-ranges option
229 * src/common.h (show_snapshot_field_ranges): New prototype.
230 * src/incremen.c (show_snapshot_field_ranges): New function.
231 * src/tar.c: New option --show-snapshot-field-ranges.
232 * doc/snapshot.texi: Document the --show-snapshot-field-ranges
234 * doc/tar.texi: Likewise.
236 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
238 Take into account chdir_fd when extracting from incremental dumps.
240 * src/common.h (tar_savedir): New prototype.
241 * src/misc.c (tar_savedir): New function.
242 (remove_any_file): Use tar_savedir.
243 * src/incremen.c (try_purge_directory): Use tar_savedir.
244 * src/update.c (update_archive): Use tar_savedir.
245 * tests/incr07.at: New testcase.
246 * tests/Makefile.am (TESTSUITE_AT): Add new test.
247 * tests/testsuite.at: Likewise.
250 2013-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
254 * src/tar.c (main): Mention --delete in the error message.
257 2013-09-13 Paul Eggert <eggert@cs.ucla.edu>
259 * src/names.c (file_list_name): Properly prototype.
261 2013-09-13 Paul Eggert <eggert@cs.ucla.edu>
263 tar: don't warn about zero timestamps
265 * src/extract.c (check_time): Suppress warniing when t.tv_sec
267 Problem reported by Denis Excoffier.
269 2013-08-19 Pavel Raiskup <praiskup@redhat.com>
271 Minor fix in the testsuite.
273 * tests/T-cd.at: sort the 'tar cf' output.
275 2013-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
277 Improve error diagnostics
279 * src/names.c (file_list_name): New static function.
280 (add_file_id): If a filelist is being read twice, print the names
281 of the files that caused it.
282 * tests/T-rec.at: New test case.
283 * tests/Makefile.am: Add new file.
284 * tests/testsuite.at: Include new file.
286 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
288 Revamp initial name collection functions to ensure proper
291 * src/names.c (NELT_NOOP): New constant
292 (name_elt) <next,prev>: New members.
293 (name_array,allocated_entries,entries,scanned): Remove.
294 (check_name_alloc): Remove function.
295 (name_elt_alloc): New static.
296 (name_list_adjust,name_list_advance): New functions.
297 (name_add_name,name_add_dir)
298 (name_add_file): Use new allocation functions.
299 (read_next_name): Advance list head pointer as necessary
301 (name_next_elt): Read elements from list.
302 * tests/T-cd.at: New file.
303 * tests/T-mult.at: New file.
304 * tests/T-nest.at: New file.
305 * tests/Makefile.am: Add new testcases.
306 * tests/testsuite.at: Likewise.
308 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
310 Don't treat attempts to read an already read file list as
313 * src/names.c (add_file_id): Report error and return 1 if the file
314 has already been read.
315 (read_next_name): Don't try to open file if add_file_id returns 1.
316 (name_next_elt): Simplify conditional.
318 2013-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
322 * src/names.c (name_next_elt): Simplify conditional.
324 2013-08-15 Pavel Raiskup <praiskup@redhat.com>
326 Fix use of uninitialized memory
328 * src/names.c (name_add_file): Initialize the ep->v.file.fp
330 after structure allocation.
332 2013-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
336 * src/names.c (handle_option): Use program_invocation_short_name
337 instead of the constant string.
338 (read_next_name): Remove unused variable.
340 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
344 * doc/tar.texi: Parsing of the options found in the file list
345 follows the same rules as for command line. Remove the obsolete
346 description. This complements 26538c9b.
348 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
350 Fix interacton of --verbose and --append.
352 * src/buffer.c (_open_archive): don't overwrite existing archive
353 if given the --verify option.
354 * tests/append04.at: New file.
355 * tests/Makefile.am: Add new testcase.
356 * tests/testsuite.at: Add new testcase.
359 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
363 * src/names.c (read_name_from_file): Fix a typo. Remove
366 2013-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
368 Reduce memory consuption when handling the -T option.
370 The commit cdb27293 made the -T option more flexible, but
371 incurred a very considerable memory overhead by storing
372 all file names in the argument array. In case of very
373 big file lists this caused tar to run out of memory. This
374 was reported by Christian Wetzel <wetzel@phoenix-pacs.de>
376 (http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00018.html).
378 On the other hand, Michal Žeidl discovered that tar misfunctioned
379 when given empty file lists or lists with the trailing newline
380 misssing in the last entry. This was reported by Pavel Raiskup
382 (http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html
386 This change fixes both issues.
388 * src/common.h (name_add_file,request_stdin): New prototype.
389 (more_options): New prototype.
390 * src/names.c (NELT_FILE): New entry type.
391 (name_elt) <file>: New union member.
392 (name_add_file): New function.
393 (read_name_from_file): New function, a rewrite of
394 the same function from tar.c
395 (read_next_name,copy_name): New static functions.
396 (name_next_elt): Handle NELT_FILE entries.
397 * src/tar.c (request_stdin): Make extern.
398 (read_name_from_file,add_file_id)
399 (update_argv): Removed.
400 (parse_opt): Change handling of the -T option.
401 (more_options): New function.
403 * tests/T-null.at: Rewrite test.
404 * tests/T-zfile.at: New file.
405 * tests/T-nonl.at: New file.
406 * tests/Makefile.am: Add new testcases.
407 * tests/testsuite.at: Likewise.
411 2013-06-29 Sergey Poznyakoff <gray@gnu.org.ua>
413 Fix the compatibility check for the --occurrence option.
415 * src/tar.c (SUBCL_OCCUR): New class.
416 (subcommand_class): Update.
417 (decode_options): Accept the --occurrence option
418 with any subcommand from the SUBCL_OCCUR class.
420 2013-06-29 Pavel Raiskup <praiskup@redhat.com>
422 testsuite: do not resist on file order in archive
424 On my Fedora 19 box, the exclude08 & exclude11 tests failed before
425 this fix. The reason was that the directory traversing chosen the
426 file order differently than the testsuite expected.
428 * tests/exclude08.at: Sort the tarball content output.
429 * tests/exclude09.at: Likewise.
430 * tests/exclude10.at: Likewise.
431 * tests/exclude11.at: Likewise.
432 * tests/exclude12.at: Likewise.
433 * tests/exclude13.at: Likewise.
434 * tests/exclude14.at: Likewise.
435 * tests/exclude15.at: Likewise.
436 * tests/exclude16.at: Likewise.
438 2013-06-29 Sergey Poznyakoff <gray@gnu.org.ua>
440 Improve checks for incompatible options.
442 * src/common.h (READ_LIKE_SUBCOMMAND): Remove define.
443 * src/tar.c (IS_SUBCOMMAND_CLASS): New macro.
444 (decode_options): Use IS_SUBCOMMAND_CLASS in checking
445 option compatibility.
446 Accept the --verify option only with subcommands that
447 write to the archive.
449 * tests/opcomp01.at: New test case.
450 * tests/opcomp02.at: New test case.
451 * tests/opcomp03.at: New test case.
452 * tests/opcomp04.at: New test case.
453 * tests/opcomp05.at: New test case.
454 * tests/opcomp06.at: New test case.
455 * tests/Makefile.am: Add new testcases.
456 * tests/testsuite.at: Likewise.
458 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
460 tar: port to Mingw Shell
462 * src/extract.c (extract_symlink) [!HAVE_SYMLINK]:
463 Fix typo by replacing WARN_SYMBOLIC_CAST with WARN_SYMLINK_CAST.
464 Problem reported by kaka in
465 <http://lists.gnu.org/archive/html/bug-tar/2013-06/msg00008.html>.
467 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
469 maint: revert previous change
471 It wasn't actually needed. Reported by Stefano Lattarini in
472 <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00041.html>.
473 * configure.ac (AM_GNU_GETTEXT_VERSION): Decrease from 0.18.2
476 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
478 maint: port to bleeding-edge Automake by assuming Gettext 0.18.2
480 Reported by Stefano Lattarini in
481 <http://lists.gnu.org/archive/html/bug-tar/2013-04/msg00009.html>.
482 * configure.ac (AM_GNU_GETTEXT_VERSION): Increase from 0.16
484 README-alpha says that we do not make any efforts to accommodate
485 older versions of Gettext.
487 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
489 tar: port to --without-xattrs --enable-gcc-warnings
491 Reported by Pavel Raiskup in
492 <http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00029.html>.
493 * src/xattrs.c (xattrs__fd_set) [!HAVE_XATTRS]: Omit.
495 2013-04-25 Paul Eggert <eggert@cs.ucla.edu>
497 doc: port to texinfo 5
499 * doc/tar.texi (Reports, assumptions, Mixing):
500 Put FIXMEs at line start.
502 2013-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
504 Continue extracting from a separate volume after skipping a
507 Reported by Göran Udeborg on 2013-03-09.
509 * src/extract.c (extract_skip): New function.
510 (prepare_to_extract): Set extractor to extract_skip if starting
513 2013-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
515 Fix interaction of various --exclude-tag options with
516 --listed-incremental.
518 * src/incremen.c (procdir): Set directory->tagfile in
519 the exclusion_tag_contents case.
520 (makedumpdir): Mark all entries as ignored if directory->tagfile
522 Free new_dump before returning.
523 (maketagdumpdir): New function.
524 (scan_directory): If directory->children is set to
525 NO_CHILDREN and directory->tagfile is set, create a
526 dumpdir consisting of the tagfile only.
528 * tests/exclude08.at: New testcase.
529 * tests/exclude09.at: New testcase.
530 * tests/exclude10.at: New testcase.
531 * tests/exclude11.at: New testcase.
532 * tests/exclude12.at: New testcase.
533 * tests/exclude13.at: New testcase.
534 * tests/exclude14.at: New testcase.
535 * tests/exclude15.at: New testcase.
536 * tests/exclude16.at: New testcase.
537 * tests/Makefile.am: Add new tests.
538 * tests/testsuite.at: Include new tests.
539 * tests/atlocal.in (mkexcltest): New function.
540 * tests/chtype.at: Update keywords.
541 * tests/filerem01.at: Likewise.
542 * tests/filerem02.at: Likewise.
543 * tests/incremental.at: Likewise.
544 * tests/multiv04.at: Likewise.
546 2013-02-20 Paul Eggert <eggert@cs.ucla.edu>
550 * lib/wordsplit.c (_wsplit_error): Mark with printf attribute.
551 (expvar): "Use" defstr to pacify GCC.
552 * src/system.c (xexec): Now _Noreturn, to pacify GCC.
553 (run_decompress_program): Add cast to pacify GCC.
554 (sys_exec_command, sys_exec_info_script,
555 sys_exec_checkpoint_script):
556 Remove unused variables.
558 2013-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
560 Pass command line arguments to external commands.
562 Any option taking a command name as its argument accepts
563 additional arguments as well.
565 * lib/wordsplit.c: New file.
566 * lib/wordsplit.h: New file.
567 * lib/Makefile.am: Add new files.
568 * src/system.c (xexec): New function.
569 (run_decompress_program): Use wordsplit.
570 (sys_child_open_for_compress,sys_exec_command)
571 (sys_exec_info_script)
572 (sys_exec_checkpoint_script): Use xexec to invoke external
576 * doc/tar.texi: Update.
578 2013-01-29 Nathan Stratton Treadway <nathanst@ontko.com>
580 tar: improve compile-time diagnostics
582 * src/misc.c (sysinttostr, strtosysint): Improve #error wording.
584 2013-01-27 Paul Eggert <eggert@cs.ucla.edu>
586 tar: improve quality of diagnostics with incrementals
588 Inspired by a prototype by Nathan Stratton Treadway in
589 <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00000.html>.
590 * src/incremen.c (read_num): Rewrite by merging read_negative_num
591 and read_unsigned_num. Use strtosysint rather than rolling this
592 stuff ourselves. Change return type to bool. All uses changed.
593 (read_negative_num, read_unsigned_num): Remove.
594 (read_num, read_timespec, read_incr_db_2): Improve quality of
595 diagnostics, e.g., by supplying byte offset of error.
597 2013-01-26 Paul Eggert <eggert@cs.ucla.edu>
599 tar: fix bug with sparse files with effective size of 8 GiB
602 Reported by Pavel Raiskup in
603 <http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html>.
604 * NEWS: Document the fix.
605 * src/sparse.c (pax_start_header): New function.
606 (pax_dump_header_0, pax_dump_header_1): Use it.
608 2012-12-31 Paul Eggert <eggert@cs.ucla.edu>
610 maint: update copyrights for 2013 and as per current GNU standards
612 2012-12-31 Paul Eggert <eggert@cs.ucla.edu>
614 maint: remove unnecessary file
616 * src/configure.in: Remove. This file has been obsolete for
619 2012-12-24 Paul Eggert <eggert@cs.ucla.edu>
621 maint: don't enable warnings by default unless GCC 4.6 or later
623 * configure.ac (gl_GCC_VERSION_IFELSE): New macro, from coreutils.
624 (gl_gcc_warnings): By default, disable warnings for GCC versions
625 before 4.6. This works around a failure when building from git on
626 Ubuntu 10, reported privately by Nathan Stratton Treadway.
628 2012-12-23 Paul Eggert <eggert@cs.ucla.edu>
630 Handle incremental format 2 with negative numbers, too.
632 * src/incremen.c (read_unsigned_num): Last arg is intmax_t *, not
633 uintmax_t, for consistency with other readers. All callers
635 Avoid signed integer overflow.
638 2012-12-23 Paul Eggert <eggert@cs.ucla.edu>
640 Fix some problems with negative and out-of-range integers.
642 Original problem reported for HP-UX LVM v2.2 by Michael White in
643 <http://lists.gnu.org/archive/html/bug-tar/2012-10/msg00000.html>.
644 This patch fixes some other gotchas that I noticed.
645 * gnulib.modules: Add extern-inline.
646 * src/common.h: Use _GL_INLINE_HEADER_BEGIN,
647 _GL_INLINE_HEADER_END.
648 (COMMON_INLINE, max, min): New macros.
649 (represent_uintmax, valid_timespec): New inline functions.
650 (SYSINT_BUFSIZE): New constant.
651 (sysinttostr, strtosysint, decode_timespec): New decls.
652 * src/create.c (start_private_header): Silently bring the time_t
653 value into range; it is now the caller's responsibility to deal
654 with any overflow error. Use uid 0 and gid 0 rather than the
655 user's uid/gid, since the faked header isn't "owned" by the user
656 and the uid/gid could in theory be out of range. Leave major and
659 (write_gnu_long_link): Let start_private_header zero things out.
660 * src/create.c (write_gnu_long_link, write_extended):
661 * src/xheader.c (xheader_write_global):
662 Use start_time, not current time; no point hammering on the clock.
663 * src/compare.c (diff_multivol): Check that offset, size are
665 * src/incremen.c (read_incr_db_01, write_directory_file_entry):
666 Allow negative time_t, dev_t, and ino_t.
667 * src/list.c (max): Remove (moved to common.h).
668 (read_header): Check that size is in range.
669 (from_header): Return intmax_t, not uintmax_t, to allow negative.
670 All callers changed. At compile time, check assumptions about
671 intmax_t and uintmax_t. Use bool for booleans. Avoid overflow
672 hassles on picky hosts.
673 (mode_from_header): Last arg is now bool *, not unsigned *.
675 (simple_print_header): Do not assume UID, GID fit in 'long'.
676 * src/list.c (from_header):
677 * src/xheader.c (out_of_range_header):
678 Arg is now a plain minimum value, not minus minval converted to
679 uintmax_t. All callers changed.
680 * src/misc.c (COMMON_INLINE): New macro.
681 (sysinttostr, strtosysint, decode_timespec): New functions.
682 * src/sparse.c (oldgnu_add_sparse, oldgnu_fixup_header)
684 Check for offset overflow.
685 (decode_num): Clear errno before calling strtoumax.
686 * src/tar.c (expand_pax_option): Don't discard nanoseconds.
687 * src/xheader.c (assign_time_option): Allow negative time_t.
688 (decode_record): Simplify, since out-of-range string is guaranteed
689 to produce a value exceeding len_max.
690 (xheader_read): Last arg is off_t, not size_t.
691 Caller should diagnose negative arg, as needed.
692 Check that it's in range.
693 (enum decode_time_status): Remove.
694 (_decode_time): Remove, folding into decode_time.
695 (decode_time): Return bool, not enum decode_time_status.
696 Rely on decode_timespec to do most of the work.
697 (code_signed_num): New function.
699 (decode_signed_num): New function.
700 (decode_num): Use it.
701 (gid_coder, gid_decoder, uid_coder, uid_decoder,
703 (sparse_map_decoder): Code and decode negative values.
704 (sparse_map_decoder): Improve check for out-of-range values.
705 * tests/time01.at: New file.
706 * tests/Makefile.am (TESTSUITE_AT): Add it.
707 * tests/testsuite.at: Include it.
709 2012-12-22 Paul Eggert <eggert@cs.ucla.edu>
711 Port use of mkdirat etc. to Solaris 10.
713 * gnulib.modules (fchmodat, fchownat, fstatat, mkdirat, unlinkat):
714 Add. These were split out in gnulib, so we now need to request
715 them separately. mkdirat, for example, is not in Solaris 10.
717 2012-12-22 Paul Eggert <eggert@cs.ucla.edu>
719 Port ACL configuration to Solaris 10.
721 * configure.ac (with_posix_acls): Fix misspellings.
722 Stop checking at the first failure, to speed up 'configure'.
724 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
726 tar: remove unused externs, or make them static
728 * src/buffer.c (record_buffer_aligned, flush_write_ptr,
731 * src/list.c (recent_global_header):
732 * src/unlink.c (deferred_unlink_delay):
733 * src/transform.c (transform_flags):
734 * src/xattrs.c (acl_get_file_at, acl_set_file_at,
737 * src/common.h (rmt_command_option): Remove; unused.
738 * src/tar.c (check_links_option, allocated_archive_names):
739 Move decls here from common.h; these are now static.
741 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
743 * .gitignore: Regenerate.
745 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
747 build: new configure option --enable-gcc-warnings
749 This has a similar meaning as in other GNU applications
750 such as coreutils and Emacs.
752 * .gitignore: Remove redundant build-aux.
753 Remove gnu, since gnu/Makefile.am is now in git.
754 Add gnu/.gitignore, gnu/charset.alias, gnu/*.h, gnu/*/ to cover
756 * bootstrap.conf (gnulib_mk): Remove.
757 * configure.ac: Add support for --enable-gcc-warnings,
758 taken from coreutils and simplified.
759 * gnu/Makefile.am: New file. Formerly this was autogenerated,
760 but the autogenerated file has been renamed to gnulib.mk,
761 its usual name when bootstrapping from gnulib.
762 This way, AM_CFLAGS can incorporate warning options.
763 * gnulib.modules: Add manywarnings.
764 * lib/Makefile.am, src/Makefile.am (AM_CFLAGS): New macro,
765 incorporating warning options.
766 * lib/attr-xattr.in.h (ENOATTR): New macro, if not already
768 * src/buffer.c (magic): Don't rely on incomplete initializers.
769 * src/common.h (report_difference): Add printf format attribute.
770 * src/system.c (sys_exec_command, sys_exec_info_script)
771 (sys_exec_checkpoint_script):
772 * src/tar.c (update_argv):
773 Add casts to char * to pacify GCC warnings about using string
774 literals in a char * context.
775 * src/xattrs.c, src/xattrs.h (xattrs_clear_setup):
776 Declare parameters as (void), not ().
777 * src/xheader.c (xheader_format_name): Initialize pptr to null,
778 to pacify GCC. Remove unnecessary test of nptr versus null.
780 2012-12-19 Paul Eggert <eggert@cs.ucla.edu>
782 tar: don't truncate diagnostic
784 * src/list.c (from_header): Fix buffer size calculation when
785 generating a diagnostic.
787 2012-12-03 Sergey Poznyakoff <gray@gnu.org.ua>
791 * tests/Makefile.am: Fix double AM_CPPFLAGS
793 2012-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
795 Use AM_CPPFLAGS instead of INCLUDES.
797 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
801 * NEWS: Mention the support for POSIX ACLs, extended
802 attributes and SELinux context.
803 * THANKS: List James Antill and Pavel Raiskup.
805 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
809 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
811 Allow to store/extract '=' character in xattr keyword
813 * src/xheader.c (xattr_decode_keyword)
814 (xattr_encode_keyword): New functions.
815 (xheader_print_n,xattr_decoder): Use them.
816 * tests/xattr05.at: New test case.
817 * tests/Makefile.am: Add new test case.
818 * tests/testsuite.at: Likewise.
820 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
824 * configure.ac: Avoid linking against -lacl when
825 --without-posix-acls is given.
826 * tests/selacl01.at: Call restorecon
827 * tests/selnx01.at: Likewise.
828 * tests/testsuite.at (AT_SELINUX_UTILS_PREREQ): Likewise.
829 (AT_SELINUX_PREREQ,AT_ACLS_PREREQ): Use the right _PREREQ macros.
831 2012-11-19 Pavel Raiskup <praiskup@redhat.com>
835 * bootstrap (gnulib_extra_files): Remove $build_aux/missing
837 2012-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
841 * src/xattrs.c: Don't mix variable declarations and statements.
842 Use proper data types. Remove improper use of const qualifiers.
843 Use x2nrealloc to reallocate memory buffers.
845 2012-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
849 * src/xattrs.c: Fix indentation. Fix copyleft statement, promote
851 * src/xattrs.h: Likewise
853 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
855 Add SELinux context store/restore/list support.
857 * gnulib.modules: Add selinux-at.
858 * src/Makefile.am (tar_LDADD): Add LIB_SELINUX.
860 * src/create.c (start_header, dump_file0): Handle selinux
862 * src/extract.c (delayed_set_stat) <cntx_name>: New member.
863 (delayed_link) <cntx_name>: New member.
864 (set_stat, delay_set_stat)
865 (apply_nonancestor_delayed_set_stat): Handle selinux contexts.
866 * src/tar.c: New options: "--selinux", "--no-selinux".
867 (tar_stat_destroy): Free cntx_name.
868 * src/tar.h (tar_stat_info) <cntx_name>: New member.
869 * src/xattrs.c (xattrs_selinux_get)
870 (xattrs_selinux_set): New functions.
871 (xattrs_print_char): Honor selinux_context_option.
872 (xattrs_print): Print selinux context.
873 * src/xheader.c: Handle new keyword "RHT.security.selinux".
874 * tests/Makefile.am: Add new tests.
875 * tests/testsuite.at: Likewise.
876 * tests/selacl01.at: New test.
877 * tests/selnx01.at: New test.
879 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
881 Support for POSIX ACLs
883 * configure.ac: Check whether ACLs are available on the
885 * gnulib.modules: Add acl
886 * src/create.c (start_header): Store ACLs when creating
888 (dump_file0): Handle ACLs.
889 * src/extract.c (delayed_set_stat) <acls_a_ptr, acls_a_len>
890 <acls_d_ptr, acls_d_len>: New members.
891 (delayed_link): Likewise.
892 (set_stat,delay_set_stat)
893 (apply_nonancestor_delayed_set_stat): Set ACLs.
894 * src/tar.c: New options: "--acls", "--no-acls"
895 (tar_stat_destroy): Free acls_a_ptr and acls_d_ptr fields.
896 * src/tar.h (tar_stat_info) <acls_a_ptr, acls_a_len>
897 <acls_d_ptr, acls_d_len>: New members.
898 * src/xattrs.c (xattrs_acls_get, xattrs_acls_set): New functions.
899 * src/xheader.c: Support new keywors: "SCHILY.acl.access" and
900 "SCHILY.acl.default".
901 * tests/Makefile.am: Add new tests.
902 * tests/testsuite.at: Likewise.
903 * tests/acls01.at: New test.
904 * tests/acls02.at: New test.
906 2012-11-18 Pavel Raiskup <praiskup@redhat.com>
908 Add basic suuport for extended attributes.
910 * src/Makefile.am: Add xattrs.[ch]
911 * src/xattrs.c: New file.
912 * src/xattrs.h: New file.
913 * src/common.h (READ_LIKE_SUBCOMMAND): New define.
914 (selinux_context_option, acls_option, xattrs_option): New globals.
915 (xheader_xattr_init, xheader_xattr_free)
916 (xheader_xattr_copy, xheader_xattr_add): New protos.
917 (WARN_XATTR_WRITE): New mask.
918 * src/create.c (start_header): Handle xattrs pairs if in POSIX
920 (dump_file0): Handle extended attributes.
921 * src/extract.c (delayed_set_stat,delayed_link) <xattr_map_size>
922 <xattr_map>: New members.
923 (set_xattr): New static function.
924 (open_output_file): Accept an additional argument indicating
925 whether the file has already been created.
926 (set_stat,delay_set_stat)
927 (apply_nonancestor_delayed_set_stat)
928 (extract_file): Handle extended attributes.
929 * src/list.c (decode_header, simple_print_header): Display
931 * src/tar.c: New options --xattrs, --no-xattrs, --xattrs-include,
933 (tar_stat_destroy): Free the xattr_map storage.
934 * src/tar.h (xattr_array): New struct.
935 (tar_stat_info) <xattr_map_size, xattr_map>: New members.
936 * src/warning.c: New warning control keyword "xattr-write".
937 * src/xheader.c (xheader_xattr_init)
938 (xheader_xattr_free, xheader_xattr_add)
939 (xheader_xattr_copy): New functions.
940 (struct xhdr_tab) <prefix>: New member.
941 (locate_handler): Permit selecting the keyword based on its
943 (xheader_protected_pattern_p)
944 (xheader_protected_keyword_p): Likewise.
945 (xattr_coder, xattr_decoder): New functions.
946 (xhdr_tab): Reflect the changes to struct xhdr_tab.
947 New keyword "SCHILY.xattr".
948 * tests/Makefile.am: Add new tests.
949 * tests/testsuite.at: Likewise.
950 (AT_CHECK_UTIL, AT_XATTRS_UTILS_PREREQ)
951 (AT_CAPABILITIES_UTILS_PREREQ, AT_XATTRS_PREREQ): New defuns.
952 * tests/xattr01.at: New test.
953 * tests/xattr02.at: New test.
954 * tests/xattr03.at: New test.
955 * tests/xattr04.at: New test.
956 * tests/capabs_raw01.at: New test.
958 2012-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
960 Prepare for implementing extended attribute support.
962 This patch adds *xattr() stubs in case extended attribute
964 not present and implements the *attrat() family of functions.
966 on the patch by Pavel Raiskup <pavel@raiskup.cz> for gnulib.
968 * acinclude.m4 (TAR_HEADERS_ATTR_XATTR_H): New defun.
969 * configure.ac: Call TAR_HEADERS_ATTR_XATTR_H
970 * lib/Makefile.am: Add xattr-at.[ch], distribute attr-xattr.in.h
971 [!TAR_COND_XATTR_H]: Build attr/xattr.h
972 * lib/attr-xattr.in.h: New file.
973 * lib/xattr-at.c: New file.
974 * lib/xattr-at.h: New file.
976 2012-11-14 Sergey Poznyakoff <gray@gnu.org.ua>
978 Fix creation of incremental archives when a subdirectory becomes
981 When used with --listed-incrfental and --one-file-system, tar
982 was unable to cope with directories that had once been part of the
983 dumped system and became separate mount points afterwards.
985 has been reported and a fix proposed by Nathan Stratton Treadway.
987 * src/incremen.c (procdir): If one_file_system_option is in
989 clear out dumpdir info from the directory.
990 * tests/Makefile.am: Add new testcase.
991 * tests/listed05.at: New testcase.
992 * tests/testsuite.at (AT_PRIVILEGED_PREREQ): New macro.
996 2012-07-27 Jim Meyering <jim@meyering.net>
998 maint: try to avoid unwanted chatter in ChangeLog
1000 * bootstrap.conf: Do not alter ChangeLog if it already exists.
1002 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
1004 doc: improve discussion of compressed archives
1006 * doc/tar.texi (gzip): Don't claim that -I 'gzip --best' works.
1007 Problem reported by Davide Brini in
1008 <http://lists.gnu.org/archive/html/bug-tar/2012-07/msg00025.html>.
1009 Also, improve some of the surrounding text.
1011 This file is a placeholder. It will be replaced with the actual
1013 by make dist. Run make ChangeLog if you wish to create it
1016 2012-06-27 Paul Eggert <eggert@cs.ucla.edu>
1018 tests: fix permissions-assumption bug in test
1020 * tests/owner.at: Don't assume umask is 022.
1021 Reported by Pavel Raiskup in
1022 <http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00015.html>.
1024 2012-06-27 Paul Eggert <eggert@cs.ucla.edu>
1026 tar: don't assume root is uid 0
1028 This is not true for Tandem NonStop Kernel. See Joachim Schmitz's
1029 comment in <http://bugs.gnu.org/10305#111>.
1030 * gnulib.modules: Add root-uid.
1031 * src/extract.c: Include <root-uid.h>.
1032 (extr_init): Don't assume root is uid 0.
1034 2012-04-25 Paul Eggert <eggert@cs.ucla.edu>
1036 * src/compare.c (diff_dumpdir): Omit useless 'stat'.
1038 2012-04-25 Paul Eggert <eggert@cs.ucla.edu>
1040 * doc/tar.texi (Option Summary): Fix xref typo.
1042 Reported by Nathan Stratton Treadway in
1043 <http://lists.gnu.org/archive/html/bug-tar/2012-04/msg00035.html>.
1045 This file is a placeholder. It will be replaced with the actual
1047 by make dist. Run make ChangeLog if you wish to create it
1050 2012-03-29 Sergey Poznyakoff <gray@gnu.org.ua>
1052 Fix unrecognized option.
1054 * src/tar.c (parse_opt): Handle OLD_ARCHIVE_OPTION.
1056 2012-03-11 Paul Eggert <eggert@cs.ucla.edu>
1060 This lint was found by GCC 4.6.2 on Fedora 15 x86-64.
1061 * src/buffer.c (buffer_write_global_xheader, mv_end,
1063 (compute_duration, print_total_stats, flush_read, flush_write):
1064 * src/checkpoint.c (checkpoint_finish_compile):
1065 * src/list.c (test_archive_label):
1066 * src/misc.c (chdir_count):
1067 * src/names.c (const):
1068 * src/unlink.c (finish_deferred_unlinks):
1069 Define with (void) instead of with (), for slightly-better C type
1070 checking and to avoid a GCC warning.
1071 * src/compare.c (diff_dumpdir):
1072 * src/tar.c (parse_owner_group): Remove unused local.
1073 * src/misc.c (chdir_do):
1074 * src/tar.c (add_exclude_array): Rename local to avoid shadowing.
1075 (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
1076 Define only if needed.
1077 * src/update.c (update_archive): Initialize a local; this fixes
1078 what appears to be a real bug.
1080 2012-02-14 Paul Eggert <eggert@cs.ucla.edu>
1082 doc: suggest Bash for large-fd script
1084 * doc/tar.texi (Multi-Volume Archives): Suggest Bash for shell
1085 script that might use >&10. Problem reported by Edward F
1087 <http://lists.gnu.org/archive/html/bug-tar/2012-02/msg00002.html>.
1089 2012-01-18 Paul Eggert <eggert@cs.ucla.edu>
1091 tar: quote 'like this', not `like this'
1093 This fixes some test failures recently introduced by gnulib
1095 prompted by recent changes to the GNU coding standards,
1096 which now advise to use quotes 'like this' or "like this"
1097 rather than `like this'.
1098 * NEWS: Document this.
1099 * README, README-hacking, doc/Makefile.am, scripts/backup.in:
1100 * scripts/backup.sh.in, scripts/dump-remind.in:
1101 * src/buffer.c, src/checkpoint.c, src/create.c, src/incremen.c:
1102 * src/misc.c, src/names.c, src/sparse.c, src/transform.c:
1103 * tests/incr02.at, tests/incremental.at, tests/multiv08.at:
1104 * tests/sparse04.at, tests/star/README, tests/update01.at:
1105 Quote 'like this' in comments.
1107 Quote "like this" in comments, when quoting English phrases rather
1110 * scripts/xsparse.c (get_var, read_xheader, main):
1111 * src/compare.c (diff_archive):
1112 * src/extract.c (prepare_to_extract):
1113 * src/tar.c (request_stdin, tar_set_quoting_style, doc, options)
1114 (set_subcommand_option, report_textual_dates, parse_opt)
1115 (decode_options, main):
1116 * src/xheader.c (decx):
1117 Quote 'like this' in diagnostics.
1118 * doc/tar.texi (list, warnings, override)
1119 (Selecting Archive Members, quoting styles, after, hard links)
1120 (Sparse Recovery, Multi-Volume Archives, label):
1121 Adjust documentation to match new output.
1122 * tests/backup01.at, tests/incr01.at, tests/incr04.at:
1123 * tests/label04.at, tests/label05.at, tests/link03.at:
1124 * tests/listed02.at, tests/multiv03.at, tests/multiv05.at:
1125 * tests/rename01.at, tests/rename02.at, tests/rename03.at:
1127 Adjust tests to match new quoting behavior.
1129 2012-01-18 Paul Eggert <eggert@cs.ucla.edu>
1131 tar: port --overwrite symlink test to GNU/Hurd
1133 Problem reported by Pino Toscano in
1134 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00040.html>.
1135 * gnulib.modules: Add fcntl-h, which defines
1136 HAVE_WORKING_O_NOFOLLOW.
1137 * src/extract.c (open_output_file): Use HAVE_WORKING_O_NOFOLLOW,
1138 not O_NOFOLLOW, when testing whther O_NOFOLLOW works.
1140 This file is a placeholder. It will be replaced with the actual
1142 by make dist. Run make ChangeLog if you wish to create it
1145 2012-01-11 Paul Eggert <eggert@cs.ucla.edu>
1147 tar: fix core dump with --index-file=bad_path
1149 * src/tar.c (decode_options): Exit cleanly if index file won't
1151 Problem reported by Khanh-Dang Nguyen Thu Lam in
1152 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00018.html>.
1154 2012-01-06 Paul Eggert <eggert@cs.ucla.edu>
1156 tar: don't assume O_NONBLOCK is benign on regular files
1158 On Data Migration Facility (DMF), High Peformance Storage System
1160 and presumably other file systems based on hierarchical storage,
1162 a regular file with O_NONBLOCK can cause later reads to fail with
1163 errno == EAGAIN. We need the O_NONBLOCK to avoid some security
1165 Work around the problem by using fcntl to clear the O_NONBLOCK
1166 flag if I/O fails with that errno value.
1167 Problem reported by Vitezslav Cizek in
1168 <http://lists.gnu.org/archive/html/bug-tar/2012-01/msg00000.html>.
1169 * src/common.h (blocking_read, blocking_write): New decls.
1170 * src/misc.c (blocking_read, blocking_write): New functions.
1171 * src/compare.c (process_rawdata):
1172 * src/create.c (dump_regular_file):
1173 * src/extract.c (extract_file):
1174 * src/sparse.c (sparse_scan_file, sparse_extract_region):
1176 2011-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
1178 Fix --keep-old-files option.
1180 The regression was introduced by 8f390db9. This patch implements
1182 option --skip-old-files, which silently skips members which
1184 writing over existing files, and restores --keep-old-files to
1189 * configure.ac: Update.
1190 * doc/tar.texi: Document the changes.
1191 * src/common.h (SKIP_OLD_FILES): New old_files mode.
1192 * src/extract.c (maybe_recoverable): Restore KEEP_OLD_FILES
1194 Handle SKIP_OLD_FILES.
1195 * src/tar.c: New option --skip-old-files.
1196 * tests/extrac18.at: New file.
1197 * tests/extrac19.at: New file.
1198 * tests/Makefile.am: Add new test cases.
1199 * tests/testsuite.at: Likewise.
1201 2011-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
1203 Warn about existing files in keep-old-files mode (complements
1206 This is controlled by "existing-file" warning code, which is off
1209 * src/common.h (WARN_EXISTING_FILE): New warning code.
1210 (WARN_VERBOSE_WARNINGS): Add WARN_EXISTING_FILE.
1211 * src/extract.c (maybe_recoverable): warn about existing file
1212 if WARN_EXISTING_FILE is set.
1213 * src/warning.c: New warning type: "existing-file"
1215 2011-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
1217 Fix the "Creating directory:" output
1219 * src/list.c (print_for_mkdir): don't use unquoted name length for
1220 computing its output width.
1222 2011-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
1224 Fix operation of --verify in conjunction with --listed-incremental
1226 * src/common.h (clear_directory_table): New proto.
1227 * src/incremen.c (clear_directory_table): New function.
1228 * src/compare.c (diff_dumpdir): Take a pointer to struct
1229 tar_stat_info as argument.
1231 (diff_archive): Update call to diff_dumpdir.
1232 (verify_volume): Call clear_directory_table.
1234 2011-10-18 Paul Eggert <eggert@cs.ucla.edu>
1236 * doc/tar.texi (Option Summary, absolute): Document -P better,
1238 by describing how it deals with symbolic links on extraction.
1240 2011-09-28 Paul Eggert <eggert@cs.ucla.edu>
1242 2011-09-27 Paul Eggert <eggert@cs.ucla.edu>
1244 * src/tar.c (stat_on_signal): Use SA_RESTART if available.
1246 2011-09-20 Paul Eggert <eggert@cs.ucla.edu>
1248 * doc/tar.texi: Remove front- and back-cover texts.
1250 These are no longer needed for this manual, according to the
1251 GNU maintainers guide. Update copyright date to 2011.
1253 2011-09-19 Sergey Poznyakoff <gray@gnu.org.ua>
1257 * scripts/tar-snapshot-edit: License under GPLv3+.
1258 Remove trailing whitespace.
1260 2011-09-19 Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
1264 * doc/snapshot.texi: Clarify the use of nfs field in 0 and
1266 Give more precise information about which versions of tar
1270 2011-09-19 Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
1272 Upgrade tar-snapshot-edit script.
1274 * scripts/tar-snapshot-edit: Update Perl syntax to work
1275 correctly with more recent versions of Perl. (The original
1276 code worked with in the v5.8 timeframe but not with
1277 Perl v5.10.1 and later.)
1278 Add a "-c" option to check the snapshot file for invalid
1280 Handle NFS indicator character ("+") in version 0 and 1 files.
1281 Preserve the original header/version line when editing version 1
1283 Tweak output formatting.
1284 * doc/tar-snapshot-edit.texi: Update documentation.
1286 2011-08-13 Paul Eggert <eggert@cs.ucla.edu>
1288 tar: --owner and --group names and numbers
1290 The --owner and --group options now accept operands of the form
1291 NAME:NUM, so that you can specify both symbolic name and numeric
1292 ID for owner and group. Also, in these options, NAME no longer
1293 needs to be present in the current host's user and group
1294 databases; this implements Debian enhancement request 136231
1295 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136231> reported
1296 by Mark W. Eichin, communicated by Thayne Harbaugh to bug-tar in
1297 <http://lists.gnu.org/archive/html/bug-tar/2011-08/msg00001.html>.
1298 * NEWS, doc/tar.texi (Option Summary, override): Document
1300 * src/common.h (group_name_option, owner_name_option): New decls.
1301 * src/create.c (start_header): Don't assume owner and group names
1302 are in current host database.
1303 * src/tar.c (parse_owner_group): New function, for parsing
1305 (parse_opt): Use it.
1306 (decode_options): Initialize owner_name_option, group_name_option.
1307 * tests/owner.at: New file, to test this enhancement.
1308 * tests/Makefile.am (TESTSUITE_AT): Add it.
1309 * tests/testsuite.at: Include it.
1311 2011-08-13 Paul Eggert <eggert@cs.ucla.edu>
1315 * .gitignore: Add rmt.
1316 * lib/.gitignore: New file.
1318 2011-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
1320 Fix the --exclude-backups option.
1322 * src/tar.c (add_exclude_array): Take exclude option filags in its
1324 (parse_opt): Register backup_file_table with the EXCLUDE_WILDCARDS
1326 * tests/exclude07.at: New testcase.
1327 * tests/Makefile.am (TESTSUITE_AT): Add testsuite.at.
1328 * tests/testsuite.at: Include exclude07.at.
1330 2011-06-08 Paul Eggert <eggert@cs.ucla.edu>
1332 tar: simplify birthtime calculations
1334 * src/extract.c (same_birthtime): Remove.
1335 (extract_link, apply_delayed_links): Go back to using
1337 instead of same_birthtime, as this is a bit simpler. This fix
1339 on an up-to-date gnulib.
1341 2011-06-08 Paul Eggert <eggert@cs.ucla.edu>
1343 tar: use birthtime rather than ctime when checking identity
1345 Without this fix, tar would sometimes mishandle the extraction of
1346 hard links to symbolic links. Problem reported in
1347 <http://lists.gnu.org/archive/html/bug-tar/2011-06/msg00000.html>
1349 * src/extract.c (struct delayed_link): Change ctime member
1351 (same_birthtime): New function.
1352 (create_placeholder_file, extract_link, apply_delayed_links):
1353 Use it to compare birthtimes (when available) instead of ctime.
1355 2011-05-26 Paul Eggert <eggert@cs.ucla.edu>
1357 * doc/tar.texi (Old Options): Clarify distinction from short
1360 Adjust other parts of the manual to use examples that parse the
1361 same regardless of whether "-" is in front of the option clump.
1363 <http://lists.gnu.org/archive/html/bug-tar/2011-05/msg00022.html>.
1365 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1369 * tests/sparse04.at: Use the -f option.
1371 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1375 * NEWS, configure.ac: Update.
1376 * po/POTFILES.in: Remove paxexit.c (see bb971a1e).
1378 2011-03-08 Paul Eggert <eggert@cs.ucla.edu>
1380 --atime-preserve=replace: fix correctness and performance bugs
1382 reported by Eric Blake in
1383 <http://lists.gnu.org/archive/html/bug-tar/2011-03/msg00000.html>.
1384 * src/compare.c (diff_file): Do not restore atime of size-zero
1386 * src/create.c (dump_file0): Likewise. Also, do not restore atime
1387 when fd is zero, because that indicates a file we haven't opened.
1389 2011-02-23 Paul Eggert <eggert@cs.ucla.edu>
1391 * doc/tar.texi: Adjust example commands and output for accuracy.
1393 The original problem was reported by Michael Witten in
1394 <http://lists.gnu.org/archive/html/bug-tar/2011-02/msg00033.html>.
1396 2011-02-16 Paul Eggert <eggert@cs.ucla.edu>
1398 tar: if (p) free (p); -> free (p);
1400 There is no longer (since SunOS 4) any need to guard against
1401 free (NULL), so replace each "if (p) free (p);" with "free (p);".
1402 From Jim Meyering in
1403 <http://lists.gnu.org/archive/html/bug-tar/2011-01/msg00026.html>.
1404 * src/incremen.c (scan_directory, read_directory_file): As above.
1405 (try_purge_directory): Likewise.
1406 * src/list.c (read_header): Likewise.
1407 * src/misc.c (assign_string): Likewise.
1409 2010-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
1411 Correctly store long sparse file names in PAX archives.
1413 * src/sparse.c (pax_dump_header_1): Make sure the created header
1415 shorter than NAME_FIELD_SIZE bytes.
1416 * tests/sparse04.at: New testcase.
1417 * tests/Makefile.am (TESTSUITE_AT): Add sparse04.at.
1418 * tests/testsuite.at: Include sparse04.at.
1421 2010-12-07 Paul Eggert <eggert@cs.ucla.edu>
1423 tests: make the truncate test smaller and less buggy (tiny change)
1425 Reported by Solar Designer in
1426 <http://lists.gnu.org/archive/html/bug-tar/2010-12/msg00003.html>.
1427 * tests/truncate.at: Use a smaller test case, and make its
1428 race condition less likely.
1430 2010-11-27 Paul Eggert <eggert@cs.ucla.edu>
1432 tests: skip SIGPIPE-dependent tests in environments ignoring
1435 Problem reported by Sven Joachim in
1436 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00043.html>.
1437 * tests/remfiles01.at: Use AT_SIGPIPE_PREREQ.
1438 * tests/sigpipe.at: Likewise.
1439 * tests/testsuite.at (AT_SIGPIPE_PREREQ): New macro.
1441 2010-11-25 Paul Eggert <eggert@cs.ucla.edu>
1443 tar: work around NetBSD and Tru64 symlink incompatibility
1446 Problem reported by Bruno Haible in
1447 <http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00306.html>.
1448 * src/extract.c (maybe_recoverable): Also treat EFTYPE (if
1450 and ENOTSUP like ELOOP.
1452 2010-11-24 Paul Eggert <eggert@cs.ucla.edu>
1454 tar: adjust to paxutils change: paxexit.c -> paxexit-status.c
1456 * lib/Makefile.am (libtar_a_SOURCES): paxexit.c renamed to
1459 2010-11-24 Paul Eggert <eggert@cs.ucla.edu>
1461 tar: remove unused function dir_removed_diag
1463 * src/common.h (dir_removed_diag): Remove unused decl.
1464 * src/misc.c (dir_removed_diag): Remove unused function.
1466 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
1468 tar: work around FreeBSD symlink incompatibility with POSIX
1470 * src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for
1471 FreeBSD. Problem reported by Christian Weisgerber in
1472 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00080.html>.
1474 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
1476 * src/names.c: tar: fix bug with --one-file-system
1477 --listed-incremental
1479 Problem (and idea for fix) reported by Martin Weigel
1480 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00071.html>.
1481 * src/common.h (is_individual_file): Remove decl.
1482 * src/create.c (dump_file0): Replace "is_individual_file (p)"
1484 * src/incremen.c (procdir): Replace "!is_individual_file
1485 (name_buffer)" with "st->parent". Fix bug with --one-file-system
1486 and --listed-incremental.
1487 * src/names.c (individual_file_table, register_individual_file):
1488 (is_individual_file): Remove. All uses removed.
1490 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
1492 tests: new test listed04 for --one-file-system
1493 --listed-incremental
1495 * tests/Makefile.am (TESTSUITE_AT): Add listed04.at.
1496 * tests/listed04.at: New file.
1497 * tests/testsuite.at: Include it.
1499 2010-11-23 Paul Eggert <eggert@cs.ucla.edu>
1501 scripts: fix option parsing
1503 Problem reported by Dennis Wydra in
1504 <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00082.html>.
1505 * scripts/backup.in: Accept "-l LEVEL". Be more systematic about
1506 backslashes inside ``; it shouldn't matter for modern shells but
1507 it might matter for older ones.
1508 * scripts/restore.in: Likewise.
1509 * scripts/backup.in: Adjust implementation of -t/--time to match
1510 the new implementation of -l/--level.
1512 2010-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
1514 Issue a warning if the archive being compared contais transformed
1517 * src/common.h (transform_program_p): New proto.
1518 * src/transform.c (transform_program_p): New function.
1519 * src/compare.c (verify_volume): Warn if the archive contains
1520 transformed file names.
1522 2010-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
1526 * doc/tar.texi: Reword the description of decompress-program.
1528 2010-11-15 Paul Eggert <eggert@cs.ucla.edu>
1530 tar: fix --verify option, which broke in 1.24
1532 * NEWS: Document this.
1533 * src/compare.c (verify_volume): Decode the header before invoking
1534 diff_archive, as diff_archive no longer does this as of the
1535 2010-06-28 commit. Also, don't try to invoke diff_archive on a
1537 * tests/Makefile.am (TESTSUITE_AT): Add verify.at.
1538 * tests/testsuite.at: Include verify.at.
1539 * tests/verify.at: New file.
1541 2010-11-08 Paul Eggert <eggert@cs.ucla.edu>
1543 Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/tar
1545 2010-11-08 Jim Meyering <meyering@redhat.com>
1547 tests: avoid spurious failure when VERSION_CONTROL envvar is set
1549 * tests/backup01.at: Unset VERSION_CONTROL. Otherwise,
1550 when set to e.g., 'always', it would cause this test to fail.
1552 2010-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
1556 * configure.ac: Version 1.25
1557 * NEWS: Describe the changes.
1559 2010-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
1561 Run alternative decompression programs if the principal one is
1564 Some compression programs are able to handle various compression
1566 (e.g. `gzip' can decompress files created by `compress', `xz'
1568 to handle lzma, etc.) Tar tries to use such programs for
1570 if the principal decompressor cannot be started.
1572 * src/buffer.c (compress_type): Swap ct_none and ct_tar.
1573 (archive_compression_type): New static variable.
1574 (zip_magic): Remove program and option fields.
1575 (zip_program): New structure and static.
1576 (compress_program): Remove macro.
1577 (find_zip_program): New static function.
1578 (first_decompress_program,next_decompress_program): New functions.
1579 (open_compressed_archive): Set archive_compression_type instead of
1580 use_compress_program_option.
1581 * src/common.h (first_decompress_program)
1582 (next_decompress_program): New functions.
1583 (WARN_DECOMPRESS_PROGRAM): New flag.
1584 (WARN_VERBOSE_WARNINGS): Include WARN_DECOMPRESS_PROGRAM.
1585 * src/warning.c (warning_args): Add "decompress-program".
1586 (warning_types): Add WARN_DECOMPRESS_PROGRAM.
1587 * src/system.c (run_decompress_program): New function.
1588 (sys_child_open_for_uncompress): Use run_decompress_program
1589 instead of calling execlp directly.
1591 2010-11-02 Paul Eggert <eggert@cs.ucla.edu>
1593 tests: fix some issues with signals, timestamps, "test" typo
1595 * tests/extrac17.at: Add --warning=no-timestamp, to avoid
1596 bogus warning due to NFS clock skew.
1597 * tests/remfiles01.at: Discard diagnostics that some shells
1598 generate about broken pipes.
1599 * tests/sigpipe.at: Likewise.
1600 * tests/remfiles01.at: Fix typo: "test $EC" was written where
1601 "test $EC -ne 0" was intended.
1603 2010-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
1605 Fix extraction of device nodes.
1607 * src/extract.c (extract_node): Do not mask out node type.
1608 The bug was introduced in commit ea964cce.
1610 2010-10-28 Paul Eggert <eggert@cs.ucla.edu>
1612 tar: don't cross struct member boundaries with OLDGNU_MAGIC
1614 * src/create.c (write_gnu_long_link, start_header): Access
1615 header->buffer + offsetof (struct posix_header, magic), instead of
1616 header->header.magic, when reading or writing the OLDGNU_MAGIC
1617 pattern. The code violates the C standard without this change,
1618 and GCC warns about this if fortify checking is enabled. It's not
1619 a bug on traditional (i.e., non-debugging) platforms, but it does
1620 violate the C standard so it should be fixed. Problem originally
1621 reported by John Emil Karlson in
1622 <http://lists.gnu.org/archive/html/bug-tar/2010-04/msg00023.html>.
1623 * src/list.c (decode_header): Likewise.
1625 2010-10-28 Paul Eggert <eggert@cs.ucla.edu>
1627 tests: port to sh variants that squirrel away file descriptors
1629 OpenBSD /bin/sh, and some other sh variants, squirrel away file
1630 descriptors before closing them. For example, for "cat 3<&-" they
1631 first dup file descriptor 3 to a fd that is 10 or greater, then
1632 close 3 (because if "cat" had been a builtin command like ":" then
1633 they would have wanted to avoid the fork and restore the fd after
1634 ":" finished); and they treat ordinary (forking) commands the same
1635 as builtin commands. This approach fails after "ulimit -n 10".
1636 Work around this deficiency by closing the file descriptors before
1637 invoking ulimit. Problem reported by Christian Weisgerber in
1638 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00041.html>;
1639 solution suggested by Jilles Tjoelker in
1640 <http://article.gmane.org/gmane.comp.shells.dash/415>.
1642 * tests/extrac11.at (scarce file descriptors): Close file
1643 descriptors before invoking ulimit -n.
1645 2010-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
1647 Transform file names when updating and appendig to archives.
1649 This complements 28e91b48.
1651 * src/common.h (transform_stat_info): New prototype.
1652 * src/list.c (transform_stat_info): Remove static qualifier.
1653 * src/update.c (update_archive): Call transform_stat_info.
1654 * tests/Makefile.am (TESTSUITE_AT): Add append03.at
1655 * tests/testsuite.at: Include append03.at
1657 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
1659 tests: port to Solaris diff
1661 * tests/extrac13.at: Don't assume that "diff -c" outputs nothing
1662 when there are no differences. This is not true on Solaris,
1663 where it outputs "No differences encounted".
1665 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
1667 tar: fix -x --overwrite bug (no --dereference, ! O_NOFOLLOW)
1669 This bug was discovered on Solaris 8. On older hosts lacking
1670 O_NOFOLLOW, tar -x --overwrite (without --dereference) follows
1671 symbolic links, causing the "extract over symlinks" test to fail.
1673 * src/extract.c (open_output_file): If O_NOFOLLOW is needed but
1674 does not work, check for a symlink separately.
1676 2010-10-27 Paul Eggert <eggert@cs.ucla.edu>
1678 tar: don't use "((" in shell scripts
1680 * tests/extrac11.at: Replace "((" with "( (" in shell scripts, as
1681 "((" is not portable to the Korn shell, and POSIX 1003.1-2008 says
1682 that "((" is not portable.
1684 2010-10-26 Sergey Poznyakoff <gray@gnu.org.ua>
1686 Make sure name matching occurs before name transformation.
1688 The commit 9c194c99 altered that order.
1690 * src/list.c (transform_stat_info): New function. Split off from
1692 (read_and): Call transform_stat_info right before do_something,
1693 and after deciding if we should proceed with this member name,
1694 so that name matching occurs before name transformation.
1696 * tests/extrac17.at: New file.
1697 * tests/Makefile.am (TESTSUITE_AT): Add extrac17.at
1698 * tests/testsuite.at: Include extrac17.at.
1700 2010-10-26 Paul Eggert <eggert@cs.ucla.edu>
1702 tar: don't assume stdin is open when testing fd limits
1704 * tests/extrac11.at: Redirect stdin from /dev/null, in case
1705 the parent 'make' is running with stdin closed.
1707 2010-10-26 Sergey Poznyakoff <gray@gnu.org.ua>
1709 Further fixes in bootstrap.
1711 * bootstrap: Restore the default for gnulib_path
1712 (symlink_to_dir): Re-apply 67cad07.
1714 2010-10-26 Paul Eggert <eggert@cs.ucla.edu>
1716 tar: fix bug with -C and extracting directories
1718 Problem reported by Denis Excoffier in
1719 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00034.html>.
1721 * src/extract.c (extract_dir): Use mkdirat, not mkdir.
1722 * tests/extrac16.at: New file, to test for this bug.
1723 * tests/Makefile.am (TESTSUITE_AT): Add it.
1724 * tests/testsuite.at: Include it.
1726 This file is a placeholder. It will be replaced with the actual
1728 by make dist. Run make ChangeLog if you wish to create it
1731 2010-10-25 Sergey Poznyakoff <gray@gnu.org.ua>
1735 * configure.ac, NEWS: Version 1.24
1736 * bootstrap: Restore tar-specific code lost during last
1737 sync from gnulib (241b72ffad).
1738 * src/misc.c (chdir_do): Remove unused automatic variable.
1740 2010-10-16 Paul Eggert <eggert@cs.ucla.edu>
1742 tar: use more-accurate diagnostic when intermediate mkdir fails
1744 Without this change, if tar tried to extract a file A/B/C, noticed
1745 that A/B didn't exist, attempted to mkdir A/B, and the mkdir
1746 failed, it did not diagnose the mkdir failure, but simply reported
1747 the failure to open A/B/C. This sometimes led to confusion
1748 because it wasn't clear what tar was trying to do, in particular
1749 that tar tried to mkdir A/B. With this patch, tar issues two
1750 diagnostics in this case: one for A/B and the other for A/B/C.
1751 Problem reported by Hauke Laging in
1752 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00020.html>.
1753 * gnulib.modules: Remove faccessat.
1754 * src/extract.c (make_directories): New arg INTERDIR_MADE.
1755 Diagnose mkdir failure. Return 0 on success, nonzero on failure,
1756 as opposed to nonzero iff some directory was created. All callers
1757 changed. Simplify the code when mkdir fails, by checking whether
1758 the desired file exists unless errno==EEXIST: this is more robust.
1759 * tests/extrac15.at: New test, to check this.
1760 * tests/Makefile.am (TESTSUITE_AT): Add it.
1761 * tests/testsuite.at: Include it.
1763 2010-10-16 Paul Eggert <eggert@cs.ucla.edu>
1765 tests: port to NFS file servers with clock skew
1767 Several of the tests assumed that a newly created file cannot
1768 have a time stamp dated in the future. This assumption is not
1769 true when files are served by a remote host whose clock is
1770 slightly in advance of ours. Fix the problems that I observed
1771 when running "make check" a couple of times on such a server.
1773 * tests/backup01.at: Use --warning=no-timestamp to suppress
1774 clock-skew warnings.
1775 * tests/chtype.at, tests/comprec.at, tests/exclude06.at:
1776 * tests/extrac01.at, tests/extrac03.at, tests/extrac05.at:
1777 * tests/extrac06.at, tests/extrac08.at, tests/extrac13.at:
1778 * tests/extrac14.at, tests/incr01.at, tests/incr03.at,
1780 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at:
1781 * tests/pipe.at, tests/rename02.at, tests/rename03.at:
1782 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
1783 * tests/sparse01.at:
1786 2010-10-12 Paul Eggert <eggert@cs.ucla.edu>
1788 gnulib: sync from latest gnulib, notably bootstrap and
1791 * bootstrap: Sync from gnulib.
1792 * doc/.gitignore: Rename getdate.texi to parse-datetime.texi.
1793 * doc/Makefile.am (tar_TEXINFOS): Likewise.
1794 * doc/tar.texi (Top): Adjust to renaming of getdate to
1796 * gnulib.modules: Likewise. Also, remove ftruncate (now
1798 And add inttostr (we missed this dependency).
1799 * src/tar.c: Include parse-datetime.h, not getdate.h. All calls
1800 to get_date replaced with parse_datetime.
1802 2010-09-24 Paul Eggert <eggert@cs.ucla.edu>
1804 tar: -x -C symlink fix
1806 * src/misc.c (chdir_do): Don't use O_NOFOLLOW when opening the
1807 argument to -C. This is for consistency with "tar -c -C FOO", and
1808 matches the new documentation.
1809 * tests/extrac14.at: New file.
1810 * tests/Makefile.am (TESTSUITE_AT): Add it.
1811 * tests/testsuite.at: Include it.
1813 2010-09-24 Paul Eggert <eggert@cs.ucla.edu>
1815 tar: --dereference consistency
1817 This closes another race condition, that occurs when overwriting a
1818 symlink with a regular file.
1819 * NEWS (--dereference consistency): New section.
1820 * doc/tar.texi (Option Summary): Describe new --deference
1822 (dereference): Likewise. Remove discussion that I didn't follow,
1823 even before --dereference was changed.
1824 * src/common.h (deref_stat, set_file_atime): Adjust signatures.
1825 * src/compare.c (diff_file, diff_multivol): Respect
1827 instead of rolling our own flags. This implements the new
1830 (diff_file, diff_dumpdir): Likewise, for fstatat_flags.
1831 * src/create.c: Adjust to set_file_atime signature change.
1832 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
1834 * src/incremen.c (try_purge_directory): Likewise.
1835 * src/misc.c (maybe_backup_file): Likewise.
1836 * src/extract.c (file_newer_p): New arg STP. All callers changed.
1837 (maybe_recoverable): New arg REGULAR. All callers changed.
1838 Handle the case of overwriting a symlink with a regular file,
1839 when --overwrite is specified but --dereference is not.
1840 (open_output_file): Add O_CLOEXEC, O_NOCTTY, O_NONBLOCK for
1841 consistency with file creation. Add O_NOFOLLOW if
1842 overwriting_old_files && ! dereference_option.
1843 * src/incremen.c (update_parent_directory): Use fstat, not
1845 there's less to go wrong.
1846 * src/misc.c (deref_stat): Remove DEREF arg. All callers changed.
1847 Instead, use fstatat_flags.
1848 (set_file_atime): Remove ATFLAG arg. All callers changed.
1849 Instead, use fstatat_flags.
1850 * src/names.c, src/update.c: Adjust to deref_stat signature
1852 * src/tar.c (get_date_or_file): Use stat, not deref_stat, as this
1853 is not a file to be archived.
1854 * tests/Makefile.am (TESTSUITE_AT): Add extrac13.at.
1855 * tests/extrac13.at: New file.
1856 * tests/testsuite.at: Include it.
1858 2010-09-20 Paul Eggert <eggert@cs.ucla.edu>
1860 tar: do not crash with --listed-incremental
1862 Problem reported by Frantisek Hanzlik in
1863 <https://bugzilla.redhat.com/635318> via Kamil Dudka in
1864 <http://lists.gnu.org/archive/html/bug-tar/2010-09/msg00066.html>.
1865 I don't understand this code either, but Sergey can take a look at
1866 this patch, and perhaps install a better one, when he has
1868 * src/incremen.c (append_incremental_renames): Don't actually
1870 anything to DIR if DIR is null.
1872 2010-09-19 Paul Eggert <eggert@cs.ucla.edu>
1874 tar: prefer openat-style functions
1876 This change replaces traditional functions like 'open' with the
1877 POSIX.1-2008 functions like 'openat'. Mostly this is an internal
1878 refactoring change, in preparation for further changes to close
1880 * gnulib.modules: Add faccessat, linkat, mkfifoat, renameat,
1883 * src/Makefile.am (tar_LDADD): Add $(LIB_EACCESS).
1884 * tests/Makefile.am (LDADD): Likewise.
1885 * src/common.h (chdir_fd): New extern var.
1886 * src/compare.c (diff_file, diff_multivol): Use openat instead
1888 * src/create.c (create_archive, restore_parent_fd): Likewise.
1889 * src/extract.c (create_placeholder_file): Likewise.
1890 * src/names.c (collect_and_sort_names): Likewise.
1891 * src/update.c (append_file): Likewise.
1892 * src/compare.c (diff_symlink): Use readlinkat instead of
1894 * src/compare.c (diff_file): Use chdir_fd instead of AT_FDCWD.
1895 * src/create.c (subfile_open, dump_file0): Likewise.
1896 * src/extract.c (fd_chmod, fd_chown, fd_stat, set_stat):
1897 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
1899 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
1900 (extract_link, apply_delayed_links):
1901 Use fstatat rather than stat or lstat.
1902 * src/misc.c (maybe_backup_file, deref_stat): Likewise.
1903 * src/extract.c (make_directories): Use mkdirat rather than mkdir.
1904 Use faccessat rather than access. This fixes a minor permissions
1905 bug when tar is running setuid (who would want to do that?!).
1906 (open_output_file): Use openat rather than open.
1907 In the process, this removes support for Masscomp's O_CTG files,
1908 which aren't compatible with openat's signature. Masscomp! Wow!
1909 That's a blast from the past. As far as I know, that operating
1910 system hasn't been supported for more than 20 years.
1911 (extract_link, apply_delayed_links):
1912 Use linkat rather than link.
1913 (extract_symlink, apply_delayed_links):
1914 Use symlinkat rather than symlink.
1915 (extract_node): Use mknodat rather than mknod.
1916 (extract_fifo): Use mkfifoat rather than mkfifo.
1917 (apply_delayed_links): Use unlinkat rather than unlink or rmdir.
1918 * src/misc.c (safer_rmdir, remove_any_file): Likewise.
1919 * src/unlink.c (flush_deferred_unlinks): Likewise.
1920 * src/extract.c (rename_directory): Use renameat rather than
1922 * src/misc.c (maybe_backup_file, undo_last_backup): Likewise.
1923 * src/misc.c: Don't include <save-cwd.h>; no longer needed now
1924 that we're using openat etc.
1925 (struct wd): Add member fd. Remove members err and fd. All uses
1927 (CHDIR_CACHE_SIZE): New constant.
1928 (wdcache, wdcache_count, chdir_fd): New vars.
1929 (chdir_do): Use openat rather than save_cwd. Keep the cache up
1930 to date. This code won't scale well, but is good enough for now.
1931 * src/update.c (update_archive): Use openat + fdopendir +
1932 streamsavedir rather than savedir.
1934 This file is a placeholder. It will be replaced with the actual
1936 by make dist. Run make ChangeLog if you wish to create it
1939 2010-09-18 Paul Eggert <eggert@cs.ucla.edu>
1941 tar: add utimens.h includes
1943 * src/extract.c: Include <utimens.h>, needed for fdutimens
1945 * src/misc.c: Likewise.
1947 2010-09-18 Paul Eggert <eggert@cs.ucla.edu>
1949 tar: switch to gnulib fdutimensat module
1951 * gnulib.modules: Add fdutimensat.
1952 * src/common.h (fd_utimensat): Remove decl.
1953 * src/extract.c (set_stat): Call fdutimensat, not fd_utimensat.
1954 * src/misc.c (set_file_atime): Likewise.
1955 (fd_utimensat): Remove.
1957 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
1959 tar: extract permissions for . last
1961 * src/common.h (must_be_dot_or_slash): New decl.
1962 * src/extract.c (mark_after_links): New function, taking code
1963 that used to be in create_placeholder_file.
1964 (create_placeholder_file): Use it.
1965 (delay_set_stat): Always delay setting status for . and /.
1966 * src/misc.c (must_be_dot_or_slash): Now extern.
1967 * tests/extrac12.at: New file.
1968 * tests/Makefile.am (TESTSUITE_AT): Add it.
1969 * tests/testsuite.at: Likewise.
1971 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
1973 tar: don't check for getdtablesize; use AC_CHECK_FUNCS_ONCE
1975 * configure.ac: Don't check for getdtablesize; no longer needed.
1976 Use AC_CHECK_FUNCS_ONCE rather than AC_CHECK_FUNCS, for
1979 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
1981 tar: extract symlink attributes, close some symlink-related races
1983 * NEWS: Describe symlink-extraction improvements.
1984 * src/extract.c (enum permstatus): Remove.
1985 (fchmod, fchown): Define dummy replacement macros if the system
1986 does not supply them.
1987 (implemented): New function.
1988 (struct delayed_set_stat): Remove members invert_permissions,
1989 permstatus. They were too confusing, and tried to do too much
1990 in too-little space. Instead, add members current_mode,
1991 current_mode_mask, interdir, atflag. All users changed.
1992 (struct delayed_link): Add members mode, atime, mtime, to support
1993 platforms such as BSD where symlinks have these attributes.
1995 (fd_chmod): Renamed from fdchmod. New argument atflag. Check for
1996 operation not supported at run-time, not at configure-time. Put
1997 fd argument first. All callers changed.
1998 (fd_chown): Likewise, renaming from fdchown.
1999 (fd_stat): Likewise, renaming from fdstat.
2000 (set_mode): Remove args stat_info, cur_info, invert_permissions,
2001 permstatus. Add args mode, mode_mask, current_mode,
2003 atflag. All callers changed. Close some races. Use an easier-to
2004 understand method for computing permissions. Work around POSIX
2005 incompatibility in Linux fchmodat. Support extraction of symlink
2006 modes, if the OS allows it.
2007 (set_stat): Remove args cur_info, invert_permissions, permstatus.
2008 Add args current_mode, current_mode_mask, interdir, atflag.
2009 All callers changed. Close some races. Support extraction of
2010 attributes on symlinks, if the OS allows it.
2011 (delay_set_stat): Remove args invert_permissions, permstatus.
2012 Add args current_mode, current_mode_mask, mode, atflag.
2013 The ST arg can be null now, indicating that it's an intermediate
2014 directory. All callers changed.
2015 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
2017 (extract_dir): Also be paranoid if only --same-permissions, due
2018 to semantics of setgid and setuid directories on some hosts.
2019 This closes a race on those hosts. Simplify calculation of
2020 delay_set_stat arguments; the old code was truly strange and
2021 probably wrong in some border cases.
2022 (extract_dir, extract_file, extract_node, extract_fifo): Don't
2024 unspecified behavior in mode arg of open, mknod, etc. Instead,
2025 mask out those bits when creating the file, and add them later via
2027 (open_output_file): file_name is now const. Add arg current_mode,
2028 current_mode_mask. All callers changed. When overwriting
2030 refuse to overwrite something that is not a regular file, since
2031 we're extracting a regular file.
2032 (extract_file): Remove the FIXME comment. Whatever the protection
2033 issues were, they should be fixed now. As a result of all
2035 API changes, we now use fchmod etc. rather than chmod etc.,
2038 (create_placeholder_file, apply_delayed_links): Record desired
2039 mode and times for symlinks, for OSes that support that.
2041 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2043 tar: tar -x without --incremental no longer sets atime again
2045 * src/extract.c (set_stat): Use UTIME_OMIT rather than UTIME_NOW.
2046 The UTIME_NOW was there only to emulate the previous behavior of
2047 using the current time, and the previous behavior was there only
2048 because before we started assuming POSIX.1-2008 there was no
2049 portable way to get the effect of UTIME_NOW.
2051 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2053 tar: another --atime-preserve race fix
2055 * src/common.h (set_file_atime): Add parentfd arg.
2056 * src/compare.c (diff_file): Use it.
2057 * src/create.c (dump_file0): Likewise. This closes yet another
2058 race condition with symbolic links.
2059 * src/misc.c (set_file_atime): Add parentfd arg.
2061 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
2063 tar: --atime-preserve fixes for races etc.
2065 This patch fixes a race condition in the --atime-preserve=replace
2066 option, which might cause tar to improperly follow a symbolic
2069 It also drops the use of the _FIOSATIME ioctl of Solaris 2.x
2070 and later, which loses resolution on time stamps. Modern Solaris
2071 systems support full-resolution time stamps in the kernel, and
2072 it's not worth the hassle of testing this call, useful only in
2073 no-longer-supported Solaris variants.
2075 Also, it undoes a change I recently introduced to the --compare
2076 option, which caused it to not follow symbolic links unless the
2077 --dereference option was also used. Quite possibly this change is
2078 a good idea, but the old behavior was documented and the change
2079 should not have been installed casually.
2081 * configure.ac: Don't check for stropts.h and sys/filio.h.
2082 * gnulib.modules: Add futimens, utimensat. Remove futimens.
2083 * src/common.h (fd_utimensat): New decl.
2084 * src/compare.c (diff_file, diff_multivol):
2085 Don't use open_read_flags: those are for --create only.
2086 * src/create.c (dump_file0): Adjust to set_file_atime changes.
2087 Pass fstatat_flags to set_file_atime, so that symbolic links are
2088 not followed inadvertantly.
2089 * src/extract.c: Don't include utimens.h.
2090 (set_stat): Use fd_utimensat ant UTIME_NOW rather than fdutimens.
2091 * src/misc.c: Don't include utimens.h, stropts.h, sys/filio.h.
2092 (fd_utimensat): New function.
2093 (set_file_atime): Use it. New arg atflag, controlling symlink
2094 handling. All callers changed.
2096 2010-09-14 Paul Eggert <eggert@cs.ucla.edu>
2098 * configure.ac: tar: close some race conditions when extracting
2100 * configure.ac: Check for fchmod and fchown. Don't check
2102 * src/extract.c (fdchmod, fdchown, fdstat): New functions.
2103 (set_mode, set_stat): New arg FD. All callers changed.
2104 This avoids some race conditions between closing a regular file
2105 and setting its metadata, and it's a bit faster.
2107 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2109 tar: don't worry about fdopendir closing its argument
2111 * NEWS: Don't mention dirfd; no longer needed.
2112 * gnulib.modules: Remove dirfd.
2113 * src/create.c (get_directory_entries): Remove the code dealing
2114 with dirfd failures, as the new fdopendir replacement doesn't
2115 close its argument so we don't need to call dirfd. See
2116 <http://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00208.html>
2117 and gnulib commit 970c9038e4cca46e1b037ae0a6d574dfae6a7327.
2119 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2121 * NEWS: Fix wording typo in previous change.
2123 Reported by Jim Meyering.
2125 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
2127 tar: live within system-supplied limits on file descriptors
2129 * NEWS: Note the change. Mention dirfd and fdopendir.
2130 * gnulib.modules: Add dirfd and fdopendir. The code was already
2131 using fdopendir; dirfd is a new need.
2132 * src/common.h (open_searchdir_flags, get_directory_entries):
2133 (subfile_open, restore_parent_fd, tar_stat_close): New decls.
2134 (check_exclusion_tags): Adjust signature to match code change.
2135 * src/create.c (IMPOSTOR_ERRNO): New constant.
2136 (check_exclusion_tags): First arg is now a struct tar_stat_info
2137 const *, not an fd. All callers changed.
2138 (dump_regular_file, dump_file0): A zero fd represents an unused
2139 slot, so play it safe if the fd member is zero here. A negative
2140 fd represents the negation of an errno value, so play it safe and
2141 do not assign -1 to fd merely because an open fails.
2142 (open_failure_recover, get_directory_entries, restore_parent_fd):
2143 (subfile_open): New functions. These help to recover from file
2144 descriptor exhaustion.
2145 (dump_dir, dump_file0): Use them.
2146 (dump_file0): Use tar_stat_close instead of rolling our own close.
2147 * src/incremen.c (scan_directory): Use get_directory_entries,
2148 subfile_open, etc., to recover from file descriptor exhaustion.
2149 * src/names.c (add_hierarchy_to_namelist): Likewise.
2150 (collect_and_sort_names): A negative fd represents the negation
2151 of an errno value, so play it safe and do not assign -1 to fd.
2152 * src/tar.c (decode_options): Set open_searchdir_flags.
2153 Add O_CLOEXEC to all the open flags.
2154 (tar_stat_close): New function, which knows how to deal with
2155 new convention for directory streams and file descriptors.
2156 Diagnose 'close' failures.
2157 (tar_stat_destroy): Use it.
2158 * src/tar.h (struct tar_stat_info): New member dirstream.
2159 fd now has the negative of an errno value, not merely -1, if
2160 the file could not be opened, so that failures to reopen
2162 are better-diagnosed later.
2163 * tests/Makefile.am (TESTSUITE_AT): Add extrac11.at.
2164 * tests/testsuite.at: Likewise.
2165 * tests/extrac11.at: New file.
2167 2010-09-08 Paul Eggert <eggert@cs.ucla.edu>
2169 tar: improve documentation of reliability and security issues
2171 * doc/tar.texi (Reliability and security, Reliability):
2172 (Permissions problems, Data corruption and repair, Race
2174 (Security, Privacy, Integrity, Live untrusted data):
2175 (Security rules of thumb): New nodes.
2177 2010-09-06 Paul Eggert <eggert@cs.ucla.edu>
2179 tar: more reliable directory traversal when creating archives
2181 * NEWS: Document this.
2182 * gnulib.modules: Add openat, readlinkat.
2183 * src/common.h (open_read_flags, fstatat_flags): New global
2185 (cachedir_file_p, dump_file, check_exclusion_tags,
2187 Adjust to new signatures, described below.
2188 (name_fill_directory): Remove.
2189 * src/compare.c (diff_file, diff_multivol): Use open_read_flags.
2190 * src/create.c (struct exclusion_tag): Exclusion predicates
2192 a file descriptor, not a file name.
2193 (add_exclusion_tag): Likewise. All uses changed.
2194 (cachedir_file_p): Likewise.
2195 (check_exclusion_tags): The directory is now a file descriptor,
2196 not a file name. All uses changed. Use openat for better
2198 (file_dumpable_p): Arg is now a struct stat, not a struct
2199 tar_stat_info. All uses changed. Check the arg's file types too.
2200 (dump_dir0, dump_dir, dump_file0, dump_file): Omit top_level and
2201 parent_device args, since st->parent tells us that now. All uses
2203 (dump_dir): Likewise. Also, omit fd arg for similar reasons.
2204 Apply fdsavedir to a dup of the file descriptor, since we need a
2205 file descriptor for openat etc. as well, and fdsavedir (perhaps
2206 unwisely) consumes its file descriptor when successful.
2207 Do not consume st->fd when successful; this simplifies the caller.
2208 (create_archive): Allocate a file descriptor when retraversing
2209 a directory, during incremental dumps.
2210 (dump_file0): Use fstatat, openat, and readlinkat for better
2212 When opening a file, use the result of fstat on the file
2214 rather than the fstatat on the directory entry, to avoid some race
2215 conditions. No need to reopen the directory since we now
2217 close it. Change "did we open the file?" test from 0 <= fd to
2218 0 < fd since fd == 0 now represents uninitialized.
2219 (dump_file): Now accepts struct tar_stat_info describing parent,
2220 not parent_device. Also, accept basename and fullname of entry.
2222 * src/incremen.c (update_parent_directory): Accept struct
2223 tar_stat_info for parent, not name. All callers changed.
2224 Use fstatat for safer directory traversal.
2225 (procdir): Accept struct tar_stat_info, not struct stat and
2226 dev_t, for info about directory. All callers changed.
2227 (scan_directory): Accept struct tar_stat_info, not name,
2228 device, and cmdline, for info about directory. All callers
2229 changed. Do not consume the file descriptor, since caller
2230 might need it. Use fstatat and openat for safer directory
2231 traversal; also, use fstat after opening to double-check.
2232 (name_fill_directory): Remove.
2233 * src/names.c (add_hierarchy_to_namelist): Accept struct
2234 tar_stat_info instead of device and cmdline. All callers changed.
2235 When descending into a subdirectory, use openat and fstat for
2236 safer directory traversal.
2237 (collect_and_sort_names): Use open and fstat for safer directory
2238 traversal. Set up struct tar_stat_info for callee's new API.
2239 * src/tar.c (decode_options): Initialize open_read_flags
2241 (tar_stat_destroy): Close st->fd if it is positive (not zero!).
2242 * src/tar.h (struct tar_stat_info): New members parent, fd.
2243 * src/update.c (update_archive): Adjust to dump_file's API change.
2244 * tests/filerem02.at: Ignore stderr since its contents now depend
2245 on the file system implementation.
2247 2010-09-05 Paul Eggert <eggert@cs.ucla.edu>
2249 tar: remove lint discovered by Sun C compiler
2251 * src/common.h (WARN_ALL): Don't mask with 0xffffffff; on a 32-bit
2252 host, 0xffffffff is of type 'unsigned int', which makes WARN_ALL
2253 an unsigned int value that is too large to fit into an int, and
2254 the C standard says that this has undefined behavior. The mask is
2255 not needed, so omit it.
2257 2010-09-04 Paul Eggert <eggert@cs.ucla.edu>
2259 tar: restore macros that are used in some cases
2261 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
2262 Restore these macros, undoing the previous change to this file.
2263 The macros are used after all, in some cases. Sorry about that.
2265 2010-09-03 Paul Eggert <eggert@cs.ucla.edu>
2267 tar: remove unused macros
2269 * src/create.c (UINTMAX_TO_CHARS): Remove; no longer used.
2270 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
2272 * src/incremen.c (DIR_IS_NEW): Comment out; not used.
2273 Mark this with a FIXME, since it looks like it should be used.
2275 2010-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
2277 Fix --remove-files in update/append mode.
2279 * src/update.c (update_archive): Call finish_deferred_unlinks when
2282 2010-08-26 Paul Eggert <eggert@cs.ucla.edu>
2284 tar: avoid assumptions about root access and chmod -w in test
2287 * tests/extrac07.at, tests/extrac09.at, tests/listed03.at: Use
2288 AT_UNPRIVILEGED_PREREQ, since this test requires non-root
2290 * tests/extrac07.at: Don't use "chmod -w", as POSIX says it's not
2291 portable to start a chmod permissions-list with "-" as it may be
2292 confused with an option. Use "chmod a-w" instead.
2294 2010-08-26 Paul Eggert <eggert@cs.ucla.edu>
2296 tar: fix bug with -C and delayed setting of metadata
2298 * src/common.h (chdir_current): New decl.
2299 * src/extract.c (struct delayed_set_stat, struct delayed_link):
2300 New member change_dir.
2301 (delay_set_stat, create_placeholder_file): Set it.
2302 (apply_nonancestor_delayed_set_stat, apply_delayed_links): Use it.
2303 (extract_link): Check that the links are all relative to the same
2305 (extract_archive): Restore the current directory after
2306 apply_nonancestor_delayed_set_stat has possibly changed it.
2307 * src/misc.c (chdir_current): New external var; this used to
2308 be the private static variable 'previous' inside chdir_dir.
2310 * tests/Makefile.am (TESTSUITE_AT): New test extrac10.at.
2311 * tests/extrac10.at: New file.
2312 * tests/testsuite.at: Include it.
2314 2010-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
2316 Don't apply file transformations to volume names.
2318 * src/list.c (decode_header): Don't apply file transformations
2320 * tests/xform01.at: New testcase.
2321 * tests/xform-h.at (xform): Rename macro to xformtest. Use
2323 * tests/Makefile.am, tests/testsuite.at: Add xform01.at
2325 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2327 tar: optimize -c --sparse when file is entirely sparse
2329 * src/sparse.c (sparse_scan_file): If the file is entirely sparse,
2330 that is, if ST_NBLOCKS is zero, don't bother scanning for nonzero
2331 blocks. Idea by Kit Westneat, communicated by Bernd Schubert in
2332 <http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00038.html>.
2333 Also, omit unnecessary lseek at start of file.
2335 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2337 tar: don't assume size of a sparse file chunk fits in size_t
2339 * src/tar.h (struct sp_array): Change numbytes from size_t
2342 * scripts/xsparse.c (struct sp_array): Likewise.
2343 Include <stdint.h>, for SIZE_MAX.
2344 (expand_sparse): Don't try to allocate a buffer bigger than
2346 * src/common.h (SIZE_TO_CHARS, size_to_chars, SIZE_FROM_HEADER):
2347 (size_from_header): Remove decls.
2348 * src/create.c (size_to_chars): Remove.
2349 * src/list.c (size_from_header): Remove.
2350 * src/sparse.c (sparse_extract_region, check_data_region):
2351 (oldgnu_add_sparse, oldgnu_store_sparse_info, pax_decode_header):
2352 Don't assume chunk sizes fit in size_t.
2353 (oldgnu_add_sparse): Check for off_t overflow.
2354 * src/xheader.c (sparse_numbytes_decoder, sparse_map_decoder):
2357 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
2359 tar: use ctime, not mtime, when checking placeholders
2361 * src/extract.c (struct delayed_link): Rename member mtime
2363 All uses changed to use ctime rather than mtime.
2365 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2367 tar: add comment to link04.at test
2369 * tests/link04.at: Add explanatory comment at head.
2371 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2373 tar: fix 1.23 Solaris regression related to PRIV_SYS_LINKDIR
2375 The idea was suggested by Petr Sumbera in the thread starting
2377 http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00000.html
2378 * src/extract.c (set_mode): Save the errno of the chmod that
2379 failed, for the benefit of chmod_error_details. Do not bother
2380 retrying chmod unless the mode suggests setuid is the issue.
2381 (extract_archive): Remove redundant call to
2382 priv_set_remove_linkdir.
2383 * src/system.c: Include priv-set.h.
2384 (sys_spawn_shell, sys_child_open_for_compress):
2385 (sys_child_open_for_uncompress, sys_exec_command):
2386 (sys_exec_info_script, sys_exec_checkpoint_script):
2387 Invoke priv_set_restore_linkdir before execv or execlp, so that
2388 the subprocess has the same privileges that tar originally did.
2390 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
2392 tar: handle files that occur multiple times but have link count 1
2394 This patch was inspired by the following patch that addressed a
2395 similar problem in GNU coreutils du:
2396 http://git.savannah.gnu.org/gitweb/?p=coreutils.git;h=efe53cc72b599979ea292754ecfe8abf7c839d22
2397 * src/common.h (name_count): New decl.
2398 * src/create.c (trivial_link_count): New static var.
2399 (create_archive): Initialize it.
2400 (dump_hard_link, file_count_links): Use it, so that files with
2401 link count 1 are handled correctly when they are found multiple
2403 * src/names.c (allocated_entries): Renamed from allocated_names,
2404 since the identifier's name was misleading. All uses changed.
2405 (entries): Renamed from names. All uses changed.
2406 (scanned): Renamed from name_index. All uses changed.
2407 (name_count): New var.
2408 (name_add_name): Increment it.
2409 * tests/link04.at: New file.
2410 * tests/testsuite.at: Add it.
2411 * tests/Makefile.am (TESTSUITE_AT): Likewise.
2413 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2415 tar: use nlink_t for link counts
2417 * src/create.c (struct link): nlink is now of type nlink_t,
2420 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2422 tar: don't export names that aren't used elsewhere
2424 * src/common.h (file_dumpable_p, gid_to_chars, major_to_chars):
2425 (minor_to_chars, mode_to_chars, uid_to_chars, uintmax_to_chars):
2426 (string_to_chars, dumpdir_creat0, dumpdir_create, dumpdir_free):
2427 (dumpdir_locate, dumpdir_next, dumpdir_first, gid_from_header):
2428 (major_from_header, minor_from_header, mode_from_header):
2429 (time_from_header, uid_from_header, quote_copy_string,
2431 (xheader_init, transform_header_name):
2432 Remove declarations; these are no longer exported from their
2434 (GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS):
2435 (UID_TO_CHARS, UINTMAX_TO_CHARS, UNAME_TO_CHARS, GNAME_TO_CHARS):
2436 Move to src/create.c, since no other module uses these.
2437 (GID_FROM_HEADER, MAJOR_FROM_HEADER, MINOR_FROM_HEADER):
2438 (MODE_FROM_HEADER, TIME_FROM_HEADER, UID_FROM_HEADER):
2439 Move to src/extract.c, since no other module uses these.
2440 (dumpdir_t, dumpdir_iter_t): Remove; no longer used.
2441 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars):
2442 (mode_to_chars, uid_to_chars, uintmax_to_chars, string_to_chars):
2443 (file_dumpable_p): Now static.
2444 * src/incremen.c (dumpdir_create0, dumpdir_create, dumpdir_free):
2445 (dumpdir_locate, dumpdir_next, dumpdir_first): Now static.
2446 (scan_directory, write_directory_file_entry):
2447 Use struct dumpdir_iter * rather than dumpdir_iter_t.
2448 * src/list.c (gid_from_header, major_from_header,
2450 (mode_from_header, time_from_header, uid_from_header):
2451 (transform_member_name): Now static.
2452 * src/misc.c (quote_copy_string): #if 0 out, as it's not used
2454 * src/system.c (wait_for_grandchild): Now static.
2455 * src/tar.c (request_stdin): Now static.
2456 * src/xheader.c (xheader_init): Now static.
2458 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
2460 tar: fix misspelled identifier "set_comression_program_by_suffix"
2462 * src/suffix.c (set_compression_program_by_suffix): Renamed from
2463 set_comression_program_by_suffix.
2464 * src/buffer.c, src/common.h, src/tar.c: All uses changed.
2466 2010-08-20 Paul Eggert <eggert@cs.ucla.edu>
2468 tar: change interdir_made from int to bool
2470 * src/extract.c (maybe_recoverable, create_placeholder_file):
2471 Change interdir_made from int * to bool *, since the flag has just
2472 two values 0 and 1. All uses changed. This does not affect tar's
2475 2010-08-20 Paul Eggert <eggert@cs.ucla.edu>
2477 tar: remove trailing white space from source files
2479 * ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README:
2480 * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi:
2481 * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el:
2482 * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi:
2483 * doc/value.texi, lib/Makefile.am, scripts/backup-specs:
2484 * scripts/dump-remind.in, scripts/tar-snapshot-edit,
2486 * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c:
2487 * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c:
2488 * src/tar.h, src/update.c, src/warning.c, src/xheader.c:
2489 * tests/append01.at, tests/append02.at, tests/atlocal.in:
2490 * tests/delete03.at, tests/exclude.at, tests/exclude06.at:
2491 * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at:
2492 * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at:
2493 * tests/incr01.at, tests/incr02.at, tests/incr03.at,
2495 * tests/label02.at, tests/label03.at, tests/label04.at:
2496 * tests/label05.at, tests/link02.at, tests/link03.at:
2497 * tests/listed01.at, tests/listed02.at, tests/long01.at:
2498 * tests/longv7.at, tests/multiv01.at, tests/multiv02.at:
2499 * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at:
2500 * tests/multiv07.at, tests/multiv08.at, tests/options.at:
2501 * tests/options02.at, tests/remfiles03.at, tests/rename01.at:
2502 * tests/rename02.at, tests/rename03.at, tests/rename04.at:
2503 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
2504 * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at:
2505 * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at:
2506 * tests/star/README, tests/star/gtarfail2.at:
2507 * tests/star/multi-fail.at:
2508 * tests/star/pax-big-10g.at, tests/star/quicktest.sh:
2509 * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at:
2510 * tests/update01.at, tests/update02.at, tests/volsize.at:
2512 Remove trailing spaces and tabs from lines, and remove
2513 trailing empty lines from files. This makes it a bit easier
2514 to share code among coreutils and other projects that do this.
2516 2010-08-19 Paul Eggert <eggert@cs.ucla.edu>
2518 tar: update licenses to latest versions from www.gnu.org
2520 * COPYING: Update to latest version; this is just minor
2522 * doc/fdl.texi: Update from GFDL 1.2 to 1.3.
2523 * doc/tar.texi: Adjust to new format of fdl.texi. Omit trailing
2526 2010-07-18 Paul Eggert <eggert@cs.ucla.edu>
2528 * src/misc.c (struct wd): Fix comment to match code.
2530 2010-07-18 Paul R. Eggert <eggert@cs.ucla.edu>
2532 tar: no need to report getcwd error if never using the result
2534 * src/misc.c (struct wd): Rename 'saved' to 'err', with new
2536 (chdir_arg, chdir_do): Adjust to new semantics. Do not report an
2537 error merely because save_cwd fails; report an error only if
2538 save_cwd's result is needed later.
2539 * tests/extrac09.at: New file, to test for bug that was fixed.
2540 * tests/testsuite.at: Include it.
2541 * tests/Makefile.am (TESTSUITE_AT): Add it.
2543 2010-07-18 Paul R. Eggert <eggert@cs.ucla.edu>
2545 tar: go back to absolutifying filenames in normalize_filename
2548 * src/misc.c (normalize_filename): For now, go back to making
2549 filenames absolute, even though this causes 'tar' to fail when
2550 getcwd fails. However, do not attempt to resolve ".." as this
2551 does not work with symlinks. Also, do the right thing with
2552 leading file system prefixes and on hosts where // != /.
2554 2010-07-17 Sergey Poznyakoff <gray@gnu.org.ua>
2556 Allow for size suffixes in -L and --record-size options.
2558 * src/tar.c (TAR_SIZE_SUFFIXES): New define.
2559 (parse_opt): Allow for size suffixes in arguments to
2560 -L and --record-size options.
2561 * NEWS, doc/tar.texi: Update.
2563 2010-07-15 Paul R. Eggert <eggert@cs.ucla.edu>
2565 tar: don't crash if getcwd fails
2567 * src/extract.c: Don't include xgetcwd.h.
2568 (extract_dir): stat "." rather than statting getcwd's output.
2569 * src/misc.c (normalize_filename_x): Rewrite so as not to resolve
2570 /../, which can't be done reliably in the presence of symlinks.
2571 Don't reject valid names such as ".".
2572 (normalize_filename): Don't make it absolute; that way, we don't
2573 have to invoke xgetcwd which might fail. Don't bother to realloc
2574 at the end, since that uses time and now saves little space.
2575 (chdir_do): Don't crash if xgetcwd fails.
2576 * tests/Makefile.am (TESTSUITE_AT): Add listed03.at.
2577 * tests/listed03.at: New file.
2578 * tests/testsuite.at: Include listed03.at.
2580 2010-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
2582 Keep a detailed map of archive members stored in the record
2585 A separate map (bufmap) provides information for creating
2586 multi-volume continuation headers.
2588 * src/buffer.c (bufmap): New struct.
2589 (bufmap_head, bufmap_tail, inhibit_map): New variables.
2590 (mv_begin_write): New function.
2591 (mv_begin): Rename to mv_begin_read. Rewrite using mv_begin_write.
2592 All callers changed.
2593 (mv_total_size): Remove.
2594 (bufmap_locate, bufmap_free, bufmap_reset): New functions.
2595 (_flush_write): Update bufmap.
2596 (close_archive): Free bufmap.
2597 (add_chunk_header): Take a bufmap argument.
2598 (gnu_add_multi_volume_header): Likewise.
2599 (add_multi_volume_header): Likewise.
2600 (_gnu_flush_write): Rewrite using bufmap.
2601 (real_s_name, real_s_totsize)
2603 (save_name, save_totsize, save_sizeleft): Removed. All
2605 (mv_size_left): Update bufmap_head.
2607 (multi_volume_sync): Remove.
2609 * src/common.h (mv_begin_write): New prototype.
2610 (mv_begin): Rename to mv_begin_read.
2611 * src/create.c: Use mv_begin_write instead of mv_begin.
2612 Remove calls to mv_size_left and mv_end.
2613 * src/sparse.c: Likewise.
2615 * tests/multiv07.at: Close stdin.
2616 * tests/spmvp00.at: Update AT_KEYWORDS.
2617 * tests/spmvp10.at: Likewise.
2619 * tests/multiv08.at: New testcase.
2620 * tests/Makefile.am, tests/testsuite.at: Add multiv08.at.
2622 2010-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
2626 * NEWS, configure.ac: Version 1.23.90
2627 * doc/tar.texi: Document the use of lbzip2.
2629 2010-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
2631 Fix exclusion of long file names when extracting from pax format
2634 * src/list.c (read_and): Call decode_header before attempting
2636 (list_archive): Remove call to decode_header.
2638 * src/compare.c (diff_archive): Remove call to decode_header.
2639 * src/extract.c (extract_archive): Likewise.
2641 * test/exclude06.at: New test case.
2642 * tests/testsuite.at: Include exclude06.at.
2643 * tests/Makefile.am (TESTSUITE_AT): Add exclude06.at.
2645 2010-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
2649 * src/buffer.c (magic): Split the character constant to help
2650 cc recognize character boundaries (7 is a valid hex character).
2652 2010-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
2656 * src/buffer.c (magic): Fix xz magic.
2658 2010-06-16 Paul Eggert <eggert@cs.ucla.edu>
2660 Remove some lint, found by gcc -W etc.
2662 * src/common.h (label_notfound): New decl.
2663 * src/buffer.c (set_volume_start_time, compress_type):
2664 (guess_seekable_archive, open_compressed_archive, init_buffer):
2665 (_flush_write, archive_is-dev, increase_volume_number):
2666 (change_tape_menu, try_new_volume, add_chunk_header):
2667 (multi_volume_sync):
2668 Declare as 'static' if it's not exported.
2669 Use function prototype (void) rather than old-style ().
2670 * src/checkpoint.c (expand_checkpoint_string): Likewise.
2671 * src/incremen.c (dirlist_replace_prefix, makedumpdir,
2674 * src/list.c (print_volume_label): Likewise.
2675 * src/misc.c (normalize_filename_x): Likewise.
2676 * src/names.c (make_name, free_name, check_name_alloc,
2679 * src/tar.c (tar_list_quoting_style, add_exclude_array):
2680 (set_stat_signal): Likewise.
2681 * src/transform.c (new_transform,
2682 _single_transform_name_to_obstack):
2683 (_transform_name_to_obstack): Likewise.
2684 * src/unlink.c (dunlink_alloc): Likewise.
2686 * src/buffer.c (struct zip_magic): Use const when appropriate.
2687 * src/incremen.c (obstack_code_rename,
2688 write_directory_file_entry):
2690 * src/sparse.c (COPY_STRING): Likewise.
2691 * src/system.c (dec_to_env, time_to_env, oct_to_env, str_to_env):
2692 (chr_to_env): Likewise.
2693 * src/tar.c (tar_list_quoting_style, set_stat_signal): Likewise.
2695 * src/extract.c (extract_node): Don't return garbage.
2697 * src/names.c: Remove old-style declarations of getgrnam etc.
2698 All modern systems declare these, and it's not worth the hassle
2699 of ignoring the warnings on modern systems for old-style decls.
2701 2010-05-17 Sergey Poznyakoff <gray@gnu.org.ua>
2705 * src/incremen.c (make_directory): Retain the slash if it is the
2706 only character in a filename.
2708 2010-04-02 Sergey Poznyakoff <gray@gnu.org.ua>
2710 Recode NEWS back to UTF-8
2712 2010-04-01 Sergey Poznyakoff <gray@gnu.org.ua>
2714 Fix the gzip.at test case.
2716 * tests/gzip.at: Suppress gzip error output, as it can differ
2717 depending on its version etc. Bug reported by Ludovic Courtès.
2719 2010-03-28 Sergey Poznyakoff <gray@gnu.org.ua>
2721 New option --full-time.
2723 * src/common.h (full_time_option): New global.
2724 * src/tar.c (FULL_TIME_OPTION): New constant.
2725 (options): New option --full-time.
2726 (parse_opt): Handle the --full-time option.
2727 * src/list.c (simple_print_header): Pass full_time_option
2728 as the 2nd argument to tartime.
2729 * doc/tar.texi: Update.
2732 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
2734 Minor fixes in the testsuite.
2736 * tests/extrac07.at: Fix a typo (invalid number
2737 of arguments before format list).
2738 * tests/link02.at: Use `ln' instead of `link'.
2739 * tests/link03.at: Likewise.
2741 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
2745 * src/names.c (collect_and_sort_names): Remove
2746 entry from the table before freeing it.
2748 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
2750 Fix dead loop on extracting existing symlinks with the -k option.
2752 * src/extract.c (create_placeholder_file)
2753 (extract_link, extract_symlink)
2754 (extract_node, extract_fifo): Handle all possible
2755 return values from maybe_recoverable. This complements
2756 8f390db92fc. Reported by Ico Doornekamp <bug-tar@zevv.nl>.
2759 2010-03-20 Sergey Poznyakoff <gray@gnu.org.ua>
2761 Fix undesired error exit on receiving SIGPIPE.
2763 * src/tar.c: Do not ignore SIGPIPE.
2764 * tests/sigpipe.at: New testcase.
2765 * tests/Makefile.am, tests/testsuite.at: Add sigpipe.at
2766 * tests/remfiles01.at: Fix error code expectation.
2769 2010-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
2773 Tar --remove-files relied on canonicalize_file_name,
2774 which replaces symlinks in file name components with
2775 the directories they point to. Due to this, tar
2776 effectively ignored existence of symbolic links and
2777 was unable to remove a directory that contained any
2778 (Alexander Kozlov <akozlov@nada.kth.se>, 2010-03-15).
2780 * gnulib.modules: Remove canonicalize.
2781 * src/misc.c (normalize_filename): Rewrite
2782 from scratch. The function operates only on
2783 its input string, it makes no attempt to test
2784 components for existence or to resolve symbolic
2786 * tests/Makefile.am (TESTSUITE_AT): Add remfiles03.at.
2787 * tests/testsuite.at: Likewise.
2788 * tests/remfiles03.at: New test case.
2791 2010-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
2795 * src/buffer.c (check_label_pattern): Initialize result.
2796 * tests/remfiles01.at: Skip if run with root privileges.
2798 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
2800 Fix `--test-label' and `--label -r' behavior.
2802 * doc/tar.texi (Including a Label in the Archive): Revise
2806 * src/buffer.c (open_archive): Check volume label on
2807 ACCESS_UPDATE as well.
2808 * src/list.c (test_archive_label): Rewrite to match the
2810 * src/names.c (regex_usage_warning): Return int.
2811 (names_notfound): Rewrite the conditional.
2812 (label_notfound): New function.
2814 * tests/label03.at: New testcase.
2815 * tests/label04.at: New testcase.
2816 * tests/label05.at: New testcase.
2817 * tests/Makefile.am: Add new testcases.
2818 * tests/testsuite.at: Likewise.
2820 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
2824 * doc/tar.texi: Consistently use lowercase `see' within sentences.
2825 More fixes spotted by Denis Excoffier.
2828 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
2830 Shut up a gcc warning message.
2832 * src/tar.c (tar_help_filter): Use a separate const
2833 variable to hold returns from gettext. Reported by
2834 Peter Breitenlohner.
2836 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
2840 * src/names.c (collect_and_sort_names): Initialize prev_name.
2841 Reported by Dmitry V. Levin.
2843 2010-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
2847 * configure.ac, NEWS: Update version number.
2849 2010-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
2855 * doc/snapshot.texi, doc/snapshot.texi,
2856 doc/sparse.texi, doc/tar-snapshot-edit.texi,
2857 doc/tar.texi: Spellchecked and proof-read. Thanks
2859 * gnulib.modules: Remove utime.
2861 2010-03-08 Kamil Dudka <kdudka@redhat.com>
2863 Fix possible overflow in code_timespec (tiny change)
2865 * src/misc.c (code_timespec): ignore invalid values of ns
2867 2010-03-08 Sergey Poznyakoff <gray@gnu.org.ua>
2869 Minor fix in the testsuite.
2871 * tests/extrac05.at: Skip test if creating
2874 2010-03-08 Sergey Poznyakoff <gray@gnu.org.ua>
2876 Fix eventual memory override and fd exhaustion in create.c Both
2877 bugs reported by Kamil Dudka.
2879 * src/create.c (check_exclusion_tags): Do not keep
2880 pointer to a location within tagname: it may change
2881 after xrealloc. Use byte offset instead.
2882 (dump_file0): Close fd before returning without
2883 dumping the directory.
2885 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
2889 * doc/tar.texi: Improve some wording.
2891 2010-03-02 Antonio Diaz Diaz <ant_diaz@teleline.es>
2895 * configure.ac: Add TAR_COMPR_PROGRAM(lzip)
2896 * doc/tar.texi: Reflect lzip support.
2897 * src/buffer.c (compress_type) <ct_lzip>: New constant.
2898 (magic): Add magic for lzip.
2899 * src/suffix.c (compression_suffixes): Add lz.
2900 * src/tar.c: New option --lzip.
2902 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
2906 * tests/exclude05.at: Rewrite awk invocation to avoid
2907 overflowing awk's file table on Solaris.
2909 2010-03-02 Eric Blake <ebb9@byu.net>
2911 Fix large file support.
2913 * scripts/xsparse.c (read_map): Use fseeko.
2914 * src/incremen.c (write_directory_file): Likewise.
2916 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
2920 * src/buffer.c (seek_archive): Rewrite size computation
2921 to prevent it from reaching negative values. Based on
2922 report by Denis Excoffier <Denis.Excoffier@free.fr>.
2924 2010-02-25 Sergey Poznyakoff <gray@gnu.org.ua>
2926 Supply more information to the --to-command script.
2928 * src/system.c (stat_to_env): Pass information about the current
2929 volume in variables TAR_ARCHIVE, TAR_VOLUME, TAR_BLOCKING_FACTOR,
2931 * doc/tar.texi: Document new environment variables.
2933 * configure.ac: Version number 1.22.91.
2935 2010-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
2939 * src/names.c (regex_usage_warning): Fix warning message.
2941 2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
2945 2010-02-05 OndÅ™ej VaÅ¡Ãk <ovasik@redhat.com>
2947 Bugfix (tiny change)
2949 * src/xheader.c (xheader_read): Remove unnecessary call
2952 2010-01-26 Sergey Poznyakoff <gray@gnu.org.ua>
2954 Enable silent build mode.
2956 * configure.ac: Require automake 1.11, autoconf 2.63. Enable
2959 * lib/Makefile.am (rmt-command.h): Silent the rule.
2961 2010-01-25 Sergey Poznyakoff <gray@gnu.org.ua>
2963 Read POSIX multivolume archives split at the header boundary.
2965 * src/common.h (read_header_mode): New enum.
2966 (read_header): Change type of the 3rd argument.
2967 * src/list.c (read_header): Change type of the 3rd argument.
2968 All callers updated.
2969 * src/buffer.c (try_new_volume): Allow for volumes split at the
2970 extended/ustar header boundary. This is against POSIX specs, but
2971 we must be able to read such archives anyway.
2973 * tests/multiv07.at: New test case.
2974 * tests/Makefile.am: Add multiv07.at
2975 * tests/testsuite.at: Likewise.
2977 * src/compare.c: Update calls to read_header.
2978 * src/delete.c: Likewise.
2979 * src/update.c: Likewise.
2981 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
2986 * doc/tar.texi: Update.
2987 * src/create.c (finish_header): Minor change.
2989 2010-01-24 Rob Vermaas <rob.vermaas@gmail.com>
2991 Bugfix (tiny change).
2993 * src/tar.c (format_default_settings)[REMOTE_SHELL]: Fix
2996 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3000 * src/incremen.c (read_incr_db_01)
3001 (read_directory_file): Initialize bufsize to 0.
3002 Suggested by noordsij@cs.helsinki.fi.
3004 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3006 Improve handling of --test-label.
3008 * src/list.c (print_volume_label): New function.
3009 (print_header): Call print_volume_label.
3010 (test_archive_label): New function.
3011 * src/buffer.c (VOLUME_LABEL_APPEND): Remove.
3012 (VOLUME_TEXT, VOLUME_TEXT_LEN): New macros
3013 (drop_volume_label_suffix): New function.
3014 (check_label_pattern): Use drop_volume_label_suffix.
3015 * src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND.
3016 (test_label_option): Remove.
3017 (drop_volume_label_suffix): New proto.
3018 (test_archive_label): New proto.
3019 * src/names.c (all_names_found): Remove test for
3021 * src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND.
3022 (set_subcommand_option): Improve diagnostics.
3023 (parse_opt): Set subcommand if --test-label is given.
3024 (main): Handle TEST_LABEL_SUBCOMMAND.
3026 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
3028 Fix listing of volume labels (in particular in PAX archives).
3030 * src/buffer.c (match_volume_label): Call set_volume_label.
3031 (check_label_pattern): Get label string
3033 (match_volume_label): Handle volume labels stored in
3035 * src/common.c (print_header,read_header): Change signature.
3036 (read_header_primitive): Remove prototype.
3037 * src/list.c (recent_global_header): New static.
3038 (list_archive): Always print volume labels.
3039 (read_header_primitive): Remove.
3040 (read_header): Change the signature (all callers updated)
3041 Save the recent global header.
3042 (volume_label_printed): New static.
3043 (simple_print_header): New function (ex-print_header).
3044 (print_header): Change the signature (all callers updated).
3045 For POSIX formats, print first volume header (if set).
3046 * src/xheader.c (xheader_write_global): Write the data
3047 accumulated in xhdr->stk even if keyword_global_override_list
3049 (xheader_read): On unexpected EOF, report error instead of
3051 (XHDR_PROTECTED, XHDR_GLOBAL): New defines.
3052 (struct xhdr_tab): Remove `protected' with `flags'. All uses
3054 (decg): If XHDR_GLOBAL bit is set, call the keyword's decode
3055 method instead of adding it to `kwl'.
3057 * src/compare.c: Update calls to read_header.
3058 * src/create.c: Likewise.
3059 * src/delete.c: Likewise.
3060 * src/update.c: Likewise.
3061 * src/extract.c: Likewise.
3062 (extract_volhdr): Do not print "Reading <label>" statement,
3064 it is inconsistent: it is not printed if the volume begins with a
3065 member continued from the previous volume.
3067 * tests/label01.at: New testcase.
3068 * tests/label02.at: New testcase.
3069 * tests/Makefile.am, tests/testsuite.at: Add new testcases.
3071 2010-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
3073 Fix prefix length calculation in ustar mode.
3075 * src/create.c (split_long_name): Fix prefix length
3077 (write_ustar_long_name): Improve ustar mode compatibility
3078 with the Sun version.
3080 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3082 Rewrite update algorithm.
3084 * src/common.h (namebuf_t): New typedef.
3085 (namebuf_create, namebuf_free)
3086 (namebuf_name): New prototypes.
3087 (remname): New prototype.
3088 * src/misc.c (struct namebuf): New structure.
3089 (namebuf_create, namebuf_free)
3090 (namebuf_name): New functions.
3091 * src/create.c (dup_dir0): Remove is_avoided_name
3092 checks. This is taken care of in update_archive.
3093 * src/incremen.c (scan_directory): Use namebuf
3094 to produce full file names.
3095 * src/names.c (nametail): Remove extra level of
3096 indirection. All uses updated.
3097 (avoided_name_table, add_avoided_name)
3098 (is_avoided_name): Remove.
3099 * src/update.c (update_archive): Change algorithm.
3100 Instead of adding unmodified files to the avoided_name
3101 table, create namelist so that it contains only
3104 * tests/Makefile.am: Add update01.at, update02.at
3105 * tests/testsuite.at: Likewise.
3106 * tests/update.at (AT_KEYWORDS): Add update00.
3108 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3112 * src/tar.c (main): Ignore SIGPIPE.
3113 * src/system.c (sys_child_open_for_compress)
3114 (sys_child_open_for_uncompress): Reset SIGPIPE
3115 in child to default.
3116 * tests/remfiles01.at: Avoid race conditions.
3117 * tests/remfiles02.at: Likewise.
3119 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
3123 * src/buffer.c (_open_archive): Call guess_seekable_archive
3124 only if the call to open_compressed_archive succeeded.
3126 2009-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
3128 Improve previous changes.
3130 * acinclude.m4: Fix typos.
3131 * gnulib.modules: Add xvasprintf.
3132 * src/common.h: Include xvasprintf.h.
3133 * src/tar.c (options): Remove docstrings for --gzip, --bzip2,
3134 --compress, --lzop, --lzma and --xz.
3135 (tar_help_filter): Generate these using actual values of
3136 *_PROGRAM constants.
3137 (format_default_settings): Use xasprintf.
3138 (parse_opt): Use *_PROGRAM defines instead of hardcoded
3141 2009-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
3143 Allow installers to specify alternative program names for
3144 compression programs.
3146 This adds --with-gzip, --with-bzip2 etc. switches to the
3148 one can do, e.g. ./configure --with-bzip2=lbzip2 and have
3150 whenever user calls `tar --bzip2'.
3152 * acinclude.m4: New file.
3153 * configure.ac: Add TAR_COMPR_PROGRAM invocations for
3154 the supported compressors.
3155 * src/buffer.c (magic): Use *_COMPRESSOR defines instead
3156 of hardcoded program names.
3157 * src/suffix.c (compression_suffixes): Likewise.
3159 2009-10-09 Sergey Poznyakoff <gray@gnu.org.ua>
3163 * src/buffer.c (magic): Fix `xz' entry: add the name of the
3165 * src/suffix.c (compression_suffixes, nsuffixes): Mark as static.
3167 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3169 Provide a way to explicitly set mtime for extended header
3172 * src/tar.c (struct textual_date): ts is a copy of the structure,
3173 not a pointer to it. Date is a copy as well, hence the `const' is
3175 (get_date_or_file): Return 0/1 depending on success/failure.
3176 Copy timestamp to the `ts' member. Store a copy of the string
3178 (report_textual_dates): Report only if verbose_option is set,
3179 but always free the list.
3180 (expand_pax_option): New function.
3181 (parse_opt): Preprocess the argument to xheader_set_option with
3183 (decode_options): Call report_textual_dates unconditionally.
3184 * src/xheader.c (exthdr_mtime_option, exthdr_mtime)
3185 (globexthdr_mtime_option, globexthdr_mtime): New statics.
3186 (xheader_set_keyword_equal): handle exthdr.mtime and
3188 (xheader_write): Override `t' argument if a corresponding
3189 exthdr.mtime or globexthdr.mtime option is set.
3191 * doc/tar.texi: Document the changes.
3193 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3195 Use file's mtime as mtime for its extended header.
3197 This makes two pax archives binary equivalent if they
3198 have the same contents and care is taken to make extended
3199 headers otherwise reproducible, e.g. by using:
3201 --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0
3203 Proposed by Michael D. Adams <mdmkolbe@gmail.com>.
3205 * src/common.h (start_private_header): Take time_t as 3rd param.
3206 (xheader_write): Likewise.
3207 * src/create.c (start_private_header): Take time_t as 3rd param.
3208 All callers updated.
3209 (write_extended): Use file's mtime as mtime for its extended
3211 Use current time stamp as mtime for global headers.
3212 (xheader_write): Take time_t as 3rd param.
3214 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3216 Fix bugs in handling the --remove-files option.
3218 Make sure the files are deleted only if they were succesfully
3222 * src/exit.c: New file.
3223 * src/unlink.c: New file.
3224 * src/Makefile.am (tar_SOURCES): Add exit.c and unlink.c.
3225 * src/common.h: Include progname.h
3226 (program_name): Remove global.
3227 (records_written): New extern.
3228 (queue_deferred_unlink, finish_deferred_unlinks): New prototypes.
3229 (fatal_exit_hook): New extern.
3230 * src/create.c (create_archive): Call finish_deferred_unlinks.
3231 (dump_hard_link, dump_file0): Don't actually unlink the file,
3232 queue it to deferred_unlinks instead.
3233 * src/delete.c (records_written): Remove extern: declared in
3235 * src/extract.c (extract_archive): Set fatal_exit_hook.
3236 (fatal_exit, xalloc_die): Move to exit.c
3237 * src/system.c (sys_wait_for_child): Exit immediately
3238 if the child dies or exits with a non-zero status.
3239 (sys_child_open_for_compress)
3240 (sys_child_open_for_uncompress): Use set_program_name,
3241 instead of setting program_name directly.
3242 * src/tar.c (main): Use set_program_name,
3243 instead of setting program_name directly.
3245 * tests/Makefile.am (TESTSUITE_AT): Add remfiles01.at
3247 * tests/testsuite.at: Likewise.
3248 * tests/gzip.at: Reflect the above changes.
3250 2009-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
3252 Fix bug in OLDGNU format creation.
3254 See tests/append02.at for a detailed description
3256 * src/common.h (MODE_FROM_HEADER): Take additional argument.
3257 (mode_from_header): Likewise.
3258 * src/create.c (mode_to_chars): Store all mode bits if
3259 using OLDGNU_FORMAT. This reverses f4e4adea80a.
3260 * src/list.c (decode_header): Use header mode field
3261 to discern between GNU and OLDGNU formats.
3262 (mode_from_header): Store unrecognized mode bits (from 10th up)
3263 in the location pointed to by the third parameter.
3264 * tests/append02.at: Update documentation and references.
3266 2009-09-16 Sergey Poznyakoff <gray@gnu.org.ua>
3268 Restore extra help output.
3270 * src/tar.c (tar_list_quoting_styles): Change first argument to
3272 (format_default_settings): New function.
3273 (show_default_settings)
3274 (show_default_settings_fs): Removed.
3275 (tar_help): Removed.
3276 (tar_help_filter): New function.
3277 (argp): Set help_filter.
3278 (parse_opt): Fix error message.
3280 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3282 Improve command line option handling.
3284 * gnulib.modules: Add argp-version-etc and progname,
3285 use getopt-gnu instead of getopt.
3286 * src/tar.c (HANG_OPTION, USAGE_OPTION)
3287 (VERSION_OPTION): Remove.
3288 (options): Remove corresponding options. Let argp
3290 (parse_opt): Likewise.
3291 (_argp_hang): Removed.
3292 (tar_authors): New variable.
3293 (decode_options): Call argp_version_setup.
3294 Do not use ARGP_NO_HELP flag in the call to argp_parse.
3296 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3298 Avoid overwriting exit_status with a value indicating less
3299 important condition.
3301 * src/tar.c (set_exit_status): New function.
3302 * src/common.h (set_exit_status): New prototype.
3303 * src/compare.c: Use set_exit_status instead of
3304 exit_status assignments.
3305 * src/create.c: Likewise.
3306 * src/misc.c: Likewise.
3308 * src/system.c (wait_for_grandchild): Use auto variable
3309 instead of the global exit_status.
3310 * src/incremen.c (scan_directory): Use file_removed_diag
3311 instead of stat_diag.
3313 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
3315 Automatic detection of seekable archives.
3317 * src/buffer.c (guess_seekable_archive): New function.
3318 (_open_archive): Call guess_seekable_archive for archives
3320 (new_volume): Likewise.
3321 * src/common.h (seek_option): New global.
3322 * src/tar.c (options): New option --no-seek.
3323 (parse_opt): --seek and --no-seek set seek_option,
3324 not seekable_archive.
3325 (decode_options): Initialize seek_option to -1.
3328 * doc/tar.texi: Update.
3330 2009-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
3334 * tests/extrac08.at: Ensure a predictable umask value.
3335 * tests/xform-h.at (xform): do not depend on file name
3338 2009-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
3340 Fix interaction between --listed-incremental and -C
3342 * src/incremen.c (read_directory_file): Execute eventual -C dir
3343 after opening the snapshot file.
3344 (collect_and_sort_names): Remove call to chdir_do
3345 * tests/incr05.at, tests/incr06.at: Use relative file names for
3348 2009-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
3350 Update for new exclude module from gnulib. Add testcases by
3353 * src/names.c (is_pattern): Remove.
3354 (regex_usage_warning): Use fnmatch_pattern_has_wildcards
3357 * src/tar.c: New option --exclude-backups.
3358 (vcs_file_table, backup_file_table): New globals.
3359 (add_exclude_array): New function.
3360 * tests/exclude01.at, tests/exclude02.at,
3361 tests/exclude03.at, tests/exclude04.at,
3362 tests/exclude05.at: New testcases. Supplied by Phil Proudman.
3363 * tests/Makefile.am (TESTSUITE_AT): Add new tests.
3364 * tests/testsuite.at: Add new tests.
3367 2009-08-10 Sergey Poznyakoff <gray@gnu.org.ua>
3369 Remove src/version.c (reappeared after migration to Git)
3371 2009-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
3375 * src/misc.c (file_removed_diag): Set exit code to
3378 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3382 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3384 Fix handling of files removed during incremental dumps.
3386 Changes to src/create.c and src/incremen.c are partially
3387 based on patch from Alexander Peslyak <solar at openwall.com>.
3389 The new testcases require paxutils commit f653a2b or later.
3391 * src/common.h (struct name): New member `cmdline'.
3392 (dump_file): Change type of the 2nd argument to bool.
3393 (file_removed_diag, dir_removed_diag): New prototypes.
3394 (addname): New argument `cmdline'.
3395 (name_from_list): Change return value.
3396 * src/create.c (dump_dir0, dump_dir): top_level is bool.
3397 (create_archive): Update calls to name_from_list.
3398 Take advantage of the name->cmdline to set top_level argument
3399 during incremental backups.
3400 (dump_file0): top_level is bool.
3401 Do not bail out if a no-top-level file disappears during
3403 backup, use file_removed_diag instead.
3404 (dump_filed): top_level is bool.
3405 * src/incremen.c (update_parent_directory): Silently ignore
3406 ENOENT. It should have already been reported elsewhere.
3407 (scan_directory): Use dir_removed_diag to report missing
3409 * src/misc.c (file_removed_diag, dir_removed_diag): New functions.
3410 * src/names.c (name_gather): Set ->cmdname.
3411 (addname): Likewise. All uses updated.
3412 (name_from_list): Return struct name const *. All uses updated.
3414 * tests/filerem01.at: New testcase.
3415 * tests/filerem02.at: New testcase.
3416 * tests/Makefile.am, tests/testsuite.at: Add filerem01.at,
3418 * tests/grow.at, test/truncate.at: Use new syntax for genfile
3422 * doc/tar.texi: Minor fix.
3424 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
3426 Optimize searches for directory structures by keeping a pointer
3427 to struct directory in struct name.
3429 * src/common.h (struct name): New member `directory' replaces
3430 dir_contents. Rearrange members.
3431 (rebase_directory): Change signature.
3432 (scan_directory): Change signature.
3433 (name_fill_directory)
3434 (directory_contents, safe_directory_contents): New prototypes.
3435 (append_incremental_renames): Change signature.
3436 (replace_prefix): New proto.
3437 * src/compare.c (diff_dumpdir): Use directory_contents +
3440 * src/incremen.c (replace_prefix): Move to misc.c
3441 (rebase_directory): Rewrite.
3442 (scan_directory): Return pointer to struct directory.
3443 (directory_contents, safe_directory_contents): New functions.
3444 (get_directory_contents): Remove.
3445 (name_fill_directory): New function.
3446 (append_incremental_renames): Rewrite. This also fixes a memory
3448 * src/names.c (name_gather, addname): Reflect changes in struct
3450 (add_hierarchy_to_namelist): Rewrite using name_fill_directory and
3452 (rebase_child_list): Update call to rebase_directory.
3453 (collect_and_sort_names): Optimize
3455 * src/misc.c (replace_prefix): New function.
3456 * src/names.c (add_hierarchy_to_namelist): Use new
3457 get_directory_contents.
3459 * tests/incr05.at: New test case.
3460 * tests/incr06.at: New test case.
3461 * tests/Makefile.am, test/testsuite.at: Add incr05.at and
3464 * doc/Makefile.am (check-options): Improve rule.
3465 * doc/tar.texi, NEWS: Update.
3467 2009-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
3471 * src/common.h (rebase_directory): New prototype.
3472 * src/incremen.c (rebase_directory): Use replace_prefix.
3473 * src/names.c (collect_and_sort_names): Abort if
3476 2009-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
3478 Improve listed incremental dumps.
3480 The modified algorithm tries to avoid dumping the same
3481 directory twice and ensures the order of the directories
3482 in the resulting archive is the same, whatever their order
3483 on the command line. It also fixes the operation of
3484 --listed-incremental -C.
3486 * gnulib.modules: Add canonicalize
3487 * src/common.h (incremental_level): New global.
3488 (check_exclusion_tags): first argument is const.
3489 (get_directory_contents): Add third argument.
3490 (zap_slashes, normalize_filename): New prototypes.
3491 (chdir_count): New prototype.
3492 (WARN_VERBOSE_WARNINGS): New define.
3493 (WARN_ALL): Exclude WARN_VERBOSE_WARNINGS.
3494 * src/compare.c (diff_dumpdir): Update the call to
3495 get_directory_contents.
3496 * src/create.c (check_exclusion_tags): First argument is const.
3497 Use ISSLASH and DIRECTORY_SEPARATOR instead of referring to '/'.
3499 * src/incremen.c (struct directory): New member `caname'.
3500 (hash_directory_name): Rename to
3501 hash_directory_canonical_name. Operate
3502 on the canonical name.
3503 (compare_directory_names): Rename to
3504 compare_directory_canonical_names.
3505 Operate on the canonical name.
3506 (make_directory): Take two arguments.
3507 (free_directory): Free caname.
3508 (attach_directory): Create caname.
3509 (find_directory): Use caname for lookups.
3510 (PD_VERBOSE): Remove.
3511 (PD_FORCE_INIT): New define.
3512 (procdir): First argument is const.
3513 Reinitialize directory if PD_FORCE_INIT bit is set.
3514 Do not use PD_VERBOSE or verbose_option for issuing warnings.
3515 Rely on WARNOPT instead.
3517 (scan_directory): Take three arguments. The third one is a boolean
3518 which is true if the directory is explicitly mentioned on
3521 (get_directory_contents): Remove. Use scan_directory instead.
3522 All callers updated.
3523 (read_directory_file): Truncate the file if --level=0 is given.
3524 * src/misc.c: Include canonicalize.h
3525 (zap_slashes, normalize_filename): New functions.
3526 (chdir_count): New function.
3527 * src/names.c (add_hierarchy_to_namelist): Take three arguments,
3529 get_directory_contents and scan_directory.
3530 (collect_and_sort_names): Allow at most one -C, before file name
3532 Read directory file after eventual changing to another directory.
3533 Avoid adding the same directory under different pathnames to
3535 * src/tar.c: New option --level.
3537 * tests/incr03.at, tests/incr04.at, tests/listed01.at,
3538 tests/listed02.at, tests/rename01.at, tests/rename02.at,
3539 tests/rename03.at: Update for new tar behavior.
3540 * tests/multiv01.at: Do not use --listed-incremental.
3542 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
3544 Forgotten to push src/warning.c
3546 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
3548 Implement the --warning option.
3550 * src/warning.c: New file.
3551 * src/Makefile.am: Add warning.c
3552 * src/common.h: Provide definitions for warning classes.
3553 (warning_option): New global.
3554 (WARNOPT): New define.
3555 (set_warning_option): New prototype.
3556 * src/tar.c: New option `--warning'.
3557 * src/compare.c: When applicable WARNOPT instead of WARN.
3558 * src/create.c: Likewise.
3559 * src/extract.c: Likewise.
3560 * src/incremen.c: Likewise.
3561 * src/list.c: Likewise.
3563 * NEWS, doc/tar.texi: Update.
3565 2009-08-05 Carl Worth <cworth@cworth.org>
3567 Fix descriptions of some options (tiny change)
3569 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
3571 Fix backup handling and restoring file modes of existing
3574 * NEWS, THANKS: Update
3575 * src/extract.c (extract_dir): reset status to 0 if the
3576 directory already exists.
3577 * src/misc.c (maybe_backup_file): Assign before_backup_name
3578 and clear after_backup_name before checking if we really need
3580 * tests/backup01.at: New testcase.
3581 * tests/extrac08.at: New testcase.
3582 * tests/Makefile.am, tests/testsuite.at: Add extrac08.at and
3585 2009-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
3587 Fix hard links recognition with -c --remove-files
3589 * src/create.c (dump_hard_link): Always look up in the link table
3590 if remove_files_option is set. Patch suggested by Theodore Ts'o
3592 (check_links): Remove extra newline from the warning message.
3593 * tests/link02.at, tests/link03.at: New testcases.
3594 * tests/Makefile.am (TESTSUITE_AT): Add link02.at and link03.at
3595 * tests/testsuite.at: Include link02.at and link03.at
3597 2009-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
3599 Fix handling of hard link targets by -c --transform
3601 * src/create.c (file_count_links): Transform link target
3603 * tests/xform-h.at: New test case.
3604 * tests/Makefile.am (TESTSUITE_AT): Add xform-h.at.
3605 * tests/testsuite.at: Add xform-h.at
3607 2009-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
3611 * src/extract.c (file_newer_p): Do not report error on ENOENT
3613 2009-06-19 Sergey Poznyakoff <gray@gnu.org.ua>
3615 Remove rebox.el (reappeared after migration to Git)
3617 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
3619 Remove files that were removed in CVS, but reappeared after
3622 2009-06-18 David Bartley <dtbartle@csclub.uwaterloo.ca>
3624 Fix Solaris bug where chmod fails if we don't have
3627 * gnulib.modules: Add priv-set.
3628 * src/extract.c (set_mode, extract_archive): Restore
3629 PRIV_SYS_LINKDIR on chmod failure.
3630 * src/tar.c (main): Drop PRIV_SYS_LINKDIR on startup.
3632 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
3634 Ensure default behavior for SIGPIPE
3636 * src/tar.c (main): Install default handler for SIGPIPE.
3637 Proposed by Bastian Blank.
3639 2009-06-18 Eric Blake <ebb9@byu.net>
3641 Follow autoconf recommendation for TESTSUITEFLAGS.
3643 * tests/Makefile.am (check-local, installcheck-local): Honor
3646 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
3648 Fix handling of sub-subprocess returns.
3650 * src/system.c (wait_for_grandchild): New function.
3651 (sys_child_open_for_compress)
3652 (sys_child_open_for_uncompress): Use wait_for_grandchild
3653 to manage grandchild return.
3655 2009-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
3657 Report record size only if the archive refers to a device.
3659 * Makefile.am (INCLUDES): Add ../lib, for rmt-command.h
3660 * src/buffer.c (short_read): Report the actual record size
3661 only if the archive descriptor refers to a device.
3662 * tests/pipe.at, tests/shortrec.at,
3663 tests/sparsemvp.at: Reflect the above change.
3664 * NEWS, configure.ac: Version 1.22.90
3666 2009-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
3668 Do not issue errors on existing files when given the -k option
3670 * Makefile.am (dist-hook): Fix rule.
3671 * src/extract.c (maybe_recoverable): Return three-state value.
3672 (extract_dir): Skip extraction if maybe_recoverable indicates so.
3673 (extract_file): Likewise.
3675 2009-05-12 Eric Blake <ebb9@byu.net>
3677 Avoid undefined behavior
3679 * src/xheader.c (xheader_set_keyword_equal): Pass correct type to
3681 * src/transform.c (run_case_conv): Likewise.
3683 2009-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
3685 Remove src/Makefile.in
3687 2009-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
3691 * bootstrap (symlink_to_dir): Fix symlink calculation.
3692 * doc/tar.texi: Minor fixes by Victor Villa and Stepan Kasal.
3694 2009-03-07 Sergey Poznyakoff <gray@gnu.org.ua>
3700 Currently the ChangeLog is generated automatically from the Git
3701 revision history, but from 1997 to 2009 the ChangeLog file was
3702 maintained by hand, under CVS. This file records the older log.
3704 Copyright 1997-2001, 2003-2009, 2013 Free Software Foundation, Inc.
3706 This file is part of GNU tar.
3708 GNU tar is free software; you can redistribute it and/or modify
3709 it under the terms of the GNU General Public License as published by
3710 the Free Software Foundation; either version 3 of the License, or
3711 (at your option) any later version.
3713 GNU tar is distributed in the hope that it will be useful,
3714 but WITHOUT ANY WARRANTY; without even the implied warranty of
3715 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3716 GNU General Public License for more details.
3718 You should have received a copy of the GNU General Public License
3719 along with this program. If not, see <http://www.gnu.org/licenses/>.
3721 2009-03-05 Sergey Poznyakoff <gray@gnu.org.ua>
3723 * src/incremen.c: --no-recursive works with --incremental.
3725 2009-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
3729 * src/buffer.c, src/suffix.c: Add support for xz compression.
3730 * src/tar.c: New option --xz, for compression/decompression using xz.
3731 Re-assign -J as a short equivalent of --xz.
3733 2009-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
3735 * doc/tar.texi: Fix typo.
3737 2008-12-29 Sergey Poznyakoff <gray@gnu.org.ua>
3739 * bootstrap.conf: Include size_max.
3740 * gnulib.modules: Remove memset, rmdir. Replace strdup with
3741 strdup-posix. Patch by Eric Blake.
3742 * src/tar.c: Implement -I as a shorthand for --use-compress-program.
3743 * doc/tar.texi: Document -I.
3744 * tests/pipe.at, tests/shortrec.at: Account for eventual 'Record
3746 * tests/testsuite.at (AT_TAR_CHECK_HOOK): New define
3747 (AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros.
3749 2008-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
3751 * src/xheader.c: Remove duplicate inclusion of fnmatch.h. Reported
3754 2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
3756 Do not try to drain the input pipe before closing the
3759 * src/buffer.c (close_archive): Remove call to
3760 sys_drain_input_pipe. Pass hit_eof as the second
3761 argument to sys_wait_for_child.
3762 * src/common.h (sys_drain_input_pipe): Remove
3763 (sys_wait_for_child): Declare second argument.
3764 * src/system.c (sys_drain_input_pipe): Remove.
3765 (sys_wait_for_child): Take two arguments. The second one helps to
3766 decide whether to tolerate child termination on SIGPIPE.
3768 2008-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
3770 * src/buffer.c (_write_volume_label): Fix typo, which prevented
3771 `-V label -M' from working.
3773 2008-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
3775 * NEWS, configure.ac: Version 1.20.91
3776 * doc/tar.texi: Document transformation scope flags.
3777 * src/common.h (transform_symlinks_option): Remove in favor of
3778 transformation scope flags.
3779 (XFORM_REGFILE, XFORM_LINK, XFORM_SYMLINK, XFORM_ALL): New macros.
3780 (transform_name, transform_member_name, transform_name_fp): Take
3781 an additional argument, specifying scope flags.
3782 * src/create.c: Reflect changes to transform_name.
3783 * src/extract.c (extract_link, extract_symlink): Remove calls to
3784 transform_member_name. It is done in read_header.
3785 * src/list.c (decode_xform): Reflect change in data type of 2nd
3787 (transform_member_name): 2nd arg is int.
3788 (decode_header): Transform file name and link target names.
3789 * src/tar.c: Remove --transform-symlinks.
3790 * src/transform.c (struct transform): New member `flags'.
3791 (transform_flags): New variable.
3792 (parse_transform_expr): Parse transformation scope flags. Allow to
3793 set global flags using `flags=' syntax.
3794 (_transform_name_to_obstack, transform_name_fp)
3795 (transform_name): Take an additional argument, specifying scope
3798 2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
3800 * THANKS: Add Ed Leaver.
3801 * src/buffer.c (short_read): Remove !read_full_records condition,
3802 which was always false on a first record and thus disabled record
3803 size autodetection. Thanks Ed Leaver for the patch.
3804 (_gnu_flush_read): Handle blocking_factor == 1.
3805 * tests/sparsemv.at: Reflect changes to buffer.c.
3806 * tests/sparsemvp.at: Likewise.
3807 * tests/volsize.at: Likewise.
3810 2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
3812 * src/common.h (transform_symlinks_option): New global.
3813 * src/create.c (dump_file0): Transform symlink targets only if
3814 explicitly required. Thanks Cyril Strejc for reporting the
3816 * src/tar.c (parse_opt): New options --transform-symlinks and
3817 --no-transform-symlinks. New alias --xform to the --transform
3819 * doc/tar.texi: Document --transform-symlinks
3823 * src/names.c (name_gather): Use xzalloc.
3824 * src/buffer.c (short_read): Move record size detection before
3827 2008-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
3829 * src/tar.c (options): Add --lzop option.
3831 2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
3833 * src/checkpoint.c (checkpoint_compile_action): Add missing
3836 2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
3839 * doc/tar.texi: Update.
3840 * src/tar.c: New option --no-null.
3842 2008-09-23 Sergey Poznyakoff <gray@gnu.org.ua>
3844 * src/common.h (filename_terminator): Remove global.
3845 * src/tar.c (filename_terminator): New static.
3846 * src/names.c (name_next_elt): Do not depend on
3847 filename_terminator, this was a leftover from 1.13.
3849 2008-09-18 Sergey Poznyakoff <gray@gnu.org.ua>
3851 * doc/tar.texi: Remove incorrect example.
3853 2008-09-07 Sergey Poznyakoff <gray@gnu.org.ua>
3855 * src/incremen.c (dumpdir_create0): Eliminate gcc warning.
3856 (attach_directory): Bugfix - add missing return statement.
3857 * THANKS: Add Enric Hernandez
3859 2008-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
3861 * src/incremen.c (struct directory): New member `next'. Change
3863 (dirhead, dirtail): New statics.
3864 (make_directory): Reflect changes to struct directory.
3865 (free_directory, attach_directory): New functions.
3866 (dirlist_replace_prefix): New function.
3867 (note_directory): Use attach_directory, instead of make_directory,
3868 (find_directory, find_directory_meta): Use free_directory.
3869 (procdir): Replace directory prefixes in directory list to avoid
3870 marking subdirectories as renamed after renaming their parent
3872 (append_incremental_renames): Iterate over directory list, not
3873 hash table, to preserve logical ordering of renames.
3874 * tests/rename04.at, tests/rename05.at: New test cases.
3875 * tests/Makefile.am, tests/testsuite.at: Add rename04.at and
3877 * tests/atlocal.in (decho): New function.
3878 * tests/multiv06.at: Use decho instead of echo2.
3879 * tests/incremental.at: Raise wait interval to 2 seconds.
3881 2008-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
3883 * src/tar.c (decode_options): Do not allow volume length less
3885 * src/buffer.c (_gnu_flush_write): Compensate for the effect
3886 of eventual flush_archive occurring in the middle of buffer
3888 Increment records_written only if _flush_write was able to write
3890 * tests/multiv06.at: New testcase.
3891 * tests/Makefile.am, test/testsuite.at: Add tests/multiv06.at
3893 2008-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
3895 * configure.ac, NEWS: Version 1.20.90
3896 * doc/tar.texi: Document -J, --no-auto-compress, etc.
3897 * src/buffer.c (ct_tar): New constant.
3898 (magic): Add lzop support. Proposed by Kevin Day
3899 <thekevinday@gmail.com>.
3900 (check_compressed_archive): Do not use autodetect if the
3901 compression program was specified explicitly.
3902 Fall back to analyzing archive name, if the autodetection fails.
3903 * src/suffix.c: Add .lzo
3904 * src/tar.c: New options --lzop and --no-auto-compress.
3905 New short option -J (alias for --lzma).
3907 * src/buffer.c (try_new_volume): Print more information with error
3909 (_gnu_flush_write): Improve error checking. Adjust
3910 real_s_sizeleft before calling new_volume to avoid creating
3911 malformed multivolume headers.
3912 * tests/delete05.at, tests/gzip.at, tests/ignfail.at,
3913 tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
3914 tests/shortfile.at: Update to match new diagnostic wording
3919 2008-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
3921 * doc/tar.texi (exclude): Document support for new VCS.
3924 * tests/multiv05.at: Fix typos.
3925 * tests/volsize.at: Remove a TZ dependency.
3927 2008-06-14 Dan Drake <dan@dandrake.org> (tiny change)
3929 * src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and
3932 2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
3934 * src/tar.c (main): Reword the "delayed error" message. New
3935 wording proposed by Karl Berry.
3937 2008-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
3939 * configure.ac: Raise version number to 1.20
3940 * src/compare.c (diff_dumpdir): const.
3941 * src/common.h (dumpdir_t,dumpdir_iter_t): New data types.
3942 (dumpdir_create0,dumpdir_create,dumpdir_free,dumpdir_locate)
3943 (dumpdir_first,dumpdir_next): New functions.
3944 * src/incremen.c (dumpdir_create0,dumpdir_create,dumpdir_free)
3945 (dumpdir_first,dumpdir_next): New functions.
3946 (dumpdir_locate): Rewrite using binary search.
3947 (struct directory): Change members char *contents, *icontents to
3948 struct dumpdir *dump, *idump. All references updated.
3949 (note_directory): Last arg is const.
3950 * src/names.c (add_hierarchy_to_namelist): buffer is const.
3951 * tests/incr03.at, tests/incr04.at, tests/rename02.at,
3952 tests/rename03.at: Insert calls to sleep between creation of files
3953 and adding them to the archive.
3955 2008-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
3957 * src/create.c (dump_file0): Count links only for actually dumped
3960 2008-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
3962 * NEWS: Document --no-check-device and --check-device.
3963 * doc/rendition.texi: Change the way FIXME-*refs are handled in
3965 * doc/intern.texi, doc/tar.texi: Update.
3966 * doc/untabify.el: New file.
3967 * doc/Makefile.am (EXTRA_DIST): Add untabify.el
3968 (untabify, final, check-format, check-refs, check-fixmes)
3969 (check-unrevised, all-check-docs, check-docs): New rules.
3971 * src/common.h (check_device_option): New global.
3972 * src/incremen.c (procdir): Use boolean and instead of bitwise
3973 one. Patch by Jean-Louis Martineau.
3974 Compare device numbers only if check_device_option is set.
3975 * src/tar.c: New command line options --no-check-device and
3976 --check-device. Proposed by Jean-Louis Martineau.
3977 (parse_opt): Hanlde new options.
3978 (decode_options): Initialize check_device_option to true.
3982 2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
3984 * bootstrap: Use rsync to get translations.
3985 * doc/tar.texi: Minor change.
3986 * lib/.cvsignore: Update
3987 * po/.cvsignore: Update
3988 * src/system.c: Remove include setenv.h.
3989 * tests/atlocal.in (STAR_DATA_URL): Update.
3990 * tests/star/README: Update URL.
3992 2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
3994 * doc/tar.texi: Fix a typo. Reported by Denis Excoffier.
3996 2008-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
3999 * configure.ac: Version 1.19.90
4000 * po/POTFILES.in: Add missing files.
4001 * src/compare.c (verify_volume): Honor --ignore-zeros.
4002 Proposed by Jan-Benedict Glaw.
4003 * tests/shortfile.at (AT_KEYWORDS): Add shortfile0.
4005 2008-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
4008 * src/create.c (dump_file0): Apply transform_name to symlink
4011 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
4013 * src/transform.c: Support multiple --transform options. Support
4014 semicolon-separated lists of replace expressions.
4015 * NEWS, tar.texi: Document changes to the --transform option.
4017 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4019 * doc/tar.texi: Update Back-Cover text to reflect new GNU wording.
4021 2007-12-17 Paul Eggert <eggert@cs.ucla.edu>
4023 Exit with nonzero status if a close fails on an archive.
4024 Problem (and initial trivial fix)
4025 * src/buffer.c (close_archive, new_volume): close_error, not
4028 2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
4030 * src/buffer.c (check_compressed_archive): Do not bail out if the
4031 file is too short, set boolean flag, passed as an argument
4032 instead. This fixes a bug introduced on 2007-08-24. See also
4035 * tests/Makefile.am, tests/testsuite.at: Add shortupd.at.
4036 * tests/shortupd.at: New test.
4038 2007-11-12 Jim Meyering <meyering@redhat.com>
4040 Don't read from name[-1].
4041 * src/incremen.c (make_directory): Handle namelen == 0, since
4042 find_directory_meta calls make_directory ("").
4044 2007-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
4046 * bootstrap (checkout): Use URL of the gnulib CVS mirror.
4047 * gnulib.modules: Add fseeko and snprintf.
4049 2007-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
4051 * src/checkpoint.c: New actions: bell and ttyout
4052 * src/system.c (sys_exec_info_script)
4053 (sys_exec_checkpoint_script): pass the current blocking factor in
4054 TAR_BLOCKING_FACTOR environment variable.
4055 * doc/tar.texi: Update
4058 2007-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
4060 * doc/Makefile.am: Use texi2html and the CVS version of gendocs.sh
4061 to create HTML versions of the manual.
4062 * doc/gendocs_template: Likewise.
4063 * doc/tar.texi: Document --hard-dereference and
4064 --checkpoint-action options. Improve documentation of
4067 2007-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
4070 * configure.ac: Version 1.19.1
4071 * po/POTFILES.in: Add src/checkpoint.c
4072 * src/Makefile.am (tar_SOURCES): add checkpoint.c
4073 * src/checkpoint.c: New file - checkpoint handling.
4074 * src/buffer.c (checkpoint, do_checkpoint): Remove.
4075 (_flush_write, simple_flush_read, _gnu_flush_read): Use
4077 * src/common.h (enum checkpoint_style): Remove.
4078 (checkpoint_style): Remove.
4079 (DEFAULT_CHECKPOINT): New define.
4080 (hard_dereference_option): New variable.
4081 (sys_exec_checkpoint_script): New declaration.
4082 * src/create.c (file_count_links): do nothing if
4083 hard_dereference_option is set.
4084 * src/system.c (sys_exec_checkpoint_script): New function.
4085 (sys_exec_info_script): Restore SIGPIPE handler.
4086 * src/tar.c: (parse_opt): New options --hard-dereference,
4087 --checkpoint-action.
4088 (decode_options): Call checkpoint_finish_compile.
4090 * src/system.c (sys_exec_info_script): Initialize buf. Problem
4091 reported by Bengt-Arne Fjellner.
4093 2007-10-18 Jim Meyering <jim@meyering.net>
4095 Avoid compiler warnings.
4096 * src/list.c (read_header_primitive): Define two locals, to
4097 avoid incorrect "may be used uninitialized" warnings.
4098 * src/incremen.c (procdir): Remove decl of unused local, "len".
4100 2007-10-18 Sergey Poznyakoff <gray@gnu.org.ua>
4102 * doc/tar.texi (gzip): Remove compression patent
4103 warning. According to Brett Smith, the patent is
4106 2007-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
4108 * src/suffix.c: New file. Compress format detection by archive
4109 suffix (when creating). Suggested by Jean-Pierre Demailly.
4110 * src/Makefile.am: Add suffix.c
4111 * src/buffer.c (magic): Add an entry for new lzma format. Proposed
4113 * src/common.h (set_comression_program_by_suffix): New prototype.
4114 * src/tar.c: New options --auto-compress (-a) and --lzma
4115 * THANKS: Add Lasse Collin and Jean-Pierre Demailly.
4117 * doc/tar.texi: Update
4119 2007-10-12 Paul Eggert <eggert@cs.ucla.edu>
4121 * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1
4122 warning about "comparison is always true due to limited range of
4123 data type" when char is unsigned.
4125 2007-10-11 Paul Eggert <eggert@cs.ucla.edu>
4127 Adjust to recent gnulib changes.
4128 * configure.ac: Dont' check for strerror, since gnulib now does this.
4129 * .cvsignore: Add m4, tar-[0-9]*.
4130 * lib/.cvsignore: Adjust to various gnulib file name changes.
4131 Add .deps, rmt-command.h.
4133 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
4135 * configure.ac, NEWS: Raise version number to 1.19
4136 * tests/star/README: Update
4138 2007-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
4140 * src/create.c (dump_regular_file): Fix file padding in case of
4141 truncation to zero size.
4144 2007-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
4146 * tests/T-null.at: Use AT_DATA for sample output.
4148 2007-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
4150 * src/incremen.c (try_purge_directory): Ensure that arguments to T
4153 2007-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
4155 * src/incremen.c (obstack_code_rename): Apply safer_name_suffix to
4156 name arguments before storing them in T and R records. Reported by
4159 2007-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
4161 * configure.ac: Raise version number to 1.18.90
4164 * doc/snapshot.texi: Document version 2.
4165 * doc/dumpdir.texi: Update.
4167 Implement --exclude-tag* and --exclude-cache* options for listed
4168 incremental archives.
4169 New option --exclude-vcs to exclude VCS-specific files and
4173 * doc/tar.texi: Document --exclude-vcs option
4174 * src/common.h (exclusion_tag_warning, check_exclusion_tags): New
4176 * src/create.c (exclusion_tag_warning, check_exclusion_tags):
4177 Remove static qualifier.
4178 (check_exclusion_tags): account for dirname without terminating
4180 (dump_dir0): exclusion_tag_all is handled elsewhere.
4181 * src/incremen.c (struct directory): New member tagfile
4182 (make_directory): Initialize tagfile to NULL
4183 (procdir): New argument: entry
4184 Hanlde exclusion tags.
4185 (makedumpdir): Take into account directory->tagfile.
4186 (scan_directory): Hanlde exclusion tags.
4187 * src/tar.c: New option --exclude-vcs
4188 (exclude_vcs_files): New function
4190 2007-09-14 Paul Eggert <eggert@cs.ucla.edu>
4192 * AUTHORS: Remove unnecessary information. Just list the
4194 * THANKS: Remove info duplicated from AUTHORS.
4196 2007-08-25 Jim Meyering <jim@meyering.net>
4198 Don't include <getline.h>. No longer needed.
4199 * src/incremen.c: Don't include <getline.h>. No longer needed.
4200 * src/buffer.c: Likewise.
4201 * src/system.c: Likewise.
4202 * src/tar.c: Likewise.
4204 Avoid shadowing and unused-variable warnings.
4205 * src/create.c (check_exclusion_tags): Remove declaration of unused
4207 * src/compare.c (diff_dumpdir): Rename stat->stat_data to avoid
4208 shadowing the syscall.
4209 * src/buffer.c (do_checkpoint): Don't shadow the write syscall.
4210 (try_new_volume): Avoid shadowing "access".
4211 * src/tar.c (decode_options): Rename index->idx to avoid shadowing.
4212 (find_argp_option): Rename option->o to avoid shadowing.
4213 * src/incremen.c (scan_directory): Rename local, dir_name->dir,
4214 to avoid shadowing the function.
4215 (get_directory_contents): Likewise.
4216 * src/system.c (global_pid): Rename from "pid", to avoid being
4218 * src/extract.c (apply_nonancestor_delayed_set_stat):
4219 Rename st->sb to avoid shadowing another local.
4221 2007-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
4223 * configure.ac, NEWS: Raise version number to 1.18.1
4225 * src/buffer.c (check_compressed_archive): Detect files smaller
4227 * tests/shortfile.at: New test case for the above change.
4228 * tests/testsuite.at, tests/Makefile.am: Add shortfile.at
4230 2007-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
4232 * bootstrap: Gnulib initialization destroyed paxutils m4 files.
4233 Initialize paxutils structure after that of gnulib.
4235 2007-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
4237 * src/names.c (contains_dot_dot): Fix double-dot recognition in
4238 case of duplicate /. Patch by Dmitry V. Levin.
4240 * bootstrap (symlink_to_gnulib): Make sure the target directory
4241 exists and create it if it does not.
4243 * doc/tar.texi: Fix a typo.
4245 2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
4247 * bootstrap: Update for the change of the TP URL
4249 2007-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
4251 Relicense under GPLv3
4253 2007-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
4255 * tests/testsuite.at (AT_TAR_MKHIER): Skip test if genfile is
4256 unable to create the file
4257 * tests/lustar01.at: Likewise
4259 2007-06-21 Eric Blake <ebb9@byu.net>
4261 Resolve testsuite failures 40-42 on cygwin.
4262 * tests/testsuite.at (AT_TAR_MKHIER): Skip tests when long
4263 file names cannot be created.
4265 2007-06-16 Sergey Poznyakoff <gray@gnu.org.ua>
4267 * doc/Makefile.am (tar_TEXINFOS): Add tar-snapshot-edit.texi
4268 * doc/tar-snapshot-edit.texi: New file
4269 * doc/tar.texi (Fixing Snapshot Files): New appendix
4271 * scripts/tar-snapshot-edit: New file
4272 * tests/extrac07.at: Add back write permissions on dir
4274 2007-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
4276 * tests/exclude.at: Sort the output.
4278 2007-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
4280 * configure.ac, NEWS: Raise version number to 1.17
4282 * doc/tar.texi, doc/intern.texi: Replace: s/filename/file name/;
4283 s/(ASCII|ID|BSD)/@acronym{&}/;s/"[^"]+"/``&''/
4284 Use `path' only when it refers to search paths, use
4285 `file name' otherwise.
4286 Fix various errors (based on patch by Benno Schulenberg)
4288 * doc/tar.texi (Operation Summary): Restore alphabetical order of
4291 2007-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
4293 Fix bug, introduced on 2007-03-30.
4295 * src/common.h (xform_type): New data type
4296 (transform_member_name): Last argument is of xform_type type
4299 * src/extract.c: Update calls to transform_member_name
4300 * src/list.c (decode_xform): Exempt symbolic links from component
4301 stripping and name suffix normalization.
4303 * tests/extrac07.at: Update
4305 2007-05-30 Sergey Poznyakoff <gray@gnu.org.ua>
4307 * src/xheader.c (decx): Unknown pax keywords produce a warning,
4310 2007-05-29 Paul Eggert <eggert@cs.ucla.edu>
4312 * src/misc.c (set_file_atime): Use gl_futimens, not futimens,
4313 due to gnulib change.
4315 2007-05-19 Sergey Poznyakoff <gray@gnu.org.ua>
4317 * src/common.h (buffer_write_global_xheader): New function
4318 (struct xheader): Move definition to tar.h
4319 (extended_header): Remove global
4320 (xheader_init): New function
4321 (xheader_decode_global,xheader_store,xheader_read)
4322 (xheader_write_global,xheader_write,xheader_string_begin)
4323 (xheader_string_add,xheader_string_end): Take xhdr as first
4325 * src/tar.h (struct xheader): New definition
4326 (struct tar_stat_info): New member xhdr (extended header).
4328 * src/xheader.c (xheader_init): New function
4329 (xheader_decode_global,xheader_store,xheader_read)
4330 (xheader_write_global,xheader_write,xheader_string_begin)
4331 (xheader_string_add,xheader_string_end): Take xhdr as first
4334 * src/buffer.c (buffer_write_global_xheader): New function
4335 Update to use new xheader calls.
4337 * src/compare.c, src/create.c, src/delete.c, src/list.c,
4338 src/sparse.c, src/tar.c, src/update.c: Global extended_header
4339 removed, use new xheader calls instead.
4341 * tests/T-null.at: Minor fix
4342 * tests/atlocal.in (tarball_prereq): Discard eventual md5sum
4345 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua>
4347 * src/create.c (dump_file0): Original ctime cannot be used as a
4348 directory change indicator if --remove-files is given.
4350 2007-04-12 Paul Eggert <eggert@cs.ucla.edu>
4352 Adjust to latest Gnulib.
4353 * lib/.cvsignore: Add dirfd.c, dirfd.h, float+.h, mbscasecmp.c,
4354 stdio.h, stdio_.h, stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
4355 Remove exit.h, getcwd.h, mempcpy.h, memrchr.h, mkdtemp.h, stpcpy.h,
4356 strcase.h, strchrnul.h, strdup.h, strndup.h, strnlen.h, time_r.h,
4358 * m4/.cvsignore: Remove localedir.h. Sort.
4360 2007-04-03 Paul Eggert <eggert@cs.ucla.edu>
4362 * src/common.h (closeopen): Remove decl.
4363 * src/misc.c: Don't include <sys/time.h>, <sys/resource.h>; no longer
4365 (get_max_open_files, closeopen): Remove. All callers removed.
4366 (chdir_dir): Use a different technique, which doesn't rely on closing
4368 * src/tar.c (main): Don't call closeopen.
4370 2007-04-04 Sergey Poznyakoff <gray@gnu.org.ua>
4373 * doc/tar.texi: Update
4374 * src/system.c (sys_exec_info_script): Store the
4375 inter-communication fd in the environment variable TAR_FD
4377 2007-04-03 Sergey Poznyakoff <gray@gnu.org.ua>
4379 * src/tar.c (main): Move closeopen after decode_options to
4380 allow shell process substitution to work.
4381 * tests/extrac07.at: Expect a warning on stderr.
4383 2007-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
4385 * src/common.h (transform_name_fp): Change signature
4386 (transform_member_name): New function
4387 * src/extract.c (extract_link, extract_symlink): Use
4388 transform_member_name instead of safer_name_suffix so that
4389 --transform and --strip-components affect links as well.
4390 * src/list.c (transform_member_name): New function
4391 (decode_header): Use transform_member_name
4392 * src/names.c (all_names_found): Remove check for matching_flags.
4396 * bootstrap (slurp): Remove any occurrences of $bt from the
4398 * src/incremen.c: Do not include mkdtemp.h
4400 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4402 Adjust to recent gnulib changes.
4403 * lib/.cvsignore: Add fchownat.c, rmt-command.h, strerror.c, string.h,
4404 string_.h, sys, sys_time_.h, unistd_.h, wchar_.h, wctype_.h.
4405 Remove localedir.h, size_max.h, xsize.h.
4406 * src/xheader.c: Don't include stpcpy.h; no longer needed, now that
4407 gnulib string.h defines stpcpy on all platforms.
4409 2007-01-23 Sergey Poznyakoff <gray@gnu.org.ua>
4411 * doc/tar.texi: Document --exclude-caches* and --exclude-tag*
4413 * src/common.h (exclude_caches_option): Remove
4414 (enum exclusion_tag_type): New data type
4415 (add_exclude_tag): Rename to add_exclusion_tag
4416 (cachedir_file_p): New prototype
4417 * src/create.c (struct exclude_tag): rename to exclusion_tag
4418 (check_exclusion_tags): New function
4419 (cachedir_file_p): New function (from check_cache_directory)
4420 (dump_dir0,dump_file0): Use check_exclusion_tags
4421 * src/tar.c: New options --exclude-caches-all,
4422 --exclude-caches-under, --exclude-tag-all, --exclude-tag-under
4423 * tests/exclude.at: New file
4424 * tests/Makefile.am (TESTSUITE_AT): Add exclude.at
4425 * tests/testsuite.at: Add exclude.at
4427 2007-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
4429 * gnulib.modules: Require strerror
4430 * doc/gendocs_template: Fix typos
4431 * scripts/xsparse.c (expand_sparse): use ftruncate to handle the
4433 * src/sparse.c (sparse_skip_file,pax_dump_header_1)
4434 (pax_decode_header): Keep track of the number of bytes
4436 * configure.ac: Version 1.16.2
4439 2007-01-04 Sergey Poznyakoff <gray@gnu.org.ua>
4441 * src/compare.c (diff_dumpdir): Compare directory contents using
4442 dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
4443 incremental directory table in the inconsistent state and trigger
4445 (read_and_process): Process dumpdirs no matter what the archive
4447 * src/incremen.c (list_dumpdir): Minor fixes.
4449 * src/compare.c (read_and_process): Fix type of "size"
4451 2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
4453 * tests/T-null.at: Skip the test if genfile is not able to create
4454 the filename with an embedded newline.
4456 2006-12-12 Paul Eggert <eggert@cs.ucla.edu>
4458 Port to Forte Developer 7 C 5.4 and C99.
4459 * src/common.h (add_exclude_tag): Add decl; C99 requires this
4460 and Forte warns about it.
4461 * src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
4463 * src/misc.c (get_max_open_files): Rewrite to avoid code that
4464 Forte C complains about as being unreachable.
4465 * src/xheader.c (mtime_code): Rewrite to avoid Forte error
4466 reported by Trond Hasle Amundsen.
4468 * src/incremen.c (compare_dirnames): Rewrite to avoid casts.
4469 * src/utf8.c (string_ascii_p): Likewise.
4470 * src/xheader.c (mtime_coder, volume_size_coder, volume_offset_coder):
4473 2006-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
4475 * bootstrap: Add paxutils files to dot_ignore.
4477 * configure.ac: Raise version number to 1.16.1
4478 * bootstrap (slurp): Create .(cvs|git)ignore if not present
4479 * po/.cvsignore, m4/.cvsignore: Remove automatically generated
4482 2006-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
4485 * Makefile.am (distclean-local): Fixed
4486 * doc/tar.texi: Update documentation of --exclude-tag
4487 * src/create.c (dump_dir0): Move checks for exclude tags to
4489 (dump_dir): Move calls to ensure_slash to dump_file0
4490 * src/extract.c (extract_file): Call skip_member if open fails.
4491 Patch proposed by Jan-Benedict Glaw <jbglaw@lug-owl.de>
4492 * tests/truncate.at: Use genfile instead of dd, because on some
4493 systems /dev/zero is not available.
4495 2006-12-04 Paul Eggert <eggert@cs.ucla.edu>
4497 * NEWS: Fix some race conditions with tar -x --same-owner.
4498 * src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
4499 S_IRWXG | S_IRWXO might be masked out.
4500 (set_mode): Set the mode if some bits were masked out originally.
4501 (set_stat): Don't chmod before chown, as that might temporarily
4502 grant permissions that we don't want to grant. The chmod was
4503 there only to work around broken hosts, so add a comment advising
4504 users not to use those broken hosts instead.
4505 (repair_delayed_set_stat, extract_dir):
4506 Remember to mask out current umask before inverting permissions.
4507 (extract_dir): If the owner might change, or if the mode has
4508 special bits, create the directory 700 at first, but restore it later.
4509 (open_output_file): New arg mode; all uses changed.
4510 (extract_file, extract_node, extract_fifo): If the owner might
4511 change, omit group and other bits at first, but restore them after
4514 2006-12-04 Jim Meyering <jim@meyering.net>
4516 * doc/tar.texi (Long Options): Remove doubled word.
4518 2006-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
4520 * src/xheader.c (xheader_read): Remove unused variable
4522 * po/POTFILES.in: Remove src/mangle.c
4524 * bootstrap: Implement --update-po and .bootstrap
4526 * src/create.c (dump_dir0): Implement --exclude-tag option
4527 * src/tar.c: Likewise
4528 * doc/tar.texi (exclude): Document --exclude-tag
4530 2006-11-29 Paul Eggert <eggert@cs.ucla.edu>
4532 * NEWS: Remove support for mangled names.
4533 * doc/tar.texi (verbose tutorial): Likewise.
4534 * src/Makefile.am (tar_SOURCES): Remove mangle.c.
4535 * src/common.h (extract_mangle): Remove decl.
4536 * src/extract.c (extract_mangle_wrapper): Remove.
4537 (prepare_to_extract): Remove support for mangled names.
4538 * src/list.c (read_and, print_header): Likewise.
4539 * src/mangle.c: Remove.
4540 * src/tar.h (GNUTYPE_NAMES): Remove.
4542 Port to latest gnulib. There were a lot of changes, so the
4543 simplest way to get this up and running was to switch to coreutils
4544 bootstrap procedure. I noticed one feature missing after this
4545 merge: the ability to update a single .po file. I can add that
4547 * README-cvs, bootstrap.conf: New files.
4548 * lib/.cvsignore: Remove Makefile.am, printf-parse.c, vasnprintf.c.
4549 Add fstatat.c, gnulib.mk, openat-proc.c, same-inode.h, stat_.h,
4550 tempname.c, tempname.h, uinttostr.c.
4551 * lib/printf-parse.c, lib/vasnprintf.c: New files, from coreutils,
4552 to override gnulib, so that we don't need xsize.h.
4553 * bootstrap: Replace with coreutils bootstrap, except add support
4555 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Remove, as gl_EARLY now
4557 (gl_EARLY, gl_INIT): Add.
4558 (tar_GNULIB): Remove.
4559 * gnulib.modules: Add configmake.
4560 * lib/Makefile.tmpl: Remove, replacing with....
4561 * lib/Makefile.am: New file.
4562 * src/Makefile.am (tar.o): Remove dependency: Automake does this
4564 * src/tar.c: Include <configmake.h> and <rmt-command.h>, not
4567 2006-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
4569 * src/xheader.c (mtime_coder): Treat non-null data as a pointer to
4570 struct timespec, overriding st->mtime
4571 * src/create.c (start_header): Pass mtime as a call-specific data
4574 * tests/truncate.at: Do not use 'k' modifier in dd options.
4575 * tests/append02.at: Do not depend on command timing.
4577 2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
4579 * src/tar.c (enum read_file_list_state.file_list_skip): New value
4580 (read_name_from_file): Skip zero-length entries
4582 * tests/T-empty.at: New test case
4583 * tests/T-null.at: New test case
4584 * tests/extrac07.at: New test case
4585 * tests/Makefile.am: Add new test cases.
4586 * tests/testsuite.at: Add new test cases.
4587 * tests/extrac02.at: Add more keywords
4588 * tests/extrac04.at: Likewise
4589 * tests/extrac06.at: Likewise
4590 * tests/shortrec.at: Do not assume tar's default archive is stdout
4592 2006-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
4594 * src/extract.c, src/xheader.c: Call last_component instead of
4595 base_name. The latter returns a malloced string since 2006-03-11.
4597 2006-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
4599 * NEWS, configure.ac: Version 1.16
4600 * Makefile.am (distclean-local): New rule
4602 2006-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
4604 * src/tar.c: Fix help output formatting. Thanks Benno
4607 2006-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
4609 * Makefile.am (dist-hook): Create a cpio archive.
4612 2006-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
4614 * doc/tar.texi (Synopsis): Document tar exit codes.
4615 * src/create.c (dump_regular_file,dump_file0): Set exit_status to
4616 TAREXIT_DIFFERS if the file being dumped was truncated or
4618 * src/tar.c: Do not attempt to close stderr after call to
4620 * tests/grow.at: New test case
4621 * tests/Makefile.am: New test grow.at
4622 * tests/testsuite.at: Likewise
4623 * tests/truncate.at (AT_KEYWORDS): Keyword `filechange'
4624 Test tar exit status.
4626 * src/buffer.c (_open_archive): Make sure stdlis is set to stderr
4627 when we are writing archive to stdout (unless --index-file is
4628 used). Bug introduced on 2006-07-06.
4629 * tests/Makefile.am: New test verbose.at
4630 * tests/testsuite.at: Likewise
4631 * tests/indexfile.at (AT_KEYWORDS): Add stdout keyword
4632 * tests/verbose.at: New test case
4634 2006-10-02 Sergey Poznyakoff <gray@gnu.org.ua>
4636 * THANKS: Add Joerg Weilbier
4637 * src/buffer.c (new_volume): Initialize current_block
4638 * src/xheader.c (xheader_string_end): Fix diagnostic message.
4639 * tests/multiv05.at: New testcase.
4640 * tests/Makefile.am, tests/testsuite.at: Add multiv05.at
4642 2006-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
4644 * bootstrap: Use ${package} instead of hardcoding package name
4645 * doc/tar.texi: Minor fix
4646 * src/tar.c (doc0, doc1, initialize_argp_doc): Removed. Rely on
4647 the new argp method instead.
4649 2006-09-12 Sergey Poznyakoff <gray@gnu.org.ua>
4651 * README: Fix a typo
4653 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
4655 Adjust to latest gnulib.
4656 * lib/.cvsignore: Add at-func.c, configmake.h, fchmodat.c,
4657 fcntl.h, fcntl_.h, inttypes_.h, lstat.c, lstat.h.
4658 * tests/testsuite.at (AT_TAR_MKHIER): Use install-sh -d
4659 rather than the no-longer-included mkinstalldirs.
4661 2006-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
4663 * src/incremen.c (try_purge_directory): Initialize struct st. Fix
4664 condition for selecting candidates for removal.
4665 * README-alpha: List texinfo among build prerequisites for the CVS
4668 * bootstrap (intl_files_to_remove): Do not remove m4/inttypes-h.m4
4669 and m4/inttypes-pri.m4
4671 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4673 * bootstrap: Set XGETTEXT_OPTIONS to flag our printf-format functions,
4674 so that translators are warned about strings that are formats but
4675 don't look like formats. This might help prevent core dumps.
4676 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
4677 Suggested by Eric Blake to avoid problems like
4678 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
4679 (AM_GNU_GETTEXT_VERSION): Upgrade from 0.12.1 to 0.15. The gettext
4680 manual says we should use the version number normally expected of
4681 maintainers, neither more nor less.
4683 * bootstrap (get_translations):
4684 Don't exclude ky.po; it is working again.
4686 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
4688 * bootstrap (get_translations):
4689 Don't exclude ja.po; it is working again.
4690 Don't remove all old .po files if we're merely updating one.
4691 * po/.cvsignore: Add Makevars.
4693 2006-08-07 Paul Eggert <eggert@cs.ucla.edu>
4695 * src/tar.c: Work around limitation imposed by gettext 0.15
4696 by concatenating strings with "\v" after translation.
4697 (doc): Remove, splitting into:
4698 (doc0, doc1): New constants.
4699 (argp): Don't use doc; just initialize to NULL.
4700 (initialize_argp_doc): New function.
4701 (decode_options): Use it.
4703 * bootstrap: Redo po file retrieval to match Bison's method,
4704 since the translation project changed its index format.
4705 Don't use --assume-autoconf; it's now replaced
4706 by looking in configure.ac.
4707 (m4/codeset.m4, m4/intdiv.m4, m4/inttypes-pri.m4, m4/isc-posix.m4):
4708 (m4/lcmessage.m4, m4/onceonly_2_57.m4, m4/gettext.m4, m4/glibc21.m4):
4709 (m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4):
4710 (m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4):
4711 Don't rename to ..._gl.m4, as this is no longer needed.
4712 (m4/geteext.m4): Patch to remove the need for intl/*.
4713 Use autopoint manually, then remove the intl files,
4714 then undo changes to gnulib files that autoreconf made,
4715 and then run aclocal/autoconf/autoheader/automake.
4716 This makes our bootstrap procedure closer to Bison's.
4717 (po/Makevars): Generate automatically.
4718 * configure.ac (AC_PREREQ): Update from 2.59 to 2.60.
4719 (gl_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Remove.
4720 * gnulib.modules: Add inttypes, stdint.
4721 * lib/.cvsignore: Add close-stream.c, close-stream.h,
4722 stdint.h, stdint_.h.
4723 * po/Makefile: Remove; now automatically generated.
4725 * src/incremen.c (read_incr_db_01): Check input strings more
4726 carefully. Do not pass arbitrary char values to isspace, as
4727 this has undefined behavior. Likewise for assigning arbitrary
4728 uintmax_t values to other types.
4729 (read_negative_num, read_unsigned_num, read_timespec):
4730 New functions, to check input values a bit more carefuly.
4731 (read_num): Use read_unsigned_num. New arg MAX_VAL;
4732 all callers changed.
4733 (read_incr_db_2): Use these new functions.
4734 Use a consistent diagnostic for unexpected EOF.
4735 (read_directory_file): Do not assign arbitrary uintmax_t value
4737 (read_timespec, write_directory_file_entry, write_directory_file):
4738 Handle negative time_t values correctly. We don't bother to do
4739 this with pre-2 formats, since presumably the time stamps were
4742 * src/tar.c (doc): Don't use \v in an argument to gettext;
4743 gettext 0.15 rejects this.
4745 2006-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
4747 * src/tar.c (decode_options): Do not require -L with -M -Hpax.
4748 It could be needed in future, but currently it is not.
4749 * src/create.c (to_chars_subst): Update comment regarding OLDGNU
4750 vs. GNU format differences.
4751 (mode_to_chars): Treat OLDGNU_FORMAT same as GNU_FORMAT. Fixes bug
4752 reported by TAMUKI Shoichi <tamuki@linet.gr.jp>, which caused
4753 equivalent `tar cf ...' and `tar rf ...' commands to produce
4756 * tests/append02.at: New test case
4757 * tests/Makefile.am, tests/testsuite.at: Add append02.at
4759 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4761 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4762 it with --assume-autoconf='latest-stable'.
4764 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
4766 Adjust to recent gnulib changes.
4767 * lib/.cvsignore: Remove atexit.c, exit.c, getndelim2.c, getndelim2.h,
4768 pathmax.h, paxconvert.c, paxerror.h, xstrdup.c.
4769 Add inttypes.h, mktime.c, wcwidth.h, xstrndup.c, xstrndup.h.
4770 * src/create.c (start_header): Adjust to API change to mode_adjust.
4772 2006-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
4774 * THANKS: Add Ralf Wildenhues
4777 2006-07-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4779 * doc/dumpdir.texi, doc/snapshot.texi, doc/sparse.texi,
4780 doc/tar.texi: Fix some typos.
4782 2006-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
4784 tar --index-file=FILE --file=- sent the archive to FILE, and
4785 the listing to stderr. Bug reported by Marcin Gryszkalis
4788 * src/buffer.c (_open_archive): Remove stdlis initialization
4789 * src/tar.c (decode_options): Initialize stdlis
4790 * tests/indexfile.at: New test case
4791 * tests/testsuite.at: Include indexfile.at
4792 * tests/Makefile.am (TESTSUITE_AT): Add indexfile.at
4794 2006-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
4796 * doc/Makefile.am (manual): Fix TEXINPUTS
4797 * doc/rendition.texi (FIXME): Do not use deprecated @quote-args.
4798 Do not use @allow-recursion. In its current form the macro is not
4801 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
4803 * bootstrap (update_po): Fix single translation update
4805 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
4807 * configure.ac (AC_CHECK_FUNCS): Check for getdtablesize
4808 * src/common.h (closeopen): New function
4809 * src/misc.c (chdir_arg): Use x2nrealloc to reallocate wd.
4810 (get_max_open_files,closeopen): New functions
4811 (chdir_do): Do not use save_cwd if it was already used more than
4812 max_open_files-4 times to avoid running off the file
4814 * src/tar.c (main): Call closeopen
4815 * doc/tar.texi: Update --directory description
4818 2006-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
4820 * doc/tar.texi: Update. Add cross-references.
4821 * doc/sparse.texi: Add cross-references.
4823 2006-06-25 Sergey Poznyakoff <gray@gnu.org.ua>
4825 * scripts/xsparse.c: A sample utility to expand sparse files
4826 extracted by third-party tars. It is not meant to be installed nor
4827 to be included in the distribution. It is here, so that it can be
4828 obtained either from CVS or from the tar web site.
4829 * doc/Makefile.am (tar_TEXINFOS): Sorted
4830 * doc/tar.texi (Other Tars): New node describing how to extract
4831 GNU-specific member formats using third-party tars.
4832 * src/common.h (sparse_file_p): Remove
4833 * src/sparse.c: Likewise
4834 * src/create.c: Use ST_IS_SPARSE instead of sparse_file_p (update
4836 * src/tar.c: --sparse-version turns on --sparse
4838 2006-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
4840 * src/buffer.c (print_total_stats): Add default case.
4841 * src/common.h (name_init): New prototype.
4842 (xheader_string_end): Return bool.
4843 * src/extract.c (extract_volhdr): Add missing return
4844 * src/incremen.c: Remove not used variables
4845 * src/sparse.c (pax_dump_header_0): Return false if
4846 xheader_string_end fails (for 0.1 formats).
4847 (pax_dump_header): Return meaningful value
4848 * src/transform.c (segm_count): Change type to size_t
4849 * src/xheader.c (xhdr_tab.decoder): pass keyword as a second
4850 argument. All callers changed.
4851 (decode_record): Check for numeric overflow
4852 (xheader_string_end): Return boolean value. Check for possible
4855 2006-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
4857 * doc/sparse.texi: New file
4858 * doc/Makefile.am (tar_TEXINFOS): Add sparse.texi
4859 * doc/intern.texi (Sparse Formats): New node
4860 * doc/tar.texi: Update master menu
4862 * src/common.h (tar_sparse_major,tar_sparse_minor): New globals.
4863 * src/sparse.c: Implement sparse format versioning. Implement new
4864 version (1.0) of PAX sparse format.
4865 (pax_sparse_member_p): Fix condition
4866 (pax_dump_header): A dispatcher function
4867 (pax_dump_header_0,pax_dump_header_1): New functions.
4869 (oldgnu_dump_header): Minor fix: make sure
4870 sparse_header.isextended is set before calling
4871 set_next_block_after
4872 * src/tar.c: New option --sparse-version
4873 * src/tar.h (struct tar_stat_info.sparse_major,sparse_minor): New
4875 * src/xheader.c: Implement new keywords: GNU.sparse.name,
4876 GNU.sparse.major, GNU.sparse.minor, GNU.sparse.realsize
4878 * tests/spmpv00.at, tests/spmvp01.at, tests/spmvp10.at: New
4881 * tests/Makefile.am: Add spmvp00.at, spmpv01.at, spmpv10.at
4882 * tests/shortrec.at: Explicitely give `-f -' to the tar invocation
4883 * tests/sparsemvp.at: Rewritten as an include file.
4884 (TAR_MVP_TEST): New macro
4885 * tests/testsuite.at: Include sparsemvp.at, spmvp00.at,
4886 spmvp01.at, spmvp10.at
4888 2006-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
4890 * doc/tar.texi (Overriding File Metadata): New node
4891 Document --mtime option.
4892 * src/common.h (set_mtime_option,mtime_option): New globals
4893 * src/create.c (start_header): Override mtime if requested
4894 * src/tar.c: Implement new option, --mtime, allowing to set
4895 modification times for all archive members during creation.
4896 (struct tar_args): textual_date_option replaced with a linked list
4897 textual_date. All references updated.
4898 (get_date_or_file,report_textual_dates): New functions.
4899 * configure.ac: Raise version number to 1.15.92
4902 2006-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
4904 * src/common.h (struct name.explicit): Remove
4905 Use variable names in all declarations
4906 (name_scan): Remove second argument
4907 * src/delete.c: Remove second argument from calls to name_scan
4908 * src/update.c: Likewise
4909 * src/incremen.c (procdir): Use is_individual_file to check for
4910 files explicitely specified in the command line. Fixes bug
4911 reported by Dat Head on 19 Jun 2006 (descending into mountpoints
4912 with --one-file-system in use)
4913 * src/misc.c (maybe_backup_file): Second argument is bool
4914 * src/names.c (name_next_elt): Call register_individual_file
4915 (namelist_match): Remove third argument
4916 (name_match): Change return type to bool
4917 (name_scan): Remove second argument
4918 * src/sparse.c (pax_dump_header): Store original sparse file name
4919 in GNU.sparse.name variable. The name field in the ustar header
4920 now contains generated name (%d/GNUSparseFile.%p/%f), so that
4921 non-pax-aware tars won't extract the file under the original
4923 * src/xheader.c (GNU.sparse.name): New variable for storing sparse
4926 2006-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
4928 * doc/Makefile.am (check-options): Expand macros before grepping
4930 * doc/rendition.texi (FIXME) [!PROOF_FOOTNOTED]: Enclose in a
4932 * doc/tar.texi: Define op as codeindex. Use special macros to
4934 Consequently prefer @dfn{long options} over @dfn{mnemonic
4936 Document --unquote, --no-unquote
4937 (Short Option Summary): Build a table of cross-references to the
4938 corresponding long options.
4939 (Using Multiple Tapes,Multi-Volume Archives): Rewritten
4941 * doc/value.texi (xopindex,opsummary): New macros
4943 * doc/Makefile.am (check-options): New goal
4944 * doc/tar.texi: Update
4945 * src/tar.c: Implement --overwrite-dir option (long ago
4948 2006-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
4950 * doc/tar.texi: Document better the --totals option
4952 * src/buffer.c (total_blocks_deleted): New variable
4953 (set_start_time): Set volume_start_time and last_stat_time as well
4954 (set_volume_start_time): New function
4955 (compute_duration): Do not call set_start_time, update
4956 last_stat_time instead. Use it in calculation instead of
4957 start_time, which is now set only once, upon startup.
4958 (print_total_written): Removed.
4959 (print_total_stats): New function for printing byte/speed statistics.
4960 (_open_archive): Detect attempts to update compressed archives.
4961 (_gnu_flush_write): Always update prev_written.
4962 (open_archive): Call set_volume_start_time.
4963 * src/common.h (volume_start_time,last_stat_time): New globals
4964 (print_total_written): Replaced with:
4965 (print_total_stats): New function
4966 * src/delete.c (records_skipped): Remove static qualifier, the
4967 variable is used by print_total_stats in buffer.c
4968 * src/extract.c (check_time): Use volume_start_time when checking
4969 for timestamp plausability.
4970 * src/tar.c: (options, parse_opt): Allow for optional argument to
4971 the --totals option, which specifies a signal upon delivery of which
4972 the statistics must be output.
4973 (main): Call print_total_stats if total_option is set.
4975 2006-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
4977 * src/xheader.c (xheader_set_single_keyword): Fix typo.
4978 (decode_time): Avoid using gotos.
4980 * doc/mastermenu.el: New file
4981 * doc/Makefile.am (master-menu): New goal
4982 * doc/tar.texi: Update master menu
4984 2006-06-10 Sergey Poznyakoff <gray@gnu.org.ua>
4986 * doc/tar.texi: Remove leftover include
4988 2006-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
4990 * doc/Makefile.am (tar_TEXINFOS): Add intern.texi
4991 (EXTRA_DIST): Remove convtexi.pl, add texify.sed
4992 * doc/intern.texi: New file
4993 * doc/convtexi.pl: Remove
4994 * doc/texify.sed: Auxiliary script to convert ../src/tar.h to
4996 * doc/rendition.texi: Fix typo
4997 * doc/tar.texi: Update
4998 * src/tar.h: Fix indentation, introduce end-of-format marker for
5001 * THANKS: Add Jason Armistead
5002 * doc/tar.texi: Update
5004 * src/buffer.c: Implement more flexible checkpoint style
5005 * src/common.h (checkpoint_option): Change type to unsigned
5006 (checkpoint_style): New variable.
5007 * src/tar.c: --checkpoint takes an optional argument specifying
5008 number of records between two successive checkpoints (proposed
5009 by Jason Armistead on 2004-06-22). Optional dot starting the
5010 argument means "print dots instead of textual checkpoints".
5011 (tar_help): New function
5012 * src/transform.c: Minor fixes.
5014 2006-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
5016 * gnulib.modules: Add mkdtemp
5017 * doc/dumpdir.texi: New file
5018 * doc/Makefile.am (tar_TEXINFOS): Add dumpdir.texi
5019 * doc/tar.texi: Document dumpdir format
5020 * src/incremen.c (dumpdir_locate,obstack_code_rename):
5021 (purge_directory): Re-implement renaming. Introduce
5023 (make_tmp_dir_name): Remove
5025 * src/transform.c (set_transform_expr,_transform_name_to_obstack):
5026 Implement NUMBER flag.
5027 (add_char_segment): Fix length assignement
5029 * doc/tar.texi: Update
5031 2006-06-07 Sergey Poznyakoff <gray@gnu.org.ua>
5033 * src/transform.c (transform_name_fp): Run fun even if
5034 _transform_name_to_obstack returns false.
5035 (_transform_name_to_obstack,set_transform_expr): Implement GNU
5036 extension case conversion operations.
5038 * doc/tar.texi (transform): Document the option.
5040 2006-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
5043 * src/common.h (set_transform_expr): New function
5044 * tests/Makefile.am: Add incr04.at
5045 * tests/testsuite.at: Likewise
5046 * tests/incr04.at: New test case
5047 * tests/long01.at: Fix typo in the comment
5048 * tests/multiv04.at: Use genfile --files-from
5050 (Above changes need new genfile.c from paxutils)
5054 * doc/tar.texi: Update
5055 * src/transform.c: New file
5056 * src/Makefile.am (tar_SOURCES): New module transform.c
5057 * src/common.h (transform_name, transform_name_fp): New functions
5058 (show_stored_names_option): Renamed to
5059 show_transformed_names_option. All uses changed
5060 * src/create.c (dump_file0): Transform file name
5061 * src/extract.c (extract_archive): safer_name_suffix and
5062 stripped_prefix_len are now called by decode_header
5063 * src/list.c (print_header): Update displayable name selection.
5064 * src/tar.c: New option --transform
5065 New option --show-transformed-names generalizes
5066 --show-stored-names. The latter is retained as an alias.
5068 2006-05-31 Sergey Poznyakoff <gray@gnu.org.ua>
5070 * src/incremen.c (make_directory): Fix initialization of struct
5073 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
5075 * doc/tar.texi: Document use of globbing patterns.
5076 * src/tar.c (parse_opt): Add comment before --preserve case.
5078 2006-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
5081 * doc/tar.texi: Update
5082 * configure.ac (AM_INIT_AUTOMAKE): Use tar-ustar option. Raise
5083 version requirement to 1.9
5084 * src/common.h (struct name): Refactured
5085 (warn_regex_usage): New variable.
5086 (dump_file): First argument is const char*.
5087 (name_init,name_add): Removed
5088 (name_add_name,name_add_dir): New functions
5089 (name_next): Return const char*.
5090 * src/create.c: (dump_file,dump_file0): First argument is const
5091 char*. All callers updated.
5092 * src/names.c: Rewritten handling of member names in the command
5093 line. Tar no longer attempts to guess globbing patterns, instead
5094 it relies on --wildcard option.
5095 (init_names): Removed.
5096 (struct name_elt): New structure.
5097 (name_array): Change type to struct name_elt. All references updated
5098 (name_add_name,name_add_dir): New functions
5099 (name_next_elt): New function
5100 (name_next): Rewritten using name_next_elt.
5101 (namelist_match): Rewritten pattern matching using
5103 (names_notfound): Warn if globbing patterns were used without
5105 * src/tar.c (options): Move globbing-related options into a
5106 separate group. Set -l as an alias to --check-links, as required
5108 (struct tar_args): New fields
5109 wildcards,matching_flags,include_anchored
5110 (MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS): New macros
5111 (parse_opt): Use x2nrealloc to grow archive_name_array.
5112 Use MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS to create appropriate
5113 fnmatch options, and name_add_name,name_add_dir to handle member
5114 name and -C arguments.
5115 (decode_options): Likewise
5116 (main): Remove call to init_names.
5118 * tests/append.at, tests/append01.at, tests/extrac01.at,
5119 tests/options.at, tests/options02.at, tests/same-order01.at,
5120 tests/same-order02.at: Make AT_SETUP more readable.
5122 2006-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
5124 * src/buffer.c (change_tape_menu): Fix typo (uninitialized
5125 variable) introduced yesterday.
5127 2006-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
5129 * doc/tar.texi: Use @var{file_name} instead of @var{file name}
5130 * src/buffer.c (change_tape_menu): Break the loop after obtaining
5131 new archive name. Check for empty input line.
5133 2006-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
5135 * tests/atlocal.in (XFAILFILE): New variable
5136 * tests/version.at: Create $XFAILFILE on failure
5137 * tests/testsuite.at (AT_TAR_CHECK): Declare expected failure if
5140 2006-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
5143 * src/buffer.c (read_header0): Use read_header_primitive to avoid
5144 clubbering current_tar_info. All callers updated.
5145 * src/common.h (read_header_primitive): New function
5146 * src/extract.c (extract_volhdr): New function
5147 (prepare_to_extract): Use extract_volhdr as extractor for volume
5149 * src/list.c (read_header_primitive): New function
5150 (read_header): Front end for read_header_primitive
5151 * tests/chtype.at: New file
5152 * tests/volsize.at: New file
5153 * tests/Makefile.am (TESTSUITE_AT): Add chtype.at, volsize.at
5154 (check-full): New target.
5155 * tests/atlocal.in (TEST_DATA_URL,STAR_DATA_URL)
5156 (STAR_TESTSCRIPTS): Provide default values.
5157 (tarball_prereq): New function
5158 * tests/testsuite.at (AT_TARBALL_PREREQ): New defun
5159 (AT_STAR_PREREQ): Rewrite using tarball_prereq
5160 Include chtype.at and volsize.at
5161 * tests/volume.at: Add keywords.
5163 * tests/star/gtarfail.at, tests/star/gtarfail2.at,
5164 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
5165 tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at
5166 (AT_STAR_PREREQ): Provide md5 sum.
5168 * lib/.cvsignore: Update
5170 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
5172 * tests/testsuite.at (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New
5175 * tests/extrac04.at, tests/incr03.at, tests/listed02.at,
5176 tests/pipe.at, tests/rename01.at, tests/rename02.at,
5177 tests/rename03.at, tests/same-order01.at: Call
5178 AT_SORT_PREREQ. Remove fd 2 redirection after calls to sort
5179 * ignfail.at: Call AT_UNPRIVILEGED_PREREQ
5181 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
5183 Listed incremental backups: keep more information about
5184 directories. Handle renamed directories more effectively
5185 (initial implementation, more updates to follow).
5186 Source tree before this point is tagged
5187 alpha_1_15_90_incremental_1.
5190 * configure.ac: Raise version number to 1.15.91
5191 * src/common.h (rename_directory,append_incremental_renames): New
5193 * src/extract.c (rename_directory): New function
5194 * src/incremen.c (struct directory.contents, flags): New members
5195 (nfs,found,new): Remove. Replaced by appropriate bitmask values in
5196 `flags' field. All uses updated.
5197 (directory_meta_table): New table.
5198 (hash_directory): Rename to hash_directory_name
5199 (compare_directories): Rename to compare_directory_names
5200 (hash_directory_meta,compare_directory_meta,find_directory_meta):
5202 (compare_dirents): Removed
5203 (note_directory): Get 7th argument: directory contents.
5205 (dumpdir_locate,makedumpdir): New functions
5206 (scan_directory): Rewritten. Use makedumpdir to create a sorted
5207 dumpdir array. This makes the obstack argument unnecessary. Besides,
5208 ALL_CHILDREN flag is set only for new directories.
5209 (procdir): Change return type to struct directory. Return
5210 immediately if the directory was already initialized. Discover
5211 directory renames using directory_meta_table.
5212 (append_incremental_renames): New function.
5213 (read_directory_file, write_directory_file): Use new snapshot file
5215 * src/names.c (collect_and_sort_names): Update dir_contents of the
5216 first non-fake name entry when in listed incremental mode.
5218 * tests/incr03.at: New testcase
5219 * tests/rename01.at: New testcase
5220 * tests/rename02.at: New testcase
5221 * tests/rename03.at: New testcase
5222 * tests/Makefile.am: Add
5223 incr03.at,rename01.at,rename02.at,rename03.at
5224 * tests/testsuite.at: Likewise.
5225 * tests/listed02.at: Update for the new behavior
5226 * tests/multiv04.at (AT_KEYWORDS): Add missing incremental kw.
5228 2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
5230 * src/buffer.c (try_new_volume): Attempt to continue if the name
5231 is apparently truncated in a GNU format volume.
5233 * tests/comprec.at, tests/delete01.at, tests/delete02.at,
5234 tests/delete04.at, tests/delete05.at, tests/extrac05.at,
5235 tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
5236 tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
5237 tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
5238 this enables extra error checking.
5240 * tests/multiv03.at: Attempt to extract a member with truncated
5241 file name from the archive.
5243 * src/buffer.c (_open_archive): Remove unnecessary argument to
5244 check_compressed_archive.
5246 2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
5248 * tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
5249 tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
5250 system does not support sparse files.
5251 * doc/tar.texi (@copying): Remove the reference to not existing
5254 2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
5256 * src/extract.c (extract_dir): Fix toggling existing directory
5257 permissions (Debian bug #361077). Use parts of patch provided by
5258 Ian Jackson <iwj@ubuntu.com>.
5259 * src/compare.c: Minor changes
5260 * src/incremen.c (directory.new): New member
5261 (note_directory,find_directory: Use make_directory to create
5262 struct directory entries
5263 (procdir): Avoid duplicating directories in the incremental
5265 * tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
5266 * tests/testsuite.at: Include extrac06.at
5268 2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
5270 * tests/atlocal.in (PATH): Add build-aux from the source tree,
5273 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
5275 * THANKS: Add Benno Schulenberg
5277 2006-03-13 Jim Meyering <jim@meyering.net>
5279 * tests/listed02.at: Sort the two lines of stderr from the
5280 first `tar -v --listed-incremental'. They would come out
5281 reversed and provoke a test failure on a tmpfs
5284 2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
5286 * doc/tar.texi: Minor fixes.
5287 * src/tar.c (options): Consistently begin help messages with a
5290 2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
5292 * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
5294 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
5296 * src/buffer.c (record_buffer_aligned): New var.
5297 (init_buffer): Use it to ensure that the buffer is aligned.
5298 This doesn't result in any measurable performance improvement
5299 on my host (Debian GNU/Linux 3.1 stable, with default block size),
5300 but I assume it does help on some hosts.
5302 * lib/.cvsignore: Sort.
5304 2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
5306 * tests/shortrec.at: Use -f - to read from stdin.
5308 2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
5310 * doc/tar.texi: Fix typo: --to-command instead of --to-program
5312 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5314 * tests/multiv04.at (split directory members in a MV archive):
5315 Don't use %X in an awk printf format; this doesn't work with
5316 Solaris 10 /usr/bin/awk. Use %x instead.
5318 2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
5320 * src/create.c (split_long_name): Fix maximum length estimation.
5322 * tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
5324 * tests/atlocal.in: Add build-aux to the PATH
5325 * tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
5326 * tests/longv7.at: Reword test title
5327 * tests/lustar01.at: New test
5328 * tests/lustar02.at: New test
5329 * tests/lustar03.at: New test
5330 * tests/testsuite.at (AT_TAR_MKHIER): New macro
5331 (lustar01.at,lustar02.at,lustar03.at): New tests.
5333 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5335 * bootstrap: Don't claim lib/Makefile.am is generated automatically
5338 Avoid installation glitches on Solaris 8 with Sun C 5.4.
5339 * lib/.cvsignore: Add system-ioctl.h.
5340 * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
5341 * src/buffer.c: Include system-ioctl.h.
5342 * src/compare.c: Likewise.
5343 * src/delete.c: Likewise.
5344 * src/system.c: Include <getline.h>, <setenv.h>.
5345 * src/tar.c: Include <getline.h>.
5347 2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
5349 * src/buffer.c (add_chunk_header): Free st.orig_file_name after
5350 calling finish_header().
5351 (new_volume): Prompt the user for archive name if unable to open
5354 * src/create.c (dump_file0): Restore file_count_links,
5355 accidentally removed on 2005-11-29.
5356 * configure.ac: Raise version number to 1.15.90
5359 2006-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
5361 * src/tar.c (tar_set_quoting_style): Provide second argument to
5362 the format spec: program_invocation_short_name. Reported by Jim
5365 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
5367 * gnulib.modules: Add closeout, exitfial.
5368 * lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
5370 * src/buffer.c: Incluse closeout.h.
5371 (_open_archive): Use freopen rather than fopen, so
5372 that stdlis is always either stdout or stderr. Use
5373 close_stdout_set_file_name to report its name.
5374 * src/tar.c: Include closeout.h and exitfail.h.
5375 (parse_opt, usage): Call close_stdout as appropriate, to check for
5377 (decode_options): Exit with status TAREXIT_FAILURE, not 1.
5378 (main): Set exit_failure, to exit with proper status on memory
5379 allocation failure and the like.
5380 Use close_stdout rather than rolling our own test.
5382 * NEWS: --version now outputs copyright etc., to conform to the
5383 GNU coding standards. Remove --license.
5384 * gnulib.modules: Add version-etc-fsf.
5385 * doc/tar.texi: Document the change.
5386 * lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
5387 * scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
5388 * scripts/backup.in: Remove --license. Change --version to conform
5390 * scripts/restore.in: Likewise.
5391 * scripts/backup.sh.in (license): Output briefer license in the
5392 style of coreutils, for consistency with other changes.
5393 * src/tar.c: Include <version-etc.h>.
5394 (LICENSE_OPTION): Remove.
5395 (options): Remove --license.
5397 (parse_opt): Use version_etc instead of rolling it ourselves.
5399 * tests/version.at (tar --version): Check only the first line of
5402 * ChangeLog, NEWS, src/common.h, src/extract.c, src/incremen.c:
5403 * src/list.c, src/names.c, src/tar.h, src/xheader.c:
5404 Update copyright year to 2006.
5406 2006-02-07 Jim Meyering <jim@meyering.net>
5408 * src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
5410 2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
5412 * src/common.h (get_gnu_dumpdir): Remove prototype
5413 (is_dumpdir): New function
5414 * src/extract.c (prepare_to_extract): Use is_dumpdir member to
5416 * src/incremen.c (get_gnu_dumpdir): Static
5417 (is_dumpdir): New function
5418 (purge_directory): Use is_dumpdir
5419 * src/list.c (list_archive): Use is_dumpdir
5420 Do not wrap skip_member in mv_begin/mv_end, the function itself
5422 (decode_header): Set stat_info->is_dumpdir
5423 (skip_member): Do nothing if skipped is true
5424 * src/tar.h (struct tar_stat_info): New members is_dumpdir and skipped.
5426 2006-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
5428 * src/tar.c (decode_options): Refuse using --delete with
5429 compression options.
5431 2006-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
5434 * configure.ac (DEFAULT_QUOTING_STYLE): New configuration variable
5435 * doc/tar.texi: Initial documentation for --quoting-style,
5436 --quote-chars and --no-quote-chars option.
5437 * src/tar.c: Implement new options --quoting-style, --quote-chars
5438 and --no-quote-chars.
5440 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
5442 * bootstrap: Default to pserver, and switch to cvs.sv.gnu.org,
5443 to accommodate recent changes to the GNU CVS server.
5444 * lib/.cvsignore: Add argp-pin.c, mkdirat.c, openat-priv.h.
5446 2005-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
5448 * src/names.c (name_scan): Take an additional argument requesting
5450 * src/common.h (name_scan): Change prototype.
5451 * src/delete.c, src/incremen.c, src/update.c: Update invocations
5454 2005-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
5456 * src/common.h (struct name): New member `explicit'. Remove unused
5458 * src/incremen.c (procdir): If name_scan() returns something,
5459 check if it was explicitely given in the command line
5460 * src/names.c (addname,add_hierarchy_to_namelist): Initialize
5461 explicit member appropriately.
5463 * src/incremen.c (procdir): If --one-file-system is given and a
5464 directory is found to be on another device, *and* this directory
5465 is explicitely given in the command line, then do not omit it.
5467 2005-12-11 Sergey Poznyakoff <gray@gnu.org.ua>
5470 * doc/tar.texi: Document --delay-directory-restore option.
5471 (Configuring Help Summary): Document usage of ARGP_HELP_FMT
5472 variable to customize help output.
5473 * src/common.h (delay_directory_restore_option): New global.
5474 * src/extract.c (directories_first): Replaced by
5475 delay_directory_restore_option. All uses changed.
5476 * src/tar.c (options,parse_opt): New options
5477 --delay-directory-restore and --no-delay-directory-restore
5479 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
5481 * src/buffer.c (open_archive): Add default case to shut up gcc.
5482 * src/common.h (set_file_atime): Add prototype.
5483 * src/create.c (to_chars_subst): Remove unused variable
5484 Make sure useful result code is returned.
5485 * src/incremen.c (read_directory_file): Fix format string
5486 Thanks Eric Blake for reporting.
5488 2005-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
5490 * doc/tar.texi (Current status): Renamed to 'Changes' and moved to
5492 (Large or Negative Values): Rewritten
5493 * src/common.h (gid_to_chars, major_to_chars, minor_to_chars)
5494 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
5495 (uid_to_chars, uintmax_to_chars): Return bool
5496 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars)
5497 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
5498 (uid_to_chars, uintmax_to_chars): Return bool
5499 (to_chars): Return bool
5500 (start_header): Check return values of convertion routines. Fail
5501 if unable to store data in the header.
5503 2005-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
5505 * doc/tar.texi: Following the discussion with Karl Berry,
5506 discontinue using @value{} substitutions for Texinfo commands.
5507 Properly index all long options. Print a
5508 separate long option index.
5509 * doc/value.texi: Remove @set's
5511 * doc/tar.texi: Update --info-script documentation
5512 Resolve some more FIXMEs.
5513 * scripts/dump-remind.in: Use TAR_VOLUME instead of reading volno
5515 * src/buffer.c (new_volume): Update invocation
5516 (change_tape_menu): New function. Disable '!' command if given
5518 * src/common.h (sys_exec_info_script): Update declaration
5519 (restrict_option): New global
5520 * src/system.c (sys_exec_info_script): The script can supply new
5521 archive name to use by writing it to file descriptor 3.
5522 * src/tar.c (options): Add --restrict option. Use macros for
5524 (license): Print full list of copyright years
5527 2005-12-06 Eric Blake <ebb9@byu.net> (trivial changes)
5529 * configure.ac (DENSITY_LETTER): Fix m4 overquoting.
5530 * .cvsignore: Ignore .bootstrap.
5532 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
5534 * doc/tar.texi: Document --to-command and --info-script
5535 options. Add missing xrefs.
5536 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
5538 * src/common.h (archive_format_string,subcommand_string)
5539 (sys_exec_info_script): New prototypes.
5540 * src/system.c (sys_exec_info_script): New function.
5541 * src/tar.c (archive_format_string): Remove static qualifier.
5542 (subcommand_string): New function.
5544 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
5546 * src/extract.c: Fix restoring of directory timestamps from
5547 incremental archives.
5548 (directories_first): New variable.
5549 (prepare_to_extract): Set directories_first
5550 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
5551 if not extracting from an incremental archive
5552 (extract_dir): Obtain root_device here, to make sure it works
5555 * src/incremen.c (purge_directory): Skip the member and return if
5556 the archive is not in incremental format.
5557 * tests/incr02.at: New testcase
5558 * tests/Makefile.am: Add incr02.at
5559 * tests/testsuite.at: Likewise
5561 * THANKS: Add Guerkan Karaman.
5564 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
5566 * doc/tar.texi (Option Summary): Rewrite the
5567 --atime-preserve=system description in response to Ian Turner's
5570 2005-11-30 Ian Turner <ian@zmanda.com>
5572 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
5575 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
5577 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
5578 * THANKS: Add Ian Turner.
5580 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
5581 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
5582 * doc/tar.texi: Change "modification time" to "data modification
5583 time", "change time" to "status change time", and "filesystem" to
5584 "file system", so that we use terminology consistent with POSIX.
5585 Use American spacing rather than French for sentence ends.
5586 "non-dependable" -> "undependable".
5587 (Option Summary, Attributes): Explain better the pitfalls of the
5588 --atime-preserve option, and suggest read-only mounts,loopback
5589 mounts, and noatime mounts for older systems.
5590 * doc/value.texi (op-atime-preserve-system): Renamed from
5591 op-atime-preserver-system to fix a misspelling.
5592 * src/common.h (enum atime_preserve): Use lower case for enum values.
5593 * src/compare.c: Don't include utimens.h; no longer needed.
5594 (diff_file): Use set_file_atime rather than utimens; avoid closing
5595 diff_handle until after this, so that we can set the file time stamp
5596 via the file descriptor rather than via its name.
5597 * src/create.c: Don't include utimens.h; no longer needed.
5598 (dump_regular_finish): Remove. All callers now do its work inline.
5599 (dump_dir): New arg FD. All callers changed.
5600 Use fdsavedir rather than savedir.
5601 (unknown_file_error): Arg is a const pointer now.
5602 (dump_file0): 2nd arg is a const pointer now.
5603 Treat directories more like files, with respect to --atime-preserve.
5604 For example, also warn if a directory changes while we are dumping it.
5605 Prefer file descriptors to file names when retrieving/setting file
5606 attributes; this saves path-resolution time and allows us to avoid
5607 changing mtime/ctime on Solaris when restoring atime as root.
5608 Use O_DIRECTORY when opening directories, to avoid some race conditions.
5609 Do not reset atime if mtime has changed. Report an error if
5610 we cannot reset atime.
5612 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
5613 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
5615 2005-11-29 Ian Turner <ian@zmanda.com>
5617 First cut at adding support for --atime-preserve=system.
5618 * doc/tar.texi (Option Summary): First cut at documenting it.
5619 All other uses of --atime-preserve changed to --atime-preserve=replace.
5620 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
5622 (op-atime-preserve): Mention METHOD.
5623 * src/common.h (atime_preserve): New enum.
5624 (atime_preserve_option): Now of the enum type rather than bool.
5626 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
5627 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
5629 * src/tar.c (usage): Mention new usage.
5630 (parse_opt): Parse new usage.
5632 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
5634 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
5635 stable), and consistently use tabs rather than spaces.
5637 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
5639 * src/xheader.c: Remove parts of code prematurely introduced
5640 yesterday. Thanks Eric Blake.
5642 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
5644 * src/xheader.c (xheader_format_name): Fix memory leak.
5646 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
5648 * gnulib.modules: Add rpmatch
5649 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
5650 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
5651 * po/POTFILES.in: Add rpmatch.c
5652 * src/tar.c (confirm): Rewritten using rpmatch.
5653 (decode_options): Minor optimizations
5654 (main): Call stdopen() to ensure the first three descriptors are
5657 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
5658 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
5659 tests/star/multi-fail.at: Close stdin so that if something fails
5660 causing tar to ask for the next volume, it won't hang the
5663 * src/buffer.c (flush_write,flush_read): Change data type.
5664 (flush_archive): Compute actual buffer fill level before calling
5666 (close_archive): Call flush_archive again if the first call
5667 resulted in partially filled buffer.
5668 (try_new_volume): Rewritten handling of initial headers.
5669 (add_chunk_header): New function. Write an additional header
5670 before the continuation chunk. The purpose of the header is to
5671 allow third-party tars to extract the member.
5672 (simple_flush_write): Take an argument.
5673 (_gnu_flush_write): Correctly handle partially filled buffers.
5674 * src/common.h (flush_read,flush_write): Functions, again.
5675 (write_extended): Changed declaration
5676 (xheader_format_name): New declaration
5677 * src/create.c (write_extended): Change type and meaning of
5678 the first argument. All callers updated
5679 * src/xheader.c (xheader_format_name): Remove static
5680 qualifier. Change last argument.
5681 Correct buffer size calculation (allocated too much space).
5682 (xheader_write): Increase global_header_count here ...
5683 (xheader_write_global): ... instead of here
5685 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
5686 * tests/multiv01.at: Update
5687 * tests/multiv02.at: Update
5688 * tests/multiv03.at: Update
5689 * tests/sparsemvp.at: Update
5690 * tests/star/multi-fail.at: Update
5692 * scripts/tarcat: Handle archives in pax format. Improve handling
5693 of traditional archives.
5694 * doc/tar.texi (Tarcat): New node
5696 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
5698 Fix splitting of sparse files between the volumes.
5700 * src/buffer.c (try_new_volume): Bugfix. Always check
5701 continued_file_name. If it is absent, the volume is out
5703 (add_multi_volume_header): Create GNU.volume.filename keyword in
5704 the extended header.
5705 * src/sparse.c (sparse_dump_region): Call mv_size_left.
5706 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
5707 * src/system.c: Do not pad compressed output if it goes to
5709 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
5711 * tests/sparsemv.at: New testcase
5712 * tests/sparsemvp.at: New testcase
5713 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
5714 * tests/testsuite.at: Likewise.
5716 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
5718 * src/buffer.c: Rewritten in a more modular fashion to provide
5719 GNU extensions (multi-volume archives and archive labels) in
5721 NOTICE, that some of the aspects (e.g. splitting the archive
5722 on the extended header boundary) are still not solved, others
5723 (splitting a sparse file between the volume) require additional
5724 testing. Wait for the next commit.
5726 (volume_label,continued_file_name,continued_file_size)
5727 (continued_file_offset): New globals.
5728 (save_name,save_totsize,save_sizeleft): Make static
5729 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
5730 (open_archive,flush_write,flush_read): Rewritten
5732 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
5734 (volume_label,continued_file_name,continued_file_size): New
5736 (flush_read,flush_write): Pointers to functions
5737 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
5738 (write_extended): New function.
5740 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
5741 src/list.c: Use mv_.* functions uniformly instead of fiddling
5742 with the global variables.
5743 * src/sparse.c: Use mv_.* functions where necessary.
5744 * src/tar.c (decode_options): Allow to use --multi-volume and
5745 --label with pax archives.
5746 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
5748 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
5749 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
5750 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
5751 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
5752 tests/listed01.at, tests/listed02.at, tests/long01.at,
5753 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
5754 tests/multiv03.at, tests/multiv04.at, tests/options.at,
5755 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
5756 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
5757 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
5758 of related tests in groups.
5760 * doc/tar.texi: Update
5762 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
5764 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
5765 not void *, to avoid create.c warning from GCC "passing argument 3
5766 of 'xheader_store' discards qualifiers from pointer target type".
5767 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
5768 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
5769 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
5770 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
5771 (xheader_store): Likewise.
5772 * src/common.h (xheader_store): Likewise.
5774 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
5775 and Paul Eggert <eggert@cs.ucla.edu>
5777 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
5778 (tar_timespec_cmp): New function. Wrapper over
5779 timespec_cmp using the timespec precision provided by the
5780 current archive format.
5781 * src/common.h (tar_timespec_cmp): New declaration.
5782 * src/compare.c (diff_file): Use tar_timespec_cmp.
5783 * src/extract.c (file_newer_p): Likewise.
5784 * src/update.c (update_archive): Likewise.
5785 * tests/truncate.at: Reverted changes
5786 * tests/update.at: Reverted changes
5788 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
5790 Support for incremental formats in pax archives.
5791 Fixed POSIX compatibility of `sparse' extended header keywords.
5793 * src/common.h (dumpdir_size,get_gnu_dumpdir)
5794 (xheader_string_begin,xheader_string_add)
5795 (xheader_string_end): New functions.
5796 * src/create.c (dump_dir0): Handle incremental backups in pax
5798 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
5799 (purge_directory): Use stat_info.dumpdir instead of getting its
5801 * src/list.c (list_archive): Handle incremental backups in pax
5803 (decode_header): Initialize stat_info.dumpdir
5804 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
5805 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
5806 variable has been explicitely deleted, use GNU.sparse.offset/
5807 GNU.sparse.numbytes variables.
5808 * src/tar.c (decode_options): Incremental options are allowed with
5810 (tar_stat_destroy): Free dumpdir
5811 * src/tar.h (struct tar_stat_info.dumpdir): New member.
5812 * src/xheader.c (xheader_keyword_deleted_p): Remove static
5814 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
5815 values to contain embedded nulls, so take an extra argument
5816 specifying the length of the string.
5817 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
5818 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
5819 (path_decoder,size_decoder,uid_decoder,uname_decoder)
5820 (sparse_size_decoder,sparse_numblocks_decoder)
5821 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
5822 (decode_record): Pass value length to the handler
5823 (run_override_list): Pass value length to the decoder
5824 (xheader_print_n): New function
5825 (xheader_print): Rewritten using xheader_print_n
5826 (xheader_finish): Do not rely om strlen to compute the length of
5827 the collected string: it can contain embedded nulls
5828 (xheader_string_begin,xheader_string_add,xheader_string_end): New
5830 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
5831 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
5832 (xhdr_tab): Add new variables.
5834 * tests/incr01.at: Test gnu, oldgnu, and posix formats
5835 * tests/incremental.at: Likewise
5837 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
5839 * NEWS: Minor language and white space fixes.
5841 * tests/truncate.at: Create files whose time stamps must fall on
5842 1-second boundaries. This prevents tests from failing on hosts
5843 like Solaris 8 that have nanosecond-resolution file time stamps.
5844 * tests/update.at: Likewise.
5846 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
5849 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
5851 * doc/tar.texi: Properly document incremental dumps
5852 * doc/value.texi: Likewise.
5853 * doc/snapshot.texi: Likewise.
5855 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
5857 Improve listed incremental format:
5859 * src/common.h (update_parent_directory): New prototype.
5860 * src/create.c (dump_file): Call update_parent_directory.
5861 * src/incremen.c (struct directory.mtime): New member.
5862 (note_directory): Take additional arguments. All callers updated.
5863 (scan_directory): Updated to use more metadata. In particular,
5864 this allows to correctly detect renamed files.
5865 (read_directory_file,write_directory_file)
5866 (write_directory_file_entry): Support new directory file format.
5867 * tests/listed01.at: Sleep 1 sec before creating second file.
5868 * tests/listed02.at: Never skip the test. It should work on any
5871 * doc/snapshot.texi: New file
5872 * doc/tar.texi: Update.
5873 * doc/Makefile.am: Update.
5875 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
5877 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
5878 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
5880 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
5882 * bootstrap: Fix quoting in help output.
5883 (update_po): Use backward-compatible wget option --cache instead
5884 of deprecated -C to accomodate for wget 1.10.
5885 Changes proposed by Eric Blake
5886 * THANKS: Add Eric Blake
5888 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
5890 * doc/tar.texi: Consistently put two spaces after sentences,
5891 and put commas after "i.e." and "e.g.". This is the usual GNU
5894 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
5895 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
5898 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
5900 * src/compare.c (diff_dumpdir): Pass a valid device number to
5901 get_directory_contents.
5903 * THANKS: Add John Thomas McDole
5905 * bootstrap: If file `.bootstrap' exists in the cwd and is
5906 readable, prepend its contents to the command line
5908 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
5910 * tests/link01.at: Skip test if ln fails (suppose the OS does
5911 not support hard links).
5913 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
5915 * src/tar.c (decode_options): Report error if -A or -r is used
5916 together with compression option.
5918 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
5920 * doc/tar.texi: Use @option and @kbd consistently.
5921 Document new options.
5923 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
5926 * src/common.h (show_stored_names_option): New variable
5927 * src/list.c (print_header): If show_stored_names_option is given,
5928 list member names as stored in the archive. Patch proposed by Erik
5929 Cumps <erik.cumps@icos.be>
5930 * src/tar.c: Implement --show-stored-names option
5932 * src/common.h (test_label_option): New variable;
5933 * src/list.c (print_header): Special handling if test_label_option
5935 * src/names.c (all_names_found): If test_label_option is set
5937 * src/tar.c: New option --test-label tests the archive volume
5938 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
5940 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5942 * tests/Makefile.am (clean-local): Don't attempt to run
5943 $(TESTSUITE) if it doesn't exist. Problem reported by
5946 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5948 Don't filter time stamps through the resolution supported
5949 by struct stat; keep them to full nanosecond resolution.
5950 This affects behavior only on older hosts or file systems
5951 that have lower-resolution time stamps.
5952 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
5953 (OLDER_TAR_STAT_TIME): New macro.
5954 (code_timespec): New function.
5955 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
5956 * src/compare.c (diff_file): Use full time stamp resolution.
5957 * src/create.c (start_header, dump_file0): Likewise.
5958 (start_header, dump_file0): Adjust to new structure layout.
5959 (dump_regular_finish): Simplify by using timespec_cmp.
5960 * src/extract.c (struct delayed_set_stat): Don't store stat info
5961 that we don't need, to save space. All uses changed.
5962 (struct delayed_set_stat, struct delayed_link, file_newer_p):
5963 (create_placeholder_file, extract_link, apply_delayed_links):
5964 Use full time stamp resolution.
5965 (check_time): Use code_timespec rather than rolling our own code.
5966 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
5967 avoid losing time information. All callers changed.
5968 * src/list.c (read_and, decode_header, print_heaeder):
5969 Use full time stamp resolution.
5970 * src/misc.c (code_timespec): New function.
5971 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
5972 separately, for benefit of hosts with lower resolution.
5973 * src/update.c (update_archive): Use full time stamp resolution.
5974 * src/xheader.c (code_time): Use new code_timespec function
5976 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
5977 (mtime_coder, mtime_decoder): Use full time stamp resolution.
5979 Report time stamps to full resolution in environment.
5980 Report memory allocation failures rather than ignoring them.
5981 * src/system.c (time_to_env): New function.
5982 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
5983 (stat_to_env): Report full resolution in time stamps.
5985 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5987 Merge changes from gnulib for file system sub-second time stamps.
5988 * configure.ac: Remove checks for struct stat.st_spare1, struct
5989 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
5990 stat.st_atimensec, as gnulib now does this for us.
5991 Similarly for LIB_CLOCK_GETTIME.
5992 * gnulib.modules: Add stat-time.
5993 * lib/.cvsignore: Add stat-time.h.
5994 * src/common.h: Include stat-time.h.
5995 (timespec_lt): Remove. All callers changed to use timespec_cmp.
5996 (get_stat_atime, get_stat_ctime, get_stat_mtime):
5997 (set_stat_atime, set_stat_ctime, set_stat_mtime):
5998 Remove; now defined by stat-time.h.
6000 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
6002 * src/incremen.c (list_dumpdir): New function. Used to dump
6003 contents of GNUTYPE_DUMPDIR blocks.
6004 * src/common.h (list_dumpdir): Likewise.
6005 * src/list.c (list_archive): Use list_dumpdir() to display
6006 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
6009 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
6011 * lib/.cvsignore: Adjust to current gnulib and modules used.
6012 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
6013 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
6014 strnlen1.h, unistd--.h.
6015 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
6017 Treat fishy-looking hard links like fishy-looking symlinks.
6018 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
6019 member to after_links. All uses changed.
6020 (struct delayed_link): Renamed from struct delayed_symlink.
6021 All uses changed. New member is_symlink.
6022 (delayed_link_head): Renamed from delayed_symlink_head. All uses
6024 (create_placeholder_file): New function, taken from extract_symlink.
6025 (extract_link): Create placeholders for fishy-looking hard links.
6026 (extract_symlink): Move code into create_placeholder_file.
6027 (apply_delayed_links): Renamed from apply_delayed_symlinks.
6028 All uses changed. Create both hard links and symlinks.
6030 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
6032 * README-alpha: Modernize description of software required for
6035 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
6037 * gnulib.modules: Add strdup
6038 * src/incremen.c (purge_directory): Do not dereference symbolic
6039 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
6040 David Brown <davidb@davidb.org>
6041 * tests/incr01.at: New test.
6042 * tests/Makefile.am: Add incr01.at
6043 * tests/testsuite.at: Likewise
6046 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
6048 * src/incremen.c (read_directory_file): Use strtoumax to read
6049 snapshot file contents.
6050 (write_directory_file_entry): Use umaxtostr().
6052 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
6054 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
6055 sparse files to /dev/null with --totals option.
6056 * tests/update.at: Remove dependency on file order.
6058 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6060 * doc/tar.texi: Fix typo.
6062 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6064 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
6066 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6068 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
6069 sparse_select_optab(). All callers updated.
6070 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
6072 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6074 * src/sparse.c (pax_sparse_member_p): Checking member size
6075 vs. file size is not reliable enough. Use sparse_map_avail.
6077 * tests/star/gtarfail.at: Adapt to the new output format
6078 * tests/star/gtarfail2.at: Likewise
6079 * tests/star/multi-fail.at: Likewise
6080 * tests/star/pax-big-10g.at: Likewise
6081 * tests/star/ustar-big-2g.at: Likewise
6082 * tests/star/ustar-big-8g.at: Likewise
6084 * tests/sparse03.at: New test.
6085 * tests/Makefile.am: Add sparse03.at
6086 * tests/testsuite.at: Likewise
6088 * src/xheader.c (size_decoder): Do not set archive_file_size.
6090 Fix bugs introduced yesterday:
6092 * src/sparse.c (tar_sparse_init): Initialize
6094 (sparse_scan_file): Initialize archive_file_size to 0. The
6095 variable keeps size of the file *as stored in the archive*, not
6096 the size reported by stat.
6098 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
6100 A sweep of the sparse code prompted by a bug report by Jim Meyering.
6101 * src/sparse.c: Include <inttostr.h>.
6102 (struct tar_sparse_file): offset and dumped_size are off_t, not
6103 size_t. optab is now const *.
6104 (dump_zeros): Return bool success flag, not off_t.
6105 All callers changed.
6106 Use a constant-zero buffer rather than clearing a buffer each time.
6107 Don't mess up if write fails.
6108 (dump_zeros, check_sparse_region):
6109 Don't assume off_t is no wider than size_t.
6110 (tar_sparse_init): Don't bother clearing a field that is already clear.
6111 (zero_block_p): First arg is const *, not *.
6112 (clear_block, SPARSES_INIT_COUNT): Remove.
6113 (sparse_add_map): First arg is now struct start_stat_info *, not
6114 struct tar_sparse_file *. All callers changed.
6115 Use x2nrealloc to check for size_t overflow.
6116 (parse_scan_file): Cache commonly-used parts of file.
6117 Use an auto buffer, not a static one.
6118 Don't bother clearing the buffer; not needed.
6119 Don't bother clearing items that are already clear.
6120 (oldgnu_optab, star_optab, pax_optab): Now const.
6121 (sparse_dump_region): Don't bother clearing the buffer before
6122 reading into it; just clear the parts that aren't read into.
6123 (sparse_dump_file): Clear the whole local variable 'file'.
6124 (diff_buffer): Remove; now a local var.
6125 (check_sparse_region): Don't bother clearing buffer before
6126 reading into it. Don't assume off_t is promoted to long.
6127 (oldgnu_get_sparse_info, star_get_sparse_info):
6128 Use an auto status, not static.
6129 * src/tar.h (struct tar_stat_info): had_trailing_slash is
6131 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
6132 Rewrite to avoid cast.
6133 (sparse_offset_decoder, sparse_numbytes_decoder):
6134 Diagnose excess entries rather than crashing.
6136 2005-06-22 Jim Meyering <jim@meyering.net>
6138 * src/common.h (timespec_lt): Add a return type: bool.
6140 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
6142 Further improvements inspired by Jim Meyering's fixes.
6144 * NEWS: Better support for full-resolution time stamps.
6145 The -v option now prints time stamps only to 1-minute resolution.
6146 * gnulib.modules: Add utimens.
6147 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
6148 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
6149 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
6150 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
6151 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
6153 * src/buffer.c (set_start_time, compute_duration, start_time):
6154 Use gettime rather than rolling our own code.
6155 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
6156 (newer_ctime_option): Remove.
6157 (timespec_lt): New function.
6158 (OLDER_STAT_TIME): Use it.
6159 (string_to_chars): First arg is char const *, not char *.
6160 (tartime): Time arg is now struct timespec. New bool arg.
6161 All callers changed.
6162 (code_ns_fraction): New decl.
6163 (sys_stat_nanoseconds): Remove decl.
6164 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
6165 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
6166 * src/compare.c: Include utimens.h rather than rolling our own.
6167 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
6169 (diff_dumpdir, diff_multivol): Prototype.
6170 (diff_file): Support higher-resolution time stamps.
6171 * src/create.c: Include utimens.h rather than rolling our own.
6172 (MAX_OCTAL_VAL): New macro.
6173 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
6174 the destination is already zeroed.
6175 (string_to_chars): First arg is char const *.
6176 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
6177 for minor device number.
6178 (write_header_name, dump_hard_link, dump_file0):
6179 Simplify test for old GNU format.
6180 (start_header): Put in placeholders for uid, etc., even when
6181 using extended headers, for benefit of older "tar" implementations.
6182 Don't assume uintmax_t is wider than 32 bits.
6183 Output extended header for mtime if needed.
6184 (dump_regular_finish, dump_file0):
6185 Support extended time stamp resolution.
6186 * src/extract.c: Include utimens.h rather than rolling our own.
6187 (check_time): Support extended time stamp resolution.
6188 * src/list.c: Include <inttostr.h>.
6189 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
6190 * src/xheader.c: Include <inttostr.h>.
6191 Do not include <xstrtol.h>.
6192 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
6193 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
6194 (BILLION, LOG10_BILLION): New constants.
6195 (to_decimal): Remove; superseded by inttostr. All callers changed
6197 (xheader_format_name): Don't assume pids and uintmax_t values
6198 fit in 63 bytes (!) when printed.
6199 (decode_record): Don't bother to check for ERANGE; an out of range
6200 value must be treater than len_max anyway.
6201 If the length is out of range, output it in the diagnostic.
6202 (format_uintmax): Remove; all callers changed to use umaxtostr.
6203 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
6204 (out_of_range_header): New function.
6205 (decode_time): Use it.
6206 (code_time): Accept struct timespec, not time_t and unsigned long.
6207 All callers changed. Size sbuf properly, and remove unnecessary check.
6208 Don't assume time stamps can fit in 199 bytes.
6209 Handle negative time stamps. Handle fractional time stamps
6210 more consistently. Don't output unnecessary trailing zeros.
6211 (decode_time): Yield struct timespec, not time_t and unsigned long.
6212 All callers changed.
6213 Handle negative time stamps. Truncate towards minus infinity
6214 consistently. Improve overflow checks, and output a better
6215 diagnostic on overflow.
6216 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
6217 (decode_num): New function, for better diagnostics.
6218 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
6219 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
6220 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
6221 (sparse_offset_decoder, sparse_numbytes_decoder):
6222 Use decode_num, etc., instead of xstrtoumax, etc.
6224 2005-06-21 Jim Meyering <jim@meyering.net>
6226 Carefully crafted invalid headers can cause buffer overrun.
6227 Invalid header fields go undiagnosed.
6228 Some valid time strings are ignored.
6230 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
6231 of `calloc'. Use xcalloc instead.
6232 (decode_time, gid_decoder, size_decoder, uid_decoder):
6233 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
6234 Ensure that the result of calling xstrtoumax is no larger than
6235 the maximum value for the target type. Upon any failure, exit with
6237 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
6238 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
6239 (decode_time): Rewrite to accept time strings like
6240 1119018481.000000000. Before, such strings were always ignored.
6242 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6244 * src/create.c (dump_file0): Check for is_avoided_name()
6245 first. Fixes bug reported by Martin Lohmeier
6246 <martin@mein-horde.de>
6247 * tests/update.at: New file
6248 * tests/Makefile.am (TESTSUITE_AT): Add update.at
6249 * tests/testsuite.at: Likewise
6251 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6253 * configure.ac (AC_STRUCT_ST_BLKSIZE)
6254 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
6256 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
6258 * src/names.c (excluded_name): excluded_filename ->
6259 excluded_file_name, because the name was changed in gnulib.
6261 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6263 * src/tar.c (read_name_from_file,update_argv): Automatically
6264 detect nul-terminated list files.
6267 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6269 * scripts/backup.sh.in: Bugfixes.
6271 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6273 * scripts/backup.in: Minor fixes
6274 * scripts/backup.sh.in (mt_begin,mt_rewind)
6275 (mt_offline,mt_status): Use $MT to invoke mt
6276 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
6278 * doc/tar.texi: Document new backup scripts behavior
6280 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6282 * lib/.cvsignore: Updated
6283 * lib/Makefile.tmpl: Add new paxutils files
6284 * po/POTFILES.in: Likewise
6285 * src/buffer.c: Update invocations of safer_name_suffix()
6286 * src/create.c: Likewise
6287 * src/extract.c: Likewise
6288 * src/xheader.c: Likewise
6289 * src/common.h: Include paxlib.h instead of paxerror.h
6290 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
6291 imported from paxutils
6292 * src/names.c (hash_string_hasher,hash_string_compare)
6293 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
6294 (safer_name_suffix): Moved to paxutils
6296 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6298 * bootstrap (copy_files): Accept optional third argument: a prefix
6299 to be appended to destination file names.
6300 Import paxutils/paxlib files.
6301 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
6303 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
6305 * po/POTFILES.in: Likewise.
6306 * src/common.h: Remove defines and declarations imported from
6308 * src/misc.c: Likewise
6309 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
6311 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
6313 * src/misc.c (remove_any_file): Fix typo in previous change.
6315 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
6317 Port to Solaris 10's treatment of unlinking directories.
6318 * gnulib-modules: Add unlinkdir.
6319 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
6320 * src/common.h (we_are_root): Remove extern decl; it's now static.
6321 * src/extract.c (we_are_root): Now static.
6322 * src/misc.c: Include <unlinkdir.h>.
6323 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
6325 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
6326 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
6327 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
6328 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
6329 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
6330 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
6331 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
6332 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
6333 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
6334 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
6335 src/xheader.c, tests/Makefile.am, tests/append.at,
6336 tests/append01.at, tests/comprec.at, tests/delete01.at,
6337 tests/delete02.at, tests/delete03.at, tests/delete04.at,
6338 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
6339 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
6340 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
6341 tests/link01.at, tests/listed01.at, tests/listed02.at,
6342 tests/long01.at, tests/longv7.at, tests/multiv01.at,
6343 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
6344 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
6345 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
6346 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
6347 tests/testsuite.at, tests/truncate.at, tests/version.at,
6348 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
6349 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
6350 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
6351 tests/star/ustar-big-8g.at:
6352 Update FSF postal mail address.
6354 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6358 * bootstrap: Install files from paxutils/doc
6359 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
6360 * doc/tar.texi (Genfile): New appendix
6361 * src/compare.c (diff_file): diff_handle was not initialized
6362 * src/create.c (dump_regular_file): Correctly pad archive members
6363 that shrunk during archiving. Repored by Frank Heckenbach.
6364 * src/extract.c (file_newer_p): Return false if file does not
6366 (prepare_to_extract): Correct warning wording.
6367 * tests/truncate.at: New test case
6368 * tests/Makefile.am: Add truncate.at
6369 * tests/testsuite.at: Likewise.
6371 * doc/.cvsignore: Updated
6372 * lib/.cvsignore: Updated
6373 * tests/.cvsignore: Updated
6375 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
6377 * tests/multivol04.at: Tell awk to read from /dev/null.
6379 Adjust to recent gnulib changes.
6380 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
6381 * src/common.h (initial_umask): New var.
6382 * src/create.c (start_ueader): Use it, and adjust to new modechange
6384 (hash_link): unsigned -> size_t parameters and result.
6385 * src/incremen.c (hash_directory): Likewise.
6386 * src/names.c (hash_string_hasher): Likewise.
6387 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
6389 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6391 * tests/Makefile.am: Add shortrec.at.
6393 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
6395 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
6396 (short_read): Don't warn about short reads; they're normal.
6397 * tests/shortrec.at: New file.
6398 * tests/testsuite.at: Include it.
6400 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
6401 it is sometimes left behind as a garbage file (maybe due to the
6404 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6406 * src/list.c: Handle Solaris 'X' type flag
6407 * src/tar.h (SOLARIS_XHDTYPE): New define
6409 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
6411 * src/tar.c: Minor fixes to text messages. Proposed by Benno
6413 * src/extract.c: Likewise
6414 (extract_file): Assign orig_file_name
6415 to save_name uniformly over the program. This fixes matching
6416 directory names at the start of an archive volume.
6417 * src/buffer.c (flush_write): Warn when the name of the archive
6418 straddling volume boundary is longer than 100 characters. Earlier
6419 behavior was to issue a fatal error.
6420 (struct zip_magic): Reverted part of changes from 2005-04-04.
6421 They make the maintenance too costly. Removing `unsigned'
6422 qualifier from `magic' member should be enough.
6423 * src/compare.c (diff_init): Read directory file if in listed
6424 incremental. This prevents spurious 'Contents differ' diagnostics.
6425 (diff_archive): Minor fixes to text messages
6426 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
6427 to save_name uniformly over the program. This fixes matching
6428 directory names at the start of an archive volume.
6429 * src/create.c: Assign orig_file_name
6430 to save_name uniformly over the program. This fixes matching
6431 directory names at the start of an archive volume.
6432 * src/list.c: Likewise
6434 * tests/multiv03.at: Modified to match the new behavior
6435 * tests/multiv04.at: New file. Test splittind directory members between
6436 the archive volumes.
6437 * tests/Makefile.am: Add multiv04.at
6438 * tests/testsuite.at: Likewise.
6440 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
6442 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
6443 for reasons discussed in the thread beginning at
6444 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
6445 * .cvsignore: Remove config; add build-aux.
6447 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
6448 The unsigned char * pointer ran afoul of pedantic C compilers, and
6449 we didn't need pointers anyway. Put the size field before the
6450 data to avoid unnecessary padding. All uses changed.
6451 (magic) Make it const, since it doesn't change. All uses changed.
6453 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
6455 * src/xheader.c (decode_record): Don't dump core when given
6456 a corrupted extended header. Problem reported by Jim Meyering.
6457 Also, check for other ways that the header might be invalid,
6458 e.g., missing newline at end. Do not allow keys with nulls.
6459 Allow blanks before and after length, as POSIX requires.
6460 Do not allow leading "-" in length. Check for length overflow.
6461 (xheader_decode, xheader_decode_global): Let decode_record
6462 check for exhaustion of record.
6463 (xheader_read): Null-terminate the extended record;
6464 decode_record relies on this.
6466 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6468 * bootstrap (TP_URL): Change from
6469 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
6470 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
6471 some redirection glitches.
6472 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
6473 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
6474 * lib/.cvsignore: Add intprops.h (new gnulib file).
6476 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6478 * src/list.c (print_header): Print UID/GID in case of
6479 empty user/group name. This could occur when dumping
6480 files belonging to non-existing users and when listing
6482 Reported by Igor Lautar.
6484 * src/create.c: Correctly parse empty uname/gname
6485 * src/sparse.c (sparse_scan_file): Bugfix. offset had
6488 * scripts/backup.in: Use `head -n 1'. Provide missing
6489 argument to ${MT_STATUS}. Proposed by Jan Merka.
6490 * scripts/backup.sh.in: Likewise. Fixed typo in
6491 MT_OFFLINE assignment.
6492 * scripts/restore.in (restore_fs): Use root_fs
6494 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6496 * src/create.c: Replace strdup with xstrdup
6497 * src/names.c: Likewise
6498 * src/tar.c: Likewise
6500 * tests/append01.at: Added reference to bug-tar archive
6501 * tests/listed02.at: Use -print with find.
6503 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6505 * THANKS: Added Tim Adye. Fixed UTF.
6506 * src/list.c (read_header): Removed assignment to
6507 oldgnu_header.isextended. It was breaking append mode.
6509 * tests/append01.at: New test.
6510 * tests/Makefile.am: Added append01.at
6511 * tests/testsuite.at: Likewise
6513 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6515 * gnulib.modules: New file. List of required gnulib
6517 * bootstrap: Merge list of required modules from
6518 paxutils with that from tar proper.
6519 * src/tar.c: Various fixes in help and diagnostic messages.
6521 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6523 * src/common.h (EXTRACT_OVER_PIPE): New macro
6524 * src/compare.c: Code clean up.
6525 * src/extract.c (extract_archive): Do not check for
6526 EXTRACT_OVER_PIPE, decode_options() does this.
6527 * src/misc.c (exec_error,fork_error,dup2_error)
6528 (pipe_error): Removed unneeded functions.
6529 * src/system.c (sys_exec_command): Use xclose, xpipe,
6530 xfork, xdup2 and exec_fatal.
6531 * src/tar.c (options): Improved sorting. Document --backup=off.
6532 (decode_options): Clear backup_option if necessary.
6534 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6536 Initial implementation of --to-command option proposed
6539 * bootstrap: Get setenv module from gnulib
6540 * src/buffer.c: Do not use 8-bit chars in comments
6541 * src/common.h (to_command_option)
6542 (ignore_command_error_option): New globals
6543 (sys_exec_command,sys_wait_command): New commands
6544 * src/extract.c (extract_file): Handle to_command_option
6545 Fix error recovery: decrease `size' by `written', not
6546 by `count', otherwise tar misses the next header
6547 Do not diagnose write error if to_command_option
6548 is set, since the command may have exited prematurely.
6549 It would be better to check for sigpipe, though.
6550 (prepare_to_extract): Handle to_command_option
6551 * src/misc.c (exec_error, fork_error, dup_error)
6552 (pipe_error): New functions
6553 * src/system.c (sys_exec_command)
6554 (sys_wait_command): New functions
6555 * src/tar.c: Handle new options --to-command,
6556 --ignore-command-error
6557 * THANKS: Added Hansjoerg Lipp
6559 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
6561 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
6562 All uses changed. Fix typo that sometimes suppressed all "Archive
6563 contains obsolescent base-64 headers" warnings, not just the first
6565 (tar_checksum): Accept only octal checksums, since they aren't
6566 supposed to overflow into weird formats.
6568 Adjust to gnulib changes.
6569 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
6570 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
6571 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
6572 this file). Sort entries.
6574 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6576 * src/extract.c: Further rewrite.
6577 * src/buffer.c: Removed unused variables.
6578 * src/list.c: Likewise
6579 * src/tar.c (update_argv): Changed type to void
6581 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
6582 * src/create.c (start_private_header,write_header_name)
6583 (dump_hard_link): Restore compatibility with 1.13.25
6584 * src/extract.c (extract_archive): Rewritten
6585 * src/list.c: Add translators' comments
6586 * src/tar.c (options) Minor spelling fix
6587 * tests/star/quicktest.sh: Determine path to the tar executable.
6589 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6591 * po/POTFILES.in: Added tests/genfile.c
6592 * src/buffer.c (short_read): Use ngettext()
6593 (new_volume): use quote().
6594 * src/create.c: Use quote()
6595 * src/extract.c: Likewise
6596 * src/xheader.c: Likewise
6597 * src/misc.c: Add comments to translators
6599 * tests/same-order01.at: sort ls output
6600 * tests/sparse01.at (RE_CHECK): Added missing space
6602 * tests/sparse02.at: Test extracting sparse files over a pipe.
6603 * tests/Makefile.am: Added sparse02.at
6604 * tests/testsuite.at: Likewise
6605 * tests/listed02.at: Skip the test on filesystems that do not
6606 update ctime of a file when renaming it. To be reverted when
6607 the new incremental mode is ready.
6608 * tests/sparse01.at: Extract and compare sparse file
6610 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6612 * src/sparse.c: Extract sparse files even if the output
6615 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6617 * bootstrap: Add a comment to lib/Makefile.am saying that this
6618 is an autogenerated file.
6619 Exit with code 1 if any of autotools fails.
6620 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
6621 * tests/Makefile.am: Add append.at
6623 * m4/.cvsignore: Ignore all *.m4 files
6625 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6627 Rewritten handling of -T (--files-from) option. Now it
6628 inserts the file names immediately into argv array which allows
6630 1) any valid tar options (including another -T) to be used in the file
6631 2) any number of -T options to be given in command line
6633 * configure.ac: Raised version number to 1.15.2
6634 * src/common.h: Include obstack.h
6635 (files_from_option): Removed
6636 (unquote_option): New variable
6637 (stat_fatal): New function
6638 (name_close): Removed function.
6639 * src/incremen.c: Remove inclusion of obstack.h
6640 * src/xheader.c: Likewise.
6641 * src/misc.c (stat_fatal): New function
6642 * src/names.c (name_file): Removed variable.
6643 (read_name_from_file): Removed function. All callers changed.
6644 (name_close): Removed function. All callers changed.
6645 * src/tar.c: New options --unquote (--no-unquote) and
6647 (add_file_id,read_name_from_file,update_argv): New functions
6648 (parse_opt): Rewritten handling of -T option. Handle hidden
6649 --HANG option for debugging purposes.
6650 (decode_options): Init unquote_option to true. Init argv_stk.
6651 Remove unneeded references to files_from_option
6653 * doc/tar.texi: Document new options.
6654 Moved rendition macros and option value definitions into
6656 * doc/rendition.texi: New file
6657 * doc/value.texi: New file
6658 * doc/Makefile.am: Updated
6660 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
6662 * tests/testsuite.at (RE_CHECK): Use "join - file", not
6663 "join file -", to work around a bug in Solaris 8 join.
6664 Problem reported by Tomohiro Suzuki.
6666 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6668 * src/list.c (read_header): Fixed calculation of the
6669 size for GNU long name/link. Tar was reading one block
6670 more if name_size was divisible by 512. Thanks Josef
6672 * tests/long01.at: New file. Test listing of GNU long names
6674 * tests/pipe.at: Sort tar output.
6675 * tests/Makefile.am: Added long01.at
6676 * tests/testsuite.at: Likewise.
6677 * THANKS: Added Josef Bauer
6678 * lib/.cvsignore: Updated
6679 * m4/.cvsignore: Updated
6682 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6684 * directory: Updated for 1.15.1
6685 * doc/Makefile.am: Use gendocs.sh to generate web documentation
6686 * doc/gendocs_template: Template file for gendocs.sh
6687 * doc/tar.texi: Updated docs for --[no-]same-permissions
6688 * src/tar.c: Reworded docstrings for --[no-]same-permissions
6690 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6692 * bootstrap: Create m4/paxutils.m4
6693 * configure.ac: Call tar_PAXUTILS
6694 * tests/options02.at: Test that tar correctly handles non-option
6695 arguments interspersed with options.
6696 * tests/Makefile.am: Add options02.at
6697 * tests/testsuite.at: Likewise
6698 * tests/listed02.at: Do not create useless directory
6700 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6702 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
6703 Mike Frysinger <vapier@gentoo.org> for reporting.
6705 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
6707 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
6708 needless sed command. Problem reported by Paul Jarc.
6710 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
6712 Accommodate latest gnulib.
6713 * doc/.cvsignore: Add getdate.texi.
6714 * bootstrap: Do not treat alloca-opt specially; this is no
6715 longer needed (and breaks builds) with latest gnulib.
6717 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6719 * src/tar.c (main): Reverted recent changes (#ifdef).
6721 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6723 * configure.ac: Raise version number to 1.15.1
6725 * NEWS: Entry for 1.15.1
6726 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
6727 broke extraction from stdin.
6728 * src/list.c (from_header, tar_checksum): Changed declaration.
6729 All callers updated.
6730 * src/common.h: Likewise
6731 * src/tar.c (main): Protect invocation of setlocale by
6734 * tests/comprec.at: New test
6735 * tests/pipe.at: New test
6736 * tests/Makefile.am (comprec.at,pipe.at): New tests
6737 * tests/testsuite.at: Likewise
6738 * tests/gzip.at: Use AT_GZIP_PREREQ
6739 * tests/star/pax-big-10g.at: Likewise
6740 * tests/star/ustar-big-2g.at: Likewise
6741 * tests/star/ustar-big-8g.at: Likewise
6743 * tests/extrac04.at: Discard stderr from sort, on some
6744 systems it spits out lots of irrelevant info.
6745 * tests/listed02.at: Likewise
6747 * doc/index.html.in: Rewritten in xhtml to follow recent
6751 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6753 Released version 1.15. Sources up to this point are
6754 tagged release_1_15.
6756 * configure.ac: Raised version number to 1.15
6758 * directory: Updated
6759 * bootstrap (update_po): Give -r to wget. Always remove index.html
6760 Ignore alloca-opt module (it duplicates alloca)
6762 * tests/Makefile.am: Distribute star/quicktest.sh
6763 * tests/star/README: Document quicktest.sh
6764 * tests/star/qucktest.sh: Removed.
6765 * tests/star/quicktest.sh: New file.
6767 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6770 * doc/tar.texi: Document auto-detection of compressed archive
6772 * src/tar.c (decode_options): Ignore --seek if used with --delete.
6773 Delete.c is based on the assumption that the archive is being
6774 actually read, not lseeked.
6776 * tests/delete05.at: New file
6777 * tests/extrac02.at: Fixed typo in AT_SETUP
6778 * tests/Makefile.am: Added delete05.at
6779 * tests/testsuite.at: Likewise.
6781 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6783 * src/delete.c (delete_archive_members): Bugfix: when
6784 attempting to delete an nonexistent member, the last
6785 blocking_factor blocks were zeroed.
6787 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
6789 * TODO: Mention sub-second resolution, lutimes, lchmod.
6791 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
6793 Adjust to recent gnulib changes.
6794 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
6795 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
6796 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
6797 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
6798 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
6799 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
6801 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
6802 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
6803 pathmax.m4, realloc.m4.
6805 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6807 * configure.ac: Raised version number to 1.14.91
6808 * scripts/tarcat: New file
6809 * scripts/Makefile.am: Added tarcat
6810 * src/buffer.c (hit_eof): Changed type to boolean
6811 (read_full_records,reading_from_pipe): New variables
6812 (check_compressed_archive,open_compressed_archive): New functions
6813 (open_archive): Autodetect compressed archives and act accordingly.
6814 Set reading_from_pipe. This fixes controversial set of changes
6815 introduced 2004-05-11,2004-03-22.
6816 * src/list.c (tar_checksum): New function
6817 (read_header): Use tar_checksum().
6818 * src/common.h (tar_checksum): New function
6820 * tests/star/README: Updated
6824 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6826 * src/tar.c (decode_options): Fixed -o semantics. Thanks
6827 Jean Delvare <khali@linux-fr.org>
6829 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6831 * bootstrap: Add localcharset
6832 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
6833 makefile snippet from localcharset uses '+=' on them.
6834 * src/Makefile.am (LDADD): Add LIBICONV
6835 * src/list.c (decode_header): Set uname/gname to NULL if their
6836 header counterparts are empty
6837 * src/tar.c (options): Use OPTION_NO_TRANS
6838 * src/utf8.c: Use locale_charset() from gnulib
6840 * tests/star/README: Updated
6845 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6847 * THANKS: Added Bryan Ford
6848 * doc/Makefile.am (.text): Fixed rule
6849 * po/POTFILES.in: Added argp-help.c
6851 2004-10-04 Bryan Ford <baford@mit.edu>
6853 * src/tar.c: New option --exclude-caches, to exclude
6854 cache directories automatically on archive creation.
6855 Cache directories are directories containing a
6856 standardized tag file, as specified at:
6857 http://www.brynosaurus.com/cachedir/spec.html
6858 * src/common.h: New variable exclude_caches_option.
6859 * src/create.c: New function check_cache_directory(),
6860 called from dump_dir0() if exclude_caches_option is set,
6861 to check for a cache directory tag and exclude the directory
6862 if such a tag is found.
6863 * doc/tar.texi: Updated accordingly.
6865 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6867 * doc/tar.texi: Minor fix
6868 * src/tar.c (options): Minor fix
6870 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6873 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
6874 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
6875 * src/extract.c: Normalized use of remove_any_file().
6876 * src/misc.c: Likewise.
6877 * src/tar.c (parse_opt): Emit warning if -l option is used.
6878 (show_default_settings): REMOTE_SHELL may be undefined
6880 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6882 Test suite rewritten in autotest.
6884 * configure.ac: Updated for autotest
6885 * src/tar.c (argp_program_version): Modified.
6886 * tests/Makefile.am: Rewritten for autotest.
6888 * tests/.cvsignore: Updated
6889 * tests/append.at: New file
6890 * tests/atlocal.in: New file
6891 * tests/delete01.at: New file
6892 * tests/delete02.at: New file
6893 * tests/delete03.at: New file
6894 * tests/delete04.at: New file
6895 * tests/extrac01.at: New file
6896 * tests/extrac02.at: New file
6897 * tests/extrac03.at: New file
6898 * tests/extrac04.at: New file
6899 * tests/extrac05.at: New file
6900 * tests/gzip.at: New file
6901 * tests/ignfail.at: New file
6902 * tests/incremental.at: New file
6903 * tests/link01.at: New file
6904 * tests/listed01.at: New file
6905 * tests/listed02.at: New file
6906 * tests/longv7.at: New file
6907 * tests/multiv01.at: New file
6908 * tests/multiv02.at: New file
6909 * tests/multiv03.at: New file
6910 * tests/old.at: New file
6911 * tests/options.at: New file
6912 * tests/recurse.at: New file
6913 * tests/same-order01.at: New file
6914 * tests/same-order02.at: New file
6915 * tests/sparse01.at: New file
6916 * tests/testsuite.at: New file
6917 * tests/version.at: New file
6918 * tests/volume.at: New file
6919 * tests/star/gtarfail.at: New file
6920 * tests/star/gtarfail2.at: New file
6921 * tests/star/multi-fail.at: New file
6922 * tests/star/pax-big-10g.at: New file
6923 * tests/star/ustar-big-2g.at: New file
6924 * tests/star/ustar-big-8g.at: New file
6926 * tests/preset.in: Removed
6927 * tests/before: Removed
6928 * tests/after: Removed
6929 * tests/version.sh: Removed.
6930 * tests/append.sh: Removed.
6931 * tests/delete01.sh: Removed.
6932 * tests/delete02.sh: Removed.
6933 * tests/delete03.sh: Removed.
6934 * tests/delete04.sh: Removed.
6935 * tests/extrac01.sh: Removed.
6936 * tests/extrac02.sh: Removed.
6937 * tests/extrac03.sh: Removed.
6938 * tests/extrac04.sh: Removed.
6939 * tests/extrac05.sh: Removed.
6940 * tests/gzip.sh: Removed.
6941 * tests/incremen.sh: Removed.
6942 * tests/ignfail.sh: Removed.
6943 * tests/link01.sh: Removed.
6944 * tests/listed01.sh: Removed.
6945 * tests/listed02.sh: Removed.
6946 * tests/longv7.sh: Removed.
6947 * tests/multiv01.sh: Removed.
6948 * tests/multiv02.sh: Removed.
6949 * tests/multiv03.sh: Removed.
6950 * tests/old.sh: Removed.
6951 * tests/options.sh: Removed.
6952 * tests/same-order01.sh: Removed.
6953 * tests/same-order02.sh: Removed.
6954 * tests/volume.sh: Removed.
6955 * tests/recurse.sh: Removed.
6956 * tests/sparse01.sh: Removed.
6957 * tests/star/gtarfail.sh: Removed.
6958 * tests/star/gtarfail2.sh: Removed.
6959 * tests/star/multi-fail.sh: Removed.
6960 * tests/star/ustar-big-2g.sh: Removed.
6961 * tests/star/ustar-big-8g.sh: Removed.
6962 * tests/star/pax-big-10g.sh: Removed.
6964 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6966 * bootstrap: Install genfile.c from paxutils
6967 * tests/genfile.c: Removed. Integrated into
6969 * tests/mksparse.c: Removed. Integrated into
6970 (paxutils) genfile.c
6971 * tests/Makefile.am: Removed mksparse
6972 * tests/sparse01.sh: Use genfile instead of mksparse
6974 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6976 Started merging with cpio into paxutils. Sources before
6977 this point are tagged alpha-1_14_90
6979 * Makefile.am: Updated for use with paxutils
6980 * README-alpha: Likewise
6981 * bootstrap: Likewise
6982 * configure.ac: Likewise
6983 * lib/Makefile.tmpl: Likewise
6984 * po/POTFILES.in: Likewise
6985 * src/Makefile.am: Likewise
6986 * src/buffer.c: Likewise
6987 * src/common.h: Likewise
6988 * src/compare.c: Likewise
6989 * src/create.c: Likewise
6990 * src/delete.c: Likewise
6991 * src/extract.c: Likewise
6992 * src/incremen.c: Likewise
6993 * src/list.c: Likewise
6994 * src/mangle.c: Likewise
6995 * src/misc.c: Likewise
6996 * src/names.c: Likewise
6997 * src/sparse.c: Likewise
6998 * src/system.c: Likewise
6999 * src/tar.c: Likewise
7000 * src/update.c: Likewise
7001 * src/utf8.c: Likewise
7002 * src/xheader.c: Likewise
7004 * src/system.h: Removed
7005 * src/rmt.c: Removed
7006 * src/rmt.h: Removed
7007 * src/rtapelib.c: Removed
7009 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7011 * tests/listed02.sh: Do not depend on any particular ordering
7014 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7016 * doc/tar.texi: Document the use of -C option in
7017 file lists. Document --seek option.
7018 * configure.ac: New option --with-rmt. New configuration variable
7019 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
7020 * src/Makefile.am: Install rmt into rmtdir
7021 * src/tar.c (usage): Minor fix.
7025 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7027 * configure.ac: Raised version number to 1.14.90
7028 * src/common.h (is_individual_file): New prototype
7029 * src/create.c (dump_file0): Fix bug introduced
7031 * src/names.c (register_individual_file)
7032 (is_individual_file): New functions.
7033 * tests/listed01.sh: Use genfile instead of dd.
7034 * tests/listed02.sh: New file.
7035 * tests/Makefile.am: Added listed02.sh
7039 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7041 * src/sparse.c (sparse_add_map): Fixed improper initializations
7042 of sparse_map_size. We assume that whatever number it contains
7043 describes adequately the current size of sparse_map. The only
7044 number we need to reset is sparse_map_avail.
7045 * src/compare.c (verify_volume): Call set_next_block_after
7046 if read_header returns HEADER_FAILURE
7047 Destroy and reinitialize content of current_stat_info and
7048 extended_header after each iteration (bug reported by
7049 John L. Males <jlmales@yahoo.com>).
7050 Issue a warning if the created archive contains some members
7051 whose file names were stripped off their leading prefixes.
7052 This is a temporary fix of the issue reported by Bdale Garbee
7053 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
7054 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
7056 * src/names.c (removed_prefixes_p): New function.
7058 * src/buffer.c: When computing write rate do not take
7059 into account the time needed to verify the archive(s).
7060 The bug reported by John L. Males <jlmales@yahoo.com>
7061 (set_start_time,compute_duration): New functions.
7062 (print_total_written): Use the result of compute_duration().
7063 (close_archive): Call compute_duration.
7064 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
7065 * src/list.c (decode_header): Fixed initialization
7066 of stat_info->is_sparse
7067 * src/tar.c (main): Call set_start_time().
7069 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
7070 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
7075 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7077 * src/tar.c: Fix copy-n-paste errors in the license
7079 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7081 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
7082 Use ROOT_FS with -C option. Do not send mail
7083 if ADMINISTRATOR is set to NONE.
7084 * scripts/backup.sh.in (test_root): Append / to
7085 ROOT_FS if it does not already end in it.
7086 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
7087 New option -a (--all). Do not start restore unless
7088 -a or patterns are given.
7089 (restore_fs,restore_files): Fixed use of --listed option.
7090 * doc/tar.texi: Updated
7093 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7095 * src/tar.c (find_argp_option): Fixed typo
7097 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
7099 Merge argp, getopt, xalloc changes from gnulib.
7100 * bootstrap (gnulib_modules): Add xalloc-die.
7101 Remove code to test for patches; we don't have patches now.
7102 Set LC_ALL=C so that file names sort consistently.
7103 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7104 lib-ld.m4, lib-prefix.m4, po.m4 too.
7106 * patches/getopt.diff: Remove; gnulib now works unpatched.
7107 * configure.ac (_getopt_long_only_r): Remove check.
7108 gl_ARGP now does this for us.
7109 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
7111 * src/extract.c: Adjust to changes to gnulib xalloc module.
7112 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
7113 (xalloc_die): New function.
7115 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7119 * src/buffer.c (flush_write): Limit filenames
7120 of the members that straddle multivolume archive
7121 boundary to 100 characters.
7122 (flush_read): Use strncmp when comparing multivolume member
7124 * tests/multiv03.sh: New file
7125 * tests/Makefile.am: Added multiv03.sh
7127 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7129 * src/list.c (read_and): Call decode_header before
7130 calling skip_member()
7131 (skip_member): Use is_sparse field to determine if the
7132 member is a sparse file.
7134 * tests/Makefile.am: Added extrac05.sh
7135 * tests/extrac05.sh: New file
7136 * tests/append.sh: Rearranged leading comments. Added explicit
7137 references to report messages wherever available.
7138 * tests/delete01.sh: Likewise
7139 * tests/delete02.sh: Likewise
7140 * tests/delete03.sh: Likewise
7141 * tests/delete04.sh: Likewise
7142 * tests/extrac01.sh: Likewise
7143 * tests/extrac02.sh: Likewise
7144 * tests/extrac03.sh: Likewise
7145 * tests/extrac04.sh: Likewise
7146 * tests/gzip.sh: Likewise
7147 * tests/ignfail.sh: Likewise
7148 * tests/incremen.sh: Likewise
7149 * tests/link01.sh: Likewise
7150 * tests/listed01.sh: Likewise
7151 * tests/longv7.sh: Likewise
7152 * tests/multiv01.sh: Likewise
7153 * tests/multiv02.sh: Likewise
7154 * tests/old.sh: Likewise
7155 * tests/options.sh: Likewise
7156 * tests/recurse.sh: Likewise
7157 * tests/same-order01.sh: Likewise
7158 * tests/same-order02.sh: Likewise
7159 * tests/sparse01.sh: Likewise
7160 * tests/version.sh: Likewise
7161 * tests/volume.sh: Likewise
7163 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7165 * bootstrap: Extended --update-po option to take an
7166 optional argument specifying the po file to update.
7167 * src/create.c: Improved compatibility with 1.13.25
7168 * tests/link01.sh: New file.
7169 * tests/Makefile.am: Added link01.sh
7171 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
7175 * patches/argp.diff: Remove; no longer needed.
7177 * lib/.cvsignore: Add stat-macros.h.
7178 Remove addext.c, malloc.c, realloc.c.
7180 * src/extract.c: Include <getcwd.h>.
7181 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
7182 * src/extract.c (make_directories):
7183 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
7184 * src/misc.c (must_be_dot_or_slash): Likewise.
7185 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
7187 * src/tar.c (parse_opt): Likewise.
7188 * src/incremen.c (purge_directory): Fix format buffer typos in warning
7190 * src/tar.c (options): Add missing initializers to pacify gcc.
7191 (decode_options): Remove unused var.
7193 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
7195 * bootstrap (gnulib_modules): Add getpagesize.
7196 * configure.ac (valloc): Remove check; valloc no longer used.
7197 * lib/.cvsignore: Add getpagesize.h.
7198 * m4/.cvsignore: Add getpagesize.m4.
7199 * src/buffer.c (record_buffer): New var.
7200 (open_archive): Don't use valloc; on older or buggy hosts, you can't
7201 free the result. Use page_aligned_alloc instead.
7202 * src/compare.c (diff_init): Likewise.
7203 * src/buffer.c (open_archive): Record the pointer to be freed
7205 (close_archive): Free record_buffer.
7206 * src/common.h (page_aligned_alloc): New decl.
7207 * src/misc.c (quote_n, quote): Remove these redundant functions.
7208 (ptr_align): New function, from coreutils/src/system.h.
7209 (page_aligned_alloc): New function.
7210 * src/system.h (valloc): Remove.
7212 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
7214 * src/extract.c (extract_archive): Do not report an error
7215 when hard-linking X to X when X exists. Problem reported by
7217 * lib/.cvsignore: Add fchown-stub.c.
7219 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7222 * src/common.h (root_device): New global.
7223 (gnu_restore): Renamed to purge_directory().
7224 * src/extract.c (extr_init): Save the device number
7226 (extract_archive): Renamed gnu_restore() to purge_directory().
7227 * src/incremen.c (gnu_restore): Renamed to purge_directory().
7228 Do not attempt to purge the directory if it is on a different
7229 device and one_file_system_option is set.
7231 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7233 * doc/tar.texi: The actual default for exclude patterns
7234 is --no-anchored. Fixed.
7235 * src/tar.c (options): Likewise.
7236 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
7238 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7240 * doc/tar.texi: Fixed several inconsistencies.
7241 * src/tar.c: Fixed docstring for --checkpoint option.
7243 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7245 * src/buffer.c (seek_archive): New function
7246 * src/common.h (seek_archive): New function
7247 (seekable_archive): New global.
7248 * src/list.c (skip_file): Use seek_archive() if
7250 * src/tar.c (struct fmttab): Accept 'pax' as alias
7252 (options): New option -n (--seek).
7253 * src/update.c: Determine type of the archive before
7258 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7260 * bootstrap: New option --update-po
7261 * src/tar.c: New option -H (short alias to --format)
7262 * doc/tar.texi: Document -H option
7263 * src/names.c (safer_name_suffix): Fixed bug introduced
7266 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7268 * bootstrap: Apply patches from patch subdirectory
7270 * patches/argp.diff: New file
7271 * patches/getopt.diff: New file
7272 * configure.ac: Check for _getopt_long_only_r and
7273 force using included version of getopt if the function
7275 * src/tar.c: Use argp for command line parsing.
7276 * src/system.h: Minor formatting fix
7277 * m4/.cvsignore: Updated
7278 * lib/.cvsignore: Updated
7279 * doc/tar.texi: Minor fix.
7280 * src/extract.c: Fix improper use of 'path' term
7281 * src/incremen.c: Likewise
7282 * src/list.c: Likewise
7283 * src/misc.c: Likewise
7284 * src/names.c: Likewise
7285 * src/rmt.h: Likewise
7286 * src/rtapelib.c: Likewise
7287 * src/update.c: Likewise
7288 * src/xheader.c: Likewise
7289 * tests/star/README: Minor fix
7291 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7293 * configure.ac: Raised version number to 1.14.1
7294 * src/tar.c: Renamed --strip-path to --strip-components
7295 Changed improper use of _() to ngettext().
7296 * src/extract.c: Renamed strip_path_option to strip_components_option
7297 * src/common.h: Likewise.
7299 * doc/tar.texi: Updated
7301 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7303 * src/system.c (sys_child_open_for_uncompress): Do not
7304 set read_full_records_option: the compressed archive is
7305 likely not to contain integer number of records. Should
7306 the user wish to use reblocking, he may always give tar
7307 -B option. This is a minor improvement over the change
7309 * src/buffer.c (open_archive): Removed assignment to
7310 read_full_records_option.
7312 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
7313 as the format argument, rather than a possibly-translated variable
7314 string. Patch provided by Jim Meyering <jim@meyering.net>
7315 * src/tar.c (decode_options): Fixed typo in the comment.
7316 * tests/star/README: Minor correction
7318 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7320 * directory: New file. GNU directory entry for tar.
7321 * doc/Makefile.am: Rewritten. Added rules for generating
7322 documentation for the project's website.
7323 * doc/.cvsignore: Updated
7324 * doc/index.html.in: New file.
7326 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7328 * configure.ac: Raised version number to 1.14
7330 * tests/after: Added copyleft statement
7331 * tests/before: Added copyleft statement
7332 * tests/preset.in: Added copyleft statement
7334 Tar 1.14 is released. Sources up to this point are tagged
7337 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7339 * configure.ac: Fixed prerequisite headers for sys/buf.h
7341 * src/system.h: Likewise.
7342 * tests/after (compare): Fixed argument quoting under eval
7343 * tests/before: Quote TAR_ARCHIVE_FORMATS
7345 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7350 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
7351 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
7352 the pathname of the rmt utility.
7353 New option --enable-backup-scripts.
7354 * doc/tar.texi: Updated
7355 * scripts/Makefile.am: Install the scripts only if requested
7357 * scripts/backup.in: Fixed --version output.
7358 Fixed initialization of the listing files and printing
7359 the time of the last previous level dump.
7360 * scripts/restore.in: Fixed --version output.
7361 * src/Makefile.am (localedir.h rule): Generate correct
7362 DEFAULT_RMT_COMMAND variable.
7363 * src/common.h (rmt_command_option): New variable.
7364 * src/list.c (read_and): Print block number before
7365 issuing 'Skipping to next header' diagnostics, if
7366 requested by block_number_option.
7367 * src/rtapelib.c: Use rmt_command_option instead of
7368 hardcoded "/etc/rmt".
7369 * src/tar.c: New option --rmt-command.
7370 (decode_options): Handle --rmt-command. Initialize
7371 rmt_command_option to DEFAULT_RMT_COMMAND.
7373 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7375 * doc/tar.texi: Further update.
7377 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7379 * configure.ac: Minor fix
7380 * scripts/Makefile.am: Updated
7381 * scripts/backup-specs: Updated
7382 * scripts/backup.in: Minor fixes
7383 * scripts/backup.sh: Removed
7384 * scripts/backup.sh.in: New file. Source for backup.sh
7385 * scripts/restore.in: New file
7386 * scripts/.cvsignore: Updated
7387 * scripts/WARNING: Removed
7388 * doc/tar.texi: Updated
7391 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7393 * src/names.c (name_gather): Bugfix: Honor single -C with
7395 * tests/same-order01.sh: New file
7396 * tests/same-order02.sh: New file
7397 * tests/Makefile.am: Updated
7399 * tests/append.sh: Added copyleft header
7400 * tests/delete01.sh: Likewise
7401 * tests/delete02.sh: Likewise
7402 * tests/delete04.sh: Likewise
7403 * tests/extrac01.sh: Likewise
7404 * tests/extrac02.sh: Likewise
7405 * tests/extrac03.sh: Likewise
7406 * tests/extrac04.sh: Likewise
7407 * tests/gzip.sh: Likewise
7408 * tests/ignfail.sh: Likewise
7409 * tests/incremen.sh: Likewise
7410 * tests/multiv01.sh: Likewise
7411 * tests/old.sh: Likewise
7412 * tests/options.sh: Likewise
7413 * tests/recurse.sh: Likewise
7414 * tests/version.sh: Likewise
7415 * tests/volume.sh: Likewise
7416 * tests/star/gtarfail.sh: Likewise
7417 * tests/star/gtarfail2.sh: Likewise
7418 * tests/star/multi-fail.sh: Likewise
7419 * tests/star/pax-big-10g.sh: Likewise
7420 * tests/star/qucktest.sh: Likewise
7421 * tests/star/ustar-big-2g.sh: Likewise
7422 * tests/star/ustar-big-8g.sh: Likewise
7424 * doc/.cvsignore: Updated
7426 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7428 * configure.ac: Check whether date accepts +format argument
7429 (for backup scripts).
7430 * scripts/level-0: Removed
7431 * scripts/level-1: Removed
7432 * scripts/weekly.new: Removed
7433 * scripts/dump-remind: Removed
7434 * scripts/backup.in: New file
7435 * scripts/backup.sh: New file
7436 * scripts/dump-remind.in: New file
7437 * scripts/backup-specs: Updated
7438 * scripts/Makefile.am: Updated for new directory contents.
7439 * scripts/.cvsignore: Updated
7441 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7444 * doc/tar.texi: Updated
7445 * src/tar.c: --utc implies -vv
7447 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7449 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
7450 does not define it if it fails to find iconv.h.
7452 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7454 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
7455 and parts of configure.ac
7456 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
7457 * lib/Makefile.am: Removed
7458 * lib/Makefile.tmpl: New file.
7459 * lib/.cvsignore: Updated
7460 * m4/.cvsignore: Updated
7461 * src/xheader.c: Include stpcpy.h
7463 * src/create.c: Produce an error, not warning, if the
7464 filename is too long.
7465 * tests/longv7.sh: Synchronized with the recent changes.
7467 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7469 * configure.ac: Fixed test for iconv_t
7470 * src/rmt.h: Bugfix by Jürgen Weigert
7471 * THANKS: Add Jürgen Weigert
7472 * tests/star/README: Fixed typo
7474 2004-04-04 Paul Eggert <eggert@twinsun.com>
7476 Merge getdate documentation changes from coreutils.
7478 * doc/getdate.texi: Update from coreutils CVS.
7479 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
7481 Merge recent gnulib changes, and remove some lint.
7483 Improve support for nanosecond-resolution time stamps.
7484 * bootstrap: Add gettime, timespec modules.
7485 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
7486 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
7488 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
7489 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
7490 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
7491 * src/common.h (newer_mtime_option): Now a struct timespec, not
7492 time_t. All uses changed.
7493 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
7494 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
7495 * src/incremen.c (scan_path): Likewise.
7496 * src/list.c (read_and): Likewise.
7497 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
7498 whether newer_mtime_option is initialized.
7499 * src/tar.c (decode_options): Likewise.
7500 * src/tar.c (decode_options): Adjust to new signature for get_date.
7502 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
7503 result of safe_read, full_write, and similar functions.
7504 Detect safe_read error by comparing to SAFE_READ_ERROR;
7505 detect full_write error by comparing to 0.
7507 * src/common.h (write_error_details, sys_write_archive_buffer):
7509 * src/misc.c (write_error_details): Likewise.
7510 * src/rmt.c (main): Likewise.
7511 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
7512 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
7513 * src/sparse.c (sparse_scan_file, sparse_dump_region,
7514 check_sparse_region, check_data_region): Likewise.
7515 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
7516 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
7517 * src/update.c (append_file): Likewise.
7519 * src/buffer.c (clear_read_error_count): Use explicit (void)
7520 to indicate a function with no arguments.
7521 * src/create.c (check_links): Likewise.
7522 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
7523 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
7524 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
7525 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
7527 * src/utf8.c (get_input_charset): Likewise.
7528 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
7529 xheader_decode_global, extended_header_init): Likewise.
7530 * tests/mksparse.c (usage): Likewise.
7532 * src/buffer.c (new_volume): Rename local variables to avoid
7534 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
7535 sparse_file_p, sparse_member_p, sparse_fixup_header,
7536 sparse_dump_file, sparce_extract_file, sparse_skip_file,
7537 sparse_diff_file): Likewise.
7538 * src/compare.c (diff_archive): Likewise.
7539 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
7540 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
7542 * src/extract.c (repair_delayed_set_stat): Likewise.
7543 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
7545 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
7546 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
7547 sparse_dump_file, sparse_file_p, sparse_member_p,
7548 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
7549 check_data_region, sparse_diff_file): Likewise.
7550 * src/system.c (sys_stat_nanoseconds): Likewise.
7551 * src/xheader.c (xheader_format_name): Likewise.
7553 * src/common.h (enum old_files): Remove comma before }; not portable.
7555 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
7556 * src/rmt.c (usage): Likewise.
7557 * src/xheader.c (xheader_set_single_keyword): Likewise.
7558 * tests/genfile.c (usage): Likewise.
7559 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
7562 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
7564 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
7565 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
7566 langtab.charset, charset_lookup): Likewise.
7568 * src/common.h (name_init): Remove unused args. All callers changed.
7569 * src/names.c (name_init): Likewise.
7571 * src/common.h (usage, xheader_write, xheader_write_global,
7572 sys_reset_uid_gid): New decls.
7574 * src/compare.c (report_difference, process_noop): Add
7575 __attribute__ ((unused)) for unused attributes.
7576 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
7578 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
7579 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
7580 path_coder, size_coder, uid_coder, uname_coder,
7581 sparse_numblocks_coder): Likewise.
7583 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
7584 dump_file0): Now static.
7585 * src/utf8.c (charset_lookup): Likewise.
7586 * src/xheader.c (xheader_protected_pattern_p,
7587 xheader_protected_keyword_p, xheader_set_single_keyword,
7588 xheader_keyword_deleted_p, xheader_keyword_override_p,
7589 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
7591 * tests/genfile.c (usage): Likewise.
7592 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
7595 * src/create.c (hash_link): Rewrite to avoid cast.
7597 * src/extract.c (file_newer_p): Use parameter, not global var.
7598 * src/misc.c (write_error_details): Likewise.
7600 * src/extract.c (prepare_to_extract): Remove directory arg; not
7601 used. All callers changed.
7603 * src/misc.c (close_fatal): Remove; not used.
7604 * src/system.c (sys_utimes): Likewise.
7606 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
7608 * src/rmt.c (main): Update copyright date to 2004.
7609 * src/tar.c (decode_options): Likewise.
7611 * src/rtapelib.c (get_status_string): Don't lose errno when
7612 skipping the error messages.
7613 (get_status): Report an error if atol returns a negative number.
7615 * src/utf8.c (struct langtab, langtab, charset_lookup,
7616 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
7618 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
7619 Use macros, not definitions, to avoid type clashes with system
7621 (charset_lookup): Local var is now auto, not static.
7622 (utf8_convert): Use ICONV_CONST instead of const, to avoid
7625 * src/utf8.c (langtab): Initialize all elements of struct, to
7627 * src/xheader.c (xhdr_tab): Likewise.
7629 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
7631 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
7633 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
7636 * configure.ac: Raised version number to 1.13.94
7637 * src/system.h: Protect inclusion of <sys/time.h>
7639 Declare time() if HAVE_DECL_TIME is 0
7640 * tests/.cvsignore: Added mksparse
7642 * tests/sparse01.sh: New file
7643 * tests/multiv02.sh: New file
7644 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
7645 * tests/longv7.sh: Added missing call to 'after'
7647 * src/common.h: Added missing prototypes
7648 * src/compare.c (diff_archive): Use is_sparse member
7649 instead of GNUTYPE_SPARSE.
7650 * src/create.c: Removed unused variables
7651 * src/extract.c (extract_archive): Use sparse_member_p instead
7653 Removed unused variables
7654 * src/list.c (decode_header): Use sparse_fixup_header to correct
7656 (print_header): Do not rely on GNUTYPE_SPARSE type.
7657 Use st->stat.st_size to print real file size.
7658 (skip_member): Assign stat_info.file_name to save_name. This fixes
7659 bug reported by Mads Martin Joergensen <mmj@suse.de>
7660 Use sparse_skip_file() to skip sparse members.
7661 * src/rtapelib.c: include "common.h"
7662 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
7663 (struct tar_sparse_optab.fixup_header): New member
7664 (tar_sparse_member_p): New function.
7665 (tar_sparse_init): Return true if decode_header is not provided
7666 (tar_sparse_fixup_header)
7667 (sparse_member_p,sparse_fixup_header)
7669 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
7670 (star_fixup_header, pax_sparse_member_p): New function
7671 (pax_decode_header): Remove
7672 * src/system.h: Include <sys/time.h> and <utime.h> when available
7673 * src/tar.c (usage): Prototype moved to common.h
7674 * src/tar.h (struct tar_stat_info.is_sparse): New member
7675 * src/utf8.c (utf8_convert): Changed prototype
7676 (get_input_charset): Removed unused variable
7677 * src/xheader.c: include <fnmatch.h>
7678 (size_decoder): Assign to both st->archive_file_size and
7680 (st->stat.st_size): Assign to st->stat.st_size
7681 (sparse_numbytes_decoder): Removed unused variable
7682 * src/.cvsignore: Added .gdbinit
7683 * THANKS: Added Mads Martin Joergensen
7685 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7687 * src/create.c (write_long_name): Do not allow more than
7688 NAME_FIELD_SIZE-1 characters in a file name for V7 format
7690 * tests/longv7.sh: New file.
7691 * tests/Makefile.am: Add longv7.sh
7693 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7695 * src/buffer.c (open_archive): Clear read_full_records_option
7696 if reading from a pipe.
7697 (short_read): Display warning about the deduced record size
7699 * tests/star/pax-big-10g.sh: Updated to match the above changes.
7700 * tests/star/ustar-big-2g.sh: Likewise.
7701 * tests/star/ustar-big-8g.sh: Likewise.
7703 * configure.ac: Added gl_FUNC_STRTOULL
7704 * src/create.c (start_header): Check for GNU_FORMAT
7705 if incremental_option is set.
7706 * src/xheader.c (to_decimal): New function.
7707 (xheader_format_name): Use to_decimal() instead of snprintf.
7708 * tests/listed01.sh: Use genfile instead of dd
7709 * tests/multiv01.sh: Likewise.
7711 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7713 * src/list.c (read_and): Stop processing the archive after
7714 encountering a single zero record. Many old archives contain
7715 arbitrary garbage after it.
7716 The warning is issued anyway.
7718 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7720 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
7721 conversion buffer was not null terminated. Fix provided
7722 by Leland Lucius <llucius@tiny.net>
7723 * THANKS: Added Leland Lucius
7724 * src/utf8.c (utf8_convert): Indentation fix.
7726 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7728 * src/buffer.c (flush_read): Bugfix: the
7729 condition at line 714 included
7731 || (status > 0 && !read_full_records_option)
7733 which is grossly wrong, since even if new_volume() below succeeds,
7734 the subsequent call to rmtread will overwrite the chunk of data
7735 already read in the buffer and thus spoil everything.
7736 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
7738 * tests/star/multi-fail.sh: New test.
7739 * tests/Makefile.am: Added multi-fail.sh
7740 * tests/star/README: Updated
7742 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7745 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
7746 * src/common.h (utc_option): new global
7747 (enum old_files.KEEP_NEWER_FILES): New element
7748 * src/extract.c: Handle --keep-newer-files option
7749 * src/list.c (tartime): Print UTC if --utc was given.
7750 * src/tar.c: New options: --utc and keep-newer-files
7752 * tests/Makefile.am: Added new tests
7753 * tests/after: Rewritten
7754 * tests/before: Rewritten
7755 * tests/preset.in: Rewritten
7756 * tests/delete03.sh: Accommodate for the new testsuite logic
7757 * tests/gzip.sh: Likewise
7758 * tests/incremen.sh: Likewise
7759 * tests/listed01.sh: Likewise
7760 * tests/multiv01.sh: Likewise
7761 * tests/old.sh: Likewise
7762 * tests/options.sh: Likewise
7763 * tests/version.sh: Likewise
7764 * tests/volume.sh: Likewise
7766 * tests/star: New directory
7767 * tests/star/README: New file
7768 * tests/star/gtarfail.sh: New file
7769 * tests/star/gtarfail2.sh: New file
7770 * tests/star/pax-big-10g.sh: New file
7771 * tests/star/qucktest.sh: New file
7772 * tests/star/ustar-big-2g.sh: New file
7773 * tests/star/ustar-big-8g.sh: New file
7775 2004-02-26 Paul Eggert <eggert@twinsun.com>
7777 * doc/tar.texi (dircategory Individual utilities): Append period,
7778 as suggested by Karl Berry.
7780 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7782 * src/list.c (decode_header): Call xheader_decode before
7783 the assignment to current_stat_info.archive_file_size.
7785 2004-02-23 Paul Eggert <eggert@twinsun.com>
7787 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
7789 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7794 * tests/before: Move testing of the prerequisite archive formats
7795 to the separate function 'prereq'. Do not expect any arguments
7796 * tests/delete03.sh: Use prereq() instead of passing arguments
7798 * tests/incremen.sh: Likewise.
7799 * tests/listed01.sh: Likewise.
7800 * tests/multiv01.sh: Likewise.
7802 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7804 Added UTF-8 support. Finished global extended header
7808 * configure.ac: Detect libiconv
7809 * src/utf8.c: New file. Conversions to and from utf-8.
7810 * src/Makefile.am: Added utf8.c
7811 * src/create.c (write_header_name) In pax format, use
7812 "path" keyword if the file name is not ASCII
7813 (start_header): Likewise for uname and gname.
7814 * src/list.c: Decode encountered global headers.
7815 * src/xheader.c: Use keywords from the global
7817 Correctly handle UTF-8 conversions.
7818 (xheader_list_destroy): New function.
7819 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
7820 missing gettext markers
7821 (decode_record): Rewritten using caller-provided handler and
7823 * tests/listed01.sh: Give credit to Andreas Schuldei.
7825 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7827 * src/create.c (dump_file0): The conditional at line
7828 1296 prevented incremental backups on individual files
7829 from working, as reported by Andreas Schuldei
7830 <andreas@schuldei.org>.
7832 This is due to the condition
7834 (0 < top_level || !incremental_option)
7836 Removing it makes incremental backups work for individual
7837 files as well as for directories. On the other hand, it does
7838 not affect other functionality, as shown by the reasoning below:
7840 To begin with, the two parts of this condition are mutually
7841 superfluous, because
7843 1) when top_level < 0, incremental_option == 1
7844 so the condition yields false
7845 2) when top_level >= 0, incremental_option == 0
7846 so the condition yields true.
7848 In other words, it is completely equivalent to
7850 (!incremental_option)
7852 Now, let's consider the effect of its removal. There are two cases:
7854 1) when incremental_option==1
7855 This means incremental backup in progress. In this case dump_file
7856 is invoked only for directories or for files marked with 'Y' by
7857 get_directory_contents. The latter are those that did not meet the
7858 condition in incremen.c:242, which is exactly the same condition
7859 as this at create.c:1296. So, for these files the check
7860 (!incremental_option) is useless, since the rest of the
7861 conditional will yield false anyway. On the other hand, if
7862 dump_file is invoked on a directory, the conditional will yield
7863 false due to !S_ISDIR assertion, so these will be processed as usual.
7865 Thus, for this case the extra condition (!incremental_option) is
7866 irrelevant, and its removal won't alter the behavior of tar,
7867 *except* that it will enable incremental backups on individual
7868 files, which is the wanted effect.
7870 2) when incremental_option==0
7871 In this case the condition yields true and its removal does not
7872 affect the functionality.
7875 * configure.ac: Raised patchlevel to 93
7876 * src/incremen.c: Minor stylistic fixes.
7877 * tests/listed01.sh: New test. Check listed incremental
7878 backups on individual files.
7879 * tests/Makefile.am: Added listed01.sh
7881 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7883 * src/common.h (simple_finish_header,start_private_header): New
7885 (xheader_ghdr_name): Changed declaration
7886 * src/create.c (start_private_header): Removed static qualifier.
7887 (write_extended): Removed superfluous last argument. Use
7889 (simple_finish_header): New function.
7890 (finish_header): Use simple_finish_header() to break recursive
7891 dependency between this function and write_extended().
7892 * src/tar.c (assert_format): Do not bail out if several
7893 --format arguments are given. This is a common case when
7894 TAR_OPTIONS are used.
7895 (decode_options): New option --show-defaults displays the
7896 compiled-in defaults.
7897 Use POSIX format if no --format option was given and
7898 --pax-option was specified.
7899 Do not allow to use --pax-option unless the archive format is
7900 set to POSIX (or reading subcommand is requested).
7902 * src/update.c (update_archive): Write global extended header if
7904 * src/xheader.c (xheader_format_name): Bugfix.
7905 (xheader_xhdr_name): Changed the default extended header name
7906 to '%d/PaxHeaders.%p/%f', as POSIX requires.
7907 (xheader_ghdr_name): Removed unused argument.
7908 (xheader_write,xheader_write_global): New function.
7909 (xheader_decode): Modified to honor overrides whatever
7910 the current archive format is.
7912 * src/delete.c (delete_archive_members): Call xheader_decode
7914 * src/list.c (decode_header): Likewise.
7915 * src/incremen.c (sort_obstack): Fixed typo in the comment
7917 * doc/tar.texi: Document new default for extended
7920 * tests/before: Accept an optional list of allowed archive
7921 formats. Exit with the status 77 if the current archive
7922 format does not match any of them.
7923 * tests/delete03.sh: Require gnu, oldgnu or posix format
7924 * tests/incremen.sh: Require gnu or oldgnu format
7925 * tests/multiv01.sh: Likewise
7927 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7929 * doc/tar.texi (Option Summary): Documented --pax-option
7930 * src/tar.c: Likewise.
7932 * src/create.c (to_chars): Added a comment.
7933 * src/tar.h: Comment to GNU_FORMAT
7935 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7938 * configure.ac: Added stpcpy
7939 * bootstrap: Likewise
7940 * lib/Makefile.am: Likewise
7941 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
7943 * src/create.c (write_extended): Call xheader_xhdr_name
7944 instead of using hardcoded "././@PaxHeader" name.
7945 * src/tar.c: New option --pax-option (equivalent to -o option
7947 * src/xheader.c: Implement pax -o option. Fixed misleading
7948 heading comment (introduced 2003-09-02).
7949 * src/incremen.c: Minor fixes
7950 * m4/.cvsignore: Updated
7952 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7954 * src/incremen.c: Removed accumulator stuff in favor of obstack.
7955 (get_directory_contents): Split into two functions
7956 * src/update.c: Minor changes
7957 * doc/tar.texi: Fixed typo
7959 2004-02-15 Paul Eggert <eggert@twinsun.com>
7961 Fix Debian bug 230872, originally reported by Jeff King in
7962 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
7964 * doc/tar.texi (posix compliance): Remove. The whole section
7965 was a misunderstanding of what POSIXLY_CORRECT is supposed to
7966 mean. The GNU Coding Standards says that POSIXLY_CORRECT
7967 is for disabling extensions that are incompatible with POSIX:
7968 it is not for disabling compatible extensions. All references
7969 to this section removed.
7970 (posix): This format is created only if the posix format is
7971 specified; it is no longer created if gnu format is specified
7972 and POSIXLY_CORRECT is set.
7973 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
7974 POSIX does not specify the behavior of tar, so we should
7975 not worry about POSIXLY_CORRECT here.
7977 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7979 * Makefile.am: Removed m4
7980 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
7982 * README-alpha: Updated
7983 * bootstrap: Updated TP URL, improved help output. Default
7984 to :ext:anoncvs and set CVS_RSH, unless already set.
7985 * m4/Makefile.am: Removed
7987 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7989 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
7990 Use $option instead of $1 so all options will be parsed.
7992 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
7994 Started rewriting buffer.c ...
7996 * bootstrap: New option --no-po
7997 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
7998 (time_to_start_writing): Changed data type
7999 (file_to_switch_to): Removed. Variable never assigned to.
8000 (open_archive) Moved option compatibility checks to tar.c
8001 Other minor changes.
8002 * src/common.h (maybe_backup_file): Changed return type
8003 * src/misc.c: Likewise.
8004 * src/create.c: Updated invocations of safer_name_suffix
8005 * src/extract.c: Likewise
8006 * src/delete.c: Updated assignment to write_archive_to_stdout
8007 * src/tar.c (decode_options): More option compatibility checks
8008 (moved from buffer.c)
8009 * src/update.c (time_to_start_writing): Changed data type.
8010 * tests/recurse.sh: New test case.
8011 * tests/mksparse.c: New file.
8012 * tests/Makefile.am: Added recurse.sh and mksparse.c
8014 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8016 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
8017 Martin Simmons for the patch.
8018 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
8019 <pius@pld-linux.org> for the patch.
8021 2003-12-26 Paul Eggert <eggert@twinsun.com>
8023 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
8024 and translation website.
8026 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
8027 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
8028 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
8029 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
8030 files are replaced by autoreconf. Also, there seems to be a bug
8031 in gettext/autoconf/automake if we try to omit these files after
8032 autoreconf has replaced them, even though the gettext manual says
8033 they're optional. So give up and just include them for now, even
8034 though they make 'configure' longer and slower.
8036 Change translation URL from
8037 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
8038 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
8039 accommodate translator website revamp.
8041 Fail if autoreconf fails.
8043 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
8044 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
8045 ignore files now supplied by gettext 0.13.1.
8047 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8049 Synchronized with the backup repository on Mirddin
8051 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8053 * configure.ac: Check for varios members of struct stat
8054 that may represent file modification times with a subsecond
8056 Check for utimes (for future use)
8057 * src/buffer.c (short_read): Issue a warning on short reads.
8058 * src/common.h (sys_stat_nanoseconds): New function
8059 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
8060 * src/list.c (read_and): Treat only two successive zero
8061 filled blocks as an EOF indicator. Issue a warning if
8062 a single one is encountered.
8063 * src/system.c (sys_stat_nanoseconds): New function
8064 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
8066 * src/xheader.c (code_time,decode_time): Support for subsecond
8068 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
8069 (mtime_coder,mtime_decoder): Update invocations of code_time and
8071 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
8072 (sparse_numblocks_decoder,sparse_offset_decoder)
8073 (sparse_numbytes_decoder): Updated
8075 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8077 * src/names.c (safer_name_suffix): Reverted change made
8078 2003-11-14. Reason: Discussion with Paul Eggert and
8079 Jean-Louis Martineau. See also ChangeLog entry from
8081 * tests/delete03.sh: Likewise.
8082 * tests/extrac04.sh: Likewise.
8083 * tests/multiv01.sh: Likewise.
8085 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8087 * src/incremen.c (write_directory_file): Use sys_truncate
8088 * src/list.c (print_header): Use archive_file_size member
8089 when printing real file size.
8090 * src/sparse.c (sparse_scan_file): Correctly handle files with
8092 (sparse_dump_region,sparse_extract_region): Allow for zero size
8095 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8097 * configure.ac: Raised version number to 1.13.92
8098 * src/list.c (decode_header): Discern between pax and ustar
8100 Initialize current_stat_info.archive_file_size.
8102 NOTE: Modifications from this date on are temporarily
8103 stored on local CVS on mirddin. This repository will
8104 be synchronized with Savannah as soon as the latter
8105 becomes operational again.
8107 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8110 * src/sparse.c: Initial implementation of GNU/pax sparse
8112 * src/common.h (xheader_store): Changed prototype.
8113 * src/create.c: Update calls to xheader_store
8114 * src/extract.c (extract_archive): Check reported size vs.
8115 archive file size to determine if we have to do with a
8117 * src/tar.c (usage): Cleaned up the sample argument to --newer
8119 (decode_options): Allow --sparse for POSIX_FORMAT archives.
8120 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
8122 Implemented GNU.sparse.* keywords.
8124 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8126 * configure.ac: Check for setlocale. Thanks Bruno Haible for
8129 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8131 * src/create.c (write_gnu_long_link): Use oldgnu
8132 magic with @LongLink blocks.
8134 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8136 * src/tar.h: Support for star sparse format.
8137 * src/sparse.c: Likewise.
8139 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8141 * src/sparse.c (sparse_diff_file): New function
8142 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
8143 (sys_compare_uid_gid): Removed.
8144 (sys_compare_links,report_difference): Changed prototype
8145 (sparse_diff_file): New function
8146 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
8147 (sys_compare_uid_gid): Removed.
8148 (sys_compare_links): Changed declaration
8149 * src/compare.c (diff_archive): Use sparse_diff_file.
8151 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8153 Rewritten sparse file handling.
8155 * src/sparse.c: New file. Provides a universal framework
8156 for various methods for sparse files handling.
8157 * src/Makefile.am: Added sparse.c
8158 * src/common.h (struct sp_array,sparsearray,sp_array_size)
8159 (init_sparsearray,fill_in_sparse_array): Removed
8160 (enum dump_status): New data type
8161 (pad_archive,close_diag,open_diag,read_diag_details)
8162 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
8164 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
8166 (print_header): Changed prototype declaration.
8167 * src/tar.h (struct sp_array): Declaration from common.h
8168 (struct tar_stat_info): New members archive_file_size,
8169 sparse_map_avail,sparse_map.
8170 * src/create.c: Major rewrite.
8171 * src/extract.c: Use new sparse file interface.
8172 * src/compare.c (diff_sparse_files): Temporary placeholder.
8174 * src/buffer.c: Minor changes
8175 * src/tar.c: Likewise.
8176 * src/list.c: Likewise.
8177 * src/misc.c (close_diag,open_diag,read_diag_details)
8178 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
8179 diagnostics functions.
8180 * src/incremen.c: Use new diagnostics functions.
8181 * src/names.c: Likewise.
8183 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8185 * configure.ac: Fixed check for setsockopt
8187 * src/create.c: Do not zero-terminate name field if
8188 the name is exactly 100 characters long.
8189 (write_ustar_long_name): Fixed cheking for unsplittable
8192 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8194 * src/create.c (start_header): Removed debugging hook
8195 (dump_file): Fixed handling of linkname field.
8196 * src/names.c (safer_name_suffix): If the input
8197 file name ends with a slash, output one should do so
8199 * doc/tar.texi: Documented --format=ustar
8201 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8203 * src/tar.h (archive_format): USTAR_FORMAT: New type.
8204 * src/create.c: Added POSIX.1-1988 support.
8205 * src/names.c (safer_name_suffix): Skip leading ./
8206 * src/tar.c: New option --format=ustar forces
8207 POSIX.1-1988 archive format.
8208 * tests/delete03.sh: Updated.
8209 * tests/extrac04.sh: Updated.
8210 * tests/multiv01.sh: Updated.
8212 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8214 * src/list.c (read_and): Initialize current_stat_info
8215 and extended_header at the start of the loop.
8216 * src/names.c (all_names_found): Check if the argument
8217 contains valid filename. Fixes coredump on `not_a_tar_file'
8218 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
8219 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
8220 Fixes `pax-big-10g' bug.
8222 2003-11-12 Paul Eggert <eggert@twinsun.com>
8224 Fix some C compatibility bugs reported by Joerg Schilling.
8226 * src/common.h (stripped_prefix_len): Fix misspelling
8227 "stripped_path_len" in declaration.
8228 * src/rmt.c (main): Use "return FOO;" rather than
8229 "exit (FOO);"; we no longer have to worry about
8230 pre-ANSI hosts that mishandled returned values from "main".
8231 * src/tar.c (main): Likewise. This avoids warnings on some
8233 * src/system.c: Include signal.h, for 'kill'.
8234 * src/system.h (DEV_BSIZE): Remove.
8235 (DEFAULT_ST_BLKSIZE): New macro.
8236 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
8237 * src/tar.c (enum): Remove comma just before }.
8239 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8241 * src/list.c (decode_header): Initialize st_atime and
8244 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8246 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
8247 Bunk <bunk@fs.tum.de> for reporting.
8248 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
8249 <martin@xemacs.org> for spotting.
8251 2003-11-04 Paul Eggert <eggert@twinsun.com>
8253 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
8256 2003-10-26 Paul Eggert <eggert@twinsun.com>
8258 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
8259 Bug reported by Christian Weisgerber.
8261 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8265 * src/tar.c (decode_options): Removed superfluous archive format
8267 * doc/tar.texi: Documented new features.
8269 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8272 * THANKS: Added Wojciech Polak
8273 * configure.ac: Added checks for missing functions. Raised
8274 version number to indicate alpha release.
8275 * lib/Makefile.am: Added missing headers
8276 * lib/waitpid.c: Added missing includes.
8277 * src/extract.c: Likewise.
8278 * src/names.c: Removed spurious includes.
8279 * src/xheader.c: Likewise.
8280 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
8281 macro overriding broken mkdir prototypes.
8283 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8285 * configure.ac: Check for dev_t and ino_t.
8286 * m4/Makefile.am: Added missing files.
8287 * src/system.c: New file.
8288 * src/Makefile.am: Added system.c
8289 * src/common.h: Prototypes for functions from system.c
8290 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
8291 * src/buffer.c: Moved system dependencies to system.c
8292 * src/compare.c: Likewise.
8293 * src/create.c: Likewise.
8294 * src/delete.c: Likewise.
8295 * src/extract.c: Likewise.
8296 * src/rtapelib.c: Likewise.
8298 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8300 Implemented --occurrence option.
8303 * src/tar.c: New option --occurrence.
8304 * src/common.h (occurrence_option): New global
8305 (struct name): Changed `found' member to `uintmax_t
8307 (names_done): Removed
8308 (all_names_found): Changed prototype.
8309 (ISFOUND,WASFOUND): New macros
8310 * src/delete.c (delete_archive_members): Honor --occurrence
8312 * src/list.c (read_and): Likewise.
8313 * src/names.c: Count number of occurrences of each name in the
8315 (name_match): Honor --occurrence option.
8316 (names_done): Removed
8317 (all_names_found,names_notfound): Rewritten.
8319 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8321 * src/tar.c: Removed extra precaution regarding
8322 subcommand_option == CAT_SUBCOMMAND
8323 * lib/Makefile.am: Updated
8325 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8327 * src/common.h (names_done): New function.
8328 * src/names.c: Likewise.
8329 * src/list.c (read_and): Use all_names_found() as `while'
8331 * src/tar.c: New option --first-copy
8334 2003-09-24 Paul Eggert <eggert@twinsun.com>
8336 * src/rmt.c (main): Don't translate Copyright string; international
8337 law says the word "Copyright" should be in English.
8338 * src/tar.c (decode_options): Likewise.
8340 2003-09-22 Paul Eggert <eggert@twinsun.com>
8342 * doc/tar.texi (extracting untrusted archives): New section.
8344 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
8345 Return size_t, not pointer, so that we don't have to worry about
8346 violating the C standard by converting char const * to char *.
8347 All callers changed.
8348 * src/names.c (stripped_path_len): Likewise. Strip file system
8349 prefix, too. Count adjacent slashes as if they were one slash;
8350 that is the POSIX standard.
8352 2003-09-17 Paul Eggert <eggert@twinsun.com>
8354 * README-alpha: Document maintainer tool assumptions a bit. GNU
8355 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
8356 Debian bug 211447. Fix minor misspellings/whitespace nits.
8358 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
8359 gl_USE_SYSTEM_EXTENSIONS.
8361 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
8362 * m4/.cvsignore: Add restrict.m4, time_r.m4.
8364 2003-09-17 Paul Eggert <eggert@twinsun.com>
8366 * bootstrap: Don't use "for option; do";
8367 Solaris 8 /bin/sh doesn't like that.
8369 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8371 * README-alpha: Updated
8372 * bootstrap: Updated
8374 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8376 * README-alpha: Updated
8377 * bootstrap: Updated
8378 * po/POTFILES.in: Added src/xheader.c
8379 * src/common.h (cut_path_elements): Added proto.
8381 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8383 * src/buffer.c: Use ngettext where appropriate.
8384 * src/compare.c: Likewise.
8385 * src/create.c: Likewise.
8386 * src/misc.c: Likewise.
8387 * src/tar.c: Likewise.
8388 * src/update.c: Likewise.
8390 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8392 * .cvsignore: Added *.shar.gz
8395 * src/common.h (strip_path_elements): New variable.
8396 * src/extract.c (extract_archive): Implemented --strip-path
8397 * src/names.c (cut_path_elements): New function.
8398 * src/tar.c: New option --strip-path=NUM.
8399 (decode_options) Assign boolean values to bool variables.
8401 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8403 * src/delete.c: Fixed deletion from the POSIX archives.
8404 * src/list.c (read_header): Minor change.
8405 * src/tar.c (main): Do not check for volume_label_option
8406 if subcommand_option is not CREATE_SUBCOMMAND.
8407 * src/xheader.c (xheader_decode): Store the header as
8408 well (for eventual delete).
8410 * tests/incremen.sh: Explicitly request GNU format. This will
8411 disappear when GNU extended header keywords are working.
8412 * tests/multiv01.sh: Likewise
8413 * tests/volume.sh: Likewise
8415 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8417 * src/create.c: Support for "linkpath" extended keyword.
8418 * src/xheader.c (decode_record): Reversed the return
8421 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8423 * configure.ac: Allow to redefine the default output format.
8424 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
8425 (archive_format_string): New function.
8426 (usage): Updated help output.
8431 2003-09-02 Paul Eggert <eggert@twinsun.com>
8433 * src/common.h (destroy_stat, xheader_decode, xheader_store,
8434 xheader_read, xheader_finish, xheader_destroy): Add decls;
8437 * src/create.c (write_extended): Remove unused local 'bufsize'.
8439 * src/delete.c (delete_archive_members): Handle case of
8440 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
8441 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
8442 occurs, as it's not possible.
8443 * src/update.c (update_archive): Likewise.
8445 Use "const" when possible in new code.
8446 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
8447 (fmttab): Now const. All uses changed.
8448 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
8449 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
8450 decode_record, xheader_store, xheader_print, code_string, code_time,
8451 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
8452 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
8453 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
8454 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
8455 uid_coder, uid_decoder, uname_coder, uname_decoder):
8456 Use pointers to const when possible.
8457 (xhdr_tab): Now const.
8459 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
8460 (set_archive_format): Report an error if no format name matches,
8461 instead of returning an undefined value.
8463 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
8464 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
8465 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
8466 uid_decoder, uname_decoder): Remove unused keyword arg.
8469 * src/tar.c (set_archive_format): Now static.
8470 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
8472 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
8473 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
8474 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
8475 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
8476 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
8477 Remove forward decls; no longer needed.
8478 (xhdr_tab): Move to end, so that the forward decls aren't needed.
8479 Add a forward declaration.
8481 Use 'bool' in new code, when appropriate.
8482 * src/xheader.c (decode_record): Return bool, not int.
8483 * src/common.h (read_header): Since it accepts bool, change
8484 all callers to use false and true rather than 0 and 1.
8486 * src/xheader.c (decode_record): Fix misspelling in diagnostic
8487 "extended headed" -> "extended header".
8489 GNU coding style fixes.
8490 * src/xheader.c (decode_record, xheader_decode):
8491 Do not use decls like "char *p, *q;".
8494 (xheader_store): Avoid parentheses around object operand of sizeof.
8496 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8498 * src/create.c (start_header): Store long file names
8499 in "path" keyword of an extended header if in POSIX
8501 (finish_header): print header before calling write_extended().
8502 * src/list.c (list_archive): Always decode the header. This
8503 is necessary so the extended header is processed and the correct
8504 filename is printed no matter what the state of verbose_option.
8505 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
8506 for the time being).
8508 2003-09-01 Paul Eggert <eggert@twinsun.com>
8510 Update from gnulib, and correct fnmatch to fnmatch-gnu.
8511 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
8513 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
8515 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
8516 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
8517 copying rules from gnulib module descriptions.
8518 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
8519 Update from gnulib modules alloca, fnmatch, getline, stdbool.
8520 * m4/.cvsignore: Add utimes-null.m4. Sort.
8522 2003-09-01 Sergey Poznyakoff
8524 Added initial support for creating POSIX headers.
8526 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
8527 (string_to_chars): New functions
8528 (struct xheader): Changed structure
8529 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
8531 * src/create.c (string_to_chars): New function.
8532 (write_extended): New function
8533 (start_header): Create extended POSIX headers if necessary.
8534 (finish_header): Likewise.
8535 * src/list.c (print_header): Take user/group from
8537 * src/names.c (gid_to_gname,gname_to_gid)
8538 (uid_to_uname,uname_to_uid): Changed prototypes.
8539 * src/tar.c: New option --format.
8540 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
8541 (struct extra_header): Removed unused structure.
8542 (union block.extra_header): Removed unused member.
8543 * src/xheader.c: Implemented coder functions.
8544 * bootstrap: Added obstack.
8545 * lib/.cvsignore: Likewise.
8546 * configure.ac: Added 'gl_OBSTACK'
8547 * m4/Makefile.am: Added new files.
8548 * m4/.cvsignore: Likewise.
8549 * TODO: Minor formatting change
8551 2003-08-31 Sergey Poznyakoff
8553 Added initial support for POSIX extended and STAR headers
8554 (only for listing/extracting).
8556 * src/xheader.c: New file.
8557 * src/Makefile.am: Added xheader.c
8558 * src/tar.h (struct star_header): New datatype
8559 (XHDTYPE,XGLTYPE): New defines
8560 (enum archive_format:STAR_FORMAT): New member
8561 (struct tar_stat_info): New datatype.
8562 (union block.star_header): New member.
8563 * src/common.h (orig_file_name,current_file_name)
8564 (current_trailing_slash,current_link_name): Removed variables.
8565 (current_stat_info): New variable
8566 (current_stat): Removed
8567 (extended_header): New variable
8568 (decode_header): Changed prototype.
8569 * src/list.c (decode_header): Added initial support for POSIX extended
8571 (skip_member): Check oldgnu_header only if current_format is set
8573 * src/buffer.c: Use current_stat_info
8574 * src/compare.c: Likewise.
8575 * src/create.c: Likewise.
8576 * src/delete.c: Likewise.
8577 * src/incremen.c: Likewise.
8578 * src/mangle.c: Likewise.
8579 * src/update.c: Likewise.
8580 * src/extract.c: Likewise.
8581 (make_directories): Improved check for the existence of the directory
8582 * src/tar.c (destroy_stat): New function.
8584 2003-08-29 Paul Eggert <eggert@twinsun.com>
8586 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
8587 was worth (e.g., different users in en_GB disagree about -ize
8589 * po/en_GB.po: Remove.
8591 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8595 * src/tar.c: Removed support for the obsolete command line
8597 * doc/tar.texi: Removed references to the obsolete command
8600 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8604 * doc/tar.texi: Updated
8605 * src/common.h (check_links_option): New variable
8606 (orig_file_name): New variable
8607 (check_links): New proto.
8608 * src/create.c (struct link.nlink): New member
8609 (link_table): Static for the module.
8610 (dump_file): Update `link' member when adding new links
8612 (check_links): New function.
8613 * src/list.c (print_header): Use orig_file_name.
8614 * src/tar.c: New option --check-links. Changed semantics of
8615 -o to comply to UNIX98 when extracting and to its previous
8616 semantics otherwise.
8617 (main): Call check_links if --check-links. was given.
8619 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8621 * src/list.c (print_header): Revised
8622 * NEWS: Started the entry for 1.13.26
8623 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
8625 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
8627 * .cvsignore: Added to the repository.
8628 * doc/.cvsignore: Likewise.
8629 * lib/.cvsignore: Likewise.
8630 * m4/.cvsignore: Likewise.
8631 * po/.cvsignore: Likewise.
8632 * scripts/.cvsignore: Likewise.
8633 * src/.cvsignore: Likewise.
8634 * tests/.cvsignore: Likewise.
8636 * lib/Makefile.am: Added exitfail.[hc]
8637 * src/misc.c (chdir_do): Fixed call to restore_cwd
8638 * src/buffer.c (flush_read): Fixed behavior on short
8639 reads right after opening the new archive (multiv01.sh test).
8640 (new_volume): Special handling for "-".
8641 * src/list.c (print_header): Print trailing slash if
8642 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
8643 * tests/multiv01.sh: Minor changes.
8644 * m4/Makefile.am: Added missing files.
8646 2003-07-05 Paul Eggert <eggert@twinsun.com>
8648 Finish the checkin begin yesterday.
8650 * NEWS: Document the user-visible changes installed in the last
8653 * TODO: New file (actually, resurrected; but with new contents).
8655 * src/list.c (read_and): Give full type for procedure arg.
8656 (read_header): Strip trailing slashes, setting current_trailing_slash.
8657 (tartime): Avoid int overflow when printing year (!).
8658 (print_header): New arg specifying block ordinal. All uses changed.
8659 Print link as 'h' type. Give labels for long links and names.
8661 * src/misc.c (contains_dot_dot): Moved to names.c
8662 (must_be_dot_or_slash): New function.
8663 (safer_rmdir): Use it.
8664 (remove_any_file): Now takes enum as option, not boolean.
8665 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
8666 to unlink a directory.
8667 (deref_stat): Accept bool, not int.
8669 * src/names.c (namelist_match): Allow partial matches only if
8671 (hash_string_hasher): Renamed from hash_avoided_name.
8672 (hash_string_compare): Renamed from compare_avoided_anames.
8673 (hash_string_insert, hash_string_lookup): New functions.
8674 (add_avoided_name, is_avoided_name): Use them.
8675 (safer_name_suffix): New function.
8676 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
8678 * src/rmt.c: Don't include print-copyr.h.
8679 (prepare_input_buffer): New arg FD.
8680 Do not read more than INT_MAX bytes at once,
8681 since it breaks on some brain damaged Tru64 hosts.
8683 when retrying instead of subtracting 1024; for speed.
8684 (main): Use gettext to translate (C), not print_copyright.
8686 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
8687 now that gnulib handles this.
8688 Include <stddef.h> and <limits.h> unconditionally, now that we assume
8690 Assume that offsetof is defined in stddef.h.
8691 Do not include <sys/param.h>.
8692 (realloc, lseek): Do not declare.
8693 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
8694 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
8695 declarations, since we now assume C89 or better.
8696 (PARAMS): Remove, as we now assume C89. All uses changed.
8697 (bindtextdomain, textdomain): Include <gettext.h> to define.
8698 Include <unlocked-io.h>.
8699 (valloc): Define if not defined, and if valloc is not declared.
8700 (xstrdup): Remove decl.
8702 * src/tar.c: Do not include <print-copyr.h>.
8703 Include <getdate.h>.
8704 (get_date): Remove decl.
8705 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
8706 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
8707 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
8708 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
8709 (long_options, decode_options): Use them.
8710 (OVERWRITE_DIR_OPTION): Remove.
8711 (long_options): New options --index-file, --no-overwrite-dir.
8712 Remove --overwrite-dir option.
8713 (usage): Use PACKAGE_BUGREPORT.
8714 (decode_options): Terminate new argv properly.
8715 Use PACKAGE_NAME, PACKAGE_VERSION.
8716 If verbose, report how we grokked any textual date option.
8717 (main): Add support for index-file.
8719 * tests/Makefile.am: Convert to UTF-8.
8720 (AUTOMAKE_OPTIONS): Remove.
8721 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
8722 (INCLUDES): Remove ../intl.
8723 (LDADD): Don't link libtar.a twice.
8725 * tests/genfile.c: Convert to UTF-8.
8726 Don't include <print-copyr.h>.
8727 (DEFAULT_PATTERN): Renamed from DEFAULT.
8728 (ZEROS_PATTERN): Renamed from ZEROS.
8729 (main): Use gettext to translate (C), not print_copyright.
8731 2003-07-04 Paul Eggert <eggert@twinsun.com>
8733 Revamp to meet current standards of autoconf, automake,
8734 gettext, and gnulib, and incorporate new translations.
8736 * config/config.guess, config/config.sub, config/depcomp,
8737 config/install-sh, config/mdate-sh, config/missing,
8738 config/mkinstalldirs, config/texinfo.texi:
8739 Moved here from parent directory, or from doc.
8740 * config.hin: Renamed from config.h.in.
8741 * config/config.rpath: New file.
8743 * intl: Remove this subdirectory.
8745 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
8747 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
8748 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
8749 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
8750 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
8751 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
8752 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
8755 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
8756 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
8757 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
8758 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
8759 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
8760 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
8761 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
8762 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
8763 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
8764 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
8765 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
8766 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
8767 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
8768 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
8769 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
8770 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
8771 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
8772 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
8773 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
8775 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
8776 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
8777 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
8778 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
8779 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
8780 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
8781 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
8782 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
8783 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
8784 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
8785 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
8786 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
8787 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
8788 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
8789 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
8790 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
8791 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
8792 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
8794 Upgrade to latest version from external source. The file "bootstrap"
8795 now grabs these automatically, so we needn't keep track of them
8796 in this change long any longer.
8798 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
8799 (SUBDIRS): Remove intl.
8800 * PORTS: Update for star, Macintosh.
8801 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
8802 Bison 1.875, gettext 0.12.1.
8803 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
8804 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
8805 (AC_CONFIG_AUX_DIR): New.
8806 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
8808 (AC_PREREQ): Bump from 2.52 to 2.57.
8809 (AC_GNU_SOURCE): New.
8810 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
8811 we no longer support K&R C.
8813 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
8814 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
8815 (AC_MBSTATE_T): Remove.
8816 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
8817 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
8818 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
8819 (AM_STDBOOL_H): Add.
8820 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
8821 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
8822 (AC_CHECK_TYPE): Remove ssize_t.
8823 (gt_TYPE_SSIZE_T): Add.
8824 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
8825 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
8826 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
8827 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
8828 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
8829 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
8830 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
8831 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
8832 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
8833 napms, poll, select, strstr, usleep.
8834 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
8835 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
8836 (AM_GNU_GETTEXT): Use external and need-ngettext options.
8837 (AM_GNU_GETTEXT_VERSION): New.
8838 (AC_OUTPUT): Remove intl/Makefile.
8840 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8841 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
8842 * doc/fdl.texi: Update to current GNU version.
8843 * doc/gettext.texi: Update to current coreutils version,
8844 plus a copyright notice.
8845 * doc/tar.texi: Switch to new method for doing copyright notices.
8846 Use @acronym instead of @sc where appropriate.
8847 Remove empty examples. Give a few more examples.
8849 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8850 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
8851 are built up in pieces with +=.
8852 (noinst_HEADERS, INCLUDES): Remove.
8853 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
8854 (libtar_a_LIBADD): Use $ rather than @.
8855 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
8857 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
8858 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
8859 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
8860 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
8861 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
8862 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
8863 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
8864 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
8865 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
8866 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
8867 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
8868 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
8869 prereq.m4, xstrtoimax.m4.
8871 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
8872 be translated, since it's not a user-visible tool.
8874 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8876 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8877 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
8878 consistency with coreutils.
8879 (LDADD): Link LIBINTL after libtar.a, since
8880 it's now external and should stand by itself.
8882 * src/buffer.c (print_total_written): Adjust to new human.h
8884 (child_open_for_compress): Do not increase size to BLOCKSIZE.
8885 (open_archive): Open index file name.
8886 Strip trailing slahes from file names.
8887 (flush_write): Set size to 0 if not saving names.
8888 (flush_write, flush_read): Use safer_name_suffix rather than
8891 * src/common.h: Include <quote.h>.
8892 (absolute_names_option, atime_preserve_option, backup_option,
8893 block_number_option, checkpoint_option, dereference_option,
8894 force_local_option, ignore_failed_read_option, ignore_zeros_option,
8895 incremental_option, interactive_option, multi_volume_option,
8896 numeric_owner_option, one_file_system_option, recursive_unlink_option,
8897 read_full_records_option, remove_files_option, same_order_option,
8898 show_omitted_dirs_option, sparse_option, starting_file_option,
8899 to_stdout_option, totals_option, touch_option, verify_option,
8900 dev_null_output, now_verifying, we_are_root): Now bool, not int.
8901 (current_trailing_slash, index_file_name, recent_long_name_blocks,
8902 recent_long_link_blocks): New vars.
8903 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
8904 (OVERWRITE_OLD_DIRS): Remove.
8905 (enum remove_option): New enum.
8906 (remove_any_file): Use it as option arg, not int.
8907 (is_avoided_name, contains_dot_dot): Return bool, not int.
8908 (safer_name_suffix): New decl.
8910 * src/compare.c (now_verifying): Now bool, not int.
8911 (fill_in_sparse_array): Move to extract.c. Now returns bool;
8912 all callers changed to test for failure.
8913 (diff_sparse_files): Take size from current_stat, not from param.
8914 (diff_archive): Do not count trailing slashes in archives.
8915 (verify_volume): Test for header failure after loop, not before.
8917 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
8918 All callers changed.
8919 (start_header): Clear devmajor and devminor fields, too.
8920 (finish_header): New arg block_ordinal.
8921 (init_sparsearray): Now extern. Set sp_array_size to
8922 SPARSES_IN_OLDGNU_HEADER if it is zero.
8923 (dump_file): Keep link table as a hash.
8924 Do not count "file changed as we read it" as a failure.
8926 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
8927 Move extern decl to common.h.
8929 * src/extract.c (we_are_root): Now bool, not int.
8930 (check_time): Warn about implausibly old time stamps.
8931 (set_stat): Use utimbuf, not stat_info.
8932 (prepare_to_extract): New arg DIRECTORY.
8933 (fill_in_sparse_array): Moved here from compare.c.
8934 (extract_sparse_file): Now returns off_t, giving size left.
8935 Truncate file at end.
8936 (extract_archive): Use safer_name_suffix rather than rolling our own.
8937 Use fill_in_sparse_array rather than rolling our own.
8938 Strip trailing slashes more effectively.
8939 Check for unsafe names.
8941 * src/incremen.c (struct directory): nfs and found are now of type
8943 (gnu_restore): Now takes directory name as argument, not offset
8944 of directory name in a global. All uses changed.
8945 (CURRENT_FILE_NAME): Remove.
8948 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
8951 2002-09-30 Paul Eggert <eggert@twinsun.com>
8953 * src/rmt.c (prepare_input_buffer): Renamed form
8954 prepare_record_buffer. All uses changed. Do not assume that
8955 size_t is the same width as int.
8957 2002-03-29 Paul Eggert <eggert@twinsun.com>
8959 * src/incremen.c (get_directory_contents):
8960 If ignore_failed_read_option, only warn about
8961 get_directory_contents failures. Fix suggested by
8964 2002-01-31 Mark W. Eichin <eichin@thok.org>
8966 * src/buffer.c (child_open_for_compress): Don't try to read
8967 past the end of the buffer.
8969 2001-10-11 Jim Meyering <meyering@lucent.com>
8971 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
8972 and quote_n (1, ... to avoid clobbering a buffer.
8974 2001-09-26 Paul Eggert <eggert@twinsun.com>
8976 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
8978 * src/buffer.c (flush_read): Don't diagnose partial blocks before
8979 end of file; just ignore them silently.
8981 * src/list.c (read_header): Don't keep around extended name
8982 and link info indefinitely; keep it only for the next file.
8983 This fixes a bug introduced in 1.13.24, and removes the need
8984 for some static variables. Set recent_long_name and
8985 recent_long_link to zero if there were no long links; this
8986 avoids a violation of ANSI C rules for pointers in delete.c.
8987 * THANKS: Add Christian Laubscher.
8989 2001-09-26 Jim Meyering <meyering@lucent.com>
8991 * doc/tar.texi (Remote Tape Server): is know -> is known
8993 2001-09-25 Paul Eggert <eggert@twinsun.com>
8995 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
8996 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
8997 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
8998 want to distinguish EINVAL and EILSEQ.
9000 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
9002 * src/extract.c (maybe_recoverable):
9003 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
9005 2001-09-22 Paul Eggert <eggert@twinsun.com>
9007 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
9009 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
9012 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
9013 * PORTS: Add copyright notice, 'star' reference.
9014 * README-alpha: Add copyright notice, autoconf 2.52 patch.
9015 * THANKS: Add Christophe Kalt.
9016 * config.sub: Upgrade to 2001-09-14 version.
9018 * configure.ac (ALL_LINGUAS): Add ko.
9019 * po/ko.po: Resurrected file.
9021 * doc/convtexi.pl: Add coding advice for Emacs.
9023 * doc/getdate.texi: Add copyright notice.
9025 * doc/mdate-sh: Upgrade to automake 1.5 version.
9027 * doc/tar.texi (extracting files): Mention --to-stdout.
9028 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
9029 (Overwrite Old Files): Likewise.
9031 * lib/Makefile.am (noinst_HEADERS):
9032 Remove copysym.h. Add print-copyr.h, unicodeio.h.
9033 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
9035 * lib/copysym.c, lib/copysym.h: Remove.
9036 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
9037 lib/unicodeio.h: New files.
9039 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9040 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
9042 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9043 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9045 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
9046 * m4/isc-posix.m4: Remove.
9048 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
9050 * po/POTFILES.in: Add copyright notice.
9052 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
9054 * tests/Makefile.am (LDADD): Likewise.
9056 * src/buffer.c (write_archive_buffer, close_archive):
9057 If an archive is a socket, treat it like a FIFO.
9058 (records_read, records_written): New vars.
9059 (write_archive_to_stdout): Now bool, not int.
9060 (open_archive, flush_write, flush_read): Keep records_read and
9061 records_written up to date.
9063 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
9064 (write_archive_to_stdout): Now bool, not int.
9065 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
9066 (read_header): Now takes bool arg. Existing callers modified
9067 to pass 0, unless otherwise specified.
9069 * src/delete.c (records_read): Remove; now a global.
9070 (acting_as_filter): Now bool, not int.
9071 (recent_long_name, recent_long_link, recent_long_name_blocks,
9072 recent_long_link_blocks, records_read, records_written): New decls.
9073 (records_skipped): New var.
9074 (move_archive): Don't divide by zero if arg is 0.
9075 Use the above vars to compute how far to move.
9076 (write_recent_blocks): New function.
9077 (delete_archive_member): Pass 1 to read_header, so that it doesn't
9078 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
9079 Keep track of how many records have been skipped.
9080 Let the buffer code count records.
9081 When copying a header, copy any extended headers that came before it.
9083 * src/extract.c (extract_archive): When marking a directory to be
9084 updated after symlinks, stat all directories after it in the
9085 delayed-set-stat list too, since they will be checked after
9086 symlinks. Add support for --overwrite-dir.
9088 * src/list.c (recent_long_name, recent_long_link,
9089 recent_long_name_blocks, recent_long_link_blocks): New vars.
9090 (read_and): Pass 0 to read_header.
9091 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
9092 headers into new vars. Null-terminate incoming symbolic links.
9094 * src/rmt.c: Include print-copyr.h, not copysym.h.
9095 (main): Use print_copyright, not copyright_symbol.
9096 * src/tar.c (decode_options): Likewise.
9097 (OVERWRITE_DIR_OPTION): New constant.
9098 (long_options, usage, decode_options): Add --overwrite-dir.
9100 * src/tar.h: Put copyright notice into documentation.
9102 * tests/Makefile.am (TESTS): Add delete03.sh.
9103 * tests/delete03.sh: New file.
9105 * tests/genfile.c: Include print-copyr.h, not copysym.h.
9106 (main): Use print_copyright, not copyright_symbol.
9107 Include <argmatch.h>.
9108 (pattern_strings): Remove.
9109 (pattern_args, pattern_types): New constants.
9110 (main): Use XARGMATCH, not argmatch.
9112 2001-09-20 Jim Meyering <meyering@lucent.com>
9114 * lib/xstrtol.c (strtoimax): Guard declaration with
9115 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
9116 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
9117 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
9118 (strtoumax): Likewise, for completeness (it wasn't necessary).
9119 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
9120 Check for declaration of strtoimax.
9121 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
9122 Check for declaration of strtoumax.
9124 2001-09-16 Paul Eggert <eggert@twinsun.com>
9126 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
9128 2001-09-14 Paul Eggert <eggert@twinsun.com>
9130 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
9132 * README-alpha: Describe automake patch.
9134 * configure.ac (LIBOBJS):
9135 Remove automake 1.4 workaround, as we're using 1.5 now.
9136 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
9138 * lib/copysym.c: Include stddef.h, for size_t.
9139 Include langinfo.h if needed.
9140 Use locale_charset only if USE_INCLUDED_LIBINTL;
9141 if not, use nl_langinfo (CODESET) if available.
9143 2001-09-13 Paul Eggert <eggert@twinsun.com>
9145 * config.guess, config.sub: Sync with canonical versions.
9147 * configure.ac (jm_PREREQ_XGETCWD): Add.
9149 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
9150 (libtar_a_SOURCES): Add copysym.c.
9151 * copysym.c, copysym.h: New files.
9153 * lib/error.c: Sync with fileutils version.
9155 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
9156 * m4/getcwd.m4: New file.
9157 * m4/uintmax_t.m4: Remove.
9159 * m4/gettext.m4 (AM_WITH_NLS):
9160 Fix bug with calculating version of Bison 1.29.
9161 Reported by Karl Berry.
9163 * src/Makefile.am (datadir): Remove.
9165 * src/rmt.c: Include copysym.h.
9166 (main): Use copyright_symbol to translate copyright notice,
9168 * src/tar.c: Likewise.
9169 * tests/genfile.c: Likewise.
9171 * src/system.h (MB_LEN_MAX): New symbol.
9173 2001-09-11 Paul Eggert <eggert@twinsun.com>
9175 * src/extract.c (struct delayed_set_stat): New member
9177 (delay_set_stat): Initialize it to 0.
9178 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
9179 taking an extra stat ourselves. All callers changed.
9180 (set_stat): Likewise.
9181 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
9182 If false, stop when encountering a struct whose 'after_symlinks'
9183 member is true. Otherwise, go through all structures but check
9184 them more carefully. All callers changed.
9185 (extract_archive): When extracting a deferred symlink, if its parent
9186 directory's status needs fixing, then mark the directory as needing
9187 to be fixed after symlinks.
9188 (extract_finish): Fix status of ordinary directories, then apply
9189 delayed symlinks, then fix the status of directories that are
9190 ancestors of delayed symlinks.
9192 * src/rtapelib.c (rexec):
9193 Remove declaration; it ran afoul of prototypes on Crays.
9194 Reported by Wendy Palm of Cray.
9196 2001-09-06 Paul Eggert <eggert@twinsun.com>
9198 * lib/strtoimax.c (HAVE_LONG_LONG):
9199 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
9200 (strtoimax): Use sizeof (long), not
9201 sizeof strtol (ptr, endptr, base),
9202 to work around bug in IBM C compiler.
9204 2001-09-04 Paul Eggert <eggert@twinsun.com>
9206 * lib/xgetcwd.c: Include "xalloc.h".
9207 (xgetcwd): Do not return NULL when memory is exhausted; instead,
9208 report an error and exit.
9210 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
9211 (jm_PREREQ): Use it.
9213 2001-09-03 Paul Eggert <eggert@twinsun.com>
9215 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
9216 (jm_PREREQ_XGETCWD): New macro.
9218 * lib/exclude.c (fnmatch_no_wildcards):
9219 Fix typo that caused us to do case-folding
9220 search even when that was not desired. This occurred only in the
9223 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
9224 Do not include xalloc.h.
9225 (INITIAL_BUFFER_SIZE): New symbol.
9226 Do not use xmalloc / xrealloc, since the caller is responsible for
9227 handling errors. Preserve errno around `free' during failure.
9228 Do not overrun buffer when using getwd.
9230 * lib/xgetcwd.c (xgetcwd):
9231 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
9232 to decide whether to use getcwd (NULL, 0).
9234 2001-09-02 Paul Eggert <eggert@twinsun.com>
9236 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
9238 2001-09-01 Jim Meyering <meyering@lucent.com>
9240 * exclude.c: Use `""', not `<>' to #include non-system header files.
9241 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
9242 and strncasecmp as r-values. Unixware didn't have declarations.
9244 2001-08-31 Jim Meyering <meyering@lucent.com>
9246 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
9247 Use an initial, malloc'd, buffer of length 128 rather than
9248 a statically allocated one of length 1024.
9250 2001-08-30 Paul Eggert <eggert@twinsun.com>
9252 * lib/utime.c: Include full-write.h.
9253 * lib/xstrtol.c (strtoimax): New decl.
9255 2001-08-29 Paul Eggert <eggert@twinsun.com>
9257 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
9259 * src/create.c (dump_file): Relativize link names before dumping.
9260 This fixes a bug reported by Jose Pedro Oliveira.
9262 * src/create.c (dump_file): Use offsetof when computing sizes for
9263 struct hack; this avoids wasted space in some cases.
9264 * src/incremen.c (note_directory, find_directory): Likewise.
9265 * src/names.c (name_gather, addname): Likewise.
9267 * src/extract.c (extract_archive): Use strcpy, not memcpy,
9268 for consistency with other code that does similar things.
9269 * src/names.c (name_gather): Likewise.
9271 * src/names.c (read_name_from_file, name_next, name_gather,
9272 add_hierarchy_to_namelist): Avoid quadratic behavior when
9273 reallocating buffers. Check for buffer size overflow.
9274 (addname): Avoid unnecessary clearing of memory.
9276 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
9278 * src/extract.c (delay_set_stat): Fix off-by-one error in file
9279 name size allocation that caused core dumps.
9281 2001-08-28 Paul Eggert <eggert@twinsun.com>
9283 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
9285 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
9286 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
9287 (daddr_t): Remove; no longer used.
9288 (jm_PREREQ_HUMAN): Add.
9290 * acconfig.h: Remove; no longer needed.
9292 * config.guess, config.sub:
9293 New files, from automake 1.5. Gettext 0.10.39 needs them.
9294 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
9296 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
9297 (SUBDIRS): Put intl before lib, as gettext requires.
9299 * ABOUT-NLS: Upgrade to gettext 0.10.39.
9300 * intl: Upgrade entire directory to gettext 0.10.39.
9301 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
9302 New files, from gettext 0.10.39.
9303 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
9304 Upgrade to gettext 0.10.39,
9305 * po/Makefile.in.in: Likewise, except fix a typo in its copying
9307 * po/cat-id-tbl.c, po/stamp-cat-id:
9308 Remove; no longer used by gettext 0.10.39.
9309 * po/ChangeLog: New file.
9311 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
9312 $(srcdir)/tar.texi: Likewise.
9313 * doc/freemanuals.texi: New file.
9314 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
9315 `fileds' -> `fields'
9316 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
9318 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
9319 (noinst_HEADERS): Add quote.h.
9320 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
9322 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
9324 * lib/full-write.c, lib/savedir.c: Comment fix.
9326 * lib/pathmax.h: Remove.
9328 * lib/quote.c, lib/quote.h: New files.
9330 * lib/xgetcwd.c: Don't include pathmax.h.
9331 Include stdlib.h and unistd.h if available.
9333 (xmalloc, xstrdup, free): Remove decls.
9334 (xgetcwd): Don't assume sizes fit in unsigned.
9335 Check for overflow when computing sizes.
9336 Simplify reallocation code.
9338 * lib/xmalloc.c: Quote failure tests.
9340 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
9342 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
9343 similar to strtol.c.
9344 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
9345 (verify): New macro.
9346 (strtoumax, uintmax_t, strtoull, strtol): Remove.
9347 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
9348 (strtoimax): Renamed from strtoumax. All uses of unsigned values
9349 changed to signed values. Check sizes at compile-time, not
9350 run-time. Prefer strtol to strtoll if both work.
9353 * lib/xstrtol.h (xstrtoimax): New decl.
9355 * m4/Makefile.am (EXTRA_DIST):
9356 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
9357 longlong.m4, xstrtoimax.m4.
9359 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
9360 Remove; now done by autoconf.
9361 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
9362 Use AC_CHECK_TYPE instead of merely looking for the header.
9364 * m4/uintmax_t.m4: Use shorter comment.
9366 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
9367 Quote first arg of AC_DEFUN.
9368 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
9369 is needed to parse the include file.
9370 Simplify logic behind the args to AC_REPLACE.
9372 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
9374 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
9377 Use "Copyright %d" to simplify the translator's job in the future.
9378 Advise translator about circle-C.
9379 * src/tar.c: (decode_options): Likewise.
9380 * tests/genfile.c (main): Likewise.
9382 2001-08-28 Jim Meyering <meyering@lucent.com>
9384 * lib/argmatch.c: Include "quote.h".
9385 (argmatch_invalid): Quote the context.
9387 * lib/dirname.c (dir_name): Fix typo on PC platforms.
9389 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
9390 Use single-quote for local .h files.
9392 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
9394 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
9397 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
9398 invoking mktime the last time.
9400 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
9402 * lib/rename.c: Major rewrite by Volker Borchert to use system
9403 rename function, but to work around problems with trailing
9406 * lib/strtoll.c: New file, from glibc.
9407 * lib/strtoul.c: Update from glibc.
9409 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
9410 Add support for signed numbers, too.
9411 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
9413 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
9415 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
9416 (main): Use generic names in debugging output.
9417 * lib/strtoimax.c: Plus add the following changes of my own:
9418 (main): Use accurate names in debugging output.
9420 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
9423 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
9424 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
9425 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
9426 m4/utime.m4, m4/utimes.m4:
9427 Quote the first argument in each use of AC_DEFUN.
9429 * m4/getline.m4: Don't use string.h.
9431 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
9433 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
9435 2001-08-27 Paul Eggert <eggert@twinsun.com>
9437 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
9439 The biggest change is the new --exclude semantics and options.
9440 The basic idea was suggested by Gerhard Poul; thanks!
9442 * NEWS: Describe new --exclude semantics and options, and bug fixes.
9443 * README: ignfail.sh fails on some NFS hosts.
9444 * NEWS, README, lib/xstrtol.h: Add copyright notice.
9446 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
9447 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
9448 Remove; the automake bug has been fixed.
9449 * acinclude.m4: Remove.
9451 * configure.ac: Renamed from configure.in.
9452 (AC_PREREQ): Bump from 2.13 to 2.52.
9453 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
9454 1997-05-30) has an encoding error.
9455 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
9456 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
9458 * doc/fdl.texi: Update to current GNU version.
9460 * doc/tar.texi: Put leading '*' in direntry.
9461 Accommodate new gfdl sectioning.
9462 New option --recursion (the default) that is the inverse of
9465 New options --anchored, --ignore-case, --wildcards,
9466 --wildcards-match-slash, and their negations (e.g., --no-anchored).
9467 Along with --recursion and --no-recursion, these control how exclude
9468 patterns are interpreted. The default interpretation of exclude
9469 patterns is now --no-anchored --no-ignore-case --recursion
9470 --wildcards --wildcards-match-slash.
9472 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
9474 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
9475 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
9476 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
9477 Include if available.
9478 (<xalloc.h>): Include
9479 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
9480 (verify): New macro. Use it to verify that EXCLUDE macros do not
9481 collide with FNM macros.
9482 (struct patopts): New struct.
9483 (struct exclude): Use it, as exclude patterns now come with options.
9484 (new_exclude): Support above changes.
9485 (new_exclude, add_exclude_file):
9486 Initial size must now be a power of two to simplify overflow checking.
9487 (free_exclude, fnmatch_no_wildcards): New function.
9488 (excluded_filename): No longer requires options arg, as the options
9489 are determined by add_exclude. Now returns bool, not int.
9490 (excluded_filename, add_exclude):
9491 Add support for the fancy new exclusion options.
9492 (add_exclude, add_exclude_file): Now takes int options arg.
9493 Check for arithmetic overflow when computing sizes.
9494 (add_exclude_file): xrealloc might modify errno, so don't
9495 realloc until after errno might be used.
9497 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
9499 (free_exclude): New decl.
9500 (add_exclude, add_exclude_file): Now takes int options arg.
9501 (excluded_filename): No longer requires options arg, as the options
9502 are determined by add_exclude. Now returns bool, not int.
9504 * lib/prepargs.c: Include <string.h>; required for C99 since
9508 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
9510 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
9511 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
9513 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
9514 Remove inttypes_h.m4, largefile.m4, mktime.m4.
9516 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
9517 subsumed by Autoconf 2.50.
9519 * m4/error.m4: Upgrade to serial 2.
9521 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
9522 remove test for GNU C library. It's not correct, as some
9523 older glibcs are buggy.
9525 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
9527 * m4/prereq.m4: Upgrade to serial 20, but then:
9528 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
9529 (jm_PREREQ_EXCLUDE): New macro.
9530 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
9533 * m4/realloc.m4: Upgrade to serial 4.
9535 * m4/strerror_r.m4: Revert to serial 1002.
9537 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
9539 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
9541 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
9542 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
9543 it is now subsumed by autoconf. Add inttypes.h.
9545 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9546 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
9548 * src/buffer.c (new_volume): Stop if the script exits with an error.
9550 * src/common.h (excluded_with_slash, excluded_without_slash):
9551 Remove, replacing by:
9552 (excluded): New decl.
9553 (link_error): New decl.
9554 (excluded_name): Now returns bool.
9557 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
9558 Support hard links to symbolic links.
9560 (struct delayed_symlink): Remove 'names' member, replacing it with
9561 'sources' and 'target' member. All uses changed.
9563 (struct string_list): New type.
9565 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
9566 for struct hack; this avoids wasted space in some cases.
9568 (extract_archive): Fix test for absolute pathnames and/or "..".
9569 Use link_error to report errors for links.
9570 Remove redundant trailing '/' at "really_dir", for all uses, not
9571 just before invoking mkdir.
9572 If overwriting old files, do not worry so much about existing
9574 Fix mode computation in the case where the directory exists.
9576 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
9577 link, make a copy of the symbolic link.
9579 * src/incremen.c (get_directory_contents):
9580 If ignore_failed_read_option, only warn about
9583 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
9584 However, check for error even for '-' or '+' case.
9586 (print_header): Try parsing uids and gids as unsigned integers first,
9587 and as a uid_t or gid_t only if that fails. This adds support for
9588 listing positive uids and gids that are greater than UID_MAX and
9591 * src/misc.c (link_error): New function.
9593 * src/names.c (collect_and_sort_names):
9594 If ignore_failed_read_option, only warn about
9597 (excluded_name): Now returns bool. Simplify, as the fancy
9598 features are now all in excluded_filename.
9600 * src/rtapelib.c (base_name): Remove decl, as system.h now
9603 * src/system.h: Include stddef.h if available.
9604 (offsetof): Declare if stddef.h doesn't.
9606 Include <dirname.h>.
9607 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
9609 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
9610 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
9611 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
9612 WILDCARDS_MATCH_SLASH_OPTION):
9615 (long_options, usage, decode_options): Add support for --anchored,
9616 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
9617 --no-wildcards-match-slash, --recursion, --wildcards,
9618 --wildcards-match-slash.
9620 (decode_options): Implement the new way of interpreting exclude
9623 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
9625 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
9626 just print error messages suggesting alternatives.
9628 (add_filtered_exclude): Remove.
9630 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
9632 * tests/extrac04.sh (out): Remove
9633 directory/subdirectory/file1, as the new semantics for
9634 --exclude exclude it.
9636 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
9638 2001-08-12 Paul Eggert <eggert@twinsun.com>
9640 * lib/addext.c (<errno.h>): Include.
9641 (errno): Declare if not defined.
9642 (addext): Work correctly on the Hurd, where pathconf returns -1 and
9643 leaves errno alone, because there is no limit. Also, work even if
9644 size_t is narrower than long.
9646 2001-07-08 Paul Eggert <eggert@twinsun.com>
9648 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
9650 2001-05-10 Paul Eggert <eggert@twinsun.com>
9652 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
9653 Include <backupfile.h> and <dirname.h> after size_t is defined.
9654 (addext): Use base_len to trim redundant trailing slashes instead of
9657 * lib/backupfile.c (ISSLASH, base_name):
9658 Remove decls; now in dirname.h.
9659 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
9661 (find_backup_file_name): Rename locals to avoid new functions.
9662 Use base_len instead of rolling it ourselves.
9663 Work even if dirlen is 0.
9664 Use a dir of '.' if given the empty string.
9667 Do not include <stdio.h>, <assert.h>; no longer needed.
9668 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
9669 Include <string.h>, <dirname.h>.
9670 (base_name): Allow file names ending in slashes, other than names
9671 that are all slashes. In this case, return the basename followed
9674 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
9675 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
9676 (dir_len): Renamed from dirlen.
9677 All callers changed.
9679 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
9681 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
9683 2001-02-16 Paul Eggert <eggert@twinsun.com>
9685 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
9686 Do not declare or define if HAVE_MBRTOWC,
9687 since the test for HAVE_MBRTOWC now requires proper declarations.
9689 * lib/alloca.c (malloc): Undef before defining.
9691 2001-02-13 Paul Eggert <eggert@twinsun.com>
9693 * src/compare.c (read_and_process): Use off_t for size.
9694 From Maciej W. Rozycki.
9696 2001-01-26 Paul Eggert <eggert@twinsun.com>
9698 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
9700 2001-01-12 Paul Eggert <eggert@twinsun.com>
9702 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
9704 * lib/savedir.h (savedir): Remove size arg.
9706 * doc/tar.texi: Add @setchapternewpage odd.
9707 Remove -I as an alias for -T, for now.
9709 Update copyright. Remove "Published by".
9710 Dates beginning with / or . are taken to be file names.
9712 * src/tar.c (<time.h>): Do not include;
9713 (time): Do not declare.
9714 (usage): Remove -I as an alias for -T.
9715 (OPTION_STRING): Remove -I.
9716 (decode_options): Dates that look like an absolute path name,
9717 or that start with '.', are presumed to be file names whose
9719 Remove 'I' as an aliase for 'T'.
9722 * src/extract.c (<time.h>): Do not include; system.h now does this.
9723 (make_directories): Skip filesystem prefixes.
9724 Don't assume '/' is the only separator.
9725 (extract_sparse_file): Use new full_write semantics.
9726 On write error, return instead of invoking skip_file.
9727 Do not free sparsearray; caller does this now.
9728 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
9730 (extract_archive): Don't assume file name lengths fit in int.
9731 Report what got stripped from member name; it might be more than '/'.
9732 Use new full_write semantics.
9733 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
9735 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
9737 * src/buffer.c (<time.h>): Do not include; system.h now does this.
9738 (time): Remove decl; likewise.
9739 (child_open_for_uncompress): Use new full_write semantics.
9740 (flush_write): Use ISSLASH instead of testing for '/'.
9741 (flush_read): Likewise.
9743 * src/rmt.h (_remdev): Look for / anywhere in Path.
9745 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
9746 Don't assume '/' is the only separator.
9747 (safer_rmdir): Don't assume '/' is the only separator.
9749 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
9751 * lib/dirname.h (dirlen): New decl.
9753 * src/incremen.c (get_directory_contents):
9754 Remove path_size arg; all callers changed.
9755 Don't assume '/' is the only directory separator.
9756 (gnu_restore): Work even if file name length doesn't fit in int.
9758 * lib/addext.c (ISSLASH): New macro.
9759 (addext): Trim any redundant trailing slashes.
9761 * src/names.c (name_next):
9762 Don't assume '/' is the only directory separator.
9763 (namelist_match): Likewise.
9764 (add_hierarchy_to_namelist): Remove dirsize arg.
9765 Do not assume '/' is the only directory separator.
9766 (new_name): Likewise.
9768 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
9769 (libtar_a_SOURCES): Add dirname.c.
9771 * src/create.c (relativize):
9772 New function, with much of old start_header's guts.
9773 Handle filesystem prefixes.
9774 (start_header): Use this new function.
9775 (init_sparsearray): Don't bother to zero out the new array;
9777 (deal_with_sparse): Fix array allocation bug.
9778 (create_archive): Don't assume '/' is the only separator.
9779 (dump_file): Likewise.
9780 Don't worry about leading / in symlink targets.
9782 * lib/savedir.c (savedir):
9783 Remove size arg; it wasn't portable. All callers changed.
9785 * lib/utime.c (utime_null): Adjust to new full_write convention.
9787 * configure.in (YACC): Avoid portability problem with Ultrix sh.
9789 * lib/backupfile.c: Include <dirname.h>.
9790 (ISSLASH): New macro.
9791 (find_backup_file_name): Use dirlen to calculate directory lengths.
9792 (max_backup_version): Strip redundant trailing slashes.
9794 * src/common.h: Include <full-write.h>.
9795 (get_directory_contents): No longer has size arg.
9796 (gnu_restore): Arg is size_t, not int.
9798 * src/system.h: Include <time.h>.
9799 (time): Declare if not defined.
9801 * lib/full-write.c: Include full-write.h, not safe-read.h.
9802 full_write returns size_t, with short writes meaning failure.
9803 All callers changed.
9805 * src/rtapelib.c: Include full-write.h.
9807 * src/rmt.c: Include full-write.h.
9808 (main): Update copyright.
9810 * doc/getdate.texi: Mention that only English is supported.
9811 Show how to use "date" so that the output is acceptable to getdate.
9812 Mention Z as an abbreviation for UTC.
9814 * lib/full-write.h: New file.
9816 * src/list.c: system.h now does time.h stuff.
9819 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
9821 Do not include string.h, strings.h, or assert.h; no longer needed.
9822 (strrchr, memrchr, malloc): Remove decls; no longer needed.
9824 (base_name): New decl.
9825 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
9826 (dir_name_r): Remove.
9827 (dirlen): New function.
9828 (dir_name): Use dirlen instead of dir_name_r.
9829 (<string.h>, <strings.h>): Include only if test program.
9830 (main): Use "return 0", not "exit (0)".
9832 2000-12-08 Paul Eggert <eggert@twinsun.com>
9834 * lib/dirname.h: New file.
9836 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
9838 * lib/fnmatch.c: Do not comment out all the code if we are using
9839 the GNU C library, because in some cases we are replacing buggy
9840 code in the GNU C library itself.
9842 2000-10-30 Paul Eggert <eggert@twinsun.com>
9844 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
9846 2000-10-29 Paul Eggert <eggert@twinsun.com>
9848 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
9850 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
9852 2000-10-28 Paul Eggert <eggert@twinsun.com>
9854 * doc/tar.texi: --no-recursion now applies to extraction, too.
9855 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
9856 * src/names.c (namelist_match, excluded_name):
9857 Do not match subfiles of a directory
9858 if --no-recursion is specified.
9859 * src/tar.c (NO_RECURSE_OPTION): Remove.
9860 (long_options): Have getopt set the --no-recursion flag.
9861 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
9862 Remove case for NO_RECURSE_OPTION.
9863 * src/common.h (recursion_option):
9864 Renamed from no_recurse_option, with sense
9865 negated, and with FNM_LEADING_DIR being the nonzero value.
9867 * names.c (namelist_match): New function.
9868 (name_match, name_scan): Use it to eliminate duplicate code.
9869 (names_notfound): Remove special case for Amiga.
9871 2000-10-27 Paul Eggert <eggert@twinsun.com>
9873 * src/misc.c (read_error_details, read_warn_details,
9874 read_fatal_details): Don't assume size_t is unsigned long.
9876 * src/buffer.c (flush_read): If read_full_records_option, try to
9877 fill the input buffer, as --delete -f - needs this.
9879 2000-10-24 Paul Eggert <eggert@twinsun.com>
9881 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
9883 * src/buffer.c (check_label_pattern):
9884 Make sure header name is a string before
9885 passing it to fnmatch.
9886 (init_volume_number): Check for global_volno overflow.
9887 (new_volume): Check for global_volno overflow.
9889 * src/tar.c (decode_options):
9890 Check that volume label is not too long to overflow
9891 name in tar header block.
9893 * Makefile.am (EXTRA_DIST): Remove rebox.el.
9895 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
9896 (AC_FUNC_STRERROR_R): Use this instead.
9898 2000-10-23 Paul Eggert <eggert@twinsun.com>
9900 * src/extract.c: Include <time.h>, since we invoke "time".
9902 * lib/prepargs.c (prepend_default_options):
9903 Don't use NULL, for portability.
9905 * m4/fnmatch.m4: Add "working" to message.
9907 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
9909 (getpwuid, getgrgid): Declare only if system headers don't.
9910 (gid_to_gname): Don't invoke setgrent.
9911 (namelist): Now static, not global.
9912 (nametail): New var. All uses of namelast changed to use
9913 nametail, with one extra level of indirection.
9914 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
9915 (name_match): Set nametail too, when setting namelist to null.
9916 (add_hierarchy_to_namelist): Change type of dir arg from char * to
9917 struct name *, so that we don't have to look up the name again
9918 here. Get change_dir from dir rather than as a separate arg. Add
9919 dirsize arg, and pass it along to get_directory_contents. Remove
9920 unnecessary check of directory type.
9921 (new_name): Do not append a slash if PATH already ends in one.
9922 (avoided_names, struct avoided_name): Remove.
9923 (avoided_name_table): New var, replacing avoided_names.
9924 (hash_avoided_name, compare_avoided_names): New function.
9925 (add_avoided_name, is_avoided_name): Use hash table rather than
9928 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
9929 (child_open_for_compress, child_open_for_uncompress,
9930 close_archive): Propagate any failure of the compression process
9932 (open_archive, flush_write, flush_read, close_archive): Do not
9933 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
9934 -1. Instead, allocate an array with the size that's needed.
9935 (open_archive): Don't bother checking S_ISCHR of /dev/null.
9936 (backspace_output): Don't try to backspace past start of archive.
9937 (close_archive): Remove special case for DELETE_SUBCOMMAND.
9939 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
9940 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
9941 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
9942 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
9943 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
9944 WITH_DMALLOC, WITH_REGEX):
9945 Remove; now generated automatically.
9947 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
9948 compatibility for glibc fragments.
9949 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
9950 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
9951 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
9952 that we needn't put an entry into acconfig.h.
9953 (ALL_LINGUAS): Add da.
9954 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
9955 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
9957 (AC_MBSTATE_T): Add.
9958 (RMT): Append $(EXEEXT).
9959 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
9960 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
9961 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
9962 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
9963 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
9964 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
9965 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
9966 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
9967 (EMUL_OPEN3): Remove; no longer needed.
9968 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
9970 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
9972 * src/common.h: Do not include basename.h.
9973 * src/rtapelib.c (base_name): Do not include basename.h;
9974 declare base_name instead.
9976 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
9978 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
9979 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
9980 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
9981 Adjust to the above changes.
9983 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
9985 * src/open3.c: Remove.
9987 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
9988 (tar_SOURCES): Remove open3.c.
9989 (INCLUDES): Remove -I.., as automake does that.
9990 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
9992 The following changes are to put LOCALEDIR into localedir.h instead
9993 of passing it on the command line.
9995 (DISTCLEANFILES): New macro.
9996 (localedir.h): New rule.
9997 (rmt.o tar.o): Now depend on localedir.h.
9999 * tests/delete02.sh, tests/extrac04.sh: New files.
10001 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
10002 (TESTS): Add extrac04.sh, and restore delete02.sh.
10003 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
10004 (INCLUDES): Remove -I.. as automake does this now.
10006 * src/rtapelib.c (rexec): Don't declare unless using it.
10007 (do_command): Simplify signal-handling code slightly.
10009 * src/delete.c (blocks_needed): Remove. All uses changed to use
10010 blocking_factor - new_blocks.
10011 (acting_as_filter): New var.
10012 (write_record, delete_archive_members): Use acting_as_filter
10013 rather than archive == STDIN_FILENO to detect whether we're acting
10014 as a filter, as open can return STDIN_FILENO in some cases.
10015 (delete_archive_members): Ignore zero blocks if
10016 ignore_zeros_option is nonzero. Fix bug that messed up last
10017 output block: write_eot can't be used here, as it gets confused
10018 when the input is at end of file.
10020 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
10021 symbolic link contents length. Pass directory size to
10022 get_directory_contents.
10024 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
10025 m4/strerror_r.m4: New files.
10026 * m4/signedchar.m4: Remove this file.
10027 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
10028 * m4/Makefile.am (EXTRA_DIST): Likewise.
10030 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
10032 * po/da.po: New translation file.
10034 * src/mangle.c (extract_mangle):
10035 Fix diagnostic with wrong number of %s'es.
10037 * lib/fnmatch.c (fnmatch):
10038 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
10039 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
10041 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
10042 fall off a device's end. Detect this.
10044 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
10046 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
10047 include <pathmax.h> and directory include files like <dirent.h>;
10048 no longer used. Include <savedir.h> instead.
10049 (closedir, signed_char): remove macro; no longer used.
10050 (bool, false, true): Include <stdbool.h> if you have the include
10051 file, otherwise define.
10054 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
10055 opendir_warn, readdir_error): Remove; no longer needed.
10056 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
10057 before deciding whether we're trying to remove ".".
10058 (remove_any_file): Try unlink first if we are not root. Use
10059 savedir when recursively removing directories, to avoid exhausting
10061 (savedir_error, savedir_warn, symlink_error): New functions.
10063 * src/list.c: (read_and): Do not invoke
10064 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
10065 responsible for that. Do not invoke apply_delayed_set_stat; our
10066 caller is now responsible for that.
10067 (read_header): Use signed char instead of signed_char. Prevent
10068 later references to current_header from mistakenly treating it as
10070 (from_header): Quote invalid base-64 strings in diagnostics.
10071 (time_from_header): Do not warn about future timestamps in
10072 archive; check_time now does that.
10073 (print_header): Quote unknown file types.
10074 (skip_member): New function, replacing skip_extended_headers and
10075 now skipping the whole member instead of just the extended
10076 headers. All callers changed. This makes the code handle
10077 extended headers uniformly, and fixes some bugs.
10079 * src/update.c (update_archive): Use skip_member.
10081 * src/extract.c (we_are_root): Now global.
10082 (struct delayed_symlink): New type.
10083 (delayed_symlink_head): New var.
10084 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
10085 not apply_delayed_set_stat.
10086 (set_mode, set_stat): Pointer args are now const pointers.
10087 (check_time): New function.
10088 (set_stat): Warn if setting a file's timestamp to be the future.
10089 (make_directories): Do not save and restore errno.
10090 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
10091 intermediate directories.
10092 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
10093 not in caller. Extract potentially dangerous symbolic links more
10094 carefully, deferring their creation until the end, and using a
10095 regular file placeholder in the meantime. Do not remove trailing
10096 / and /. from file names. Do not bother checking for ".." when
10097 checking whether a directory loops back on itself, as loopbacks
10098 can occur with symlinks too. Also, in that case, do not bother
10099 saving and restoring errno; just set it to EEXIST.
10100 (apply_nonancestor_delayed_set_stat): A prefix is a potential
10101 ancestor if it ends in slash too (as well as ending in a char just
10103 (apply_delayed_set_stat): Remove.
10104 (apply_delayed_symlinks, extract_finish): New functions.
10106 * doc/fdl.texi: New file.
10107 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
10108 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
10109 * doc/tar.texi: Add Free Documentation License. New section
10110 "Overwrite Old Files", and revamp that section to make it easier to
10111 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
10112 documentation into getdate.texi. Fix several minor typos. Describe
10113 TAR_OPTIONS. Describe incompatibility between incremental backups and
10114 --atime-preserve. Describe incompatibility between --verify and other
10115 options. Mention that tar normally removes symbolic links rather than
10116 following them, when extracting a file of the same name.
10118 * THANKS: Add gpoul. Change skip's address.
10120 * po/POTFILES.in: Add lib/human.c.
10122 * src/common.h (namelist, namelast): Remove decls.
10123 (we_are_root, extract_finish, skip_member, savedir_error,
10124 savedir_warn, symlink_error, gnu_list_name): New decls.
10125 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
10126 skip_extended_headers, is_dot_or_dotdot, closedir_error,
10127 closedir_warn, opendir_error, opendir_warn, readdir_error,
10128 readdir_warn): Remove decls.
10129 (get_directory_contents): New off_t arg.
10130 (addname): Now returns struct name *.
10132 * src/tar.h, tests/genfile.c: Fix comments.
10134 * src/create.c: Include hash.h.
10135 (gnu_list_name): Remove decl.
10136 (struct link): Remove "next" member.
10137 (linklist): Remove.
10138 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
10139 consistency with other diagnostics.
10140 (deal_with_sparse): Check for I/O error when closing the file.
10141 (create_archive): Do not allocate an array of size PATH_MAX, as
10142 PATH_MAX might be (size_t) -1. Instead, allocate an array with
10143 the size that's needed.
10144 (hash_link, compare_links): New functions.
10145 (dump_file): Do not exhaust open file descriptors when descending
10146 deeply into a directory, by using savedir rather than
10147 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
10148 Hash the set of links already created, instead of using a linked
10149 list. Fix some bugs in outputting sparse files which caused the
10150 sparse tables to be incorrect. When a file unexpectedly shrinks,
10151 output zeros rather than garbage. Do not allocate an array of
10152 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
10153 allocate an array with the size that's needed.
10155 * src/incremen.c: Include hash.h.
10156 (struct directory): Remove "next", "dir_text". Change "name" to
10157 be char[1] with struct hack, not const char *. Add "found".
10158 (directory_list): Remove. Replaced by directory_table.
10159 (directory_table): New var.
10160 (nfs_string): Renamed from nfs.
10161 (hash_directory, compare_directories): New functions.
10162 (note_directory): Now returns struct directory *. First arg is
10163 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
10164 Remove text arg. New "found" arg, basically corresponding to the
10165 old text arg not being null. All callers changed.
10166 (note_directory, find_directory): Use hash table rather than
10168 (get_directory_contents): New arg "device". Use savedir to do the
10169 hard work. Save the nfs-ness of stat_data, since it might change
10170 under us. Use note_directory instead of find_directory to save
10171 some work. When adding an "A" record, do it with
10172 add_to_accumulator instead of cheating with strcat.
10173 (read_directory_file): Use "+" flag before device to indicate
10174 whether it was NFS. Fix typo in checking for strtoul error.
10175 (write_directory_file_entry): New function.
10176 (write_directory_file): Use it, and use the hash routines to
10177 traverse the directory table.
10178 (gnu_restore): Use savedir rather than opendir/readdir.
10180 * src/tar.c: Include localedir.h, prepargs.h.
10181 (long_options): Now static.
10182 (long_options, usage, decode_options): -j is now short for
10183 --bzip2, and -I is now an alias for -T.
10184 (decode_options, main): argv is not const pointer now.
10185 (decode_options): Invoke prepend_default_options to support
10186 TAR_OPTIONS. In diagnostic, mention the string that was the
10187 invalid blocking factor, tape length, group, owner, or record
10188 size. --delete is no longer incompatible with -f -, undoing
10190 (main): Invoke extract_finish at end of extraction.
10192 * src/rmt.c: Include localedir.h.
10193 (main): Update copyright date to 2000.
10195 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
10196 following changes: Use @sc where appropriate. Document the ranges of
10197 supported times more precisely. Add Eggert to getdate authors.
10198 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
10199 zone names, as it wasn't correct and people shouldn't be relying on it
10200 anyway. Relative items also account for non-DST adjustments. Fix
10203 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
10205 * tests/ignfail.sh: opendir -> savedir in diagnostics.
10207 * tests/preset.in: Set LANGUAGE to the empty string, for some
10208 brain damaged host.
10210 2000-10-20 Paul Eggert <eggert@twinsun.com>
10212 * m4/fnmatch.m4: Mention the GNU C library.
10214 2000-10-19 Paul Eggert <eggert@twinsun.com>
10216 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
10219 2000-10-17 Paul Eggert <eggert@twinsun.com>
10221 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
10222 (CHAR_BIT): Remove.
10224 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
10225 (CHAR_BIT): Define if not defined.
10227 2000-09-09 Paul Eggert <eggert@twinsun.com>
10229 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
10231 2000-08-07 Paul Eggert <eggert@twinsun.com>
10233 * lib/xmalloc.c: Memory exhausted -> memory exhausted
10235 * lib/xalloc.h (xalloc_msg_memory_exhausted):
10236 change to array from char *.
10238 2000-08-06 Paul Eggert <eggert@twinsun.com>
10240 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
10241 compatibility with glibc 2.1.3 strftime.c.
10243 2000-07-31 Paul Eggert <eggert@twinsun.com>
10245 * lib/quotearg.c (quotearg_n_options):
10246 Don't make the initial slot vector a constant,
10247 since it might get modified.
10249 * lib/quotearg.c: Add support for more than one preallocated slot.
10251 2000-07-30 Paul Eggert <eggert@twinsun.com>
10253 * lib/quotearg.c (quotearg_n_options):
10254 Preallocate a slot 0 buffer, so that the caller
10255 can always quote one small component of a "memory exhausted" message
10258 2000-07-23 Paul Eggert <eggert@twinsun.com>
10261 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
10262 mbstate_t is always defined.
10264 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
10265 some GCC installations, and this configuration error is likely to be
10268 2000-07-22 Paul Eggert <eggert@twinsun.com>
10271 When the system forces us to redefine mbstate_t, shadow its mbsinit
10272 function. From Bruno Haible.
10274 2000-07-14 Paul Eggert <eggert@twinsun.com>
10276 * lib/xmalloc.c: Simplify exhausted message.
10278 * lib/quotearg.h: Update copyright date; from Jim Meyering.
10280 2000-07-13 Paul Eggert <eggert@twinsun.com>
10282 * lib/quotearg.h (enum quoting style):
10283 New constant clocale_quoting_style.
10286 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
10287 Add support for clocale_quoting_style, undoing previous change to
10288 locale_quoting_style.
10290 2000-07-10 Paul Eggert <eggert@twinsun.com>
10293 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
10294 since otherwise we don't need it.
10295 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
10296 since we don't do multibytes in that case.
10297 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
10298 invoke multibyte primitives.
10300 * m4/mbstate_t.m4 (AC_MBSTATE_T):
10301 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
10302 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
10303 and mbstate_t, to a single-part test that simply defines mbstate_t.
10305 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
10306 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
10307 to decide whether to define the BeOS workaround macro;
10308 this adjusts to the change to AC_MBSTATE_T.
10310 * m4/strerror_r.m4: New file.
10312 2000-07-05 Paul Eggert <eggert@twinsun.com>
10314 * lib/quotearg.c: Use double-quote to quote.
10316 * lib/quotearg.c (N_): New macro.
10317 (gettext_default): New function.
10318 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
10319 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
10322 * lib/quotearg.c (struct quoting_options):
10323 Simplify quote_these_too dimension.
10324 From Bruno Haible <haible@clisp.cons.org>.
10326 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
10327 Test for mbstate_t only if the test
10328 for an object-type mbstate_t fails.
10330 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
10332 2000-07-03 Paul Eggert <eggert@twinsun.com>
10334 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
10335 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
10337 * lib/quotearg.c (mbrtowc):
10338 Assign to *pwc, and return 1 only if result is nonzero.
10339 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
10341 2000-07-02 Paul Eggert <eggert@twinsun.com>
10343 * lib/quotearg.c (mbstate_t):
10344 Do not define; it should be defined with AC_CHECK_TYPE.
10346 2000-06-26 Paul Eggert <eggert@twinsun.com>
10348 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
10349 a bug in glibc 2.1.3.
10351 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
10353 2000-06-19 Paul Eggert <eggert@twinsun.com>
10355 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
10356 inclusion of wctype.h to work around solaris2.6 namespace pollution.
10357 (ISPRINT): Likewise.
10358 Reported by Tom Tromey.
10360 2000-06-15 Paul Eggert <eggert@twinsun.com>
10362 * lib/human.c (adjust_value): New function.
10363 (human_readable_inexact): Apply rounding style even when printing
10364 approximate values.
10366 * lib/human.c: Avoid shadowing warnings.
10369 2000-06-14 Paul Eggert <eggert@twinsun.com>
10371 * lib/human.c (human_readable_inexact): Allow an input block size
10372 that is not a multiple of the output block size, and vice versa.
10374 * lib/getdate.y (get_date): Apply relative times after time zone
10375 indicator, not before.
10377 2000-05-31 Paul Eggert <eggert@twinsun.com>
10379 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
10380 and thus don't need AC_CANONICAL_HOST.
10382 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
10383 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
10384 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
10385 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
10386 changed. Instead of inspecting the output of getconf, try to
10387 compile the test program without and with the macro definition.
10388 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
10389 getconf. Instead, check for the needed flags by compiling test
10392 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
10394 * config.guess, config.sub: Remove these files, for similar reasons.
10396 2000-05-03 Paul Eggert <eggert@twinsun.com>
10398 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
10399 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
10400 bug. This avoids a clash when files like regex.c that define
10403 2000-05-02 Paul Eggert <eggert@twinsun.com>
10405 * m4/largefile.m4 (AC_SYS_LARGEFILE):
10406 Define _GNU_SOURCE if this is needed to make
10407 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
10408 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
10410 * lib/quotearg.c (mbrtowc, mbstat_t):
10411 Add definitions if !HAVE_MBSTATE_T_OBJECT.
10412 (<wctype.h>): Include if HAVE_WCTYPE_H.
10413 (iswprint): Define to 1 if we lack it
10415 2000-04-18 Paul Eggert <eggert@twinsun.com>
10417 * m4/mbstate_t.m4: New file.
10419 2000-04-17 Bruno Haible <haible@clisp.cons.org>
10421 * tests/ignfail.sh: Test for uid 0 along with user "root".
10423 2000-04-05 Paul Eggert <eggert@twinsun.com>
10425 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
10426 Don't use -n32 on IRIX if the installer said
10429 2000-02-28 Paul Eggert <eggert@twinsun.com>
10431 * lib/quotearg.c (ALERT_CHAR): New macro.
10432 (quotearg_buffer_restyled): Use it.
10434 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10436 * src/list.c (tartime): Fix off-by-one error when copying year if
10439 2000-02-18 Paul Eggert <eggert@twinsun.com>
10441 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
10442 (textint): New typedef.
10443 (parser_control): Changed from struct parser_control to typedef
10444 (for consistency). Member year changed from int to textint. All
10446 (YYSTYPE): Removed; replaced by %union with int and textint
10448 (tID): Removed; not used.
10449 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
10450 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
10451 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
10452 (tSNUMBER, tUNUMBER): Now of type <textintval>.
10453 (date, number, to_year): Use width of number in digits, not its
10454 value, to determine whether it's a 2-digit year, or a 2-digit
10456 (yylex): Store number of digits of numeric tokens. Return '?' for
10457 unknown identifiers, rather than (unused) tID.
10459 2000-01-16 Paul Eggert <eggert@twinsun.com>
10461 * lib/quotearg.c (quotearg_buffer_restyled):
10462 Do not quote alert, backslash, formfeed,
10463 and vertical tab unnecessarily in shell quoting style.
10465 2000-01-15 Paul Eggert <eggert@twinsun.com>
10468 Change quoting to be compatible with future autoconf versions.
10470 2000-01-11 Paul Eggert <eggert@twinsun.com>
10472 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
10474 2000-01-07 Paul Eggert <eggert@twinsun.com>
10476 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
10478 Fix bug with fnmatch.h dependency, as follows:
10479 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
10480 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
10482 * src/common.h (apply_nonancestor_delayed_set_stat):
10483 Renamed from apply_delayed_set_stat.
10484 (apply_delayed_set_stat, decode_mode, chmod_error_details,
10485 chown_error_details, close_warn, closedir_warn, mkdir_error,
10486 read_error_details, read_fatal_details, read_warn_details,
10487 seek_error_details, seek_warn_details, utime_error,
10488 write_error_details, write_fatal_details): New decls.
10490 Make diagnostic messages more regular.
10491 * src/create.c (dump_file): Quote file names with colons if possible.
10492 * src/compare.c (diff_archive): Likewise.
10493 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
10494 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
10495 * src/mangle.c (extract_mangle): Likewise.
10496 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
10498 * src/buffer.c (archive_write_error, flush_archive, close_archive,
10499 new_volume, xclose):
10500 Use error message functions to report errors consistently.
10501 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
10502 * src/create.c (finish_sparse_file, dump_file): Likewise.
10503 * src/extract.c (set_mode, set_stat, extract_sparse_file,
10504 extract_archive): Likewise.
10505 * src/list.c (list_archive): Likewise.
10506 * src/update.c (append_file): Likewise.
10507 * src/compare.c (diff_init, diff_sparse_files):
10508 Use xalloc_die to report memory exhaustion.
10509 * src/incremen.c (gnu_restore): Likewise.
10510 * src/list.c (read_header): Likewise.
10511 * src/mangle.c (extract_mangle): Likewise.
10512 * src/misc.c (maybe_backup_file): Likewise.
10513 * src/tar.c (decode_options): Likewise.
10514 * src/compare.c (read_and_process, fill_in_sparse_array,
10515 diff_sparse_files):
10516 Use consistent terminology for unexpected-EOF message.
10517 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
10518 * src/list.c (list_archive, read_header, skip_file,
10519 skip_extended_headers): Likewise.
10520 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
10521 (xdup2): Regularize messages with rest of tar.
10523 * src/buffer.c (flush_read): Don't read past EOF.
10525 * src/extract.c (extr_init):
10526 If we run out of memory, invoke apply_delayed_set_stat.
10527 (prepare_to_extract): Don't complain if we can't remove ".".
10528 (apply_delayed_set_stat): New function.
10529 (apply_nonancestor_delayed_set_stat):
10530 Renamed from apply_delayed_set_stat. All uses changed.
10531 Don't remove head if it doesn't apply.
10533 * src/create.c (find_new_file_size):
10534 Return size instead of storing through pointer.
10535 All callers changed.
10536 (deal_with_sparse): Don't keep reading after read errors.
10537 (finish_sparse_file): Just abort if there is an internal error.
10538 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
10539 Don't restore access times on directories during incremental dumps
10540 until after dealing with the directory.
10541 If ignoring failed reads, count closedir, read, and unknown
10542 file errors as warnings, not errors.
10543 Fix buffer overrun problem when dumping sparse files.
10545 * src/list.c (read_and):
10546 Invoke apply_nonancestor_delayed_set_stat on file names
10547 after handling them.
10548 (decode_mode): Remove; moved to misc.c.
10550 * src/misc.c (safer_rmdir): New function.
10551 (remove_any_file): Use it to avoid problems with rmdir(".").
10552 (maybe_backup_file): Regularize diagnostics.
10553 (undo_backup_file): Likewise.
10554 (decode_mode): Moved here from list.c.
10555 (chmod_error_details, chown_error_details, close_fatal,
10556 close_warn, closedir_warn, mkdir_error, read_error_details,
10557 read_warn_details, read_fatal_details, seek_error_details,
10558 seek_warn_details, utime_error, write_error_details,
10559 write_fatal_details): New functions.
10561 * src/delete.c (save_record): Remove static variable (now local).
10562 (move_archive): Don't position before start of archive.
10563 (write_record): Abort if count is zero at inopportune time.
10566 * src/tar.c (decode_options): --delete and -f - are now
10567 incompatible, since we didn't have time to fix their bugs.
10569 * tests/Makefile.am (TESTS): Remove delete02.sh.
10570 * tests/ignfail.sh: Adjust to new quoting scheme again.
10572 2000-01-06 Paul Eggert <eggert@twinsun.com>
10574 * lib/getdate.y: Sync tm_diff with the GNU C Library.
10575 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
10576 (tm_diff): Renamed from difftm. All uses changed.
10577 Replace body with that taken from GNU C Library 2.1.3pre1.
10578 (get_date): Prefer tm_gmtoff to tm_diff if available.
10580 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
10582 * tests/incremen.sh: Invoke stat on newly created file so that its
10583 ctime is updated on Nextstep.
10585 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
10587 * lib/getdate.y (get_date):
10588 Fix typo when checking for time_t overflow in time zone calculations.
10590 1999-12-13 Paul Eggert <eggert@twinsun.com>
10592 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
10594 * README-alpha: New file.
10595 * README: New sections for gzip and bzip2, Solaris.
10596 Remove mention of BACKLOG.
10598 * configure.in (AC_C_BACKSLASH_A): Add.
10599 (AC_CHECK_HEADERS): Add wchar.h.
10600 (AC_CHECK_FUNCS): Add mbrtowc.
10601 (AC_FUNC_CLOSEDIR_VOID): Add.
10603 * tests/Makefile.am (TESTS): Add delete02.sh.
10604 (POSTPONED_TESTS): Remove.
10605 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
10608 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
10610 * tests/ignfail.sh (err): Adjust to new quoting scheme.
10612 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
10614 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
10616 * src/tar.c ("quotearg.h"): New include.
10617 (usage): Now has __attribute__ ((noreturn)).
10618 (confirm): Report errno if we can't open tty.
10619 (confirm, decode_options):
10620 Quote arbitrary strings in diagnostics.
10621 (OVERWRITE_OPTION): New constant.
10622 (long_options, usage, decode_options): New --overwrite option.
10623 (decode_options): --keep-old-files, --overwrite, and --unlink-first
10624 are now mutually exclusive.
10625 Don't assume that gettext preserves errno.
10626 (main): Set default quoting style to escape_quoting_style.
10628 * src/update.c (<quotearg.h>): New include.
10630 Don't assume that gettext preserves errno.
10631 Quote arbitrary strings in diagnostics.
10632 Check for close error.
10634 * src/names.c (<quotearg.h>): New include.
10635 (name_init, name_next, name_close, names_notfound,
10636 collect_and_sort_names): Don't assume that gettext preserves
10637 errno. Quote arbitrary strings in diagnostics.
10638 (excluded_name): Fix typo that caused empty patterns to be
10641 * src/misc.c (<quotearg.h>): New include.
10642 (quote_copy_string): Quote only newline and backslash; the output is no
10643 longer meant for humans, and is locale-independent.
10644 (contains_dot_dot): New function.
10645 (remove_any_file): Don't use lstat; just rmdir the file and then use
10646 unlink if the rmdir fails because the file isn't a directory.
10647 Check for readdir and closedir errors.
10648 (maybe_backup_file): Report "stat" for stat errors.
10649 (maybe_backup_file, chdir_do):
10650 Quote arbitrary strings in diagnostics.
10651 (maybe_backup_file, undo_last_backup):
10652 Don't assume that gettext preserves errno.
10653 (call_arg_error, call_arg_fatal, call_arg_warn,
10654 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
10655 mknod_error, open_error, open_fatal, open_warn, opendir_error,
10656 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
10657 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
10658 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
10659 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
10661 * src/system.h (__attribute__): New macro.
10662 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
10663 (S_ISDOOR): New macro.
10664 (closedir): New macro, if CLOSEDIR_VOID.
10666 * src/rmt.c, src/rtapelib.c (decode_oflag):
10667 O_APPEND might not be defined.
10669 * src/list.c: (read_and, list_archive):
10670 Quote arbitrary strings in diagnostics.
10671 (from_header): Use locale_quoting_style to quote diagnostics.
10672 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
10674 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
10676 * src/Makefile.am: Use ## for copyright comments.
10678 * src/extract.c (<quotearg.h>): New include.
10679 (enum permstatus): New enum.
10680 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
10681 two mallocs. New members file_name_len, invert_permissions, permstatus.
10682 (extr_init): Remove hack that silently adjusted newdir_umask.
10683 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
10684 Use these args to decide whether and how to set modes.
10685 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
10686 Don't assume that gettext preserves errno.
10687 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
10688 (delay_set_stat, repair_delayed_set_stat): New functions.
10689 (make_directories): Avoid mkdir where last part of path is "..".
10690 Create a struct delayed_set_stat for each directory made.
10691 (prepare_to_extract): Renamed from unlink_destination, and
10692 return 0 immediately if to_stdout_option; all callers changed.
10693 (maybe_recoverable): New parameter interdir_made.
10694 Add support for --overwrite.
10695 (extract_sparse_file, extract_archive):
10696 Quote arbitrary strings in diagnostics.
10697 (extract_archive): By default, warn about ".." in member names, and skip them.
10698 Don't open files with O_NONBLOCK or O_APPEND.
10699 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
10700 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
10701 minus the current umask. Keep track of intermediate directories made,
10702 to avoid looping when making x/../x when x doesn't exist; the
10703 earlier code solved this in a different way that didn't fit well
10704 into the new scheme. Don't extract permissions onto existing
10705 directories unless --overwrite is given. Do not add -wx------
10706 permissions to new directories permanently; just do it temporarily.
10707 Remove no-longer-needed hack with MSDOS and directory time stamps.
10708 (apply_delayed_set_stat): New argument specifies which directories to
10709 fix statuses of. Do not wait until the end of extraction to fix
10710 statuses; instead, fix a directory's status once we exit that directory.
10711 This requires less memory and does the right thing in some cases
10712 where the old method didn't.
10713 (fatal_exit): New function.
10715 * src/incremen.c (<quotearg.h>): New include.
10716 (get_directory_contents, gnu_restore):
10717 Check for readdir and closedir errors.
10718 (get_directory_contents, read_directory_file, gnu_restore):
10719 Quote arbitrary strings in diagnostics.
10720 (get_directory_contents, read_directory_file, write_directory_file):
10721 Don't assume that gettext preserves errno.
10723 * src/create.c (<quotearg.h>): New include.
10724 (start_header): Use `member names' to refer to archive member names, not
10725 `archive names'. Warn about `..' in member names.
10726 (finish_sparse_file, dump_file):
10727 Quote arbitrary strings in diagnostics.
10728 (finish_sparse_file, dump_file):
10729 Don't assume that gettext preserves errno.
10730 (dump_file): Don't use `access' to determine whether a directory is readable;
10731 this isn't reliable if tar is setuid. Use `opendir' instead.
10732 Check for readdir and closedir failures.
10733 Don't dump sockets as if they were fifos; just warn and skip.
10735 * src/delete.c (move_archive):
10736 Don't report fatal error merely because sizes don't fit
10737 into struct mtop values; fall back on lseek instead.
10738 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
10739 Say `reposition' instead of `re-position'.
10740 (delete_archive_members):
10741 Set archive to STDOUT_FILENO before outputting trailing buffer.
10743 * src/compare.c (<quotearg.h>): New include.
10744 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
10745 and `Cannot' others.
10746 (report_difference, diff_archive):
10747 Quote arbitrary strings in diagnostics.
10748 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
10749 Don't assume that gettext preserves errno.
10750 (diff_archive): Don't open regular files with O_NONBLOCK.
10751 Preserve access times of files if --atime.
10753 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
10754 (FATAL_ERROR, USAGE): Don't return 0.
10755 (enum old files): New enum.
10756 (old_files_option): New variable, replacing keep_old_files_option and
10757 unlink_first_option.
10758 (apply_delayed_set_stat): Now takes char const * param.
10759 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
10760 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
10761 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
10762 read_fatal, readdir_error, readdir_warn, readlink_error,
10763 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
10764 truncate_error, truncate_warn, unlink_error, waitpid_error,
10765 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
10768 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
10769 archive_write_error, archive_read_error, flush_archive, close_archive,
10770 init_volume_number, new_volume):
10771 Don't assume that gettext preserves errno.
10773 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
10774 (open_archive): Reject multivolume verify attempts a bit earlier.
10775 Rename local variable `access', in case it's defined by system header.
10777 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
10778 `Could not' sometimes and `Cannot' others.
10780 (open_archive, flush_read, flush_archive, close_archive, new_volume):
10781 Quote arbitrary strings in diagnostics.
10783 (read_error): Set archive to STDOUT_FILENO temporarily when writing
10786 (init_volume_number): Check for input and output errors in volno_file.
10788 (new_volume): Use new fatal_exit function to exit, and new xfork
10791 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
10793 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
10795 * doc/tar.texi: Add --overwrite.
10796 --absolute-names rejects ".." in names.
10798 * lib/quotearg.c: Add support for multibyte characters.
10800 (ISPRINT): New macro.
10801 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
10802 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
10803 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
10804 (quotearg_buffer_restyled): New function, with most of the old
10805 quotearg_buffer's contents.
10806 Major rewrite to support multibyte characters.
10807 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
10809 * m4/c-bs-a.m4: New file.
10811 * lib/Makefile.am: Use ## for copyright notice.
10813 * scripts/Makefile.am: Use ## on copyright notice.
10816 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
10818 1999-12-05 Paul Eggert <eggert@twinsun.com>
10820 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
10821 src/ChangeLog, tests/ChangeLog: Remove these files.
10822 * ChangeLog.1: New file, incorporating the above files, plus old
10824 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
10826 1999-12-05 Dale Worley <worley@ariadne.com>
10828 * src/compare.c (<utime.h>, struct utimbuf): Add.
10829 (diff_archive): Restore access times if --atime.
10830 * doc/tar.texi: Explain that --atime also preserves modification time.
10832 1999-12-04 Gerhard Poul <gpoul@gnu.org>
10834 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
10835 * BACKLOG, TODO: Remove.
10836 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
10837 * README: Bring up to date.
10839 1999-12-03 Paul Eggert <eggert@twinsun.com>
10841 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
10843 * src/compare.c (diff_archive):
10844 Do not set errno to EPIPE; we no longer use perror.
10846 * src/create.c (dump_file):
10847 If a parent directory said that a file should be there but it is
10848 absent, diagnose it as being removed in the meantime.
10849 Do not pass meaningless errno to ERROR when reporting that the
10850 file changed as we read it.
10851 Report that a file changed if its ctime changes; this is more
10852 sensitive than mtime+size, and more accurate.
10854 * src/incremen.c (enum children): New type.
10855 (struct directory): Change old char allnew member to new enum children
10858 (get_directory_contents): When doing an incremental dump that does
10859 not cross filesystem boundaries, dump the mount points, even though
10860 they are in a different filesystem. This is for convenience when
10861 restoring, and for consistency with non-incremental dumps.
10862 This requires a 3-way flag for keeping track of which children we want,
10863 so we use enum children rather than boolean.
10865 * src/open3.c (modes): Remove.
10866 (open3): Remove unportable assumptions about flag encodings.
10867 Use `stat' instead of `access' for testing file existence,
10868 to avoid problems with setuid programs.
10870 * src/names.c (name_next): If file names are given both in the
10871 command line (e.g. via -C) and in a file (via -T), do not
10872 ignore the command-line names.
10874 * m4/uintmax_t.m4: Backport to autoconf 2.13.
10876 * doc/tar.texi: Clarify getdate authorship.
10878 1999-11-23 Paul Eggert <eggert@twinsun.com>
10880 * lib/Makefile.am (DISTCLEANFILES): New macro.
10882 * configure.in (tar_fnmatch_hin):
10883 Remove; it runs afoul of a bug in autoconf 2.13.
10884 Instead, always link fnmatch.h to some file, even if it's a throwaway.
10886 1999-11-19 Paul Eggert <eggert@twinsun.com>
10888 * m4/largefile.m4: Update serial.
10890 1999-11-18 Paul Eggert <eggert@twinsun.com>
10892 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
10893 the QNX shell, which doesn't propagate exit status of failed
10894 commands inside shell assignments.
10896 1999-11-07 Paul Eggert <eggert@twinsun.com>
10898 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
10900 * configure.in (AC_PREREQ): Bump to 2.13.
10901 (ALL_LINGUAS): Add pt_BR, ja.
10902 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
10903 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
10904 for AIX crossbuilds.
10906 * doc/tar.texi: New node create options for --ignore-failed-read.
10907 Remove unused version control symbols.
10908 Modernize texinfo usage.
10910 * src/tar.c (usage): Add examples.
10912 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
10913 Include fnmatch.h when testing fnmatch.
10915 * src/common.h (collect_and_sort_names): New decl.
10917 * src/list.c (from_header):
10918 Handle 32-bit two's complement negative time stamps
10919 even if the leading octal digit is 2 or 3.
10921 * src/extract.c (set_stat): Remove duplicate code.
10923 * src/create.c (to_chars): Remove trailing newline from warning.
10924 (dump_file): Ignore doors.
10925 (finish_header): Report block numbers with origin 0, not origin 1.
10927 * src/rmt.c: Include getopt.h.
10928 (long_opts): New constant.
10929 (usage): New function.
10930 (main): Implement --help and --version.
10931 Output usage message if arguments are bad.
10933 1999-10-10 Paul Eggert <eggert@twinsun.com>
10935 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
10937 * README: Remove --with-dmalloc.
10938 Add --disable-largefile.
10939 Remove old NeXT dirent problems, or AIX valloc problems.
10940 Remove old union wait advice, and old %lld advice.
10941 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
10943 * doc/tar.texi: Clarify documentation for portable file names.
10945 * configure.in (AM_WITH_DMALLOC): Remove.
10946 (ALL_LINGUAS): Add ja.
10948 * src/tar.c (decode_options):
10949 Invalid dates are now treated as (time_t) -1.
10950 Redo version message to conform to GNU standards.
10952 * src/create.c (dump_file):
10953 Fix typo: last two args to dump_file were interchanged.
10954 * src/update.c (update_archive): Likewise.
10956 * src/common.h (tartime): New decl.
10958 * src/list.c (tartime): Now extern.
10959 (read_and): Invalid headers cause errors, not warnings.
10961 1999-10-03 Paul Eggert <eggert@twinsun.com>
10963 * lib/getdate.y (__attribute__):
10964 Don't use if GCC claims to be before 2.8; this is
10965 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
10967 1999-09-25 Paul Eggert <eggert@twinsun.com>
10969 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
10970 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
10972 * tests/incremen.sh: Add yet another sleep.
10974 1999-09-24 Paul Eggert <eggert@twinsun.com>
10976 * NEWS: A read error now causes a nonzero exit status.
10978 * src/create.c (to_chars): Fix base-256 output.
10980 * src/buffer.c (write_error):
10981 Read error is an error, not just a warning.
10983 1999-09-24 Paul Eggert <eggert@twinsun.com>
10985 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
10987 * src/tar.c (<time.h>): Include.
10988 (time): Declare if not defined.
10989 (confirm): Don't read past EOF.
10990 (long_options, usage): Add --no-same-owner, --no-same-permissions.
10991 (main): Use clock_gettime if available.
10993 * tests/Makefile.am (TESTS): Add incremen.sh
10994 (INCLUDES): Add -I../lib, for fnmatch.h.
10996 * src/update.c (update_archive):
10997 Remove call to name_expand; had no effect.
10998 Use chdir_do to change into directory.
10999 Use deref_stat instead of stat.
11000 Use add_avoided_name to mark names to be avoided; the old method of
11001 setting a bit with the name caused all descendants of that name to
11002 be avoided, in some circumstances.
11004 * tests/incremen.sh: Remove unnecessary sleeps.
11006 * src/names.c (name_next): Go back to using plain chdir.
11007 (name_gather): Use chdir_arg to keep track of arguments to chdir.
11008 (addname): Likewise.
11009 (name_match): Use chdir_do to act on chdir args.
11010 (merge_sort): Moved here from incremen.c.
11011 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
11013 (name_expand): Remove.
11014 (name_from_list): Skip fake names.
11015 Use chdir_do to act on chdir args.
11016 (struct avoided_name): New struct.
11017 (avoided_names): New var.
11018 (add_avoided_name, is_avoided_name): New functions.
11020 * src/system.h (stat, lstat): Define in terms of statx on
11021 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
11022 (UCHAR_MAX): New macro.
11023 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
11025 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
11027 * src/incremen.c (<time.h>): Remove include; no longer used.
11028 (time): Remove decl.
11029 (time_now): Remove.
11030 (get_directory_contents): Use deref_stat.
11031 Consider a subdirectory to be all new only if
11032 listed_incremental_option or if it its timestamp is newer than the
11034 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
11035 (read_directory_file): Now extern. Do not set time_now.
11036 (write_directory_file): Renamed from write_dir_file.
11037 Use start_time instead of time_now.
11038 (compare_names, collect_and_sort_names): Move to names.c.
11040 * src/mangle.c (<time.h>): Remove; not used.
11041 (time): Do not declare.
11043 * src/misc.c (chdir_from_initial_wd): Remove.
11044 (deref_stat): New function.
11045 (struct wd): New struct.
11046 (wd, wds, wd_alloc): New variables.
11047 (chdir_arg, chdir_do): New function.
11049 * src/compare.c (get_stat_data): Use deref_stat.
11051 * src/common.h (name_expand): Remove.
11053 * src/list.c (time): Declare if not defined.
11054 (base_64_digits): Moved here from create.c.
11055 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
11057 (read_and): Don't get time from header unless we need it now;
11058 as getting time can cause duplicate diagnostics if bogus.
11059 Remove "Hmm, " from diagnostic.
11060 Use "Skipping to next header" uniformly.
11061 (from_header): Renamed from from_chars. All uses changed.
11062 Allow different forms for unportable 2's complement numbers.
11063 Don't check for extended forms when parsing checksums.
11064 Parse base-256 output.
11065 (gid_from_header): Renamed from gid_from_chars. All uses changed.
11066 (major_from_header): Renamed from major_from_chars. All uses changed.
11067 (minor_from_header): Renamed from minor_from_chars. All uses changed.
11068 (mode_from_header): Renamed from mode_from_chars. All uses changed.
11069 (off_from_header): Renamed from off_from_chars. All uses changed.
11070 (size_from_header): Renamed from size_from_chars. All uses changed.
11071 (time_from_header): Renamed from time_from_chars. All uses changed.
11072 Warn about future timestamps.
11073 (uid_from_header): Renamed from uid_from_chars. All uses changed.
11074 (uintmax_from_header): Renamed from uintmax_from_chars.
11076 (tartime): New function, incorporating isotime.
11078 (print_header): Use tartime.
11080 * src/create.c (to_chars): Fix typo in decl.
11081 Don't assign through char const *.
11082 Rename name_expand back to collect_and_sort_names.
11084 * src/extract.c (<time.h>): No need to include.
11085 (time): No need to declare.
11086 (now): Remove variable.
11087 (extr_init): Don't initialize `now'.
11088 Increment same_permissions_option and same_owner_option if we_are_root
11089 is nonzero; this supports the new --no-same-owner option.
11090 (set_stat): Use start_time instead of `now'.
11092 * src/create.c (struct link): Remove unused linkcount member.
11093 (base_64_digits): Move to list.c.
11094 (base_8_digits): Remove.
11095 (to_octal): New function, with some of old contents of to_base.
11097 (to_base256): New function.
11098 (to_chars): Use base 256, not base 64, for huge values.
11099 (mode_to_chars): Don't use two's complement in GNU format or POSIX
11101 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
11102 it means we have an incremental dump where we don't know whether this
11103 is a top-level call.
11104 Use deref_stat instead of statx / stat / lstat.
11105 Cast result of alloca.
11106 Check for dates if 0 < top_level, not if listed_incremental_option.
11107 Move multiple-link check after directory check.
11108 Do not dump avoided names.
11109 Dump hard links to symbolic names as links, not as separate
11111 start_header cannot return a null pointer, so don't test for it.
11112 Likewise for find_next_block.
11114 * src/buffer.c, src/common.h (<human.h>): Include.
11115 (read_error): Read error is an error, not just a warning.
11116 (print_total_written): Also print human-readable byte count, and
11118 (open_archive, flush_write): Use start_time, not current time.
11119 (flush_read): Report about garbage bytes ignored at end of archive,
11120 but act on non-garbage bytes (instead of ignoring them).
11121 (new_volume): Use WARN for warnings.
11124 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
11126 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
11128 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
11130 * lib/Makefile.am (noinst_HEADERS):
11131 Rename fnmatch.h to fnmatch.hin; add human.h.
11132 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
11133 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
11135 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
11137 * lib/fnmatch.c (strchrnul):
11138 Define to __strchrnul if _LIBC, to our own replacement otherwise.
11139 Do not define if !_LIBC and if it already exists.
11140 (internal_fnmatch): Use it.
11142 * configure.in (tar_LDADD): New variable, used only when linking tar.
11143 (rmt_LDADD): Similarly, for rmt.
11144 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
11145 fnmatch.c; otherwise, use the system fnmatch.h.
11147 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
11148 Modernize sample backup script.
11150 * THANKS: Martin Goik's email address has changed.
11152 * m4/fnmatch.m4: New file.
11154 1999-09-03 Paul Eggert <eggert@twinsun.com>
11156 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
11157 Use EINVAL instead.
11159 1999-08-29 Paul Eggert <eggert@twinsun.com>
11161 * lib/getdate.y (get_date):
11162 Rename outermost local `probe' to `quarter'.
11163 Rename latter local `tm' to probe_tm.
11164 From: Jim Meyering <meyering@ascend.com>
11165 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
11167 1999-08-28 Paul Eggert <eggert@twinsun.com>
11169 * lib/getdate.y (PC): New macro; use it when possible.
11170 (number): Handle `Nov 11 1996' example correctly.
11171 See Risks Digest 20.55 (1999-08-27)
11172 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
11174 1999-08-23 Paul Eggert <eggert@twinsun.com>
11176 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
11178 Remove minor cases of lint from many source files: this includes
11179 unnecessary casts, uses of NULL, etc.
11181 * configure.in (AC_PROG_YACC): Remove.
11182 (YACC): Always use bison.
11183 (AC_STRUCT_TIMEZONE): Add.
11184 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
11186 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
11189 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
11190 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
11192 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
11194 * src/common.h (merge_sort): Remove decl; no longer exported.
11196 * src/system.h (voidstar): Remove.
11197 (memcpy, memcmp): Cast args.
11198 ("xalloc.h"): Add include.
11199 (xmalloc, xrealloc): Remove decl.
11201 * src/mangle.c (time): Do not declare if defined.
11202 (first_mangle, mangled_num): Remove.
11204 * src/list.c (from_chars): Report out-of-range values more precisely.
11205 (off_from_chars): Do not allow negative offsets.
11206 (uid_from_chars): Allow negative uids.
11208 * src/create.c (linklist): Now static.
11209 (to_chars): Fix wording of message to match from_chars.
11211 * src/misc.c (merge_sort): Move to incremen.c.
11212 * src/incremen.c (merge_sort): Move here from misc.c; now static.
11213 It's too painful to make it both generic and portable.
11214 (read_directory_file): "timestamp" -> "time stamp" in messages.
11216 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
11217 (usage): Fix misspelling.
11218 (OPTION_STRING): -y is now -I.
11219 (decode_options): Use -1, not EOF, for getopt_long result.
11220 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
11221 Handle operands after any "--" argument.
11222 (main): Report any output errors.
11224 * src/rmt.c (main): status is ssize_t, not long.
11226 * src/names.c (name_gather): Handle trailing -C option correctly.
11227 (addname): use memcpy, not strncpy, to copy a string of known length.
11228 (name_match): Handle trailing -C option correctly.
11229 Propagate -C option to following files.
11230 (name_match, name_scan): Remove redundant matching code.
11232 * src/buffer.c (open_archive): Use American spelling in diagnostic.
11234 * lib/getdate.y: Major rewrite. Add copyright notice.
11235 (<stdio.h>): Include only if testing.
11237 (ISLOWER): New macro.
11238 (<string.h>): Include if HAVE_STRING_H, not USG.
11240 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
11242 (EPOCH_YEAR): Renamed from EPOCH.
11243 (table): Renamed from TABLE.
11244 (meridian): Now an anonymous enum.
11245 (struct parser_control): New type.
11246 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
11247 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
11248 (%pure_parser): Added, so that the parser is pure.
11249 (%union): Removed; the type is now just plain int.
11250 All %type directives removed.
11251 (tLOCAL_ZONE): New %token.
11252 (month_day_table): Renamed from MonthDayTable.
11253 (gmtime, localtime, mktime, time): Declare only if not defined.
11254 (meridian_table): New table.
11255 (dst_table): New table.
11256 (units_table): renamed from UnitsTable.
11257 (relative_time_table): Renamed from OtherTable.
11258 (time_zone_table): Renamed from TimezoneTable. Modernized.
11259 (military_table): Renamed from MilitaryTable.
11260 (to_hour): Renamed from ToHour.
11261 (to_year): Renamed from ToYear.
11262 (lookup_zone): New function.
11263 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
11265 (yylex): Now reentrant. All callers changed.
11266 (get_date): Add support for local time zone abbreviations.
11269 1999-08-20 Paul Eggert <eggert@twinsun.com>
11271 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
11273 * src/create.c (to_chars): Generate GNU base-64 representation
11274 if we are generating an old or new GNU format tar file for a
11275 number that can't be represented with the POSIX format.
11277 * configure.in (AC_CHECK_FUNCS): Add fchdir.
11278 (AM_FUNC_GETLINE): Add.
11279 (LIBOBJS): Add getline.o to workaround comment.
11280 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
11281 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
11282 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
11283 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
11284 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
11285 lib/save-cwd.h, m4/getline.m4: New files.
11287 * src/misc.c (<save-cwd.h>): Include.
11288 (chdir_from_initial_wd): New function.
11290 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
11291 (name_gather): Handle `-C x -C y' correctly.
11292 Do not rely on addname to handle -C.
11293 (addname): New CHANGE_DIR parameter. All callers changed.
11294 Remove ugly calls to getcwd; no longer needed.
11295 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
11297 * src/incremen.c (listed_incremental_stream): New var.
11298 (read_directory_file): Remove arbitrary limits on file name length.
11299 Do not attempt to get the working directory; we can bypass this
11300 on fchdir hosts. Open the listed_incremental_option file for both
11301 read and write instead of opening it twice. Check for I/O errors
11302 when doing I/O to this file. Check for invalid data in the file,
11303 and report line numbers of invalid data.
11304 (write_dir_file): Likewise.
11305 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
11306 Do not invoke write_dir_file; that's our caller's responsibility.
11308 * src/list.c (max): New macro.
11309 (isotime): Now takes time_t, not time_t *. Report the decimal values
11310 of times that can't be broken down.
11311 (print_header): Don't assume that major and minor device numbers can
11312 fit into uintmax_t.
11314 * src/common.h (struct name): change_dir is now char const *.
11315 (write_directory_file): Remove unused decl.
11316 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
11317 chars; the old `sizeof (b)' broke when b was a pointer not an array.
11318 (chdir_from_initial_wd): New decl.
11319 (addname): New 2nd arg.
11321 * THANKS: Torsten Lull -> Catrin Urbanneck
11323 1999-08-18 Paul Eggert <eggert@twinsun.com>
11325 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
11326 Don't depend on ac_cv_func variables.
11327 From Albert Chin-A-Young <china@thewrittenword.com>.
11329 1999-08-18 Paul Eggert <eggert@twinsun.com>
11331 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
11333 * m4/signedchar.m4: New file.
11334 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
11335 * src/system.h (signed_char): New macro.
11336 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
11337 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
11339 * src/create.c (write_eot): Write at least two zero blocks.
11341 * src/extract.c (extract_archive): Fix sparse array bug:
11342 we did not find end of array correctly.
11344 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
11345 Don't assume find_next_block yields nonnull.
11346 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
11347 * src/list.c (skip_extended_headers): Likewise.
11349 * src/list.c (read_and, list_archive): Simplify code.
11350 (read_header): Fix computation of signed checksums on machines where
11352 Do not consider a block to be zero unless all its bytes are zero,
11353 even the checksum bytes. Do not attempt to parse the checksum of
11354 a zero block. Fix memory leak with long names and links.
11355 (from_chars): Accommodate a buggy tar that outputs leading NUL
11356 if the previous field overflows.
11358 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
11359 \?, for portability to non-ASCII hosts.
11361 1999-08-16 Paul Eggert <eggert@twinsun.com>
11363 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
11365 * src/extract.c (make_directories): Do not chown intermediate
11366 directories, even if we are root.
11368 * src/list.c (read_header): Fix bugs when interpreting
11369 POSIX-compliant headers that do not contain null bytes in the
11370 header or link names.
11372 1999-08-14 Paul Eggert <eggert@twinsun.com>
11374 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
11376 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
11377 (AC_HEADER_SYS_WAIT): Add.
11378 (AC_REPLACE_FUNCS): Add waitpid.
11379 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
11380 * lib/waitpid.c: New file.
11381 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
11382 * src/system.h (WCOREDUMP): Remove; no longer used.
11383 (WIFSTOPPED): Likewise.
11384 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
11385 * src/buffer.c (child_open_for_compress): Undo previous change.
11386 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
11387 (new_volume): Likewise.
11389 * src/buffer.c, src/extract.c, src/incremen.c (time):
11390 Don't declare if defined.
11391 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
11392 * src/incremen.c (read_directory_file):
11393 Invoke `time' the same way everyone else does.
11394 Check validity of --listed-incremental file contents a bit better.
11395 Do not worry about --after-date-option; tar.c now checks this.
11396 * src/list.c (isotime): Report ??? if localtime returns null.
11397 Don't assume years fit into four digits.
11398 Don't append trailing newline.
11399 (print_header): Report ??? if localtime returns null;
11400 Don't assume years fit into four digits.
11402 * src/compare.c (diff_archive): Do not fall back on absolute name
11403 when --absolute-names is not specified.
11405 * src/create.c (start_header):
11406 Include text of ignored filesystem prefix in warning.
11407 (create_archive): Check for excluded names when doing incremental
11408 pass through directory.
11409 (dump_file): Do not dump old files explicitly given on command line
11410 when using --listed-incremental. Do not strip ./ prefix from names.
11412 * src/tar.c: -g now implies after_date_option = 1.
11413 -g and -N are now incompatible options.
11415 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
11417 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
11419 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
11420 incremental headers as POSIX prefixes.
11422 1999-08-11 Paul Eggert <eggert@twinsun.com>
11424 * NEWS, configure.in: Version 1.13.6.
11426 * configure.in (ALL_LINGUAS): Add pt_BR.
11427 * po/pt_BR.po: New file.
11429 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
11430 Renamed from tar.info and header.texi; adjust actions so that
11431 they work in other directories.
11433 * doc/tar.texi: Add -y and --bzip2.
11434 Patterns containing / now exclude only file names whose prefix match.
11436 * lib/exclude.h (excluded_filename): New option parameter.
11437 (add_exclude_file): New ADD_FUNC parameter.
11438 (excluded_pathname): Remove decl.
11439 * lib/exclude.c (_GNU_SOURCE):
11440 Remove; no longer needed since we don't use FNM_ macros.
11441 (excluded_filename): Renamed from excluded_filename_opts.
11442 (excluded_filename, excluded_pathname): Remove.
11443 (add_exclude_file): New ADD_FUNC parameter.
11445 * po/POTFILES.in: Add lib/quotearg.c.
11447 * src/buffer.c (_GNU_SOURCE): Define.
11448 (<fnmatch.h>): Include unconditionally.
11449 (child_open_for_compress): Dup after closing, to avoid possible file
11450 descriptor exhaustion.
11451 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
11452 (flush_read): Likewise.
11454 * src/common.h (LG_8, LG_64): New macros.
11455 (excluded_with_slash, excluded_without_slash): New vars.
11456 (excluded): Remove.
11457 (base_64_digits): New decl.
11458 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
11459 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
11461 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
11462 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
11464 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
11465 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
11466 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
11467 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
11468 respectively. All definitions and uses changed.
11469 (excluded_name): New decl.
11471 * src/compare.c (diff_archive):
11472 Open files with O_NONBLOCK instead of O_NDELAY.
11474 * src/create.c (base_64_digits): New constant.
11475 (base_8_digits): New macro.
11476 (MAX_VAL_WITH_DIGITS): New macro.
11477 (to_base): First half of old to_oct. Support base 64 too.
11478 (to_chars): Other half of old to_oct, for 64-bit support.
11479 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
11480 (gid_substitute, uid_substitute): Look up names dynamically if
11481 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
11482 (mode_to_chars): Renamed from mode_to_oct.
11483 Support negative values in all the _to_chars functions.
11484 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
11485 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
11486 (dump_file): Inspect entire pathname, not just new file name
11487 component, when deciding whether to exclude it.
11489 * src/extract.c (extract_archive):
11490 Open files with O_NONBLOCK instead of O_NDELAY.
11492 * src/incremen.c (get_directory_contents):
11493 Inspect entire pathname, not just new file name
11494 component, when deciding whether to exclude it.
11496 * src/list.c (<fnmatch.h>): Do not include.
11497 (from_chars): Renamed from from_oct. New parameter specifying
11498 the negative of the minimum allowed value. Support negative
11499 and base-64 values.
11500 (base64_map): New var.
11501 (base64_init): New function.
11502 (print_header): Output numeric uids and gids if numeric_owner_option.
11504 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
11506 * src/names.c (_GNU_SOURCE): Define.
11507 (<fnmatch.h>): Include unconditionally.
11508 (excluded_name): New function, taking over duties of excluded_pathname.
11511 * src/rmt.c (decode_oflag): New function.
11512 (main): Use it to support symbolic open flags.
11514 * src/rtapelib.c (encode_oflag): New function.
11515 (rmt_open__): Do not allow newlines in the path.
11516 Propagate errno correctly.
11517 Decode symbolic open flags, if present.
11519 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
11522 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
11523 New -y or --bzip2 option.
11524 (add_filtered_exclude): New function.
11525 (decode_options): Put excluded patterns with / into
11526 excluded_with_slash, and without / into excluded_without_slash.
11527 Compare newer_mtime_option to its new initial value
11528 TYPE_MINIMUM (time_t) when deciding whether more than one
11529 threshold date was specified.
11531 1999-07-20 Paul Eggert <eggert@twinsun.com>
11533 * NEWS, configure.in: Version 1.13.5.
11535 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
11537 * src/buffer.c (new_volume): Likewise.
11538 * src/incremen.c (read_directory_file): Likewise.
11539 * src/tar.c (decode_options):
11540 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
11543 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
11544 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
11546 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
11547 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
11548 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
11549 Define to 0 if the corresponding S_IF* macro is not defined.
11550 (mkfifo): Do not define if already defined, or if S_IFIFO
11553 * src/compare.c (diff_archive): Use HAVE_READLINK, not
11554 S_ISLNK, to determine whether to invoke readlink.
11555 * src/create.c (dump_file): Likewise.
11557 * src/extract.c (set_mode):
11558 Do not chmod unless we are root or the -p option was given;
11559 this matches historical practice.
11560 (unlink_destination): New function, which checks for unlink failures.
11561 (maybe_recoverable): Stay quiet if -U.
11562 (extract_archive): Use O_EXCL if unlink_first_option.
11563 Report unlink failures.
11564 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
11565 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
11568 * src/incremen.c (get_directory_contents): Depend on
11569 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
11571 * src/list.c: Remove S_IS* ifdefs.
11572 * src/misc.c (maybe_backup_file): Likewise.
11574 * src/misc.c (maybe_backup_file):
11575 "Virtual memory exhausted" -> "Memory exhausted",
11576 to conform to the other places this message is issued.
11578 * src/mangle.c (extract_mangle):
11579 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
11581 * src/rtapelib.c (rmt_open__):
11582 Remove typo that caused us to omit the first char
11585 1999-07-16 Paul Eggert <eggert@twinsun.com>
11587 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
11589 * doc/tar.texi: A path name is excluded if any of its file name
11590 components matches an excluded pattern, even if the path name was
11591 specified on the command line.
11592 * src/create.c (create_archive): Likewise.
11593 * src/list.c (read_and): Likewise.
11594 * src/update.c (update_archive): Likewise.
11595 * lib/exclude.h (excluded_pathname): New decl.
11596 * lib/exclude.c (_GNU_SOURCE): Define.
11597 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
11598 (excluded_filename_opts): New function.
11599 (excluded_pathname): New function.
11601 * lib/Makefile.am (EXTRA_DIST):
11602 xstrtol.c moved here from libtar_a_SOURCES.
11603 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
11604 Remove xstrtoul.c; no longer needed.
11605 * lib/xstrtol.c: Remove.
11607 * src/tar.c (decode_options):
11608 Set newer_time_option to TYPE_MINIMUM, so that
11609 negative timestamps are handled correctly.
11610 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
11611 uniformity (and so that we don't need to have the other fns).
11612 (main): Remove call to init_total_written; no longer needed.
11614 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
11615 checks for unsigned long and long long.
11616 * src/arith.c: Remove.
11617 * src/Makefile.am (tar_SOURCES): Remove arith.c.
11618 * po/POTFILES.in: Remove src/arith.c.
11619 * src/arith.h: Use double, to simplify configuration gotchas.
11620 (tarlong): Now double.
11621 (TARLONG_FORMAT): New macro.
11622 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
11623 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
11624 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
11625 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
11626 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
11627 mult_tarlong, print_tarlong): Remove. All callers replaced with
11630 * src/common.h (init_total_written): Remove decl.
11632 * src/buffer.c (total_written):
11633 Remove; replaced with prev_written + bytes_written.
11634 (prev_written): New var.
11635 (init_total_written): Remove.
11636 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
11638 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
11639 Make sure that we can shift, multiply
11640 and divide unsigned long long values; Ultrix cc can't do it.
11642 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
11643 Check for any unknown bits, not just unknown bits left of the leftmost
11646 * lib/quotearg.c (quotearg_buffer):
11647 Don't quote spaces if C quoting style.
11648 * src/list.c (from_oct):
11649 Use C quoting style for error; omit trailing NULs.
11651 1999-07-14 Paul Eggert <eggert@twinsun.com>
11653 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
11655 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
11656 <inttypes.h> defines strtoumax as a macro (and not as a function).
11657 HP-UX 10.20 does this.
11659 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
11660 * PORTS, README, TODO, doc/tar.texi: Likewise.
11662 1999-07-12 Paul Eggert <eggert@twinsun.com>
11664 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
11665 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
11667 * src/list.c (decode_header):
11668 Do not assume that S_IFBLK and S_IFCHR are defined.
11670 * src/create.c (start_header): Do not assume S_IFMT is defined.
11671 (dump_file): Remove unnecessary check for screwy apollo lossage.
11672 Do not assume S_IFBLK and S_IFCHR are defined.
11674 * src/extract.c (extract_archive):
11675 Test whether S_IFCHR and S_IFBLK are nonzero,
11676 not whether they are defined, for consistency with other tests.
11678 * src/buffer.c (is_regular_file):
11679 Don't succeed on files that we can't access due to
11680 permissions problems.
11681 (open_archive): Fix wording on fatal error message.
11682 Don't bother to stat /dev/null if the archive is not a character
11685 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
11686 Report an error, not a warning, for I/O errors.
11687 (process_rawdata, process_dumpdir, diff_sparse_files):
11688 Change ungrammatical "Data differs" to "Contents differ".
11689 (get_stat_data): Find hidden files on AIX.
11690 Accept file name as argument; all uses changed.
11691 (get_stat_data, diff_archive): Use system error message for
11692 nonexistent files rather than rolling our own.
11693 (diff_archive): Unknown file types are errors, not warnings.
11694 Normalize spelling of message to "File type differs".
11695 Use get_stat_data to get link status, for consistency.
11696 Do not inspect st_rdev for fifos.
11697 Do not assume st_mode values contain only file types and mode bits.
11698 Check for mode changes and device number changes separately.
11700 * src/update.c (append_file):
11701 Open the file before statting it, to avoid a race.
11702 Complain about file shrinkage only when we reach EOF.
11704 1999-07-08 Paul Eggert <eggert@twinsun.com>
11706 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
11708 * configure.in (AC_EXEEXT): Add.
11710 * lib/Makefile.am (noinst_HEADERS):
11711 Add basename.h, exclude.h. Remove full-write.h.
11712 (libtar_a_SOURCES): Add exclude.c.
11714 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
11716 * lib/full-write.c: Include safe-read.h instead of full-write.h.
11717 * lib/safe-read.h (safe_read): New decl.
11718 * src/rmt.c: Include safe-read.h.
11719 * src/rtapelib.c: Include basename.h, save-read.h.
11720 (rmt_open__): Use base_name to compute base name.
11723 Include basename.h, exclude.h; don't include full-write.h.
11724 (exclude_option): Remove decl.
11725 (excluded): New decl.
11726 (add_exclude, add_exclude_file, check_exclude): Remove decls.
11728 * src/list.c (read_and):
11729 Use excluded_filename instead of check_exclude.
11730 Check base name of incoming file name, not entire file name, when
11731 deciding whether to exclude it.
11733 * src/create.c (finish_sparse_file):
11734 Use excluded_filename instead of check_exclude.
11735 Don't bother to stat excluded file names.
11736 * src/incremen.c (get_directory_contents): Likewise.
11738 * src/names.c (exclude_pool, exclude_pool_size,
11739 allocated_exclude_pool_size, simple_exclude_array,
11740 simple_excludes, allocated_simple_excludes,
11741 pattern_exclude_array, pattern_excludes,
11742 allocated_pattern_excludes, add_exclude, add_exclude_file,
11744 Remove; now done in ../lib/exclude.c.
11746 * src/tar.c (decode_options): Initialize `excluded'.
11747 Use new add_exclude_file and add_exclude functions.
11749 1999-07-05 Paul Eggert <eggert@twinsun.com>
11751 * m4/gettext.m4: Use changequote rather than [[ ]].
11753 * lib/safe-read.c: Renamed from lib/full-read.c.
11754 (safe_read): Renamed from full_read. All uses changed.
11755 * lib/safe-read.h, lib/full-write.h: New files.
11756 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
11757 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
11758 * lib/full-write.c: Include full-write.h.
11759 * src/common.h: Include full-write.h, safe-read.h.
11760 * src/system.h: (full_read, full_write): Remove decls.
11762 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
11764 * src/system.h (bindtextdomain, textdomain): undef before
11765 defining, to avoid preprocessor warnings with --disable-nls
11766 on hosts whose locale.h includes libintl.h.
11768 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
11769 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
11770 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
11773 1999-07-02 Paul Eggert <eggert@twinsun.com>
11775 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
11776 * m4/mktime.m4: New file.
11777 * m4/Makefile.am.in, m4/README: Remove these files.
11778 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
11779 remove README, Makefile.am.in.
11780 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
11781 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
11782 not AM_FUNC_MKTIME.
11784 * src/tar.c: Include signal.h.
11785 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
11786 (main): Ensure SIGCHLD is not ignored.
11788 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
11789 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
11790 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
11791 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
11792 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
11793 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
11794 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
11795 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
11796 they don't overlap with char codes. Use an enum instead of a lot
11799 * src/system.h (ISASCII): Remove.
11800 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
11801 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
11802 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
11803 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
11804 LONG_MAX): New macros.
11806 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
11807 (read_directory_file): Cast ISSPACE arg to unsigned char.
11808 * src/misc.c (ISPRINT): Remove; now in system.h.
11809 (remove_any_file): Add brackets to pacify gcc -Wall.
11810 * src/list.c: Don't include <ctype.h>; system.h already does this.
11811 (ISODIGIT, ISSPACE): Remove; now in system.h.
11812 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
11814 (from_oct): Cast ISSPACE arg to unsigned char.
11816 * src/create.c (mode_to_oct): Translate modes from internal to
11818 * src/list.c (mode_from_oct): Translate modes from external to
11819 internal form. Do not complain about unrecognized mode bits.
11820 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
11821 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
11823 * src/extract.c: (extr_init, make_directories, extract_archive):
11824 Do not assume mode bits have traditional Unix values.
11825 * src/list.c (decode_mode): Likewise.
11826 * src/create.c (start_header, dump_file): Likewise.
11827 * src/buffer.c (child_open_for_compress,
11828 child_open_for_uncompress, open_archive, (close_archive): Likewise.
11829 * src/compare.c (diff_archive): Likewise.
11831 * src/extract.c (set_mode): Use %04 not %0.4 format.
11832 (extract_sparse_file): Do not use data_block uninitialized.
11833 Check for lseek failures.
11835 * src/rtapelib.c (rmt_lseek__):
11836 Convert lseek whence values to portable integers on the wire.
11837 * src/rmt.c (main): Likewise. Check for whence values out of range.
11839 * src/create.c (finish_sparse_file): Use lseek whence macros
11840 instead of integers.
11841 * src/buffer.c (backspace_output): Likewise.
11842 * src/compare.c (diff_archive, verify_volume): Likewise.
11843 * src/delete.c (move_archive): Likewise.
11844 * src/extract.c (extract_sparse_file): Likewise.
11846 * src/create.c (dump_file): Do not invoke finish_sparse_file
11847 on a negative file descriptor.
11849 * src/buffer.c: Add braces to pacify gcc -Wall.
11851 * src/compare.c (diff_sparse_files): Report lseek errors.
11853 * configure.in (ALL_LINGUAS): Add cs, es, ru.
11855 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
11857 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
11858 message to be internationalized; \a doesn't work with msgfmt.
11860 * src/tar.c (long_options, main, usage, OPTION_STRING):
11861 Remove -E or --ending-file.
11862 * src/list.c (read_and): Likewise.
11863 * src/common.h (ending_file_option): Likewise.
11864 * src/buffer.c (close_archive): Likewise.
11866 * tests/after: Don't run two commands together in a pipeline,
11867 as some old shells mishandle pipeline exit status.
11869 1999-06-28 Paul Eggert <eggert@twinsun.com>
11871 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
11872 * NEWS: Describe changes since 1.12.
11873 * README: Update bug reporting address; move paxutils ref to NEWS.
11875 Handle EINTR correctly.
11876 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
11877 * lib/full-read.c, lib/full-write.c: New files.
11878 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
11879 Prefer full_read to read and full_write to write.
11880 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
11881 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
11883 * src/extract.c (extract_sparse_file): Likewise.
11884 * src/rmt.c (get_string, main, report_error_message,
11885 report_numbered_error): Likewise.
11886 * src/rmt.h (rmtread, rmtwrite): Likewise.
11887 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
11888 rmt_write__, rmt_ioctl__): Likewise.
11889 * src/update.c (append_file): Likewise.
11890 * src/system.h (full_read, full_write): New decls.
11892 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
11893 lib/xmalloc.c, src/arith.c, src/misc.c.
11895 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
11896 New macros. All uses of STDIN and STDOUT changed.
11897 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
11898 instead of 0 and STDOUT_FILENO instead of 1.
11899 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
11900 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
11902 * src/rmt.c (private_strerror): Avoid const. Translate results.
11904 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
11905 in the presence of NFS clock skew.
11907 1999-06-25 Paul Eggert <eggert@twinsun.com>
11909 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
11911 * src/buffer.c (write_archive_buffer): New function.
11912 (child_open_for_compress, flush_write, flush_read): Use it to write
11914 (open_archive): Report error if fstat of archive fails.
11915 Improve efficiency of check for /dev/null.
11916 Also, fix some corner cases with remote archives and /dev/null checking.
11917 (close_archive): Test for input fifo only if not remote.
11918 Truncate output archive only if it's not remote.
11920 * src/misc.c (remove_any_file):
11921 Don't terminate if you see . or ..; just skip them.
11923 1999-06-18 Paul Eggert <eggert@twinsun.com>
11925 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
11927 Output sizes using a format that's more compatible with
11928 traditional tar (and with GNU Emacs).
11929 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
11930 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
11931 Don't subtract 1 from size.
11932 * src/create.c (to_oct): Prepend leading zeros, not spaces.
11933 Output a trailing NUL unless the value won't fit without it.
11934 (finish_header): No need to append NUL to chksum, now that
11935 to_oct is doing it.
11937 1999-06-16 Paul Eggert <eggert@twinsun.com>
11939 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
11941 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
11942 @INTLLIBS@ might invoke rpl_realloc.
11944 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
11945 (intconv): Remove; use xstrto* fns instead.
11946 ("xstrtol.h"): Include.
11947 (check_decimal): Remove.
11948 (long_options, usage, OPTION_STRING, decode_options):
11949 Remove -y, --bzip2, --unbzip2.
11950 (decode_options): Use xget_version instead of get_version.
11951 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
11952 Replace invocations of check_decimal with xstrtoumax.
11954 * tests/preset.in (echo_n, echo_c): Remove.
11956 * tests/after: Don't rely on $echo_c and $echo_n.
11958 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
11959 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
11960 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
11961 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
11962 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
11963 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
11964 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
11965 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
11966 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
11967 m4/xstrtoumax.m4: New files.
11969 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
11970 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
11971 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
11972 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
11973 (AC_CHECK_FUNCS): Remove lchown.
11974 (AC_REPLACE_FUNCS): Remove basename, dirname.
11975 Add lchown, strtol, strtoul.
11976 (jm_FUNC_MKTIME): Add.
11977 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
11978 are also built via the ANSI2KNR-filtering rules.
11979 Use a no-op line to work around bug in automake 1.4 with malloc and
11981 (AC_OUTPUT): Add m4/Makefile.
11983 * lib/Makefile.am (EXTRA_DIST):
11984 Add lchown.c, malloc.c, mktime.c, realloc.c,
11985 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
11986 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
11987 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
11988 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
11989 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
11991 * src/system.h (uintmax_t): Don't declare; configure now does this.
11993 * src/common.h (backup_type): New decl.
11994 * src/common.h, src/misc.c, src/tar.c:
11995 Move include of backupfile.h to common.h.
11997 * src/misc.c (maybe_backup_file):
11998 Pass backup_type to find_backup_file_name.
12000 * src/list.c (print_header): Change sizes of uform and gform from 11 to
12001 UINTMAX_STRSIZE_BOUND.
12003 * doc/tar.texi: Remove --bzip2.
12004 Fix @xref typos reported by latest makeinfo.
12006 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
12008 (M4DIR, ACINCLUDE_INPUTS): New macros.
12009 ($(srcdir)/acinclude.m4): New rule.
12011 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
12012 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
12013 now generated automatically by autoconf.
12015 1999-05-15 Paul Eggert <eggert@twinsun.com>
12017 * doc/tar.texi: Remove -y.
12019 1999-04-09 Paul Eggert <eggert@twinsun.com>
12021 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
12022 (we were allocating too much storage).
12023 (uintmax_t): Don't declare; configure now does this.
12025 * ABOUT-NLS: Update to gettext 0.10.35 edition.
12027 1999-03-22 Paul Eggert <eggert@twinsun.com>
12029 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
12031 * acinclude.m4 (AC_LFS_FLAGS):
12032 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
12033 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
12034 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
12036 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
12037 New macros; needed for latest GNU xmalloc.c.
12039 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
12040 (libtar_a_SOURCES): Add quotearg.c.
12041 * list.c: Include <quotearg.h>.
12042 (from_oct): Add forward decl.
12043 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
12044 (from_oct): Report an error only if TYPE is nonzero.
12045 Quote any funny characters in bad header.
12047 1999-03-20 Paul Eggert <eggert@twinsun.com>
12049 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
12051 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
12052 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
12054 (AC_LFS): Simplify AIX revision number test.
12056 1999-03-17 Paul Eggert <eggert@twinsun.com>
12058 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
12060 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
12061 Remove; it doesn't work that well
12062 with AC_CANONICAL_HOST.
12063 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
12065 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
12067 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
12069 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
12071 * tar.texi: Fix bug-report addr.
12073 * README: Remove --with-included-malloc.
12074 Upgrade version numbers of build software.
12076 1999-03-07 Paul Eggert <eggert@twinsun.com>
12078 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
12080 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
12081 where bindtextdomain and gettext require -lintl.
12082 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
12083 `no' means it failed.
12084 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
12085 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
12086 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
12087 to add anything to the command line (it's all in config.h).
12088 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
12090 1999-03-01 Paul Eggert <eggert@twinsun.com>
12092 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
12094 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
12096 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
12097 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
12098 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
12099 like OFF_MAX, which are not reliable
12100 (e.g. OFF_MAX in AIX 4.2 is incorrect).
12101 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
12102 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
12104 * src/incremen.c (get_directory_contents):
12105 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
12106 Have statx depend on STX_HIDDEN, not AIX.
12108 * src/create.c (to_oct):
12109 New parameter substitute, giving a substitute value to use
12110 when the original value is out of range. Do not append a space to the
12111 output; modern tars don't. When a value is out of range, specify the
12112 maximum value, not the number of bits.
12113 (GID_NOBODY, UID_NOBODY): New macros.
12114 (gid_to_oct, uid_to_oct): Use them as substitutes.
12115 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
12116 (dump_file): Check whether the file changed as we read it.
12118 * src/rmt.c (main): Remove suspicious AIX/386 code.
12120 1999-02-19 Paul Eggert <eggert@twinsun.com>
12122 * intl/localealias.c (read_alias_file): Don't assume that memcpy
12123 returns a type compatible with char *; it doesn't on SunOS
12124 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
12126 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
12128 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
12129 * doc/tar.texi: Add --bzip2, --unbzip2 options.
12131 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
12133 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
12134 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
12135 * acinclude.m4 (AM_WITH_NLS):
12136 Update to latest gettext version (serial 5).
12137 (AC_LFS_FLAGS): New macro
12138 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
12139 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
12140 Work properly in cross-compilation scenario, by checking for getconf
12141 with AC_CHECK_TOOL and by ditching uname in favor of
12142 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
12144 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
12145 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
12146 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
12147 since getdate.y now uses ANSI code.
12149 * config.guess, config.sub: New files; taken from automake 1.4.
12151 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
12152 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
12153 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
12154 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
12155 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
12156 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
12157 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
12159 1999-02-01 Paul Eggert <eggert@twinsun.com>
12161 * src/tar.c: Update copyright.
12165 1999-02-01 Paul Eggert <eggert@twinsun.com>
12167 * NEWS, configure.in: Version 1.12.64004
12169 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
12171 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
12173 * src/extract.c (extract_archive): Fix bug when extracting sparse
12174 files: they were trashing the tar file header.
12176 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
12177 Add -y or --bzip2 or --bunzip2 option.
12179 1999-01-30 Paul Eggert <eggert@twinsun.com>
12181 * src/names.c (cached_no_such_uname, cached_no_such_gname,
12182 cached_no_such_uid, cached_no_such_gid): New vars.
12183 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
12184 Cache failures, too.
12186 * src/tar.c (decode_options):
12187 Don't pass names longer than UNAME_FIELD_SIZE to
12188 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
12190 1999-01-27 Paul Eggert <eggert@twinsun.com>
12192 * NEWS, configure.in: Version 1.12.64003
12194 * src/buffer.c (backspace_output, close_archive): Cast
12195 rmtlseek position arg to off_t, for benefit of K&R compilers
12197 * src/compare.c (verify_volume): Likewise.
12199 * NEWS, configure.in: Version 1.12.64002
12201 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
12202 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
12203 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
12204 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
12205 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
12206 uid_from_oct): Likewise.
12208 1999-01-25 Paul Eggert <eggert@twinsun.com>
12210 * incremen.sh: Fix timing bug in regression test.
12212 1999-01-22 Paul Eggert <eggert@twinsun.com>
12214 * NEWS, configure.in: Update version
12216 * Makefile.am (localedir): Change to $(datadir)/locale.
12217 (DEFS): New macro, defining LOCALEDIR.
12218 (tar.o, tar._o, rmt.o, rmt._o): Remove.
12219 (INCLUDES): Add -I..
12221 * Makefile.am (localedir): Change to $(datadir)/locale.
12223 1999-01-21 Paul Eggert <eggert@twinsun.com>
12225 * NEWS, README, configure.in: Unofficial version 1.12.64001.
12227 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
12228 * src/Makefile.am (localedir): Likewise.
12229 (DEFS): New macro, defining LOCALEDIR.
12230 (tar.o, tar._o, rmt.o, rmt._o): Remove.
12231 (INCLUDES): Add `-I..'.
12233 * tests/incremen.sh: Fix timing bug.
12235 1999-01-20 Paul Eggert <eggert@twinsun.com>
12237 * NEWS, README, configure.in: Unofficial version 1.12.64000.
12238 `lfs.7' changed to `64000' in version number
12239 to conform to gnits standards.
12241 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
12242 mkinstalldirs, ansi2knr.c: Update to latest public versions.
12244 Rebuild with automake 1.4 and autoconf 2.13, to work around some
12247 1998-12-07 Paul Eggert <eggert@twinsun.com>
12249 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
12251 * src/list.c (read_header):
12252 Accept file names as specified by POSIX.1-1996 section 10.1.1.
12254 1998-11-30 Paul Eggert <eggert@twinsun.com>
12256 * configure.in: Quote the output of uname.
12258 * src/extract.c (set_stat): chmod after chown even when not root;
12259 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
12261 1998-11-15 Paul Eggert <eggert@twinsun.com>
12263 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
12265 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
12266 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
12268 1998-10-28 Paul Eggert <eggert@twinsun.com>
12270 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
12272 * src/system.h (voidstar): Use void * if __STDC__ is defined,
12273 not merely nonzero.
12275 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
12276 On many installations, rexec is disabled.
12278 1998-08-07 Paul Eggert <eggert@twinsun.com>
12280 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
12282 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
12283 for nameless users and groups.
12285 1998-02-17 Paul Eggert <eggert@twinsun.com>
12287 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
12288 * NEWS, README: Add explanation of why this isn't an official version.
12290 1998-02-02 Paul Eggert <eggert@twinsun.com>
12292 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
12293 This is an unofficial version.
12295 1997-12-17 Paul Eggert <eggert@twinsun.com>
12297 * src/incremen.c (ST_DEV_MSB): New macro.
12298 (NFS_FILE_STAT): Use most significant bit of st_dev,
12299 even if it's unsigned.
12301 1997-12-08 Paul Eggert <eggert@twinsun.com>
12303 * src/system.h (ST_NBLOCKS): Fix typo in definition.
12305 1997-11-19 Paul Eggert <eggert@twinsun.com>
12307 * configure.in (HAVE_INTTYPES_H):
12308 Don't ignore cache variable if it's already set.
12310 1997-11-10 Paul Eggert <eggert@twinsun.com>
12312 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
12313 * src/delete.c (records_read): Now off_t.
12314 (move_archive): Don't assume mt_count is of type daddr_t.
12316 1997-10-30 Paul Eggert <eggert@twinsun.com>
12318 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
12319 Set to appropriate values if large file support
12320 needs explicit enabling.
12321 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
12323 New macros to configure.
12324 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
12326 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
12327 major_t, minor_t, ssize_t): New macros.
12329 * src/arith.h (TARLONG_FORMAT):
12330 Fix typo: %uld -> %lu. Use unsigned when long long
12332 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
12333 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
12335 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
12336 2nd arg is now unsigned long.
12338 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
12339 (prepare_record_buffer): Arg is now size_t.
12340 Remove now-useless casts.
12342 (main): Use `long' for status, so that it can store ssize_t.
12343 Use daddr_t, mode_t, size_t, off_t when appropriate.
12344 Convert daddr_t and off_t values ourselves, since they might be longer
12345 than long. Convert other types using `long' primitives.
12346 When processing MTIOCTOP, do not try to pass resulting
12347 count back, since it won't work (it could be too large) and it's
12348 not expected anyway.
12351 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
12352 now-useless casts. Use unsigned long to print *_t types, except use
12353 STRINGIFY_BIGINT for off_t.
12354 (update_archive): Cast -1 to dev_t when necessary.
12356 * src/tar.c (check_decimal):
12357 Now returns 1 if successful, 0 otherwise, and returns
12358 uintmax_t value into new arg. Check for arithmetic overflow.
12359 (decode_options): Avoid overflow if record_size fits in size_t but not int.
12360 Check for overflow on user or group ids.
12362 * src/compare.c (diff_init, process_rawdata, read_and_process,
12363 diff_sparse_files, diff_archive):
12364 Use off_t, pid_t, size_t, ssize_t when appropriate.
12365 Remove now-useless casts. Use unsigned long to print *_t types,
12366 except use STRINGIFY_BIGINT for off_t.
12368 (process_noop, process_rawdata, process_dumpdir, read_and_process):
12369 Size arg is now size_t.
12371 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
12372 when allocating buffer.
12375 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
12376 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
12377 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
12380 (get_status_string, get_status_off): New function.
12381 (get_status): Now returns long, so that it can store ssize_t.
12382 Invoke get_status_string to do the real work.
12383 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
12384 (rmt_lseek__): Now returns off_t, using new get_status_off function.
12385 (rmt_ioctl__): Convert mt_count by hand,
12386 since it might be longer than long.
12388 * src/mangle.c (extract_mangle):
12389 Check for overflow when converting off_t to size_t.
12390 Use off_t, size_t when appropriate. Remove now-useless casts.
12392 * src/system.h (mode_t): Remove; now done by autoconf.
12393 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
12394 Return number of ST_NBLOCKSIZE-byte blocks,
12395 not number of 512-byte blocks;
12396 this also helps to avoid overflow.
12397 (st_blocks): Declare if needed.
12398 (ST_NBLOCKSIZE): New macro.
12399 (<limits.h>, <inttypes.h>): Include if available.
12400 (CHAR_BIT): New macro.
12401 (uintmax_t): New typedef.
12402 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
12403 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
12404 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
12406 * src/names.c (name_init):
12407 Fix typo in error message: FILE* was passed, but char*
12410 (read_name_from_file, name_gather, addname, name_match, name_scan,
12411 add_exclude): Use size_t when appropriate. Remove now-useless casts.
12413 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
12415 * src/extract.c (newdir_umask, current_umask): Now mode_t.
12416 (extract_sparse_file): Args now use off_t.
12418 (set_mode, set_stat, make_directories, extract_sparse_file,
12419 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
12420 now-useless casts. Use unsigned long to print *_t types, except use
12421 STRINGIFY_BIGINT for off_t.
12423 * src/misc.c (quote_copy_string):
12424 Use size_t when appropriate. Remove now-useless casts.
12426 * src/list.c (read_and, list_archive, read_header, decode_mode,
12427 print_header, print_for_mkdir):
12428 Use mode_t, off_t, size_t when appropriate. Remove
12429 now-useless casts. Use unsigned long to print *_t types, except use
12430 STRINGIFY_BIGINT for off_t.
12432 (read_header): Check for overflow when converting header size.
12434 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
12435 const char *. Size arg is now size_t. Now takes new type and maxval
12436 args. Compute result using uintmax_t, not long. Report error if
12437 field does not contain octal number in range.
12438 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
12439 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
12440 uintmax_from_oct): New functions.
12442 (stringify_uintmax_t_backwards): New function.
12444 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
12445 (skip_file): Offset arg is now off_t.
12447 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
12448 real_s_totsize, real_s_sizeleft, current_block_ordinal):
12450 (write_error): Arg is now ssize_t.
12451 (child_pid): Now pid_t.
12452 (available_space_after): Now size_t.
12454 (child_open_for_compress, child_open_for_uncompress, flush_write,
12455 open_archive, flush_write, write_error, flush_read, close_archive):
12456 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
12457 casts. Use unsigned long to print *_t types, except use
12458 STRINGIFY_BIGINT for off_t.
12460 * src/delete.c (records_read): Now daddr_t.
12461 (move_archive): Arg is now daddr_t. Check for overflow when
12463 (move_archive, delete_archive_members): Use daddr_t, off_t when
12464 appropriate. Remove now-useless casts.
12466 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
12467 (rmt_lseek): Now returns off_t.
12469 * src/create.c (to_oct):
12470 Now static. Value arg is now uintmax_t. Accept new args
12471 giving name of type of octal field, for error messages. Report an
12472 error if the value is too large to fit in the field.
12473 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
12474 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
12476 (write_eot, write_long, finish_header, deal_with_sparse,
12477 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
12478 appropriate. Remove now-useless casts. Use unsigned long to print
12479 *_t types, except use STRINGIFY_BIGINT for off_t.
12481 (find_new_file_size): 1st arg is now off_t*.
12482 (finish_sparse_file): Args now use off_t, not long.
12483 Check for lseek error.
12484 (create_archive, dump_file): Cast -1 to dev_t when necessary.
12485 (dump_file): Device arg is now dev_t.
12486 Avoid overflow when testing whether file has holes
12487 by using the new ST_NBLOCKSIZE macro.
12489 * src/incremen.c (struct accumulator, add_to_accumulator,
12490 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
12491 Use size_t for sizes.
12492 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
12493 Use dev_t, ino_t for devices and inodes.
12494 (gnu_restore): Use off_t for file offsets.
12495 (struct directory): Use char for flags. Add new flag `nfs'.
12496 (nfs): New constant
12497 (NFS_FILE_STAT): New macro.
12498 (note_directory): Accept struct stat * instead of
12499 device and inode number. All callers changed.
12500 (note_directory, get_directory_contents):
12501 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
12502 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
12504 * src/common.h (record_size, struct name, struct sp_array,
12505 available_space_after):
12506 Use size_t for sizes.
12507 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
12508 Use off_t for file offsets.
12509 (struct name): dir_contents is now const char *, not char *.
12510 (dump_file, get_directory_contents): Use dev_t for devices.
12511 (to_oct): Remove decl.
12512 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
12513 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
12514 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
12515 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
12516 UINTMAX_FROM_OCT): New macros.
12517 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
12518 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
12519 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
12520 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
12521 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
12522 (print_for_mkdir): 2nd arg is now mode_t.
12526 See ChangeLog.1 for earlier changes.
12532 version-control: never
12533 buffer-read-only: t