1 2008-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
3 * NEWS: Document --no-check-device and --check-device.
4 * doc/rendition.texi: Change the way FIXME-*refs are handled in
6 * doc/intern.texi, doc/tar.texi: Update.
7 * doc/untabify.el: New file.
8 * doc/Makefile.am (EXTRA_DIST): Add untabify.el
9 (untabify, final, check-format, check-refs, check-fixmes)
10 (check-unrevised, all-check-docs, check-docs): New rules.
12 * src/common.h (check_device_option): New global.
13 * src/incremen.c (procdir): Use boolean and instead of bitwise
14 one. Patch by Jean-Louis Martineau.
15 Compare device numbers only if check_device_option is set.
16 * src/tar.c: New command line options --no-check-device and
17 --check-device. Proposed by Jean-Louis Martineau.
18 (parse_opt): Hanlde new options.
19 (decode_options): Initialize check_device_option to true.
23 2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
25 * bootstrap: Use rsync to get translations.
26 * doc/tar.texi: Minor change.
27 * lib/.cvsignore: Update
28 * po/.cvsignore: Update
29 * src/system.c: Remove include setenv.h.
30 * tests/atlocal.in (STAR_DATA_URL): Update.
31 * tests/star/README: Update URL.
33 2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
35 * doc/tar.texi: Fix a typo. Reported by Denis Excoffier.
37 2008-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
40 * configure.ac: Version 1.19.90
41 * po/POTFILES.in: Add missing files.
42 * src/compare.c (verify_volume): Honor --ignore-zeros.
43 Proposed by Jan-Benedict Glaw.
44 * tests/shortfile.at (AT_KEYWORDS): Add shortfile0.
46 2008-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
49 * src/create.c (dump_file0): Apply transform_name to symlink
52 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
54 * src/transform.c: Support multiple --transform options. Support
55 semicolon-separated lists of replace expressions.
56 * NEWS, tar.texi: Document changes to the --transform option.
58 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
60 * doc/tar.texi: Update Back-Cover text to reflect new GNU wording.
62 2007-12-17 Paul Eggert <eggert@cs.ucla.edu>
64 Exit with nonzero status if a close fails on an archive.
65 Problem (and initial trivial fix)
66 * src/buffer.c (close_archive, new_volume): close_error, not
69 2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
71 * src/buffer.c (check_compressed_archive): Do not bail out if the
72 file is too short, set boolean flag, passed as an argument
73 instead. This fixes a bug introduced on 2007-08-24. See also
76 * tests/Makefile.am, tests/testsuite.at: Add shortupd.at.
77 * tests/shortupd.at: New test.
79 2007-11-12 Jim Meyering <meyering@redhat.com>
81 Don't read from name[-1].
82 * src/incremen.c (make_directory): Handle namelen == 0, since
83 find_directory_meta calls make_directory ("").
85 2007-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
87 * bootstrap (checkout): Use URL of the gnulib CVS mirror.
88 * gnulib.modules: Add fseeko and snprintf.
90 2007-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
92 * src/checkpoint.c: New actions: bell and ttyout
93 * src/system.c (sys_exec_info_script)
94 (sys_exec_checkpoint_script): pass the current blocking factor in
95 TAR_BLOCKING_FACTOR environment variable.
96 * doc/tar.texi: Update
99 2007-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
101 * doc/Makefile.am: Use texi2html and the CVS version of gendocs.sh
102 to create HTML versions of the manual.
103 * doc/gendocs_template: Likewise.
104 * doc/tar.texi: Document --hard-dereference and
105 --checkpoint-action options. Improve documentation of
108 2007-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
111 * configure.ac: Version 1.19.1
112 * po/POTFILES.in: Add src/checkpoint.c
113 * src/Makefile.am (tar_SOURCES): add checkpoint.c
114 * src/checkpoint.c: New file - checkpoint handling.
115 * src/buffer.c (checkpoint, do_checkpoint): Remove.
116 (_flush_write, simple_flush_read, _gnu_flush_read): Use
118 * src/common.h (enum checkpoint_style): Remove.
119 (checkpoint_style): Remove.
120 (DEFAULT_CHECKPOINT): New define.
121 (hard_dereference_option): New variable.
122 (sys_exec_checkpoint_script): New declaration.
123 * src/create.c (file_count_links): do nothing if
124 hard_dereference_option is set.
125 * src/system.c (sys_exec_checkpoint_script): New function.
126 (sys_exec_info_script): Restore SIGPIPE handler.
127 * src/tar.c: (parse_opt): New options --hard-dereference,
129 (decode_options): Call checkpoint_finish_compile.
131 * src/system.c (sys_exec_info_script): Initialize buf. Problem
132 reported by Bengt-Arne Fjellner.
134 2007-10-18 Jim Meyering <jim@meyering.net>
136 Avoid compiler warnings.
137 * src/list.c (read_header_primitive): Define two locals, to
138 avoid incorrect "may be used uninitialized" warnings.
139 * src/incremen.c (procdir): Remove decl of unused local, "len".
141 2007-10-18 Sergey Poznyakoff <gray@gnu.org.ua>
143 * doc/tar.texi (gzip): Remove compression patent
144 warning. According to Brett Smith, the patent is
147 2007-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
149 * src/suffix.c: New file. Compress format detection by archive
150 suffix (when creating). Suggested by Jean-Pierre Demailly.
151 * src/Makefile.am: Add suffix.c
152 * src/buffer.c (magic): Add an entry for new lzma format. Proposed
154 * src/common.h (set_comression_program_by_suffix): New prototype.
155 * src/tar.c: New options --auto-compress (-a) and --lzma
156 * THANKS: Add Lasse Collin and Jean-Pierre Demailly.
158 * doc/tar.texi: Update
160 2007-10-12 Paul Eggert <eggert@cs.ucla.edu>
162 * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1
163 warning about "comparison is always true due to limited range of
164 data type" when char is unsigned.
166 2007-10-11 Paul Eggert <eggert@cs.ucla.edu>
168 Adjust to recent gnulib changes.
169 * configure.ac: Dont' check for strerror, since gnulib now does this.
170 * .cvsignore: Add m4, tar-[0-9]*.
171 * lib/.cvsignore: Adjust to various gnulib file name changes.
172 Add .deps, rmt-command.h.
174 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
176 * configure.ac, NEWS: Raise version number to 1.19
177 * tests/star/README: Update
179 2007-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
181 * src/create.c (dump_regular_file): Fix file padding in case of
182 truncation to zero size.
185 2007-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
187 * tests/T-null.at: Use AT_DATA for sample output.
189 2007-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
191 * src/incremen.c (try_purge_directory): Ensure that arguments to T
194 2007-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
196 * src/incremen.c (obstack_code_rename): Apply safer_name_suffix to
197 name arguments before storing them in T and R records. Reported by
200 2007-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
202 * configure.ac: Raise version number to 1.18.90
205 * doc/snapshot.texi: Document version 2.
206 * doc/dumpdir.texi: Update.
208 Implement --exclude-tag* and --exclude-cache* options for listed
209 incremental archives.
210 New option --exclude-vcs to exclude VCS-specific files and
214 * doc/tar.texi: Document --exclude-vcs option
215 * src/common.h (exclusion_tag_warning, check_exclusion_tags): New
217 * src/create.c (exclusion_tag_warning, check_exclusion_tags):
218 Remove static qualifier.
219 (check_exclusion_tags): account for dirname without terminating
221 (dump_dir0): exclusion_tag_all is handled elsewhere.
222 * src/incremen.c (struct directory): New member tagfile
223 (make_directory): Initialize tagfile to NULL
224 (procdir): New argument: entry
225 Hanlde exclusion tags.
226 (makedumpdir): Take into account directory->tagfile.
227 (scan_directory): Hanlde exclusion tags.
228 * src/tar.c: New option --exclude-vcs
229 (exclude_vcs_files): New function
231 2007-09-14 Paul Eggert <eggert@cs.ucla.edu>
233 * AUTHORS: Remove unnecessary information. Just list the
235 * THANKS: Remove info duplicated from AUTHORS.
237 2007-08-25 Jim Meyering <jim@meyering.net>
239 Don't include <getline.h>. No longer needed.
240 * src/incremen.c: Don't include <getline.h>. No longer needed.
241 * src/buffer.c: Likewise.
242 * src/system.c: Likewise.
243 * src/tar.c: Likewise.
245 Avoid shadowing and unused-variable warnings.
246 * src/create.c (check_exclusion_tags): Remove declaration of unused
248 * src/compare.c (diff_dumpdir): Rename stat->stat_data to avoid
249 shadowing the syscall.
250 * src/buffer.c (do_checkpoint): Don't shadow the write syscall.
251 (try_new_volume): Avoid shadowing "access".
252 * src/tar.c (decode_options): Rename index->idx to avoid shadowing.
253 (find_argp_option): Rename option->o to avoid shadowing.
254 * src/incremen.c (scan_directory): Rename local, dir_name->dir,
255 to avoid shadowing the function.
256 (get_directory_contents): Likewise.
257 * src/system.c (global_pid): Rename from "pid", to avoid being
259 * src/extract.c (apply_nonancestor_delayed_set_stat):
260 Rename st->sb to avoid shadowing another local.
262 2007-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
264 * configure.ac, NEWS: Raise version number to 1.18.1
266 * src/buffer.c (check_compressed_archive): Detect files smaller
268 * tests/shortfile.at: New test case for the above change.
269 * tests/testsuite.at, tests/Makefile.am: Add shortfile.at
271 2007-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
273 * bootstrap: Gnulib initialization destroyed paxutils m4 files.
274 Initialize paxutils structure after that of gnulib.
276 2007-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
278 * src/names.c (contains_dot_dot): Fix double-dot recognition in
279 case of duplicate /. Patch by Dmitry V. Levin.
281 * bootstrap (symlink_to_gnulib): Make sure the target directory
282 exists and create it if it does not.
284 * doc/tar.texi: Fix a typo.
286 2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
288 * bootstrap: Update for the change of the TP URL
290 2007-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
292 Relicense under GPLv3
294 2007-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
296 * tests/testsuite.at (AT_TAR_MKHIER): Skip test if genfile is
297 unable to create the file
298 * tests/lustar01.at: Likewise
300 2007-06-21 Eric Blake <ebb9@byu.net>
302 Resolve testsuite failures 40-42 on cygwin.
303 * tests/testsuite.at (AT_TAR_MKHIER): Skip tests when long
304 file names cannot be created.
306 2007-06-16 Sergey Poznyakoff <gray@gnu.org.ua>
308 * doc/Makefile.am (tar_TEXINFOS): Add tar-snapshot-edit.texi
309 * doc/tar-snapshot-edit.texi: New file
310 * doc/tar.texi (Fixing Snapshot Files): New appendix
312 * scripts/tar-snapshot-edit: New file
313 * tests/extrac07.at: Add back write permissions on dir
315 2007-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
317 * tests/exclude.at: Sort the output.
319 2007-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
321 * configure.ac, NEWS: Raise version number to 1.17
323 * doc/tar.texi, doc/intern.texi: Replace: s/filename/file name/;
324 s/(ASCII|ID|BSD)/@acronym{&}/;s/"[^"]+"/``&''/
325 Use `path' only when it refers to search paths, use
326 `file name' otherwise.
327 Fix various errors (based on patch by Benno Schulenberg)
329 * doc/tar.texi (Operation Summary): Restore alphabetical order of
332 2007-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
334 Fix bug, introduced on 2007-03-30.
336 * src/common.h (xform_type): New data type
337 (transform_member_name): Last argument is of xform_type type
340 * src/extract.c: Update calls to transform_member_name
341 * src/list.c (decode_xform): Exempt symbolic links from component
342 stripping and name suffix normalization.
344 * tests/extrac07.at: Update
346 2007-05-30 Sergey Poznyakoff <gray@gnu.org.ua>
348 * src/xheader.c (decx): Unknown pax keywords produce a warning,
351 2007-05-29 Paul Eggert <eggert@cs.ucla.edu>
353 * src/misc.c (set_file_atime): Use gl_futimens, not futimens,
354 due to gnulib change.
356 2007-05-19 Sergey Poznyakoff <gray@gnu.org.ua>
358 * src/common.h (buffer_write_global_xheader): New function
359 (struct xheader): Move definition to tar.h
360 (extended_header): Remove global
361 (xheader_init): New function
362 (xheader_decode_global,xheader_store,xheader_read)
363 (xheader_write_global,xheader_write,xheader_string_begin)
364 (xheader_string_add,xheader_string_end): Take xhdr as first
366 * src/tar.h (struct xheader): New definition
367 (struct tar_stat_info): New member xhdr (extended header).
369 * src/xheader.c (xheader_init): New function
370 (xheader_decode_global,xheader_store,xheader_read)
371 (xheader_write_global,xheader_write,xheader_string_begin)
372 (xheader_string_add,xheader_string_end): Take xhdr as first
375 * src/buffer.c (buffer_write_global_xheader): New function
376 Update to use new xheader calls.
378 * src/compare.c, src/create.c, src/delete.c, src/list.c,
379 src/sparse.c, src/tar.c, src/update.c: Global extended_header
380 removed, use new xheader calls instead.
382 * tests/T-null.at: Minor fix
383 * tests/atlocal.in (tarball_prereq): Discard eventual md5sum
386 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua>
388 * src/create.c (dump_file0): Original ctime cannot be used as a
389 directory change indicator if --remove-files is given.
391 2007-04-12 Paul Eggert <eggert@cs.ucla.edu>
393 Adjust to latest Gnulib.
394 * lib/.cvsignore: Add dirfd.c, dirfd.h, float+.h, mbscasecmp.c,
395 stdio.h, stdio_.h, stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
396 Remove exit.h, getcwd.h, mempcpy.h, memrchr.h, mkdtemp.h, stpcpy.h,
397 strcase.h, strchrnul.h, strdup.h, strndup.h, strnlen.h, time_r.h,
399 * m4/.cvsignore: Remove localedir.h. Sort.
401 2007-04-03 Paul Eggert <eggert@cs.ucla.edu>
403 * src/common.h (closeopen): Remove decl.
404 * src/misc.c: Don't include <sys/time.h>, <sys/resource.h>; no longer
406 (get_max_open_files, closeopen): Remove. All callers removed.
407 (chdir_dir): Use a different technique, which doesn't rely on closing
409 * src/tar.c (main): Don't call closeopen.
411 2007-04-04 Sergey Poznyakoff <gray@gnu.org.ua>
414 * doc/tar.texi: Update
415 * src/system.c (sys_exec_info_script): Store the
416 inter-communication fd in the environment variable TAR_FD
418 2007-04-03 Sergey Poznyakoff <gray@gnu.org.ua>
420 * src/tar.c (main): Move closeopen after decode_options to
421 allow shell process substitution to work.
422 * tests/extrac07.at: Expect a warning on stderr.
424 2007-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
426 * src/common.h (transform_name_fp): Change signature
427 (transform_member_name): New function
428 * src/extract.c (extract_link, extract_symlink): Use
429 transform_member_name instead of safer_name_suffix so that
430 --transform and --strip-components affect links as well.
431 * src/list.c (transform_member_name): New function
432 (decode_header): Use transform_member_name
433 * src/names.c (all_names_found): Remove check for matching_flags.
437 * bootstrap (slurp): Remove any occurrences of $bt from the
439 * src/incremen.c: Do not include mkdtemp.h
441 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
443 Adjust to recent gnulib changes.
444 * lib/.cvsignore: Add fchownat.c, rmt-command.h, strerror.c, string.h,
445 string_.h, sys, sys_time_.h, unistd_.h, wchar_.h, wctype_.h.
446 Remove localedir.h, size_max.h, xsize.h.
447 * src/xheader.c: Don't include stpcpy.h; no longer needed, now that
448 gnulib string.h defines stpcpy on all platforms.
450 2007-01-23 Sergey Poznyakoff <gray@gnu.org.ua>
452 * doc/tar.texi: Document --exclude-caches* and --exclude-tag*
454 * src/common.h (exclude_caches_option): Remove
455 (enum exclusion_tag_type): New data type
456 (add_exclude_tag): Rename to add_exclusion_tag
457 (cachedir_file_p): New prototype
458 * src/create.c (struct exclude_tag): rename to exclusion_tag
459 (check_exclusion_tags): New function
460 (cachedir_file_p): New function (from check_cache_directory)
461 (dump_dir0,dump_file0): Use check_exclusion_tags
462 * src/tar.c: New options --exclude-caches-all,
463 --exclude-caches-under, --exclude-tag-all, --exclude-tag-under
464 * tests/exclude.at: New file
465 * tests/Makefile.am (TESTSUITE_AT): Add exclude.at
466 * tests/testsuite.at: Add exclude.at
468 2007-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
470 * gnulib.modules: Require strerror
471 * doc/gendocs_template: Fix typos
472 * scripts/xsparse.c (expand_sparse): use ftruncate to handle the
474 * src/sparse.c (sparse_skip_file,pax_dump_header_1)
475 (pax_decode_header): Keep track of the number of bytes
477 * configure.ac: Version 1.16.2
480 2007-01-04 Sergey Poznyakoff <gray@gnu.org.ua>
482 * src/compare.c (diff_dumpdir): Compare directory contents using
483 dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
484 incremental directory table in the inconsistent state and trigger
486 (read_and_process): Process dumpdirs no matter what the archive
488 * src/incremen.c (list_dumpdir): Minor fixes.
490 * src/compare.c (read_and_process): Fix type of "size"
492 2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
494 * tests/T-null.at: Skip the test if genfile is not able to create
495 the filename with an embedded newline.
497 2006-12-12 Paul Eggert <eggert@cs.ucla.edu>
499 Port to Forte Developer 7 C 5.4 and C99.
500 * src/common.h (add_exclude_tag): Add decl; C99 requires this
501 and Forte warns about it.
502 * src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
504 * src/misc.c (get_max_open_files): Rewrite to avoid code that
505 Forte C complains about as being unreachable.
506 * src/xheader.c (mtime_code): Rewrite to avoid Forte error
507 reported by Trond Hasle Amundsen.
509 * src/incremen.c (compare_dirnames): Rewrite to avoid casts.
510 * src/utf8.c (string_ascii_p): Likewise.
511 * src/xheader.c (mtime_coder, volume_size_coder, volume_offset_coder):
514 2006-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
516 * bootstrap: Add paxutils files to dot_ignore.
518 * configure.ac: Raise version number to 1.16.1
519 * bootstrap (slurp): Create .(cvs|git)ignore if not present
520 * po/.cvsignore, m4/.cvsignore: Remove automatically generated
523 2006-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
526 * Makefile.am (distclean-local): Fixed
527 * doc/tar.texi: Update documentation of --exclude-tag
528 * src/create.c (dump_dir0): Move checks for exclude tags to
530 (dump_dir): Move calls to ensure_slash to dump_file0
531 * src/extract.c (extract_file): Call skip_member if open fails.
532 Patch proposed by Jan-Benedict Glaw <jbglaw@lug-owl.de>
533 * tests/truncate.at: Use genfile instead of dd, because on some
534 systems /dev/zero is not available.
536 2006-12-04 Paul Eggert <eggert@cs.ucla.edu>
538 * NEWS: Fix some race conditions with tar -x --same-owner.
539 * src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
540 S_IRWXG | S_IRWXO might be masked out.
541 (set_mode): Set the mode if some bits were masked out originally.
542 (set_stat): Don't chmod before chown, as that might temporarily
543 grant permissions that we don't want to grant. The chmod was
544 there only to work around broken hosts, so add a comment advising
545 users not to use those broken hosts instead.
546 (repair_delayed_set_stat, extract_dir):
547 Remember to mask out current umask before inverting permissions.
548 (extract_dir): If the owner might change, or if the mode has
549 special bits, create the directory 700 at first, but restore it later.
550 (open_output_file): New arg mode; all uses changed.
551 (extract_file, extract_node, extract_fifo): If the owner might
552 change, omit group and other bits at first, but restore them after
555 2006-12-04 Jim Meyering <jim@meyering.net>
557 * doc/tar.texi (Long Options): Remove doubled word.
559 2006-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
561 * src/xheader.c (xheader_read): Remove unused variable
563 * po/POTFILES.in: Remove src/mangle.c
565 * bootstrap: Implement --update-po and .bootstrap
567 * src/create.c (dump_dir0): Implement --exclude-tag option
568 * src/tar.c: Likewise
569 * doc/tar.texi (exclude): Document --exclude-tag
571 2006-11-29 Paul Eggert <eggert@cs.ucla.edu>
573 * NEWS: Remove support for mangled names.
574 * doc/tar.texi (verbose tutorial): Likewise.
575 * src/Makefile.am (tar_SOURCES): Remove mangle.c.
576 * src/common.h (extract_mangle): Remove decl.
577 * src/extract.c (extract_mangle_wrapper): Remove.
578 (prepare_to_extract): Remove support for mangled names.
579 * src/list.c (read_and, print_header): Likewise.
580 * src/mangle.c: Remove.
581 * src/tar.h (GNUTYPE_NAMES): Remove.
583 Port to latest gnulib. There were a lot of changes, so the
584 simplest way to get this up and running was to switch to coreutils
585 bootstrap procedure. I noticed one feature missing after this
586 merge: the ability to update a single .po file. I can add that
588 * README-cvs, bootstrap.conf: New files.
589 * lib/.cvsignore: Remove Makefile.am, printf-parse.c, vasnprintf.c.
590 Add fstatat.c, gnulib.mk, openat-proc.c, same-inode.h, stat_.h,
591 tempname.c, tempname.h, uinttostr.c.
592 * lib/printf-parse.c, lib/vasnprintf.c: New files, from coreutils,
593 to override gnulib, so that we don't need xsize.h.
594 * bootstrap: Replace with coreutils bootstrap, except add support
596 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Remove, as gl_EARLY now
598 (gl_EARLY, gl_INIT): Add.
599 (tar_GNULIB): Remove.
600 * gnulib.modules: Add configmake.
601 * lib/Makefile.tmpl: Remove, replacing with....
602 * lib/Makefile.am: New file.
603 * src/Makefile.am (tar.o): Remove dependency: Automake does this
605 * src/tar.c: Include <configmake.h> and <rmt-command.h>, not
608 2006-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
610 * src/xheader.c (mtime_coder): Treat non-null data as a pointer to
611 struct timespec, overriding st->mtime
612 * src/create.c (start_header): Pass mtime as a call-specific data
615 * tests/truncate.at: Do not use 'k' modifier in dd options.
616 * tests/append02.at: Do not depend on command timing.
618 2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
620 * src/tar.c (enum read_file_list_state.file_list_skip): New value
621 (read_name_from_file): Skip zero-length entries
623 * tests/T-empty.at: New test case
624 * tests/T-null.at: New test case
625 * tests/extrac07.at: New test case
626 * tests/Makefile.am: Add new test cases.
627 * tests/testsuite.at: Add new test cases.
628 * tests/extrac02.at: Add more keywords
629 * tests/extrac04.at: Likewise
630 * tests/extrac06.at: Likewise
631 * tests/shortrec.at: Do not assume tar's default archive is stdout
633 2006-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
635 * src/extract.c, src/xheader.c: Call last_component instead of
636 base_name. The latter returns a malloced string since 2006-03-11.
638 2006-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
640 * NEWS, configure.ac: Version 1.16
641 * Makefile.am (distclean-local): New rule
643 2006-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
645 * src/tar.c: Fix help output formatting. Thanks Benno
648 2006-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
650 * Makefile.am (dist-hook): Create a cpio archive.
653 2006-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
655 * doc/tar.texi (Synopsis): Document tar exit codes.
656 * src/create.c (dump_regular_file,dump_file0): Set exit_status to
657 TAREXIT_DIFFERS if the file being dumped was truncated or
659 * src/tar.c: Do not attempt to close stderr after call to
661 * tests/grow.at: New test case
662 * tests/Makefile.am: New test grow.at
663 * tests/testsuite.at: Likewise
664 * tests/truncate.at (AT_KEYWORDS): Keyword `filechange'
665 Test tar exit status.
667 * src/buffer.c (_open_archive): Make sure stdlis is set to stderr
668 when we are writing archive to stdout (unless --index-file is
669 used). Bug introduced on 2006-07-06.
670 * tests/Makefile.am: New test verbose.at
671 * tests/testsuite.at: Likewise
672 * tests/indexfile.at (AT_KEYWORDS): Add stdout keyword
673 * tests/verbose.at: New test case
675 2006-10-02 Sergey Poznyakoff <gray@gnu.org.ua>
677 * THANKS: Add Joerg Weilbier
678 * src/buffer.c (new_volume): Initialize current_block
679 * src/xheader.c (xheader_string_end): Fix diagnostic message.
680 * tests/multiv05.at: New testcase.
681 * tests/Makefile.am, tests/testsuite.at: Add multiv05.at
683 2006-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
685 * bootstrap: Use ${package} instead of hardcoding package name
686 * doc/tar.texi: Minor fix
687 * src/tar.c (doc0, doc1, initialize_argp_doc): Removed. Rely on
688 the new argp method instead.
690 2006-09-12 Sergey Poznyakoff <gray@gnu.org.ua>
694 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
696 Adjust to latest gnulib.
697 * lib/.cvsignore: Add at-func.c, configmake.h, fchmodat.c,
698 fcntl.h, fcntl_.h, inttypes_.h, lstat.c, lstat.h.
699 * tests/testsuite.at (AT_TAR_MKHIER): Use install-sh -d
700 rather than the no-longer-included mkinstalldirs.
702 2006-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
704 * src/incremen.c (try_purge_directory): Initialize struct st. Fix
705 condition for selecting candidates for removal.
706 * README-alpha: List texinfo among build prerequisites for the CVS
709 * bootstrap (intl_files_to_remove): Do not remove m4/inttypes-h.m4
710 and m4/inttypes-pri.m4
712 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
714 * bootstrap: Set XGETTEXT_OPTIONS to flag our printf-format functions,
715 so that translators are warned about strings that are formats but
716 don't look like formats. This might help prevent core dumps.
717 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
718 Suggested by Eric Blake to avoid problems like
719 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
720 (AM_GNU_GETTEXT_VERSION): Upgrade from 0.12.1 to 0.15. The gettext
721 manual says we should use the version number normally expected of
722 maintainers, neither more nor less.
724 * bootstrap (get_translations):
725 Don't exclude ky.po; it is working again.
727 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
729 * bootstrap (get_translations):
730 Don't exclude ja.po; it is working again.
731 Don't remove all old .po files if we're merely updating one.
732 * po/.cvsignore: Add Makevars.
734 2006-08-07 Paul Eggert <eggert@cs.ucla.edu>
736 * src/tar.c: Work around limitation imposed by gettext 0.15
737 by concatenating strings with "\v" after translation.
738 (doc): Remove, splitting into:
739 (doc0, doc1): New constants.
740 (argp): Don't use doc; just initialize to NULL.
741 (initialize_argp_doc): New function.
742 (decode_options): Use it.
744 * bootstrap: Redo po file retrieval to match Bison's method,
745 since the translation project changed its index format.
746 Don't use --assume-autoconf; it's now replaced
747 by looking in configure.ac.
748 (m4/codeset.m4, m4/intdiv.m4, m4/inttypes-pri.m4, m4/isc-posix.m4):
749 (m4/lcmessage.m4, m4/onceonly_2_57.m4, m4/gettext.m4, m4/glibc21.m4):
750 (m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4):
751 (m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4):
752 Don't rename to ..._gl.m4, as this is no longer needed.
753 (m4/geteext.m4): Patch to remove the need for intl/*.
754 Use autopoint manually, then remove the intl files,
755 then undo changes to gnulib files that autoreconf made,
756 and then run aclocal/autoconf/autoheader/automake.
757 This makes our bootstrap procedure closer to Bison's.
758 (po/Makevars): Generate automatically.
759 * configure.ac (AC_PREREQ): Update from 2.59 to 2.60.
760 (gl_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Remove.
761 * gnulib.modules: Add inttypes, stdint.
762 * lib/.cvsignore: Add close-stream.c, close-stream.h,
764 * po/Makefile: Remove; now automatically generated.
766 * src/incremen.c (read_incr_db_01): Check input strings more
767 carefully. Do not pass arbitrary char values to isspace, as
768 this has undefined behavior. Likewise for assigning arbitrary
769 uintmax_t values to other types.
770 (read_negative_num, read_unsigned_num, read_timespec):
771 New functions, to check input values a bit more carefuly.
772 (read_num): Use read_unsigned_num. New arg MAX_VAL;
774 (read_incr_db_2): Use these new functions.
775 Use a consistent diagnostic for unexpected EOF.
776 (read_directory_file): Do not assign arbitrary uintmax_t value
778 (read_timespec, write_directory_file_entry, write_directory_file):
779 Handle negative time_t values correctly. We don't bother to do
780 this with pre-2 formats, since presumably the time stamps were
783 * src/tar.c (doc): Don't use \v in an argument to gettext;
784 gettext 0.15 rejects this.
786 2006-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
788 * src/tar.c (decode_options): Do not require -L with -M -Hpax.
789 It could be needed in future, but currently it is not.
790 * src/create.c (to_chars_subst): Update comment regarding OLDGNU
791 vs. GNU format differences.
792 (mode_to_chars): Treat OLDGNU_FORMAT same as GNU_FORMAT. Fixes bug
793 reported by TAMUKI Shoichi <tamuki@linet.gr.jp>, which caused
794 equivalent `tar cf ...' and `tar rf ...' commands to produce
797 * tests/append02.at: New test case
798 * tests/Makefile.am, tests/testsuite.at: Add append02.at
800 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
802 * bootstrap: Adjust to today's change to gnulib-tool by invoking
803 it with --assume-autoconf='latest-stable'.
805 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
807 Adjust to recent gnulib changes.
808 * lib/.cvsignore: Remove atexit.c, exit.c, getndelim2.c, getndelim2.h,
809 pathmax.h, paxconvert.c, paxerror.h, xstrdup.c.
810 Add inttypes.h, mktime.c, wcwidth.h, xstrndup.c, xstrndup.h.
811 * src/create.c (start_header): Adjust to API change to mode_adjust.
813 2006-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
815 * THANKS: Add Ralf Wildenhues
818 2006-07-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
820 * doc/dumpdir.texi, doc/snapshot.texi, doc/sparse.texi,
821 doc/tar.texi: Fix some typos.
823 2006-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
825 tar --index-file=FILE --file=- sent the archive to FILE, and
826 the listing to stderr. Bug reported by Marcin Gryszkalis
829 * src/buffer.c (_open_archive): Remove stdlis initialization
830 * src/tar.c (decode_options): Initialize stdlis
831 * tests/indexfile.at: New test case
832 * tests/testsuite.at: Include indexfile.at
833 * tests/Makefile.am (TESTSUITE_AT): Add indexfile.at
835 2006-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
837 * doc/Makefile.am (manual): Fix TEXINPUTS
838 * doc/rendition.texi (FIXME): Do not use deprecated @quote-args.
839 Do not use @allow-recursion. In its current form the macro is not
842 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
844 * bootstrap (update_po): Fix single translation update
846 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
848 * configure.ac (AC_CHECK_FUNCS): Check for getdtablesize
849 * src/common.h (closeopen): New function
850 * src/misc.c (chdir_arg): Use x2nrealloc to reallocate wd.
851 (get_max_open_files,closeopen): New functions
852 (chdir_do): Do not use save_cwd if it was already used more than
853 max_open_files-4 times to avoid running off the file
855 * src/tar.c (main): Call closeopen
856 * doc/tar.texi: Update --directory description
859 2006-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
861 * doc/tar.texi: Update. Add cross-references.
862 * doc/sparse.texi: Add cross-references.
864 2006-06-25 Sergey Poznyakoff <gray@gnu.org.ua>
866 * scripts/xsparse.c: A sample utility to expand sparse files
867 extracted by third-party tars. It is not meant to be installed nor
868 to be included in the distribution. It is here, so that it can be
869 obtained either from CVS or from the tar web site.
870 * doc/Makefile.am (tar_TEXINFOS): Sorted
871 * doc/tar.texi (Other Tars): New node describing how to extract
872 GNU-specific member formats using third-party tars.
873 * src/common.h (sparse_file_p): Remove
874 * src/sparse.c: Likewise
875 * src/create.c: Use ST_IS_SPARSE instead of sparse_file_p (update
877 * src/tar.c: --sparse-version turns on --sparse
879 2006-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
881 * src/buffer.c (print_total_stats): Add default case.
882 * src/common.h (name_init): New prototype.
883 (xheader_string_end): Return bool.
884 * src/extract.c (extract_volhdr): Add missing return
885 * src/incremen.c: Remove not used variables
886 * src/sparse.c (pax_dump_header_0): Return false if
887 xheader_string_end fails (for 0.1 formats).
888 (pax_dump_header): Return meaningful value
889 * src/transform.c (segm_count): Change type to size_t
890 * src/xheader.c (xhdr_tab.decoder): pass keyword as a second
891 argument. All callers changed.
892 (decode_record): Check for numeric overflow
893 (xheader_string_end): Return boolean value. Check for possible
896 2006-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
898 * doc/sparse.texi: New file
899 * doc/Makefile.am (tar_TEXINFOS): Add sparse.texi
900 * doc/intern.texi (Sparse Formats): New node
901 * doc/tar.texi: Update master menu
903 * src/common.h (tar_sparse_major,tar_sparse_minor): New globals.
904 * src/sparse.c: Implement sparse format versioning. Implement new
905 version (1.0) of PAX sparse format.
906 (pax_sparse_member_p): Fix condition
907 (pax_dump_header): A dispatcher function
908 (pax_dump_header_0,pax_dump_header_1): New functions.
910 (oldgnu_dump_header): Minor fix: make sure
911 sparse_header.isextended is set before calling
913 * src/tar.c: New option --sparse-version
914 * src/tar.h (struct tar_stat_info.sparse_major,sparse_minor): New
916 * src/xheader.c: Implement new keywords: GNU.sparse.name,
917 GNU.sparse.major, GNU.sparse.minor, GNU.sparse.realsize
919 * tests/spmpv00.at, tests/spmvp01.at, tests/spmvp10.at: New
922 * tests/Makefile.am: Add spmvp00.at, spmpv01.at, spmpv10.at
923 * tests/shortrec.at: Explicitely give `-f -' to the tar invocation
924 * tests/sparsemvp.at: Rewritten as an include file.
925 (TAR_MVP_TEST): New macro
926 * tests/testsuite.at: Include sparsemvp.at, spmvp00.at,
927 spmvp01.at, spmvp10.at
929 2006-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
931 * doc/tar.texi (Overriding File Metadata): New node
932 Document --mtime option.
933 * src/common.h (set_mtime_option,mtime_option): New globals
934 * src/create.c (start_header): Override mtime if requested
935 * src/tar.c: Implement new option, --mtime, allowing to set
936 modification times for all archive members during creation.
937 (struct tar_args): textual_date_option replaced with a linked list
938 textual_date. All references updated.
939 (get_date_or_file,report_textual_dates): New functions.
940 * configure.ac: Raise version number to 1.15.92
943 2006-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
945 * src/common.h (struct name.explicit): Remove
946 Use variable names in all declarations
947 (name_scan): Remove second argument
948 * src/delete.c: Remove second argument from calls to name_scan
949 * src/update.c: Likewise
950 * src/incremen.c (procdir): Use is_individual_file to check for
951 files explicitely specified in the command line. Fixes bug
952 reported by Dat Head on 19 Jun 2006 (descending into mountpoints
953 with --one-file-system in use)
954 * src/misc.c (maybe_backup_file): Second argument is bool
955 * src/names.c (name_next_elt): Call register_individual_file
956 (namelist_match): Remove third argument
957 (name_match): Change return type to bool
958 (name_scan): Remove second argument
959 * src/sparse.c (pax_dump_header): Store original sparse file name
960 in GNU.sparse.name variable. The name field in the ustar header
961 now contains generated name (%d/GNUSparseFile.%p/%f), so that
962 non-pax-aware tars won't extract the file under the original
964 * src/xheader.c (GNU.sparse.name): New variable for storing sparse
967 2006-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
969 * doc/Makefile.am (check-options): Expand macros before grepping
971 * doc/rendition.texi (FIXME) [!PROOF_FOOTNOTED]: Enclose in a
973 * doc/tar.texi: Define op as codeindex. Use special macros to
975 Consequently prefer @dfn{long options} over @dfn{mnemonic
977 Document --unquote, --no-unquote
978 (Short Option Summary): Build a table of cross-references to the
979 corresponding long options.
980 (Using Multiple Tapes,Multi-Volume Archives): Rewritten
982 * doc/value.texi (xopindex,opsummary): New macros
984 * doc/Makefile.am (check-options): New goal
985 * doc/tar.texi: Update
986 * src/tar.c: Implement --overwrite-dir option (long ago
989 2006-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
991 * doc/tar.texi: Document better the --totals option
993 * src/buffer.c (total_blocks_deleted): New variable
994 (set_start_time): Set volume_start_time and last_stat_time as well
995 (set_volume_start_time): New function
996 (compute_duration): Do not call set_start_time, update
997 last_stat_time instead. Use it in calculation instead of
998 start_time, which is now set only once, upon startup.
999 (print_total_written): Removed.
1000 (print_total_stats): New function for printing byte/speed statistics.
1001 (_open_archive): Detect attempts to update compressed archives.
1002 (_gnu_flush_write): Always update prev_written.
1003 (open_archive): Call set_volume_start_time.
1004 * src/common.h (volume_start_time,last_stat_time): New globals
1005 (print_total_written): Replaced with:
1006 (print_total_stats): New function
1007 * src/delete.c (records_skipped): Remove static qualifier, the
1008 variable is used by print_total_stats in buffer.c
1009 * src/extract.c (check_time): Use volume_start_time when checking
1010 for timestamp plausability.
1011 * src/tar.c: (options, parse_opt): Allow for optional argument to
1012 the --totals option, which specifies a signal upon delivery of which
1013 the statistics must be output.
1014 (main): Call print_total_stats if total_option is set.
1016 2006-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
1018 * src/xheader.c (xheader_set_single_keyword): Fix typo.
1019 (decode_time): Avoid using gotos.
1021 * doc/mastermenu.el: New file
1022 * doc/Makefile.am (master-menu): New goal
1023 * doc/tar.texi: Update master menu
1025 2006-06-10 Sergey Poznyakoff <gray@gnu.org.ua>
1027 * doc/tar.texi: Remove leftover include
1029 2006-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
1031 * doc/Makefile.am (tar_TEXINFOS): Add intern.texi
1032 (EXTRA_DIST): Remove convtexi.pl, add texify.sed
1033 * doc/intern.texi: New file
1034 * doc/convtexi.pl: Remove
1035 * doc/texify.sed: Auxiliary script to convert ../src/tar.h to
1037 * doc/rendition.texi: Fix typo
1038 * doc/tar.texi: Update
1039 * src/tar.h: Fix indentation, introduce end-of-format marker for
1042 * THANKS: Add Jason Armistead
1043 * doc/tar.texi: Update
1045 * src/buffer.c: Implement more flexible checkpoint style
1046 * src/common.h (checkpoint_option): Change type to unsigned
1047 (checkpoint_style): New variable.
1048 * src/tar.c: --checkpoint takes an optional argument specifying
1049 number of records between two successive checkpoints (proposed
1050 by Jason Armistead on 2004-06-22). Optional dot starting the
1051 argument means "print dots instead of textual checkpoints".
1052 (tar_help): New function
1053 * src/transform.c: Minor fixes.
1055 2006-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
1057 * gnulib.modules: Add mkdtemp
1058 * doc/dumpdir.texi: New file
1059 * doc/Makefile.am (tar_TEXINFOS): Add dumpdir.texi
1060 * doc/tar.texi: Document dumpdir format
1061 * src/incremen.c (dumpdir_locate,obstack_code_rename):
1062 (purge_directory): Re-implement renaming. Introduce
1064 (make_tmp_dir_name): Remove
1066 * src/transform.c (set_transform_expr,_transform_name_to_obstack):
1067 Implement NUMBER flag.
1068 (add_char_segment): Fix length assignement
1070 * doc/tar.texi: Update
1072 2006-06-07 Sergey Poznyakoff <gray@gnu.org.ua>
1074 * src/transform.c (transform_name_fp): Run fun even if
1075 _transform_name_to_obstack returns false.
1076 (_transform_name_to_obstack,set_transform_expr): Implement GNU
1077 extension case conversion operations.
1079 * doc/tar.texi (transform): Document the option.
1081 2006-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
1084 * src/common.h (set_transform_expr): New function
1085 * tests/Makefile.am: Add incr04.at
1086 * tests/testsuite.at: Likewise
1087 * tests/incr04.at: New test case
1088 * tests/long01.at: Fix typo in the comment
1089 * tests/multiv04.at: Use genfile --files-from
1091 (Above changes need new genfile.c from paxutils)
1095 * doc/tar.texi: Update
1096 * src/transform.c: New file
1097 * src/Makefile.am (tar_SOURCES): New module transform.c
1098 * src/common.h (transform_name, transform_name_fp): New functions
1099 (show_stored_names_option): Renamed to
1100 show_transformed_names_option. All uses changed
1101 * src/create.c (dump_file0): Transform file name
1102 * src/extract.c (extract_archive): safer_name_suffix and
1103 stripped_prefix_len are now called by decode_header
1104 * src/list.c (print_header): Update displayable name selection.
1105 * src/tar.c: New option --transform
1106 New option --show-transformed-names generalizes
1107 --show-stored-names. The latter is retained as an alias.
1109 2006-05-31 Sergey Poznyakoff <gray@gnu.org.ua>
1111 * src/incremen.c (make_directory): Fix initialization of struct
1114 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
1116 * doc/tar.texi: Document use of globbing patterns.
1117 * src/tar.c (parse_opt): Add comment before --preserve case.
1119 2006-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
1122 * doc/tar.texi: Update
1123 * configure.ac (AM_INIT_AUTOMAKE): Use tar-ustar option. Raise
1124 version requirement to 1.9
1125 * src/common.h (struct name): Refactured
1126 (warn_regex_usage): New variable.
1127 (dump_file): First argument is const char*.
1128 (name_init,name_add): Removed
1129 (name_add_name,name_add_dir): New functions
1130 (name_next): Return const char*.
1131 * src/create.c: (dump_file,dump_file0): First argument is const
1132 char*. All callers updated.
1133 * src/names.c: Rewritten handling of member names in the command
1134 line. Tar no longer attempts to guess globbing patterns, instead
1135 it relies on --wildcard option.
1136 (init_names): Removed.
1137 (struct name_elt): New structure.
1138 (name_array): Change type to struct name_elt. All references updated
1139 (name_add_name,name_add_dir): New functions
1140 (name_next_elt): New function
1141 (name_next): Rewritten using name_next_elt.
1142 (namelist_match): Rewritten pattern matching using
1144 (names_notfound): Warn if globbing patterns were used without
1146 * src/tar.c (options): Move globbing-related options into a
1147 separate group. Set -l as an alias to --check-links, as required
1149 (struct tar_args): New fields
1150 wildcards,matching_flags,include_anchored
1151 (MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS): New macros
1152 (parse_opt): Use x2nrealloc to grow archive_name_array.
1153 Use MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS to create appropriate
1154 fnmatch options, and name_add_name,name_add_dir to handle member
1155 name and -C arguments.
1156 (decode_options): Likewise
1157 (main): Remove call to init_names.
1159 * tests/append.at, tests/append01.at, tests/extrac01.at,
1160 tests/options.at, tests/options02.at, tests/same-order01.at,
1161 tests/same-order02.at: Make AT_SETUP more readable.
1163 2006-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
1165 * src/buffer.c (change_tape_menu): Fix typo (uninitialized
1166 variable) introduced yesterday.
1168 2006-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
1170 * doc/tar.texi: Use @var{file_name} instead of @var{file name}
1171 * src/buffer.c (change_tape_menu): Break the loop after obtaining
1172 new archive name. Check for empty input line.
1174 2006-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
1176 * tests/atlocal.in (XFAILFILE): New variable
1177 * tests/version.at: Create $XFAILFILE on failure
1178 * tests/testsuite.at (AT_TAR_CHECK): Declare expected failure if
1181 2006-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
1184 * src/buffer.c (read_header0): Use read_header_primitive to avoid
1185 clubbering current_tar_info. All callers updated.
1186 * src/common.h (read_header_primitive): New function
1187 * src/extract.c (extract_volhdr): New function
1188 (prepare_to_extract): Use extract_volhdr as extractor for volume
1190 * src/list.c (read_header_primitive): New function
1191 (read_header): Front end for read_header_primitive
1192 * tests/chtype.at: New file
1193 * tests/volsize.at: New file
1194 * tests/Makefile.am (TESTSUITE_AT): Add chtype.at, volsize.at
1195 (check-full): New target.
1196 * tests/atlocal.in (TEST_DATA_URL,STAR_DATA_URL)
1197 (STAR_TESTSCRIPTS): Provide default values.
1198 (tarball_prereq): New function
1199 * tests/testsuite.at (AT_TARBALL_PREREQ): New defun
1200 (AT_STAR_PREREQ): Rewrite using tarball_prereq
1201 Include chtype.at and volsize.at
1202 * tests/volume.at: Add keywords.
1204 * tests/star/gtarfail.at, tests/star/gtarfail2.at,
1205 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
1206 tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at
1207 (AT_STAR_PREREQ): Provide md5 sum.
1209 * lib/.cvsignore: Update
1211 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
1213 * tests/testsuite.at (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New
1216 * tests/extrac04.at, tests/incr03.at, tests/listed02.at,
1217 tests/pipe.at, tests/rename01.at, tests/rename02.at,
1218 tests/rename03.at, tests/same-order01.at: Call
1219 AT_SORT_PREREQ. Remove fd 2 redirection after calls to sort
1220 * ignfail.at: Call AT_UNPRIVILEGED_PREREQ
1222 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
1224 Listed incremental backups: keep more information about
1225 directories. Handle renamed directories more effectively
1226 (initial implementation, more updates to follow).
1227 Source tree before this point is tagged
1228 alpha_1_15_90_incremental_1.
1231 * configure.ac: Raise version number to 1.15.91
1232 * src/common.h (rename_directory,append_incremental_renames): New
1234 * src/extract.c (rename_directory): New function
1235 * src/incremen.c (struct directory.contents, flags): New members
1236 (nfs,found,new): Remove. Replaced by appropriate bitmask values in
1237 `flags' field. All uses updated.
1238 (directory_meta_table): New table.
1239 (hash_directory): Rename to hash_directory_name
1240 (compare_directories): Rename to compare_directory_names
1241 (hash_directory_meta,compare_directory_meta,find_directory_meta):
1243 (compare_dirents): Removed
1244 (note_directory): Get 7th argument: directory contents.
1246 (dumpdir_locate,makedumpdir): New functions
1247 (scan_directory): Rewritten. Use makedumpdir to create a sorted
1248 dumpdir array. This makes the obstack argument unnecessary. Besides,
1249 ALL_CHILDREN flag is set only for new directories.
1250 (procdir): Change return type to struct directory. Return
1251 immediately if the directory was already initialized. Discover
1252 directory renames using directory_meta_table.
1253 (append_incremental_renames): New function.
1254 (read_directory_file, write_directory_file): Use new snapshot file
1256 * src/names.c (collect_and_sort_names): Update dir_contents of the
1257 first non-fake name entry when in listed incremental mode.
1259 * tests/incr03.at: New testcase
1260 * tests/rename01.at: New testcase
1261 * tests/rename02.at: New testcase
1262 * tests/rename03.at: New testcase
1263 * tests/Makefile.am: Add
1264 incr03.at,rename01.at,rename02.at,rename03.at
1265 * tests/testsuite.at: Likewise.
1266 * tests/listed02.at: Update for the new behavior
1267 * tests/multiv04.at (AT_KEYWORDS): Add missing incremental kw.
1269 2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
1271 * src/buffer.c (try_new_volume): Attempt to continue if the name
1272 is apparently truncated in a GNU format volume.
1274 * tests/comprec.at, tests/delete01.at, tests/delete02.at,
1275 tests/delete04.at, tests/delete05.at, tests/extrac05.at,
1276 tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
1277 tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
1278 tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
1279 this enables extra error checking.
1281 * tests/multiv03.at: Attempt to extract a member with truncated
1282 file name from the archive.
1284 * src/buffer.c (_open_archive): Remove unnecessary argument to
1285 check_compressed_archive.
1287 2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
1289 * tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
1290 tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
1291 system does not support sparse files.
1292 * doc/tar.texi (@copying): Remove the reference to not existing
1295 2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
1297 * src/extract.c (extract_dir): Fix toggling existing directory
1298 permissions (Debian bug #361077). Use parts of patch provided by
1299 Ian Jackson <iwj@ubuntu.com>.
1300 * src/compare.c: Minor changes
1301 * src/incremen.c (directory.new): New member
1302 (note_directory,find_directory: Use make_directory to create
1303 struct directory entries
1304 (procdir): Avoid duplicating directories in the incremental
1306 * tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
1307 * tests/testsuite.at: Include extrac06.at
1309 2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
1311 * tests/atlocal.in (PATH): Add build-aux from the source tree,
1314 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
1316 * THANKS: Add Benno Schulenberg
1318 2006-03-13 Jim Meyering <jim@meyering.net>
1320 * tests/listed02.at: Sort the two lines of stderr from the
1321 first `tar -v --listed-incremental'. They would come out
1322 reversed and provoke a test failure on a tmpfs
1325 2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
1327 * doc/tar.texi: Minor fixes.
1328 * src/tar.c (options): Consistently begin help messages with a
1331 2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1333 * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
1335 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
1337 * src/buffer.c (record_buffer_aligned): New var.
1338 (init_buffer): Use it to ensure that the buffer is aligned.
1339 This doesn't result in any measurable performance improvement
1340 on my host (Debian GNU/Linux 3.1 stable, with default block size),
1341 but I assume it does help on some hosts.
1343 * lib/.cvsignore: Sort.
1345 2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
1347 * tests/shortrec.at: Use -f - to read from stdin.
1349 2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
1351 * doc/tar.texi: Fix typo: --to-command instead of --to-program
1353 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
1355 * tests/multiv04.at (split directory members in a MV archive):
1356 Don't use %X in an awk printf format; this doesn't work with
1357 Solaris 10 /usr/bin/awk. Use %x instead.
1359 2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
1361 * src/create.c (split_long_name): Fix maximum length estimation.
1363 * tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
1365 * tests/atlocal.in: Add build-aux to the PATH
1366 * tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
1367 * tests/longv7.at: Reword test title
1368 * tests/lustar01.at: New test
1369 * tests/lustar02.at: New test
1370 * tests/lustar03.at: New test
1371 * tests/testsuite.at (AT_TAR_MKHIER): New macro
1372 (lustar01.at,lustar02.at,lustar03.at): New tests.
1374 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
1376 * bootstrap: Don't claim lib/Makefile.am is generated automatically
1379 Avoid installation glitches on Solaris 8 with Sun C 5.4.
1380 * lib/.cvsignore: Add system-ioctl.h.
1381 * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
1382 * src/buffer.c: Include system-ioctl.h.
1383 * src/compare.c: Likewise.
1384 * src/delete.c: Likewise.
1385 * src/system.c: Include <getline.h>, <setenv.h>.
1386 * src/tar.c: Include <getline.h>.
1388 2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
1390 * src/buffer.c (add_chunk_header): Free st.orig_file_name after
1391 calling finish_header().
1392 (new_volume): Prompt the user for archive name if unable to open
1395 * src/create.c (dump_file0): Restore file_count_links,
1396 accidentally removed on 2005-11-29.
1397 * configure.ac: Raise version number to 1.15.90
1400 2006-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
1402 * src/tar.c (tar_set_quoting_style): Provide second argument to
1403 the format spec: program_invocation_short_name. Reported by Jim
1406 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
1408 * gnulib.modules: Add closeout, exitfial.
1409 * lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
1411 * src/buffer.c: Incluse closeout.h.
1412 (_open_archive): Use freopen rather than fopen, so
1413 that stdlis is always either stdout or stderr. Use
1414 close_stdout_set_file_name to report its name.
1415 * src/tar.c: Include closeout.h and exitfail.h.
1416 (parse_opt, usage): Call close_stdout as appropriate, to check for
1418 (decode_options): Exit with status TAREXIT_FAILURE, not 1.
1419 (main): Set exit_failure, to exit with proper status on memory
1420 allocation failure and the like.
1421 Use close_stdout rather than rolling our own test.
1423 * NEWS: --version now outputs copyright etc., to conform to the
1424 GNU coding standards. Remove --license.
1425 * gnulib.modules: Add version-etc-fsf.
1426 * doc/tar.texi: Document the change.
1427 * lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
1428 * scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
1429 * scripts/backup.in: Remove --license. Change --version to conform
1431 * scripts/restore.in: Likewise.
1432 * scripts/backup.sh.in (license): Output briefer license in the
1433 style of coreutils, for consistency with other changes.
1434 * src/tar.c: Include <version-etc.h>.
1435 (LICENSE_OPTION): Remove.
1436 (options): Remove --license.
1438 (parse_opt): Use version_etc instead of rolling it ourselves.
1440 * tests/version.at (tar --version): Check only the first line of
1443 * ChangeLog, NEWS, src/common.h, src/extract.c, src/incremen.c:
1444 * src/list.c, src/names.c, src/tar.h, src/xheader.c:
1445 Update copyright year to 2006.
1447 2006-02-07 Jim Meyering <jim@meyering.net>
1449 * src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
1451 2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
1453 * src/common.h (get_gnu_dumpdir): Remove prototype
1454 (is_dumpdir): New function
1455 * src/extract.c (prepare_to_extract): Use is_dumpdir member to
1457 * src/incremen.c (get_gnu_dumpdir): Static
1458 (is_dumpdir): New function
1459 (purge_directory): Use is_dumpdir
1460 * src/list.c (list_archive): Use is_dumpdir
1461 Do not wrap skip_member in mv_begin/mv_end, the function itself
1463 (decode_header): Set stat_info->is_dumpdir
1464 (skip_member): Do nothing if skipped is true
1465 * src/tar.h (struct tar_stat_info): New members is_dumpdir and skipped.
1467 2006-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
1469 * src/tar.c (decode_options): Refuse using --delete with
1470 compression options.
1472 2006-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
1475 * configure.ac (DEFAULT_QUOTING_STYLE): New configuration variable
1476 * doc/tar.texi: Initial documentation for --quoting-style,
1477 --quote-chars and --no-quote-chars option.
1478 * src/tar.c: Implement new options --quoting-style, --quote-chars
1479 and --no-quote-chars.
1481 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
1483 * bootstrap: Default to pserver, and switch to cvs.sv.gnu.org,
1484 to accommodate recent changes to the GNU CVS server.
1485 * lib/.cvsignore: Add argp-pin.c, mkdirat.c, openat-priv.h.
1487 2005-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
1489 * src/names.c (name_scan): Take an additional argument requesting
1491 * src/common.h (name_scan): Change prototype.
1492 * src/delete.c, src/incremen.c, src/update.c: Update invocations
1495 2005-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
1497 * src/common.h (struct name): New member `explicit'. Remove unused
1499 * src/incremen.c (procdir): If name_scan() returns something,
1500 check if it was explicitely given in the command line
1501 * src/names.c (addname,add_hierarchy_to_namelist): Initialize
1502 explicit member appropriately.
1504 * src/incremen.c (procdir): If --one-file-system is given and a
1505 directory is found to be on another device, *and* this directory
1506 is explicitely given in the command line, then do not omit it.
1508 2005-12-11 Sergey Poznyakoff <gray@gnu.org.ua>
1511 * doc/tar.texi: Document --delay-directory-restore option.
1512 (Configuring Help Summary): Document usage of ARGP_HELP_FMT
1513 variable to customize help output.
1514 * src/common.h (delay_directory_restore_option): New global.
1515 * src/extract.c (directories_first): Replaced by
1516 delay_directory_restore_option. All uses changed.
1517 * src/tar.c (options,parse_opt): New options
1518 --delay-directory-restore and --no-delay-directory-restore
1520 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
1522 * src/buffer.c (open_archive): Add default case to shut up gcc.
1523 * src/common.h (set_file_atime): Add prototype.
1524 * src/create.c (to_chars_subst): Remove unused variable
1525 Make sure useful result code is returned.
1526 * src/incremen.c (read_directory_file): Fix format string
1527 Thanks Eric Blake for reporting.
1529 2005-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
1531 * doc/tar.texi (Current status): Renamed to 'Changes' and moved to
1533 (Large or Negative Values): Rewritten
1534 * src/common.h (gid_to_chars, major_to_chars, minor_to_chars)
1535 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
1536 (uid_to_chars, uintmax_to_chars): Return bool
1537 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars)
1538 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
1539 (uid_to_chars, uintmax_to_chars): Return bool
1540 (to_chars): Return bool
1541 (start_header): Check return values of convertion routines. Fail
1542 if unable to store data in the header.
1544 2005-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
1546 * doc/tar.texi: Following the discussion with Karl Berry,
1547 discontinue using @value{} substitutions for Texinfo commands.
1548 Properly index all long options. Print a
1549 separate long option index.
1550 * doc/value.texi: Remove @set's
1552 * doc/tar.texi: Update --info-script documentation
1553 Resolve some more FIXMEs.
1554 * scripts/dump-remind.in: Use TAR_VOLUME instead of reading volno
1556 * src/buffer.c (new_volume): Update invocation
1557 (change_tape_menu): New function. Disable '!' command if given
1559 * src/common.h (sys_exec_info_script): Update declaration
1560 (restrict_option): New global
1561 * src/system.c (sys_exec_info_script): The script can supply new
1562 archive name to use by writing it to file descriptor 3.
1563 * src/tar.c (options): Add --restrict option. Use macros for
1565 (license): Print full list of copyright years
1568 2005-12-06 Eric Blake <ebb9@byu.net> (trivial changes)
1570 * configure.ac (DENSITY_LETTER): Fix m4 overquoting.
1571 * .cvsignore: Ignore .bootstrap.
1573 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
1575 * doc/tar.texi: Document --to-command and --info-script
1576 options. Add missing xrefs.
1577 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
1579 * src/common.h (archive_format_string,subcommand_string)
1580 (sys_exec_info_script): New prototypes.
1581 * src/system.c (sys_exec_info_script): New function.
1582 * src/tar.c (archive_format_string): Remove static qualifier.
1583 (subcommand_string): New function.
1585 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
1587 * src/extract.c: Fix restoring of directory timestamps from
1588 incremental archives.
1589 (directories_first): New variable.
1590 (prepare_to_extract): Set directories_first
1591 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
1592 if not extracting from an incremental archive
1593 (extract_dir): Obtain root_device here, to make sure it works
1596 * src/incremen.c (purge_directory): Skip the member and return if
1597 the archive is not in incremental format.
1598 * tests/incr02.at: New testcase
1599 * tests/Makefile.am: Add incr02.at
1600 * tests/testsuite.at: Likewise
1602 * THANKS: Add Guerkan Karaman.
1605 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
1607 * doc/tar.texi (Option Summary): Rewrite the
1608 --atime-preserve=system description in response to Ian Turner's
1611 2005-11-30 Ian Turner <ian@zmanda.com>
1613 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
1616 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
1618 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
1619 * THANKS: Add Ian Turner.
1621 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
1622 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
1623 * doc/tar.texi: Change "modification time" to "data modification
1624 time", "change time" to "status change time", and "filesystem" to
1625 "file system", so that we use terminology consistent with POSIX.
1626 Use American spacing rather than French for sentence ends.
1627 "non-dependable" -> "undependable".
1628 (Option Summary, Attributes): Explain better the pitfalls of the
1629 --atime-preserve option, and suggest read-only mounts,loopback
1630 mounts, and noatime mounts for older systems.
1631 * doc/value.texi (op-atime-preserve-system): Renamed from
1632 op-atime-preserver-system to fix a misspelling.
1633 * src/common.h (enum atime_preserve): Use lower case for enum values.
1634 * src/compare.c: Don't include utimens.h; no longer needed.
1635 (diff_file): Use set_file_atime rather than utimens; avoid closing
1636 diff_handle until after this, so that we can set the file time stamp
1637 via the file descriptor rather than via its name.
1638 * src/create.c: Don't include utimens.h; no longer needed.
1639 (dump_regular_finish): Remove. All callers now do its work inline.
1640 (dump_dir): New arg FD. All callers changed.
1641 Use fdsavedir rather than savedir.
1642 (unknown_file_error): Arg is a const pointer now.
1643 (dump_file0): 2nd arg is a const pointer now.
1644 Treat directories more like files, with respect to --atime-preserve.
1645 For example, also warn if a directory changes while we are dumping it.
1646 Prefer file descriptors to file names when retrieving/setting file
1647 attributes; this saves path-resolution time and allows us to avoid
1648 changing mtime/ctime on Solaris when restoring atime as root.
1649 Use O_DIRECTORY when opening directories, to avoid some race conditions.
1650 Do not reset atime if mtime has changed. Report an error if
1651 we cannot reset atime.
1653 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
1654 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
1656 2005-11-29 Ian Turner <ian@zmanda.com>
1658 First cut at adding support for --atime-preserve=system.
1659 * doc/tar.texi (Option Summary): First cut at documenting it.
1660 All other uses of --atime-preserve changed to --atime-preserve=replace.
1661 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
1663 (op-atime-preserve): Mention METHOD.
1664 * src/common.h (atime_preserve): New enum.
1665 (atime_preserve_option): Now of the enum type rather than bool.
1667 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
1668 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
1670 * src/tar.c (usage): Mention new usage.
1671 (parse_opt): Parse new usage.
1673 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
1675 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
1676 stable), and consistently use tabs rather than spaces.
1678 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
1680 * src/xheader.c: Remove parts of code prematurely introduced
1681 yesterday. Thanks Eric Blake.
1683 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
1685 * src/xheader.c (xheader_format_name): Fix memory leak.
1687 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
1689 * gnulib.modules: Add rpmatch
1690 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
1691 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
1692 * po/POTFILES.in: Add rpmatch.c
1693 * src/tar.c (confirm): Rewritten using rpmatch.
1694 (decode_options): Minor optimizations
1695 (main): Call stdopen() to ensure the first three descriptors are
1698 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
1699 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
1700 tests/star/multi-fail.at: Close stdin so that if something fails
1701 causing tar to ask for the next volume, it won't hang the
1704 * src/buffer.c (flush_write,flush_read): Change data type.
1705 (flush_archive): Compute actual buffer fill level before calling
1707 (close_archive): Call flush_archive again if the first call
1708 resulted in partially filled buffer.
1709 (try_new_volume): Rewritten handling of initial headers.
1710 (add_chunk_header): New function. Write an additional header
1711 before the continuation chunk. The purpose of the header is to
1712 allow third-party tars to extract the member.
1713 (simple_flush_write): Take an argument.
1714 (_gnu_flush_write): Correctly handle partially filled buffers.
1715 * src/common.h (flush_read,flush_write): Functions, again.
1716 (write_extended): Changed declaration
1717 (xheader_format_name): New declaration
1718 * src/create.c (write_extended): Change type and meaning of
1719 the first argument. All callers updated
1720 * src/xheader.c (xheader_format_name): Remove static
1721 qualifier. Change last argument.
1722 Correct buffer size calculation (allocated too much space).
1723 (xheader_write): Increase global_header_count here ...
1724 (xheader_write_global): ... instead of here
1726 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
1727 * tests/multiv01.at: Update
1728 * tests/multiv02.at: Update
1729 * tests/multiv03.at: Update
1730 * tests/sparsemvp.at: Update
1731 * tests/star/multi-fail.at: Update
1733 * scripts/tarcat: Handle archives in pax format. Improve handling
1734 of traditional archives.
1735 * doc/tar.texi (Tarcat): New node
1737 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
1739 Fix splitting of sparse files between the volumes.
1741 * src/buffer.c (try_new_volume): Bugfix. Always check
1742 continued_file_name. If it is absent, the volume is out
1744 (add_multi_volume_header): Create GNU.volume.filename keyword in
1745 the extended header.
1746 * src/sparse.c (sparse_dump_region): Call mv_size_left.
1747 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
1748 * src/system.c: Do not pad compressed output if it goes to
1750 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
1752 * tests/sparsemv.at: New testcase
1753 * tests/sparsemvp.at: New testcase
1754 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
1755 * tests/testsuite.at: Likewise.
1757 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
1759 * src/buffer.c: Rewritten in a more modular fashion to provide
1760 GNU extensions (multi-volume archives and archive labels) in
1762 NOTICE, that some of the aspects (e.g. splitting the archive
1763 on the extended header boundary) are still not solved, others
1764 (splitting a sparse file between the volume) require additional
1765 testing. Wait for the next commit.
1767 (volume_label,continued_file_name,continued_file_size)
1768 (continued_file_offset): New globals.
1769 (save_name,save_totsize,save_sizeleft): Make static
1770 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
1771 (open_archive,flush_write,flush_read): Rewritten
1773 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
1775 (volume_label,continued_file_name,continued_file_size): New
1777 (flush_read,flush_write): Pointers to functions
1778 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
1779 (write_extended): New function.
1781 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
1782 src/list.c: Use mv_.* functions uniformly instead of fiddling
1783 with the global variables.
1784 * src/sparse.c: Use mv_.* functions where necessary.
1785 * src/tar.c (decode_options): Allow to use --multi-volume and
1786 --label with pax archives.
1787 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
1789 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
1790 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
1791 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
1792 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
1793 tests/listed01.at, tests/listed02.at, tests/long01.at,
1794 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
1795 tests/multiv03.at, tests/multiv04.at, tests/options.at,
1796 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
1797 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
1798 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
1799 of related tests in groups.
1801 * doc/tar.texi: Update
1803 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
1805 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
1806 not void *, to avoid create.c warning from GCC "passing argument 3
1807 of 'xheader_store' discards qualifiers from pointer target type".
1808 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
1809 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
1810 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
1811 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
1812 (xheader_store): Likewise.
1813 * src/common.h (xheader_store): Likewise.
1815 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
1816 and Paul Eggert <eggert@cs.ucla.edu>
1818 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
1819 (tar_timespec_cmp): New function. Wrapper over
1820 timespec_cmp using the timespec precision provided by the
1821 current archive format.
1822 * src/common.h (tar_timespec_cmp): New declaration.
1823 * src/compare.c (diff_file): Use tar_timespec_cmp.
1824 * src/extract.c (file_newer_p): Likewise.
1825 * src/update.c (update_archive): Likewise.
1826 * tests/truncate.at: Reverted changes
1827 * tests/update.at: Reverted changes
1829 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
1831 Support for incremental formats in pax archives.
1832 Fixed POSIX compatibility of `sparse' extended header keywords.
1834 * src/common.h (dumpdir_size,get_gnu_dumpdir)
1835 (xheader_string_begin,xheader_string_add)
1836 (xheader_string_end): New functions.
1837 * src/create.c (dump_dir0): Handle incremental backups in pax
1839 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
1840 (purge_directory): Use stat_info.dumpdir instead of getting its
1842 * src/list.c (list_archive): Handle incremental backups in pax
1844 (decode_header): Initialize stat_info.dumpdir
1845 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
1846 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
1847 variable has been explicitely deleted, use GNU.sparse.offset/
1848 GNU.sparse.numbytes variables.
1849 * src/tar.c (decode_options): Incremental options are allowed with
1851 (tar_stat_destroy): Free dumpdir
1852 * src/tar.h (struct tar_stat_info.dumpdir): New member.
1853 * src/xheader.c (xheader_keyword_deleted_p): Remove static
1855 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
1856 values to contain embedded nulls, so take an extra argument
1857 specifying the length of the string.
1858 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
1859 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
1860 (path_decoder,size_decoder,uid_decoder,uname_decoder)
1861 (sparse_size_decoder,sparse_numblocks_decoder)
1862 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
1863 (decode_record): Pass value length to the handler
1864 (run_override_list): Pass value length to the decoder
1865 (xheader_print_n): New function
1866 (xheader_print): Rewritten using xheader_print_n
1867 (xheader_finish): Do not rely om strlen to compute the length of
1868 the collected string: it can contain embedded nulls
1869 (xheader_string_begin,xheader_string_add,xheader_string_end): New
1871 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
1872 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
1873 (xhdr_tab): Add new variables.
1875 * tests/incr01.at: Test gnu, oldgnu, and posix formats
1876 * tests/incremental.at: Likewise
1878 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
1880 * NEWS: Minor language and white space fixes.
1882 * tests/truncate.at: Create files whose time stamps must fall on
1883 1-second boundaries. This prevents tests from failing on hosts
1884 like Solaris 8 that have nanosecond-resolution file time stamps.
1885 * tests/update.at: Likewise.
1887 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
1890 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
1892 * doc/tar.texi: Properly document incremental dumps
1893 * doc/value.texi: Likewise.
1894 * doc/snapshot.texi: Likewise.
1896 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
1898 Improve listed incremental format:
1900 * src/common.h (update_parent_directory): New prototype.
1901 * src/create.c (dump_file): Call update_parent_directory.
1902 * src/incremen.c (struct directory.mtime): New member.
1903 (note_directory): Take additional arguments. All callers updated.
1904 (scan_directory): Updated to use more metadata. In particular,
1905 this allows to correctly detect renamed files.
1906 (read_directory_file,write_directory_file)
1907 (write_directory_file_entry): Support new directory file format.
1908 * tests/listed01.at: Sleep 1 sec before creating second file.
1909 * tests/listed02.at: Never skip the test. It should work on any
1912 * doc/snapshot.texi: New file
1913 * doc/tar.texi: Update.
1914 * doc/Makefile.am: Update.
1916 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
1918 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
1919 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
1921 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
1923 * bootstrap: Fix quoting in help output.
1924 (update_po): Use backward-compatible wget option --cache instead
1925 of deprecated -C to accomodate for wget 1.10.
1926 Changes proposed by Eric Blake
1927 * THANKS: Add Eric Blake
1929 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
1931 * doc/tar.texi: Consistently put two spaces after sentences,
1932 and put commas after "i.e." and "e.g.". This is the usual GNU
1935 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
1936 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
1939 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
1941 * src/compare.c (diff_dumpdir): Pass a valid device number to
1942 get_directory_contents.
1944 * THANKS: Add John Thomas McDole
1946 * bootstrap: If file `.bootstrap' exists in the cwd and is
1947 readable, prepend its contents to the command line
1949 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
1951 * tests/link01.at: Skip test if ln fails (suppose the OS does
1952 not support hard links).
1954 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
1956 * src/tar.c (decode_options): Report error if -A or -r is used
1957 together with compression option.
1959 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
1961 * doc/tar.texi: Use @option and @kbd consistently.
1962 Document new options.
1964 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
1967 * src/common.h (show_stored_names_option): New variable
1968 * src/list.c (print_header): If show_stored_names_option is given,
1969 list member names as stored in the archive. Patch proposed by Erik
1970 Cumps <erik.cumps@icos.be>
1971 * src/tar.c: Implement --show-stored-names option
1973 * src/common.h (test_label_option): New variable;
1974 * src/list.c (print_header): Special handling if test_label_option
1976 * src/names.c (all_names_found): If test_label_option is set
1978 * src/tar.c: New option --test-label tests the archive volume
1979 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
1981 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1983 * tests/Makefile.am (clean-local): Don't attempt to run
1984 $(TESTSUITE) if it doesn't exist. Problem reported by
1987 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1989 Don't filter time stamps through the resolution supported
1990 by struct stat; keep them to full nanosecond resolution.
1991 This affects behavior only on older hosts or file systems
1992 that have lower-resolution time stamps.
1993 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
1994 (OLDER_TAR_STAT_TIME): New macro.
1995 (code_timespec): New function.
1996 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
1997 * src/compare.c (diff_file): Use full time stamp resolution.
1998 * src/create.c (start_header, dump_file0): Likewise.
1999 (start_header, dump_file0): Adjust to new structure layout.
2000 (dump_regular_finish): Simplify by using timespec_cmp.
2001 * src/extract.c (struct delayed_set_stat): Don't store stat info
2002 that we don't need, to save space. All uses changed.
2003 (struct delayed_set_stat, struct delayed_link, file_newer_p):
2004 (create_placeholder_file, extract_link, apply_delayed_links):
2005 Use full time stamp resolution.
2006 (check_time): Use code_timespec rather than rolling our own code.
2007 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
2008 avoid losing time information. All callers changed.
2009 * src/list.c (read_and, decode_header, print_heaeder):
2010 Use full time stamp resolution.
2011 * src/misc.c (code_timespec): New function.
2012 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
2013 separately, for benefit of hosts with lower resolution.
2014 * src/update.c (update_archive): Use full time stamp resolution.
2015 * src/xheader.c (code_time): Use new code_timespec function
2017 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
2018 (mtime_coder, mtime_decoder): Use full time stamp resolution.
2020 Report time stamps to full resolution in environment.
2021 Report memory allocation failures rather than ignoring them.
2022 * src/system.c (time_to_env): New function.
2023 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
2024 (stat_to_env): Report full resolution in time stamps.
2026 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2028 Merge changes from gnulib for file system sub-second time stamps.
2029 * configure.ac: Remove checks for struct stat.st_spare1, struct
2030 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
2031 stat.st_atimensec, as gnulib now does this for us.
2032 Similarly for LIB_CLOCK_GETTIME.
2033 * gnulib.modules: Add stat-time.
2034 * lib/.cvsignore: Add stat-time.h.
2035 * src/common.h: Include stat-time.h.
2036 (timespec_lt): Remove. All callers changed to use timespec_cmp.
2037 (get_stat_atime, get_stat_ctime, get_stat_mtime):
2038 (set_stat_atime, set_stat_ctime, set_stat_mtime):
2039 Remove; now defined by stat-time.h.
2041 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
2043 * src/incremen.c (list_dumpdir): New function. Used to dump
2044 contents of GNUTYPE_DUMPDIR blocks.
2045 * src/common.h (list_dumpdir): Likewise.
2046 * src/list.c (list_archive): Use list_dumpdir() to display
2047 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
2050 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
2052 * lib/.cvsignore: Adjust to current gnulib and modules used.
2053 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
2054 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
2055 strnlen1.h, unistd--.h.
2056 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
2058 Treat fishy-looking hard links like fishy-looking symlinks.
2059 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
2060 member to after_links. All uses changed.
2061 (struct delayed_link): Renamed from struct delayed_symlink.
2062 All uses changed. New member is_symlink.
2063 (delayed_link_head): Renamed from delayed_symlink_head. All uses
2065 (create_placeholder_file): New function, taken from extract_symlink.
2066 (extract_link): Create placeholders for fishy-looking hard links.
2067 (extract_symlink): Move code into create_placeholder_file.
2068 (apply_delayed_links): Renamed from apply_delayed_symlinks.
2069 All uses changed. Create both hard links and symlinks.
2071 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
2073 * README-alpha: Modernize description of software required for
2076 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
2078 * gnulib.modules: Add strdup
2079 * src/incremen.c (purge_directory): Do not dereference symbolic
2080 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
2081 David Brown <davidb@davidb.org>
2082 * tests/incr01.at: New test.
2083 * tests/Makefile.am: Add incr01.at
2084 * tests/testsuite.at: Likewise
2087 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
2089 * src/incremen.c (read_directory_file): Use strtoumax to read
2090 snapshot file contents.
2091 (write_directory_file_entry): Use umaxtostr().
2093 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
2095 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
2096 sparse files to /dev/null with --totals option.
2097 * tests/update.at: Remove dependency on file order.
2099 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2101 * doc/tar.texi: Fix typo.
2103 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2105 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
2107 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2109 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
2110 sparse_select_optab(). All callers updated.
2111 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
2113 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2115 * src/sparse.c (pax_sparse_member_p): Checking member size
2116 vs. file size is not reliable enough. Use sparse_map_avail.
2118 * tests/star/gtarfail.at: Adapt to the new output format
2119 * tests/star/gtarfail2.at: Likewise
2120 * tests/star/multi-fail.at: Likewise
2121 * tests/star/pax-big-10g.at: Likewise
2122 * tests/star/ustar-big-2g.at: Likewise
2123 * tests/star/ustar-big-8g.at: Likewise
2125 * tests/sparse03.at: New test.
2126 * tests/Makefile.am: Add sparse03.at
2127 * tests/testsuite.at: Likewise
2129 * src/xheader.c (size_decoder): Do not set archive_file_size.
2131 Fix bugs introduced yesterday:
2133 * src/sparse.c (tar_sparse_init): Initialize
2135 (sparse_scan_file): Initialize archive_file_size to 0. The
2136 variable keeps size of the file *as stored in the archive*, not
2137 the size reported by stat.
2139 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
2141 A sweep of the sparse code prompted by a bug report by Jim Meyering.
2142 * src/sparse.c: Include <inttostr.h>.
2143 (struct tar_sparse_file): offset and dumped_size are off_t, not
2144 size_t. optab is now const *.
2145 (dump_zeros): Return bool success flag, not off_t.
2146 All callers changed.
2147 Use a constant-zero buffer rather than clearing a buffer each time.
2148 Don't mess up if write fails.
2149 (dump_zeros, check_sparse_region):
2150 Don't assume off_t is no wider than size_t.
2151 (tar_sparse_init): Don't bother clearing a field that is already clear.
2152 (zero_block_p): First arg is const *, not *.
2153 (clear_block, SPARSES_INIT_COUNT): Remove.
2154 (sparse_add_map): First arg is now struct start_stat_info *, not
2155 struct tar_sparse_file *. All callers changed.
2156 Use x2nrealloc to check for size_t overflow.
2157 (parse_scan_file): Cache commonly-used parts of file.
2158 Use an auto buffer, not a static one.
2159 Don't bother clearing the buffer; not needed.
2160 Don't bother clearing items that are already clear.
2161 (oldgnu_optab, star_optab, pax_optab): Now const.
2162 (sparse_dump_region): Don't bother clearing the buffer before
2163 reading into it; just clear the parts that aren't read into.
2164 (sparse_dump_file): Clear the whole local variable 'file'.
2165 (diff_buffer): Remove; now a local var.
2166 (check_sparse_region): Don't bother clearing buffer before
2167 reading into it. Don't assume off_t is promoted to long.
2168 (oldgnu_get_sparse_info, star_get_sparse_info):
2169 Use an auto status, not static.
2170 * src/tar.h (struct tar_stat_info): had_trailing_slash is
2172 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
2173 Rewrite to avoid cast.
2174 (sparse_offset_decoder, sparse_numbytes_decoder):
2175 Diagnose excess entries rather than crashing.
2177 2005-06-22 Jim Meyering <jim@meyering.net>
2179 * src/common.h (timespec_lt): Add a return type: bool.
2181 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
2183 Further improvements inspired by Jim Meyering's fixes.
2185 * NEWS: Better support for full-resolution time stamps.
2186 The -v option now prints time stamps only to 1-minute resolution.
2187 * gnulib.modules: Add utimens.
2188 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
2189 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
2190 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
2191 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
2192 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
2194 * src/buffer.c (set_start_time, compute_duration, start_time):
2195 Use gettime rather than rolling our own code.
2196 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
2197 (newer_ctime_option): Remove.
2198 (timespec_lt): New function.
2199 (OLDER_STAT_TIME): Use it.
2200 (string_to_chars): First arg is char const *, not char *.
2201 (tartime): Time arg is now struct timespec. New bool arg.
2202 All callers changed.
2203 (code_ns_fraction): New decl.
2204 (sys_stat_nanoseconds): Remove decl.
2205 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
2206 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
2207 * src/compare.c: Include utimens.h rather than rolling our own.
2208 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
2210 (diff_dumpdir, diff_multivol): Prototype.
2211 (diff_file): Support higher-resolution time stamps.
2212 * src/create.c: Include utimens.h rather than rolling our own.
2213 (MAX_OCTAL_VAL): New macro.
2214 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
2215 the destination is already zeroed.
2216 (string_to_chars): First arg is char const *.
2217 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
2218 for minor device number.
2219 (write_header_name, dump_hard_link, dump_file0):
2220 Simplify test for old GNU format.
2221 (start_header): Put in placeholders for uid, etc., even when
2222 using extended headers, for benefit of older "tar" implementations.
2223 Don't assume uintmax_t is wider than 32 bits.
2224 Output extended header for mtime if needed.
2225 (dump_regular_finish, dump_file0):
2226 Support extended time stamp resolution.
2227 * src/extract.c: Include utimens.h rather than rolling our own.
2228 (check_time): Support extended time stamp resolution.
2229 * src/list.c: Include <inttostr.h>.
2230 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
2231 * src/xheader.c: Include <inttostr.h>.
2232 Do not include <xstrtol.h>.
2233 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
2234 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
2235 (BILLION, LOG10_BILLION): New constants.
2236 (to_decimal): Remove; superseded by inttostr. All callers changed
2238 (xheader_format_name): Don't assume pids and uintmax_t values
2239 fit in 63 bytes (!) when printed.
2240 (decode_record): Don't bother to check for ERANGE; an out of range
2241 value must be treater than len_max anyway.
2242 If the length is out of range, output it in the diagnostic.
2243 (format_uintmax): Remove; all callers changed to use umaxtostr.
2244 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
2245 (out_of_range_header): New function.
2246 (decode_time): Use it.
2247 (code_time): Accept struct timespec, not time_t and unsigned long.
2248 All callers changed. Size sbuf properly, and remove unnecessary check.
2249 Don't assume time stamps can fit in 199 bytes.
2250 Handle negative time stamps. Handle fractional time stamps
2251 more consistently. Don't output unnecessary trailing zeros.
2252 (decode_time): Yield struct timespec, not time_t and unsigned long.
2253 All callers changed.
2254 Handle negative time stamps. Truncate towards minus infinity
2255 consistently. Improve overflow checks, and output a better
2256 diagnostic on overflow.
2257 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
2258 (decode_num): New function, for better diagnostics.
2259 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
2260 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
2261 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
2262 (sparse_offset_decoder, sparse_numbytes_decoder):
2263 Use decode_num, etc., instead of xstrtoumax, etc.
2265 2005-06-21 Jim Meyering <jim@meyering.net>
2267 Carefully crafted invalid headers can cause buffer overrun.
2268 Invalid header fields go undiagnosed.
2269 Some valid time strings are ignored.
2271 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
2272 of `calloc'. Use xcalloc instead.
2273 (decode_time, gid_decoder, size_decoder, uid_decoder):
2274 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
2275 Ensure that the result of calling xstrtoumax is no larger than
2276 the maximum value for the target type. Upon any failure, exit with
2278 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
2279 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
2280 (decode_time): Rewrite to accept time strings like
2281 1119018481.000000000. Before, such strings were always ignored.
2283 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2285 * src/create.c (dump_file0): Check for is_avoided_name()
2286 first. Fixes bug reported by Martin Lohmeier
2287 <martin@mein-horde.de>
2288 * tests/update.at: New file
2289 * tests/Makefile.am (TESTSUITE_AT): Add update.at
2290 * tests/testsuite.at: Likewise
2292 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2294 * configure.ac (AC_STRUCT_ST_BLKSIZE)
2295 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
2297 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
2299 * src/names.c (excluded_name): excluded_filename ->
2300 excluded_file_name, because the name was changed in gnulib.
2302 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2304 * src/tar.c (read_name_from_file,update_argv): Automatically
2305 detect nul-terminated list files.
2308 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2310 * scripts/backup.sh.in: Bugfixes.
2312 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2314 * scripts/backup.in: Minor fixes
2315 * scripts/backup.sh.in (mt_begin,mt_rewind)
2316 (mt_offline,mt_status): Use $MT to invoke mt
2317 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
2319 * doc/tar.texi: Document new backup scripts behavior
2321 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2323 * lib/.cvsignore: Updated
2324 * lib/Makefile.tmpl: Add new paxutils files
2325 * po/POTFILES.in: Likewise
2326 * src/buffer.c: Update invocations of safer_name_suffix()
2327 * src/create.c: Likewise
2328 * src/extract.c: Likewise
2329 * src/xheader.c: Likewise
2330 * src/common.h: Include paxlib.h instead of paxerror.h
2331 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
2332 imported from paxutils
2333 * src/names.c (hash_string_hasher,hash_string_compare)
2334 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
2335 (safer_name_suffix): Moved to paxutils
2337 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2339 * bootstrap (copy_files): Accept optional third argument: a prefix
2340 to be appended to destination file names.
2341 Import paxutils/paxlib files.
2342 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
2344 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
2346 * po/POTFILES.in: Likewise.
2347 * src/common.h: Remove defines and declarations imported from
2349 * src/misc.c: Likewise
2350 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
2352 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
2354 * src/misc.c (remove_any_file): Fix typo in previous change.
2356 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
2358 Port to Solaris 10's treatment of unlinking directories.
2359 * gnulib-modules: Add unlinkdir.
2360 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
2361 * src/common.h (we_are_root): Remove extern decl; it's now static.
2362 * src/extract.c (we_are_root): Now static.
2363 * src/misc.c: Include <unlinkdir.h>.
2364 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
2366 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
2367 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
2368 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
2369 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
2370 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
2371 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
2372 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
2373 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
2374 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
2375 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
2376 src/xheader.c, tests/Makefile.am, tests/append.at,
2377 tests/append01.at, tests/comprec.at, tests/delete01.at,
2378 tests/delete02.at, tests/delete03.at, tests/delete04.at,
2379 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
2380 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
2381 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
2382 tests/link01.at, tests/listed01.at, tests/listed02.at,
2383 tests/long01.at, tests/longv7.at, tests/multiv01.at,
2384 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
2385 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
2386 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
2387 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
2388 tests/testsuite.at, tests/truncate.at, tests/version.at,
2389 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
2390 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
2391 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
2392 tests/star/ustar-big-8g.at:
2393 Update FSF postal mail address.
2395 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2399 * bootstrap: Install files from paxutils/doc
2400 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
2401 * doc/tar.texi (Genfile): New appendix
2402 * src/compare.c (diff_file): diff_handle was not initialized
2403 * src/create.c (dump_regular_file): Correctly pad archive members
2404 that shrunk during archiving. Repored by Frank Heckenbach.
2405 * src/extract.c (file_newer_p): Return false if file does not
2407 (prepare_to_extract): Correct warning wording.
2408 * tests/truncate.at: New test case
2409 * tests/Makefile.am: Add truncate.at
2410 * tests/testsuite.at: Likewise.
2412 * doc/.cvsignore: Updated
2413 * lib/.cvsignore: Updated
2414 * tests/.cvsignore: Updated
2416 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
2418 * tests/multivol04.at: Tell awk to read from /dev/null.
2420 Adjust to recent gnulib changes.
2421 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
2422 * src/common.h (initial_umask): New var.
2423 * src/create.c (start_ueader): Use it, and adjust to new modechange
2425 (hash_link): unsigned -> size_t parameters and result.
2426 * src/incremen.c (hash_directory): Likewise.
2427 * src/names.c (hash_string_hasher): Likewise.
2428 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
2430 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2432 * tests/Makefile.am: Add shortrec.at.
2434 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
2436 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
2437 (short_read): Don't warn about short reads; they're normal.
2438 * tests/shortrec.at: New file.
2439 * tests/testsuite.at: Include it.
2441 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
2442 it is sometimes left behind as a garbage file (maybe due to the
2445 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2447 * src/list.c: Handle Solaris 'X' type flag
2448 * src/tar.h (SOLARIS_XHDTYPE): New define
2450 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
2452 * src/tar.c: Minor fixes to text messages. Proposed by Benno
2454 * src/extract.c: Likewise
2455 (extract_file): Assign orig_file_name
2456 to save_name uniformly over the program. This fixes matching
2457 directory names at the start of an archive volume.
2458 * src/buffer.c (flush_write): Warn when the name of the archive
2459 straddling volume boundary is longer than 100 characters. Earlier
2460 behavior was to issue a fatal error.
2461 (struct zip_magic): Reverted part of changes from 2005-04-04.
2462 They make the maintenance too costly. Removing `unsigned'
2463 qualifier from `magic' member should be enough.
2464 * src/compare.c (diff_init): Read directory file if in listed
2465 incremental. This prevents spurious 'Contents differ' diagnostics.
2466 (diff_archive): Minor fixes to text messages
2467 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
2468 to save_name uniformly over the program. This fixes matching
2469 directory names at the start of an archive volume.
2470 * src/create.c: Assign orig_file_name
2471 to save_name uniformly over the program. This fixes matching
2472 directory names at the start of an archive volume.
2473 * src/list.c: Likewise
2475 * tests/multiv03.at: Modified to match the new behavior
2476 * tests/multiv04.at: New file. Test splittind directory members between
2477 the archive volumes.
2478 * tests/Makefile.am: Add multiv04.at
2479 * tests/testsuite.at: Likewise.
2481 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
2483 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
2484 for reasons discussed in the thread beginning at
2485 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
2486 * .cvsignore: Remove config; add build-aux.
2488 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
2489 The unsigned char * pointer ran afoul of pedantic C compilers, and
2490 we didn't need pointers anyway. Put the size field before the
2491 data to avoid unnecessary padding. All uses changed.
2492 (magic) Make it const, since it doesn't change. All uses changed.
2494 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
2496 * src/xheader.c (decode_record): Don't dump core when given
2497 a corrupted extended header. Problem reported by Jim Meyering.
2498 Also, check for other ways that the header might be invalid,
2499 e.g., missing newline at end. Do not allow keys with nulls.
2500 Allow blanks before and after length, as POSIX requires.
2501 Do not allow leading "-" in length. Check for length overflow.
2502 (xheader_decode, xheader_decode_global): Let decode_record
2503 check for exhaustion of record.
2504 (xheader_read): Null-terminate the extended record;
2505 decode_record relies on this.
2507 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2509 * bootstrap (TP_URL): Change from
2510 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
2511 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
2512 some redirection glitches.
2513 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
2514 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
2515 * lib/.cvsignore: Add intprops.h (new gnulib file).
2517 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2519 * src/list.c (print_header): Print UID/GID in case of
2520 empty user/group name. This could occur when dumping
2521 files belonging to non-existing users and when listing
2523 Reported by Igor Lautar.
2525 * src/create.c: Correctly parse empty uname/gname
2526 * src/sparse.c (sparse_scan_file): Bugfix. offset had
2529 * scripts/backup.in: Use `head -n 1'. Provide missing
2530 argument to ${MT_STATUS}. Proposed by Jan Merka.
2531 * scripts/backup.sh.in: Likewise. Fixed typo in
2532 MT_OFFLINE assignment.
2533 * scripts/restore.in (restore_fs): Use root_fs
2535 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2537 * src/create.c: Replace strdup with xstrdup
2538 * src/names.c: Likewise
2539 * src/tar.c: Likewise
2541 * tests/append01.at: Added reference to bug-tar archive
2542 * tests/listed02.at: Use -print with find.
2544 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2546 * THANKS: Added Tim Adye. Fixed UTF.
2547 * src/list.c (read_header): Removed assignment to
2548 oldgnu_header.isextended. It was breaking append mode.
2550 * tests/append01.at: New test.
2551 * tests/Makefile.am: Added append01.at
2552 * tests/testsuite.at: Likewise
2554 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2556 * gnulib.modules: New file. List of required gnulib
2558 * bootstrap: Merge list of required modules from
2559 paxutils with that from tar proper.
2560 * src/tar.c: Various fixes in help and diagnostic messages.
2562 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2564 * src/common.h (EXTRACT_OVER_PIPE): New macro
2565 * src/compare.c: Code clean up.
2566 * src/extract.c (extract_archive): Do not check for
2567 EXTRACT_OVER_PIPE, decode_options() does this.
2568 * src/misc.c (exec_error,fork_error,dup2_error)
2569 (pipe_error): Removed unneeded functions.
2570 * src/system.c (sys_exec_command): Use xclose, xpipe,
2571 xfork, xdup2 and exec_fatal.
2572 * src/tar.c (options): Improved sorting. Document --backup=off.
2573 (decode_options): Clear backup_option if necessary.
2575 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2577 Initial implementation of --to-command option proposed
2580 * bootstrap: Get setenv module from gnulib
2581 * src/buffer.c: Do not use 8-bit chars in comments
2582 * src/common.h (to_command_option)
2583 (ignore_command_error_option): New globals
2584 (sys_exec_command,sys_wait_command): New commands
2585 * src/extract.c (extract_file): Handle to_command_option
2586 Fix error recovery: decrease `size' by `written', not
2587 by `count', otherwise tar misses the next header
2588 Do not diagnose write error if to_command_option
2589 is set, since the command may have exited prematurely.
2590 It would be better to check for sigpipe, though.
2591 (prepare_to_extract): Handle to_command_option
2592 * src/misc.c (exec_error, fork_error, dup_error)
2593 (pipe_error): New functions
2594 * src/system.c (sys_exec_command)
2595 (sys_wait_command): New functions
2596 * src/tar.c: Handle new options --to-command,
2597 --ignore-command-error
2598 * THANKS: Added Hansjoerg Lipp
2600 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
2602 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
2603 All uses changed. Fix typo that sometimes suppressed all "Archive
2604 contains obsolescent base-64 headers" warnings, not just the first
2606 (tar_checksum): Accept only octal checksums, since they aren't
2607 supposed to overflow into weird formats.
2609 Adjust to gnulib changes.
2610 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
2611 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
2612 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
2613 this file). Sort entries.
2615 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2617 * src/extract.c: Further rewrite.
2618 * src/buffer.c: Removed unused variables.
2619 * src/list.c: Likewise
2620 * src/tar.c (update_argv): Changed type to void
2622 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
2623 * src/create.c (start_private_header,write_header_name)
2624 (dump_hard_link): Restore compatibility with 1.13.25
2625 * src/extract.c (extract_archive): Rewritten
2626 * src/list.c: Add translators' comments
2627 * src/tar.c (options) Minor spelling fix
2628 * tests/star/quicktest.sh: Determine path to the tar executable.
2630 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2632 * po/POTFILES.in: Added tests/genfile.c
2633 * src/buffer.c (short_read): Use ngettext()
2634 (new_volume): use quote().
2635 * src/create.c: Use quote()
2636 * src/extract.c: Likewise
2637 * src/xheader.c: Likewise
2638 * src/misc.c: Add comments to translators
2640 * tests/same-order01.at: sort ls output
2641 * tests/sparse01.at (RE_CHECK): Added missing space
2643 * tests/sparse02.at: Test extracting sparse files over a pipe.
2644 * tests/Makefile.am: Added sparse02.at
2645 * tests/testsuite.at: Likewise
2646 * tests/listed02.at: Skip the test on filesystems that do not
2647 update ctime of a file when renaming it. To be reverted when
2648 the new incremental mode is ready.
2649 * tests/sparse01.at: Extract and compare sparse file
2651 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2653 * src/sparse.c: Extract sparse files even if the output
2656 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2658 * bootstrap: Add a comment to lib/Makefile.am saying that this
2659 is an autogenerated file.
2660 Exit with code 1 if any of autotools fails.
2661 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
2662 * tests/Makefile.am: Add append.at
2664 * m4/.cvsignore: Ignore all *.m4 files
2666 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2668 Rewritten handling of -T (--files-from) option. Now it
2669 inserts the file names immediately into argv array which allows
2671 1) any valid tar options (including another -T) to be used in the file
2672 2) any number of -T options to be given in command line
2674 * configure.ac: Raised version number to 1.15.2
2675 * src/common.h: Include obstack.h
2676 (files_from_option): Removed
2677 (unquote_option): New variable
2678 (stat_fatal): New function
2679 (name_close): Removed function.
2680 * src/incremen.c: Remove inclusion of obstack.h
2681 * src/xheader.c: Likewise.
2682 * src/misc.c (stat_fatal): New function
2683 * src/names.c (name_file): Removed variable.
2684 (read_name_from_file): Removed function. All callers changed.
2685 (name_close): Removed function. All callers changed.
2686 * src/tar.c: New options --unquote (--no-unquote) and
2688 (add_file_id,read_name_from_file,update_argv): New functions
2689 (parse_opt): Rewritten handling of -T option. Handle hidden
2690 --HANG option for debugging purposes.
2691 (decode_options): Init unquote_option to true. Init argv_stk.
2692 Remove unneeded references to files_from_option
2694 * doc/tar.texi: Document new options.
2695 Moved rendition macros and option value definitions into
2697 * doc/rendition.texi: New file
2698 * doc/value.texi: New file
2699 * doc/Makefile.am: Updated
2701 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
2703 * tests/testsuite.at (RE_CHECK): Use "join - file", not
2704 "join file -", to work around a bug in Solaris 8 join.
2705 Problem reported by Tomohiro Suzuki.
2707 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2709 * src/list.c (read_header): Fixed calculation of the
2710 size for GNU long name/link. Tar was reading one block
2711 more if name_size was divisible by 512. Thanks Josef
2713 * tests/long01.at: New file. Test listing of GNU long names
2715 * tests/pipe.at: Sort tar output.
2716 * tests/Makefile.am: Added long01.at
2717 * tests/testsuite.at: Likewise.
2718 * THANKS: Added Josef Bauer
2719 * lib/.cvsignore: Updated
2720 * m4/.cvsignore: Updated
2723 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2725 * directory: Updated for 1.15.1
2726 * doc/Makefile.am: Use gendocs.sh to generate web documentation
2727 * doc/gendocs_template: Template file for gendocs.sh
2728 * doc/tar.texi: Updated docs for --[no-]same-permissions
2729 * src/tar.c: Reworded docstrings for --[no-]same-permissions
2731 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2733 * bootstrap: Create m4/paxutils.m4
2734 * configure.ac: Call tar_PAXUTILS
2735 * tests/options02.at: Test that tar correctly handles non-option
2736 arguments interspersed with options.
2737 * tests/Makefile.am: Add options02.at
2738 * tests/testsuite.at: Likewise
2739 * tests/listed02.at: Do not create useless directory
2741 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2743 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
2744 Mike Frysinger <vapier@gentoo.org> for reporting.
2746 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
2748 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
2749 needless sed command. Problem reported by Paul Jarc.
2751 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
2753 Accommodate latest gnulib.
2754 * doc/.cvsignore: Add getdate.texi.
2755 * bootstrap: Do not treat alloca-opt specially; this is no
2756 longer needed (and breaks builds) with latest gnulib.
2758 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2760 * src/tar.c (main): Reverted recent changes (#ifdef).
2762 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2764 * configure.ac: Raise version number to 1.15.1
2766 * NEWS: Entry for 1.15.1
2767 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
2768 broke extraction from stdin.
2769 * src/list.c (from_header, tar_checksum): Changed declaration.
2770 All callers updated.
2771 * src/common.h: Likewise
2772 * src/tar.c (main): Protect invocation of setlocale by
2775 * tests/comprec.at: New test
2776 * tests/pipe.at: New test
2777 * tests/Makefile.am (comprec.at,pipe.at): New tests
2778 * tests/testsuite.at: Likewise
2779 * tests/gzip.at: Use AT_GZIP_PREREQ
2780 * tests/star/pax-big-10g.at: Likewise
2781 * tests/star/ustar-big-2g.at: Likewise
2782 * tests/star/ustar-big-8g.at: Likewise
2784 * tests/extrac04.at: Discard stderr from sort, on some
2785 systems it spits out lots of irrelevant info.
2786 * tests/listed02.at: Likewise
2788 * doc/index.html.in: Rewritten in xhtml to follow recent
2792 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2794 Released version 1.15. Sources up to this point are
2795 tagged release_1_15.
2797 * configure.ac: Raised version number to 1.15
2799 * directory: Updated
2800 * bootstrap (update_po): Give -r to wget. Always remove index.html
2801 Ignore alloca-opt module (it duplicates alloca)
2803 * tests/Makefile.am: Distribute star/quicktest.sh
2804 * tests/star/README: Document quicktest.sh
2805 * tests/star/qucktest.sh: Removed.
2806 * tests/star/quicktest.sh: New file.
2808 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2811 * doc/tar.texi: Document auto-detection of compressed archive
2813 * src/tar.c (decode_options): Ignore --seek if used with --delete.
2814 Delete.c is based on the assumption that the archive is being
2815 actually read, not lseeked.
2817 * tests/delete05.at: New file
2818 * tests/extrac02.at: Fixed typo in AT_SETUP
2819 * tests/Makefile.am: Added delete05.at
2820 * tests/testsuite.at: Likewise.
2822 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2824 * src/delete.c (delete_archive_members): Bugfix: when
2825 attempting to delete an nonexistent member, the last
2826 blocking_factor blocks were zeroed.
2828 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
2830 * TODO: Mention sub-second resolution, lutimes, lchmod.
2832 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
2834 Adjust to recent gnulib changes.
2835 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
2836 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
2837 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
2838 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
2839 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
2840 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
2842 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
2843 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
2844 pathmax.m4, realloc.m4.
2846 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2848 * configure.ac: Raised version number to 1.14.91
2849 * scripts/tarcat: New file
2850 * scripts/Makefile.am: Added tarcat
2851 * src/buffer.c (hit_eof): Changed type to boolean
2852 (read_full_records,reading_from_pipe): New variables
2853 (check_compressed_archive,open_compressed_archive): New functions
2854 (open_archive): Autodetect compressed archives and act accordingly.
2855 Set reading_from_pipe. This fixes controversial set of changes
2856 introduced 2004-05-11,2004-03-22.
2857 * src/list.c (tar_checksum): New function
2858 (read_header): Use tar_checksum().
2859 * src/common.h (tar_checksum): New function
2861 * tests/star/README: Updated
2865 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2867 * src/tar.c (decode_options): Fixed -o semantics. Thanks
2868 Jean Delvare <khali@linux-fr.org>
2870 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2872 * bootstrap: Add localcharset
2873 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
2874 makefile snippet from localcharset uses '+=' on them.
2875 * src/Makefile.am (LDADD): Add LIBICONV
2876 * src/list.c (decode_header): Set uname/gname to NULL if their
2877 header counterparts are empty
2878 * src/tar.c (options): Use OPTION_NO_TRANS
2879 * src/utf8.c: Use locale_charset() from gnulib
2881 * tests/star/README: Updated
2886 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2888 * THANKS: Added Bryan Ford
2889 * doc/Makefile.am (.text): Fixed rule
2890 * po/POTFILES.in: Added argp-help.c
2892 2004-10-04 Bryan Ford <baford@mit.edu>
2894 * src/tar.c: New option --exclude-caches, to exclude
2895 cache directories automatically on archive creation.
2896 Cache directories are directories containing a
2897 standardized tag file, as specified at:
2898 http://www.brynosaurus.com/cachedir/spec.html
2899 * src/common.h: New variable exclude_caches_option.
2900 * src/create.c: New function check_cache_directory(),
2901 called from dump_dir0() if exclude_caches_option is set,
2902 to check for a cache directory tag and exclude the directory
2903 if such a tag is found.
2904 * doc/tar.texi: Updated accordingly.
2906 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2908 * doc/tar.texi: Minor fix
2909 * src/tar.c (options): Minor fix
2911 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2914 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
2915 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
2916 * src/extract.c: Normalized use of remove_any_file().
2917 * src/misc.c: Likewise.
2918 * src/tar.c (parse_opt): Emit warning if -l option is used.
2919 (show_default_settings): REMOTE_SHELL may be undefined
2921 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2923 Test suite rewritten in autotest.
2925 * configure.ac: Updated for autotest
2926 * src/tar.c (argp_program_version): Modified.
2927 * tests/Makefile.am: Rewritten for autotest.
2929 * tests/.cvsignore: Updated
2930 * tests/append.at: New file
2931 * tests/atlocal.in: New file
2932 * tests/delete01.at: New file
2933 * tests/delete02.at: New file
2934 * tests/delete03.at: New file
2935 * tests/delete04.at: New file
2936 * tests/extrac01.at: New file
2937 * tests/extrac02.at: New file
2938 * tests/extrac03.at: New file
2939 * tests/extrac04.at: New file
2940 * tests/extrac05.at: New file
2941 * tests/gzip.at: New file
2942 * tests/ignfail.at: New file
2943 * tests/incremental.at: New file
2944 * tests/link01.at: New file
2945 * tests/listed01.at: New file
2946 * tests/listed02.at: New file
2947 * tests/longv7.at: New file
2948 * tests/multiv01.at: New file
2949 * tests/multiv02.at: New file
2950 * tests/multiv03.at: New file
2951 * tests/old.at: New file
2952 * tests/options.at: New file
2953 * tests/recurse.at: New file
2954 * tests/same-order01.at: New file
2955 * tests/same-order02.at: New file
2956 * tests/sparse01.at: New file
2957 * tests/testsuite.at: New file
2958 * tests/version.at: New file
2959 * tests/volume.at: New file
2960 * tests/star/gtarfail.at: New file
2961 * tests/star/gtarfail2.at: New file
2962 * tests/star/multi-fail.at: New file
2963 * tests/star/pax-big-10g.at: New file
2964 * tests/star/ustar-big-2g.at: New file
2965 * tests/star/ustar-big-8g.at: New file
2967 * tests/preset.in: Removed
2968 * tests/before: Removed
2969 * tests/after: Removed
2970 * tests/version.sh: Removed.
2971 * tests/append.sh: Removed.
2972 * tests/delete01.sh: Removed.
2973 * tests/delete02.sh: Removed.
2974 * tests/delete03.sh: Removed.
2975 * tests/delete04.sh: Removed.
2976 * tests/extrac01.sh: Removed.
2977 * tests/extrac02.sh: Removed.
2978 * tests/extrac03.sh: Removed.
2979 * tests/extrac04.sh: Removed.
2980 * tests/extrac05.sh: Removed.
2981 * tests/gzip.sh: Removed.
2982 * tests/incremen.sh: Removed.
2983 * tests/ignfail.sh: Removed.
2984 * tests/link01.sh: Removed.
2985 * tests/listed01.sh: Removed.
2986 * tests/listed02.sh: Removed.
2987 * tests/longv7.sh: Removed.
2988 * tests/multiv01.sh: Removed.
2989 * tests/multiv02.sh: Removed.
2990 * tests/multiv03.sh: Removed.
2991 * tests/old.sh: Removed.
2992 * tests/options.sh: Removed.
2993 * tests/same-order01.sh: Removed.
2994 * tests/same-order02.sh: Removed.
2995 * tests/volume.sh: Removed.
2996 * tests/recurse.sh: Removed.
2997 * tests/sparse01.sh: Removed.
2998 * tests/star/gtarfail.sh: Removed.
2999 * tests/star/gtarfail2.sh: Removed.
3000 * tests/star/multi-fail.sh: Removed.
3001 * tests/star/ustar-big-2g.sh: Removed.
3002 * tests/star/ustar-big-8g.sh: Removed.
3003 * tests/star/pax-big-10g.sh: Removed.
3005 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3007 * bootstrap: Install genfile.c from paxutils
3008 * tests/genfile.c: Removed. Integrated into
3010 * tests/mksparse.c: Removed. Integrated into
3011 (paxutils) genfile.c
3012 * tests/Makefile.am: Removed mksparse
3013 * tests/sparse01.sh: Use genfile instead of mksparse
3015 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3017 Started merging with cpio into paxutils. Sources before
3018 this point are tagged alpha-1_14_90
3020 * Makefile.am: Updated for use with paxutils
3021 * README-alpha: Likewise
3022 * bootstrap: Likewise
3023 * configure.ac: Likewise
3024 * lib/Makefile.tmpl: Likewise
3025 * po/POTFILES.in: Likewise
3026 * src/Makefile.am: Likewise
3027 * src/buffer.c: Likewise
3028 * src/common.h: Likewise
3029 * src/compare.c: Likewise
3030 * src/create.c: Likewise
3031 * src/delete.c: Likewise
3032 * src/extract.c: Likewise
3033 * src/incremen.c: Likewise
3034 * src/list.c: Likewise
3035 * src/mangle.c: Likewise
3036 * src/misc.c: Likewise
3037 * src/names.c: Likewise
3038 * src/sparse.c: Likewise
3039 * src/system.c: Likewise
3040 * src/tar.c: Likewise
3041 * src/update.c: Likewise
3042 * src/utf8.c: Likewise
3043 * src/xheader.c: Likewise
3045 * src/system.h: Removed
3046 * src/rmt.c: Removed
3047 * src/rmt.h: Removed
3048 * src/rtapelib.c: Removed
3050 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3052 * tests/listed02.sh: Do not depend on any particular ordering
3055 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3057 * doc/tar.texi: Document the use of -C option in
3058 file lists. Document --seek option.
3059 * configure.ac: New option --with-rmt. New configuration variable
3060 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
3061 * src/Makefile.am: Install rmt into rmtdir
3062 * src/tar.c (usage): Minor fix.
3066 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3068 * configure.ac: Raised version number to 1.14.90
3069 * src/common.h (is_individual_file): New prototype
3070 * src/create.c (dump_file0): Fix bug introduced
3072 * src/names.c (register_individual_file)
3073 (is_individual_file): New functions.
3074 * tests/listed01.sh: Use genfile instead of dd.
3075 * tests/listed02.sh: New file.
3076 * tests/Makefile.am: Added listed02.sh
3080 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3082 * src/sparse.c (sparse_add_map): Fixed improper initializations
3083 of sparse_map_size. We assume that whatever number it contains
3084 describes adequately the current size of sparse_map. The only
3085 number we need to reset is sparse_map_avail.
3086 * src/compare.c (verify_volume): Call set_next_block_after
3087 if read_header returns HEADER_FAILURE
3088 Destroy and reinitialize content of current_stat_info and
3089 extended_header after each iteration (bug reported by
3090 John L. Males <jlmales@yahoo.com>).
3091 Issue a warning if the created archive contains some members
3092 whose file names were stripped off their leading prefixes.
3093 This is a temporary fix of the issue reported by Bdale Garbee
3094 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
3095 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
3097 * src/names.c (removed_prefixes_p): New function.
3099 * src/buffer.c: When computing write rate do not take
3100 into account the time needed to verify the archive(s).
3101 The bug reported by John L. Males <jlmales@yahoo.com>
3102 (set_start_time,compute_duration): New functions.
3103 (print_total_written): Use the result of compute_duration().
3104 (close_archive): Call compute_duration.
3105 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
3106 * src/list.c (decode_header): Fixed initialization
3107 of stat_info->is_sparse
3108 * src/tar.c (main): Call set_start_time().
3110 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
3111 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
3116 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3118 * src/tar.c: Fix copy-n-paste errors in the license
3120 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3122 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
3123 Use ROOT_FS with -C option. Do not send mail
3124 if ADMINISTRATOR is set to NONE.
3125 * scripts/backup.sh.in (test_root): Append / to
3126 ROOT_FS if it does not already end in it.
3127 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
3128 New option -a (--all). Do not start restore unless
3129 -a or patterns are given.
3130 (restore_fs,restore_files): Fixed use of --listed option.
3131 * doc/tar.texi: Updated
3134 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3136 * src/tar.c (find_argp_option): Fixed typo
3138 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
3140 Merge argp, getopt, xalloc changes from gnulib.
3141 * bootstrap (gnulib_modules): Add xalloc-die.
3142 Remove code to test for patches; we don't have patches now.
3143 Set LC_ALL=C so that file names sort consistently.
3144 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3145 lib-ld.m4, lib-prefix.m4, po.m4 too.
3147 * patches/getopt.diff: Remove; gnulib now works unpatched.
3148 * configure.ac (_getopt_long_only_r): Remove check.
3149 gl_ARGP now does this for us.
3150 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
3152 * src/extract.c: Adjust to changes to gnulib xalloc module.
3153 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
3154 (xalloc_die): New function.
3156 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3160 * src/buffer.c (flush_write): Limit filenames
3161 of the members that straddle multivolume archive
3162 boundary to 100 characters.
3163 (flush_read): Use strncmp when comparing multivolume member
3165 * tests/multiv03.sh: New file
3166 * tests/Makefile.am: Added multiv03.sh
3168 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3170 * src/list.c (read_and): Call decode_header before
3171 calling skip_member()
3172 (skip_member): Use is_sparse field to determine if the
3173 member is a sparse file.
3175 * tests/Makefile.am: Added extrac05.sh
3176 * tests/extrac05.sh: New file
3177 * tests/append.sh: Rearranged leading comments. Added explicit
3178 references to report messages wherever available.
3179 * tests/delete01.sh: Likewise
3180 * tests/delete02.sh: Likewise
3181 * tests/delete03.sh: Likewise
3182 * tests/delete04.sh: Likewise
3183 * tests/extrac01.sh: Likewise
3184 * tests/extrac02.sh: Likewise
3185 * tests/extrac03.sh: Likewise
3186 * tests/extrac04.sh: Likewise
3187 * tests/gzip.sh: Likewise
3188 * tests/ignfail.sh: Likewise
3189 * tests/incremen.sh: Likewise
3190 * tests/link01.sh: Likewise
3191 * tests/listed01.sh: Likewise
3192 * tests/longv7.sh: Likewise
3193 * tests/multiv01.sh: Likewise
3194 * tests/multiv02.sh: Likewise
3195 * tests/old.sh: Likewise
3196 * tests/options.sh: Likewise
3197 * tests/recurse.sh: Likewise
3198 * tests/same-order01.sh: Likewise
3199 * tests/same-order02.sh: Likewise
3200 * tests/sparse01.sh: Likewise
3201 * tests/version.sh: Likewise
3202 * tests/volume.sh: Likewise
3204 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3206 * bootstrap: Extended --update-po option to take an
3207 optional argument specifying the po file to update.
3208 * src/create.c: Improved compatibility with 1.13.25
3209 * tests/link01.sh: New file.
3210 * tests/Makefile.am: Added link01.sh
3212 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
3216 * patches/argp.diff: Remove; no longer needed.
3218 * lib/.cvsignore: Add stat-macros.h.
3219 Remove addext.c, malloc.c, realloc.c.
3221 * src/extract.c: Include <getcwd.h>.
3222 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
3223 * src/extract.c (make_directories):
3224 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
3225 * src/misc.c (must_be_dot_or_slash): Likewise.
3226 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
3228 * src/tar.c (parse_opt): Likewise.
3229 * src/incremen.c (purge_directory): Fix format buffer typos in warning
3231 * src/tar.c (options): Add missing initializers to pacify gcc.
3232 (decode_options): Remove unused var.
3234 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
3236 * bootstrap (gnulib_modules): Add getpagesize.
3237 * configure.ac (valloc): Remove check; valloc no longer used.
3238 * lib/.cvsignore: Add getpagesize.h.
3239 * m4/.cvsignore: Add getpagesize.m4.
3240 * src/buffer.c (record_buffer): New var.
3241 (open_archive): Don't use valloc; on older or buggy hosts, you can't
3242 free the result. Use page_aligned_alloc instead.
3243 * src/compare.c (diff_init): Likewise.
3244 * src/buffer.c (open_archive): Record the pointer to be freed
3246 (close_archive): Free record_buffer.
3247 * src/common.h (page_aligned_alloc): New decl.
3248 * src/misc.c (quote_n, quote): Remove these redundant functions.
3249 (ptr_align): New function, from coreutils/src/system.h.
3250 (page_aligned_alloc): New function.
3251 * src/system.h (valloc): Remove.
3253 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
3255 * src/extract.c (extract_archive): Do not report an error
3256 when hard-linking X to X when X exists. Problem reported by
3258 * lib/.cvsignore: Add fchown-stub.c.
3260 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3263 * src/common.h (root_device): New global.
3264 (gnu_restore): Renamed to purge_directory().
3265 * src/extract.c (extr_init): Save the device number
3267 (extract_archive): Renamed gnu_restore() to purge_directory().
3268 * src/incremen.c (gnu_restore): Renamed to purge_directory().
3269 Do not attempt to purge the directory if it is on a different
3270 device and one_file_system_option is set.
3272 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3274 * doc/tar.texi: The actual default for exclude patterns
3275 is --no-anchored. Fixed.
3276 * src/tar.c (options): Likewise.
3277 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
3279 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3281 * doc/tar.texi: Fixed several inconsistencies.
3282 * src/tar.c: Fixed docstring for --checkpoint option.
3284 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3286 * src/buffer.c (seek_archive): New function
3287 * src/common.h (seek_archive): New function
3288 (seekable_archive): New global.
3289 * src/list.c (skip_file): Use seek_archive() if
3291 * src/tar.c (struct fmttab): Accept 'pax' as alias
3293 (options): New option -n (--seek).
3294 * src/update.c: Determine type of the archive before
3299 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3301 * bootstrap: New option --update-po
3302 * src/tar.c: New option -H (short alias to --format)
3303 * doc/tar.texi: Document -H option
3304 * src/names.c (safer_name_suffix): Fixed bug introduced
3307 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3309 * bootstrap: Apply patches from patch subdirectory
3311 * patches/argp.diff: New file
3312 * patches/getopt.diff: New file
3313 * configure.ac: Check for _getopt_long_only_r and
3314 force using included version of getopt if the function
3316 * src/tar.c: Use argp for command line parsing.
3317 * src/system.h: Minor formatting fix
3318 * m4/.cvsignore: Updated
3319 * lib/.cvsignore: Updated
3320 * doc/tar.texi: Minor fix.
3321 * src/extract.c: Fix improper use of 'path' term
3322 * src/incremen.c: Likewise
3323 * src/list.c: Likewise
3324 * src/misc.c: Likewise
3325 * src/names.c: Likewise
3326 * src/rmt.h: Likewise
3327 * src/rtapelib.c: Likewise
3328 * src/update.c: Likewise
3329 * src/xheader.c: Likewise
3330 * tests/star/README: Minor fix
3332 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3334 * configure.ac: Raised version number to 1.14.1
3335 * src/tar.c: Renamed --strip-path to --strip-components
3336 Changed improper use of _() to ngettext().
3337 * src/extract.c: Renamed strip_path_option to strip_components_option
3338 * src/common.h: Likewise.
3340 * doc/tar.texi: Updated
3342 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3344 * src/system.c (sys_child_open_for_uncompress): Do not
3345 set read_full_records_option: the compressed archive is
3346 likely not to contain integer number of records. Should
3347 the user wish to use reblocking, he may always give tar
3348 -B option. This is a minor improvement over the change
3350 * src/buffer.c (open_archive): Removed assignment to
3351 read_full_records_option.
3353 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
3354 as the format argument, rather than a possibly-translated variable
3355 string. Patch provided by Jim Meyering <jim@meyering.net>
3356 * src/tar.c (decode_options): Fixed typo in the comment.
3357 * tests/star/README: Minor correction
3359 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3361 * directory: New file. GNU directory entry for tar.
3362 * doc/Makefile.am: Rewritten. Added rules for generating
3363 documentation for the project's website.
3364 * doc/.cvsignore: Updated
3365 * doc/index.html.in: New file.
3367 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3369 * configure.ac: Raised version number to 1.14
3371 * tests/after: Added copyleft statement
3372 * tests/before: Added copyleft statement
3373 * tests/preset.in: Added copyleft statement
3375 Tar 1.14 is released. Sources up to this point are tagged
3378 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3380 * configure.ac: Fixed prerequisite headers for sys/buf.h
3382 * src/system.h: Likewise.
3383 * tests/after (compare): Fixed argument quoting under eval
3384 * tests/before: Quote TAR_ARCHIVE_FORMATS
3386 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3391 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
3392 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
3393 the pathname of the rmt utility.
3394 New option --enable-backup-scripts.
3395 * doc/tar.texi: Updated
3396 * scripts/Makefile.am: Install the scripts only if requested
3398 * scripts/backup.in: Fixed --version output.
3399 Fixed initialization of the listing files and printing
3400 the time of the last previous level dump.
3401 * scripts/restore.in: Fixed --version output.
3402 * src/Makefile.am (localedir.h rule): Generate correct
3403 DEFAULT_RMT_COMMAND variable.
3404 * src/common.h (rmt_command_option): New variable.
3405 * src/list.c (read_and): Print block number before
3406 issuing 'Skipping to next header' diagnostics, if
3407 requested by block_number_option.
3408 * src/rtapelib.c: Use rmt_command_option instead of
3409 hardcoded "/etc/rmt".
3410 * src/tar.c: New option --rmt-command.
3411 (decode_options): Handle --rmt-command. Initialize
3412 rmt_command_option to DEFAULT_RMT_COMMAND.
3414 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3416 * doc/tar.texi: Further update.
3418 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3420 * configure.ac: Minor fix
3421 * scripts/Makefile.am: Updated
3422 * scripts/backup-specs: Updated
3423 * scripts/backup.in: Minor fixes
3424 * scripts/backup.sh: Removed
3425 * scripts/backup.sh.in: New file. Source for backup.sh
3426 * scripts/restore.in: New file
3427 * scripts/.cvsignore: Updated
3428 * scripts/WARNING: Removed
3429 * doc/tar.texi: Updated
3432 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3434 * src/names.c (name_gather): Bugfix: Honor single -C with
3436 * tests/same-order01.sh: New file
3437 * tests/same-order02.sh: New file
3438 * tests/Makefile.am: Updated
3440 * tests/append.sh: Added copyleft header
3441 * tests/delete01.sh: Likewise
3442 * tests/delete02.sh: Likewise
3443 * tests/delete04.sh: Likewise
3444 * tests/extrac01.sh: Likewise
3445 * tests/extrac02.sh: Likewise
3446 * tests/extrac03.sh: Likewise
3447 * tests/extrac04.sh: Likewise
3448 * tests/gzip.sh: Likewise
3449 * tests/ignfail.sh: Likewise
3450 * tests/incremen.sh: Likewise
3451 * tests/multiv01.sh: Likewise
3452 * tests/old.sh: Likewise
3453 * tests/options.sh: Likewise
3454 * tests/recurse.sh: Likewise
3455 * tests/version.sh: Likewise
3456 * tests/volume.sh: Likewise
3457 * tests/star/gtarfail.sh: Likewise
3458 * tests/star/gtarfail2.sh: Likewise
3459 * tests/star/multi-fail.sh: Likewise
3460 * tests/star/pax-big-10g.sh: Likewise
3461 * tests/star/qucktest.sh: Likewise
3462 * tests/star/ustar-big-2g.sh: Likewise
3463 * tests/star/ustar-big-8g.sh: Likewise
3465 * doc/.cvsignore: Updated
3467 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3469 * configure.ac: Check whether date accepts +format argument
3470 (for backup scripts).
3471 * scripts/level-0: Removed
3472 * scripts/level-1: Removed
3473 * scripts/weekly.new: Removed
3474 * scripts/dump-remind: Removed
3475 * scripts/backup.in: New file
3476 * scripts/backup.sh: New file
3477 * scripts/dump-remind.in: New file
3478 * scripts/backup-specs: Updated
3479 * scripts/Makefile.am: Updated for new directory contents.
3480 * scripts/.cvsignore: Updated
3482 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3485 * doc/tar.texi: Updated
3486 * src/tar.c: --utc implies -vv
3488 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3490 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
3491 does not define it if it fails to find iconv.h.
3493 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3495 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
3496 and parts of configure.ac
3497 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
3498 * lib/Makefile.am: Removed
3499 * lib/Makefile.tmpl: New file.
3500 * lib/.cvsignore: Updated
3501 * m4/.cvsignore: Updated
3502 * src/xheader.c: Include stpcpy.h
3504 * src/create.c: Produce an error, not warning, if the
3505 filename is too long.
3506 * tests/longv7.sh: Synchronized with the recent changes.
3508 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3510 * configure.ac: Fixed test for iconv_t
3511 * src/rmt.h: Bugfix by Jürgen Weigert
3512 * THANKS: Add Jürgen Weigert
3513 * tests/star/README: Fixed typo
3515 2004-04-04 Paul Eggert <eggert@twinsun.com>
3517 Merge getdate documentation changes from coreutils.
3519 * doc/getdate.texi: Update from coreutils CVS.
3520 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
3522 Merge recent gnulib changes, and remove some lint.
3524 Improve support for nanosecond-resolution time stamps.
3525 * bootstrap: Add gettime, timespec modules.
3526 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
3527 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
3529 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
3530 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
3531 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
3532 * src/common.h (newer_mtime_option): Now a struct timespec, not
3533 time_t. All uses changed.
3534 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
3535 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
3536 * src/incremen.c (scan_path): Likewise.
3537 * src/list.c (read_and): Likewise.
3538 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
3539 whether newer_mtime_option is initialized.
3540 * src/tar.c (decode_options): Likewise.
3541 * src/tar.c (decode_options): Adjust to new signature for get_date.
3543 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
3544 result of safe_read, full_write, and similar functions.
3545 Detect safe_read error by comparing to SAFE_READ_ERROR;
3546 detect full_write error by comparing to 0.
3548 * src/common.h (write_error_details, sys_write_archive_buffer):
3550 * src/misc.c (write_error_details): Likewise.
3551 * src/rmt.c (main): Likewise.
3552 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
3553 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
3554 * src/sparse.c (sparse_scan_file, sparse_dump_region,
3555 check_sparse_region, check_data_region): Likewise.
3556 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
3557 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
3558 * src/update.c (append_file): Likewise.
3560 * src/buffer.c (clear_read_error_count): Use explicit (void)
3561 to indicate a function with no arguments.
3562 * src/create.c (check_links): Likewise.
3563 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
3564 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
3565 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
3566 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
3568 * src/utf8.c (get_input_charset): Likewise.
3569 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
3570 xheader_decode_global, extended_header_init): Likewise.
3571 * tests/mksparse.c (usage): Likewise.
3573 * src/buffer.c (new_volume): Rename local variables to avoid
3575 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
3576 sparse_file_p, sparse_member_p, sparse_fixup_header,
3577 sparse_dump_file, sparce_extract_file, sparse_skip_file,
3578 sparse_diff_file): Likewise.
3579 * src/compare.c (diff_archive): Likewise.
3580 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
3581 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
3583 * src/extract.c (repair_delayed_set_stat): Likewise.
3584 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
3586 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
3587 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
3588 sparse_dump_file, sparse_file_p, sparse_member_p,
3589 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
3590 check_data_region, sparse_diff_file): Likewise.
3591 * src/system.c (sys_stat_nanoseconds): Likewise.
3592 * src/xheader.c (xheader_format_name): Likewise.
3594 * src/common.h (enum old_files): Remove comma before }; not portable.
3596 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
3597 * src/rmt.c (usage): Likewise.
3598 * src/xheader.c (xheader_set_single_keyword): Likewise.
3599 * tests/genfile.c (usage): Likewise.
3600 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
3603 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
3605 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
3606 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
3607 langtab.charset, charset_lookup): Likewise.
3609 * src/common.h (name_init): Remove unused args. All callers changed.
3610 * src/names.c (name_init): Likewise.
3612 * src/common.h (usage, xheader_write, xheader_write_global,
3613 sys_reset_uid_gid): New decls.
3615 * src/compare.c (report_difference, process_noop): Add
3616 __attribute__ ((unused)) for unused attributes.
3617 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
3619 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
3620 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
3621 path_coder, size_coder, uid_coder, uname_coder,
3622 sparse_numblocks_coder): Likewise.
3624 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
3625 dump_file0): Now static.
3626 * src/utf8.c (charset_lookup): Likewise.
3627 * src/xheader.c (xheader_protected_pattern_p,
3628 xheader_protected_keyword_p, xheader_set_single_keyword,
3629 xheader_keyword_deleted_p, xheader_keyword_override_p,
3630 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
3632 * tests/genfile.c (usage): Likewise.
3633 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
3636 * src/create.c (hash_link): Rewrite to avoid cast.
3638 * src/extract.c (file_newer_p): Use parameter, not global var.
3639 * src/misc.c (write_error_details): Likewise.
3641 * src/extract.c (prepare_to_extract): Remove directory arg; not
3642 used. All callers changed.
3644 * src/misc.c (close_fatal): Remove; not used.
3645 * src/system.c (sys_utimes): Likewise.
3647 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
3649 * src/rmt.c (main): Update copyright date to 2004.
3650 * src/tar.c (decode_options): Likewise.
3652 * src/rtapelib.c (get_status_string): Don't lose errno when
3653 skipping the error messages.
3654 (get_status): Report an error if atol returns a negative number.
3656 * src/utf8.c (struct langtab, langtab, charset_lookup,
3657 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
3659 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
3660 Use macros, not definitions, to avoid type clashes with system
3662 (charset_lookup): Local var is now auto, not static.
3663 (utf8_convert): Use ICONV_CONST instead of const, to avoid
3666 * src/utf8.c (langtab): Initialize all elements of struct, to
3668 * src/xheader.c (xhdr_tab): Likewise.
3670 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
3672 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
3674 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
3677 * configure.ac: Raised version number to 1.13.94
3678 * src/system.h: Protect inclusion of <sys/time.h>
3680 Declare time() if HAVE_DECL_TIME is 0
3681 * tests/.cvsignore: Added mksparse
3683 * tests/sparse01.sh: New file
3684 * tests/multiv02.sh: New file
3685 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
3686 * tests/longv7.sh: Added missing call to 'after'
3688 * src/common.h: Added missing prototypes
3689 * src/compare.c (diff_archive): Use is_sparse member
3690 instead of GNUTYPE_SPARSE.
3691 * src/create.c: Removed unused variables
3692 * src/extract.c (extract_archive): Use sparse_member_p instead
3694 Removed unused variables
3695 * src/list.c (decode_header): Use sparse_fixup_header to correct
3697 (print_header): Do not rely on GNUTYPE_SPARSE type.
3698 Use st->stat.st_size to print real file size.
3699 (skip_member): Assign stat_info.file_name to save_name. This fixes
3700 bug reported by Mads Martin Joergensen <mmj@suse.de>
3701 Use sparse_skip_file() to skip sparse members.
3702 * src/rtapelib.c: include "common.h"
3703 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
3704 (struct tar_sparse_optab.fixup_header): New member
3705 (tar_sparse_member_p): New function.
3706 (tar_sparse_init): Return true if decode_header is not provided
3707 (tar_sparse_fixup_header)
3708 (sparse_member_p,sparse_fixup_header)
3710 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
3711 (star_fixup_header, pax_sparse_member_p): New function
3712 (pax_decode_header): Remove
3713 * src/system.h: Include <sys/time.h> and <utime.h> when available
3714 * src/tar.c (usage): Prototype moved to common.h
3715 * src/tar.h (struct tar_stat_info.is_sparse): New member
3716 * src/utf8.c (utf8_convert): Changed prototype
3717 (get_input_charset): Removed unused variable
3718 * src/xheader.c: include <fnmatch.h>
3719 (size_decoder): Assign to both st->archive_file_size and
3721 (st->stat.st_size): Assign to st->stat.st_size
3722 (sparse_numbytes_decoder): Removed unused variable
3723 * src/.cvsignore: Added .gdbinit
3724 * THANKS: Added Mads Martin Joergensen
3726 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3728 * src/create.c (write_long_name): Do not allow more than
3729 NAME_FIELD_SIZE-1 characters in a file name for V7 format
3731 * tests/longv7.sh: New file.
3732 * tests/Makefile.am: Add longv7.sh
3734 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3736 * src/buffer.c (open_archive): Clear read_full_records_option
3737 if reading from a pipe.
3738 (short_read): Display warning about the deduced record size
3740 * tests/star/pax-big-10g.sh: Updated to match the above changes.
3741 * tests/star/ustar-big-2g.sh: Likewise.
3742 * tests/star/ustar-big-8g.sh: Likewise.
3744 * configure.ac: Added gl_FUNC_STRTOULL
3745 * src/create.c (start_header): Check for GNU_FORMAT
3746 if incremental_option is set.
3747 * src/xheader.c (to_decimal): New function.
3748 (xheader_format_name): Use to_decimal() instead of snprintf.
3749 * tests/listed01.sh: Use genfile instead of dd
3750 * tests/multiv01.sh: Likewise.
3752 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3754 * src/list.c (read_and): Stop processing the archive after
3755 encountering a single zero record. Many old archives contain
3756 arbitrary garbage after it.
3757 The warning is issued anyway.
3759 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3761 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
3762 conversion buffer was not null terminated. Fix provided
3763 by Leland Lucius <llucius@tiny.net>
3764 * THANKS: Added Leland Lucius
3765 * src/utf8.c (utf8_convert): Indentation fix.
3767 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3769 * src/buffer.c (flush_read): Bugfix: the
3770 condition at line 714 included
3772 || (status > 0 && !read_full_records_option)
3774 which is grossly wrong, since even if new_volume() below succeeds,
3775 the subsequent call to rmtread will overwrite the chunk of data
3776 already read in the buffer and thus spoil everything.
3777 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
3779 * tests/star/multi-fail.sh: New test.
3780 * tests/Makefile.am: Added multi-fail.sh
3781 * tests/star/README: Updated
3783 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3786 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
3787 * src/common.h (utc_option): new global
3788 (enum old_files.KEEP_NEWER_FILES): New element
3789 * src/extract.c: Handle --keep-newer-files option
3790 * src/list.c (tartime): Print UTC if --utc was given.
3791 * src/tar.c: New options: --utc and keep-newer-files
3793 * tests/Makefile.am: Added new tests
3794 * tests/after: Rewritten
3795 * tests/before: Rewritten
3796 * tests/preset.in: Rewritten
3797 * tests/delete03.sh: Accommodate for the new testsuite logic
3798 * tests/gzip.sh: Likewise
3799 * tests/incremen.sh: Likewise
3800 * tests/listed01.sh: Likewise
3801 * tests/multiv01.sh: Likewise
3802 * tests/old.sh: Likewise
3803 * tests/options.sh: Likewise
3804 * tests/version.sh: Likewise
3805 * tests/volume.sh: Likewise
3807 * tests/star: New directory
3808 * tests/star/README: New file
3809 * tests/star/gtarfail.sh: New file
3810 * tests/star/gtarfail2.sh: New file
3811 * tests/star/pax-big-10g.sh: New file
3812 * tests/star/qucktest.sh: New file
3813 * tests/star/ustar-big-2g.sh: New file
3814 * tests/star/ustar-big-8g.sh: New file
3816 2004-02-26 Paul Eggert <eggert@twinsun.com>
3818 * doc/tar.texi (dircategory Individual utilities): Append period,
3819 as suggested by Karl Berry.
3821 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3823 * src/list.c (decode_header): Call xheader_decode before
3824 the assignment to current_stat_info.archive_file_size.
3826 2004-02-23 Paul Eggert <eggert@twinsun.com>
3828 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
3830 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3835 * tests/before: Move testing of the prerequisite archive formats
3836 to the separate function 'prereq'. Do not expect any arguments
3837 * tests/delete03.sh: Use prereq() instead of passing arguments
3839 * tests/incremen.sh: Likewise.
3840 * tests/listed01.sh: Likewise.
3841 * tests/multiv01.sh: Likewise.
3843 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3845 Added UTF-8 support. Finished global extended header
3849 * configure.ac: Detect libiconv
3850 * src/utf8.c: New file. Conversions to and from utf-8.
3851 * src/Makefile.am: Added utf8.c
3852 * src/create.c (write_header_name) In pax format, use
3853 "path" keyword if the file name is not ASCII
3854 (start_header): Likewise for uname and gname.
3855 * src/list.c: Decode encountered global headers.
3856 * src/xheader.c: Use keywords from the global
3858 Correctly handle UTF-8 conversions.
3859 (xheader_list_destroy): New function.
3860 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
3861 missing gettext markers
3862 (decode_record): Rewritten using caller-provided handler and
3864 * tests/listed01.sh: Give credit to Andreas Schuldei.
3866 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3868 * src/create.c (dump_file0): The conditional at line
3869 1296 prevented incremental backups on individual files
3870 from working, as reported by Andreas Schuldei
3871 <andreas@schuldei.org>.
3873 This is due to the condition
3875 (0 < top_level || !incremental_option)
3877 Removing it makes incremental backups work for individual
3878 files as well as for directories. On the other hand, it does
3879 not affect other functionality, as shown by the reasoning below:
3881 To begin with, the two parts of this condition are mutually
3882 superfluous, because
3884 1) when top_level < 0, incremental_option == 1
3885 so the condition yields false
3886 2) when top_level >= 0, incremental_option == 0
3887 so the condition yields true.
3889 In other words, it is completely equivalent to
3891 (!incremental_option)
3893 Now, let's consider the effect of its removal. There are two cases:
3895 1) when incremental_option==1
3896 This means incremental backup in progress. In this case dump_file
3897 is invoked only for directories or for files marked with 'Y' by
3898 get_directory_contents. The latter are those that did not meet the
3899 condition in incremen.c:242, which is exactly the same condition
3900 as this at create.c:1296. So, for these files the check
3901 (!incremental_option) is useless, since the rest of the
3902 conditional will yield false anyway. On the other hand, if
3903 dump_file is invoked on a directory, the conditional will yield
3904 false due to !S_ISDIR assertion, so these will be processed as usual.
3906 Thus, for this case the extra condition (!incremental_option) is
3907 irrelevant, and its removal won't alter the behavior of tar,
3908 *except* that it will enable incremental backups on individual
3909 files, which is the wanted effect.
3911 2) when incremental_option==0
3912 In this case the condition yields true and its removal does not
3913 affect the functionality.
3916 * configure.ac: Raised patchlevel to 93
3917 * src/incremen.c: Minor stylistic fixes.
3918 * tests/listed01.sh: New test. Check listed incremental
3919 backups on individual files.
3920 * tests/Makefile.am: Added listed01.sh
3922 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3924 * src/common.h (simple_finish_header,start_private_header): New
3926 (xheader_ghdr_name): Changed declaration
3927 * src/create.c (start_private_header): Removed static qualifier.
3928 (write_extended): Removed superfluous last argument. Use
3930 (simple_finish_header): New function.
3931 (finish_header): Use simple_finish_header() to break recursive
3932 dependency between this function and write_extended().
3933 * src/tar.c (assert_format): Do not bail out if several
3934 --format arguments are given. This is a common case when
3935 TAR_OPTIONS are used.
3936 (decode_options): New option --show-defaults displays the
3937 compiled-in defaults.
3938 Use POSIX format if no --format option was given and
3939 --pax-option was specified.
3940 Do not allow to use --pax-option unless the archive format is
3941 set to POSIX (or reading subcommand is requested).
3943 * src/update.c (update_archive): Write global extended header if
3945 * src/xheader.c (xheader_format_name): Bugfix.
3946 (xheader_xhdr_name): Changed the default extended header name
3947 to '%d/PaxHeaders.%p/%f', as POSIX requires.
3948 (xheader_ghdr_name): Removed unused argument.
3949 (xheader_write,xheader_write_global): New function.
3950 (xheader_decode): Modified to honor overrides whatever
3951 the current archive format is.
3953 * src/delete.c (delete_archive_members): Call xheader_decode
3955 * src/list.c (decode_header): Likewise.
3956 * src/incremen.c (sort_obstack): Fixed typo in the comment
3958 * doc/tar.texi: Document new default for extended
3961 * tests/before: Accept an optional list of allowed archive
3962 formats. Exit with the status 77 if the current archive
3963 format does not match any of them.
3964 * tests/delete03.sh: Require gnu, oldgnu or posix format
3965 * tests/incremen.sh: Require gnu or oldgnu format
3966 * tests/multiv01.sh: Likewise
3968 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3970 * doc/tar.texi (Option Summary): Documented --pax-option
3971 * src/tar.c: Likewise.
3973 * src/create.c (to_chars): Added a comment.
3974 * src/tar.h: Comment to GNU_FORMAT
3976 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3979 * configure.ac: Added stpcpy
3980 * bootstrap: Likewise
3981 * lib/Makefile.am: Likewise
3982 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
3984 * src/create.c (write_extended): Call xheader_xhdr_name
3985 instead of using hardcoded "././@PaxHeader" name.
3986 * src/tar.c: New option --pax-option (equivalent to -o option
3988 * src/xheader.c: Implement pax -o option. Fixed misleading
3989 heading comment (introduced 2003-09-02).
3990 * src/incremen.c: Minor fixes
3991 * m4/.cvsignore: Updated
3993 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3995 * src/incremen.c: Removed accumulator stuff in favor of obstack.
3996 (get_directory_contents): Split into two functions
3997 * src/update.c: Minor changes
3998 * doc/tar.texi: Fixed typo
4000 2004-02-15 Paul Eggert <eggert@twinsun.com>
4002 Fix Debian bug 230872, originally reported by Jeff King in
4003 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
4005 * doc/tar.texi (posix compliance): Remove. The whole section
4006 was a misunderstanding of what POSIXLY_CORRECT is supposed to
4007 mean. The GNU Coding Standards says that POSIXLY_CORRECT
4008 is for disabling extensions that are incompatible with POSIX:
4009 it is not for disabling compatible extensions. All references
4010 to this section removed.
4011 (posix): This format is created only if the posix format is
4012 specified; it is no longer created if gnu format is specified
4013 and POSIXLY_CORRECT is set.
4014 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
4015 POSIX does not specify the behavior of tar, so we should
4016 not worry about POSIXLY_CORRECT here.
4018 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4020 * Makefile.am: Removed m4
4021 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
4023 * README-alpha: Updated
4024 * bootstrap: Updated TP URL, improved help output. Default
4025 to :ext:anoncvs and set CVS_RSH, unless already set.
4026 * m4/Makefile.am: Removed
4028 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4030 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
4031 Use $option instead of $1 so all options will be parsed.
4033 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4035 Started rewriting buffer.c ...
4037 * bootstrap: New option --no-po
4038 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
4039 (time_to_start_writing): Changed data type
4040 (file_to_switch_to): Removed. Variable never assigned to.
4041 (open_archive) Moved option compatibility checks to tar.c
4042 Other minor changes.
4043 * src/common.h (maybe_backup_file): Changed return type
4044 * src/misc.c: Likewise.
4045 * src/create.c: Updated invocations of safer_name_suffix
4046 * src/extract.c: Likewise
4047 * src/delete.c: Updated assignment to write_archive_to_stdout
4048 * src/tar.c (decode_options): More option compatibility checks
4049 (moved from buffer.c)
4050 * src/update.c (time_to_start_writing): Changed data type.
4051 * tests/recurse.sh: New test case.
4052 * tests/mksparse.c: New file.
4053 * tests/Makefile.am: Added recurse.sh and mksparse.c
4055 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4057 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
4058 Martin Simmons for the patch.
4059 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
4060 <pius@pld-linux.org> for the patch.
4062 2003-12-26 Paul Eggert <eggert@twinsun.com>
4064 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
4065 and translation website.
4067 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
4068 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
4069 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
4070 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
4071 files are replaced by autoreconf. Also, there seems to be a bug
4072 in gettext/autoconf/automake if we try to omit these files after
4073 autoreconf has replaced them, even though the gettext manual says
4074 they're optional. So give up and just include them for now, even
4075 though they make 'configure' longer and slower.
4077 Change translation URL from
4078 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
4079 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
4080 accommodate translator website revamp.
4082 Fail if autoreconf fails.
4084 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
4085 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
4086 ignore files now supplied by gettext 0.13.1.
4088 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4090 Synchronized with the backup repository on Mirddin
4092 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4094 * configure.ac: Check for varios members of struct stat
4095 that may represent file modification times with a subsecond
4097 Check for utimes (for future use)
4098 * src/buffer.c (short_read): Issue a warning on short reads.
4099 * src/common.h (sys_stat_nanoseconds): New function
4100 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
4101 * src/list.c (read_and): Treat only two successive zero
4102 filled blocks as an EOF indicator. Issue a warning if
4103 a single one is encountered.
4104 * src/system.c (sys_stat_nanoseconds): New function
4105 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
4107 * src/xheader.c (code_time,decode_time): Support for subsecond
4109 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
4110 (mtime_coder,mtime_decoder): Update invocations of code_time and
4112 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
4113 (sparse_numblocks_decoder,sparse_offset_decoder)
4114 (sparse_numbytes_decoder): Updated
4116 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4118 * src/names.c (safer_name_suffix): Reverted change made
4119 2003-11-14. Reason: Discussion with Paul Eggert and
4120 Jean-Louis Martineau. See also ChangeLog entry from
4122 * tests/delete03.sh: Likewise.
4123 * tests/extrac04.sh: Likewise.
4124 * tests/multiv01.sh: Likewise.
4126 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4128 * src/incremen.c (write_directory_file): Use sys_truncate
4129 * src/list.c (print_header): Use archive_file_size member
4130 when printing real file size.
4131 * src/sparse.c (sparse_scan_file): Correctly handle files with
4133 (sparse_dump_region,sparse_extract_region): Allow for zero size
4136 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4138 * configure.ac: Raised version number to 1.13.92
4139 * src/list.c (decode_header): Discern between pax and ustar
4141 Initialize current_stat_info.archive_file_size.
4143 NOTE: Modifications from this date on are temporarily
4144 stored on local CVS on mirddin. This repository will
4145 be synchronized with Savannah as soon as the latter
4146 becomes operational again.
4148 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4151 * src/sparse.c: Initial implementation of GNU/pax sparse
4153 * src/common.h (xheader_store): Changed prototype.
4154 * src/create.c: Update calls to xheader_store
4155 * src/extract.c (extract_archive): Check reported size vs.
4156 archive file size to determine if we have to do with a
4158 * src/tar.c (usage): Cleaned up the sample argument to --newer
4160 (decode_options): Allow --sparse for POSIX_FORMAT archives.
4161 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
4163 Implemented GNU.sparse.* keywords.
4165 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4167 * configure.ac: Check for setlocale. Thanks Bruno Haible for
4170 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4172 * src/create.c (write_gnu_long_link): Use oldgnu
4173 magic with @LongLink blocks.
4175 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4177 * src/tar.h: Support for star sparse format.
4178 * src/sparse.c: Likewise.
4180 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4182 * src/sparse.c (sparse_diff_file): New function
4183 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
4184 (sys_compare_uid_gid): Removed.
4185 (sys_compare_links,report_difference): Changed prototype
4186 (sparse_diff_file): New function
4187 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
4188 (sys_compare_uid_gid): Removed.
4189 (sys_compare_links): Changed declaration
4190 * src/compare.c (diff_archive): Use sparse_diff_file.
4192 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4194 Rewritten sparse file handling.
4196 * src/sparse.c: New file. Provides a universal framework
4197 for various methods for sparse files handling.
4198 * src/Makefile.am: Added sparse.c
4199 * src/common.h (struct sp_array,sparsearray,sp_array_size)
4200 (init_sparsearray,fill_in_sparse_array): Removed
4201 (enum dump_status): New data type
4202 (pad_archive,close_diag,open_diag,read_diag_details)
4203 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
4205 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
4207 (print_header): Changed prototype declaration.
4208 * src/tar.h (struct sp_array): Declaration from common.h
4209 (struct tar_stat_info): New members archive_file_size,
4210 sparse_map_avail,sparse_map.
4211 * src/create.c: Major rewrite.
4212 * src/extract.c: Use new sparse file interface.
4213 * src/compare.c (diff_sparse_files): Temporary placeholder.
4215 * src/buffer.c: Minor changes
4216 * src/tar.c: Likewise.
4217 * src/list.c: Likewise.
4218 * src/misc.c (close_diag,open_diag,read_diag_details)
4219 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
4220 diagnostics functions.
4221 * src/incremen.c: Use new diagnostics functions.
4222 * src/names.c: Likewise.
4224 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4226 * configure.ac: Fixed check for setsockopt
4228 * src/create.c: Do not zero-terminate name field if
4229 the name is exactly 100 characters long.
4230 (write_ustar_long_name): Fixed cheking for unsplittable
4233 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4235 * src/create.c (start_header): Removed debugging hook
4236 (dump_file): Fixed handling of linkname field.
4237 * src/names.c (safer_name_suffix): If the input
4238 file name ends with a slash, output one should do so
4240 * doc/tar.texi: Documented --format=ustar
4242 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4244 * src/tar.h (archive_format): USTAR_FORMAT: New type.
4245 * src/create.c: Added POSIX.1-1988 support.
4246 * src/names.c (safer_name_suffix): Skip leading ./
4247 * src/tar.c: New option --format=ustar forces
4248 POSIX.1-1988 archive format.
4249 * tests/delete03.sh: Updated.
4250 * tests/extrac04.sh: Updated.
4251 * tests/multiv01.sh: Updated.
4253 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4255 * src/list.c (read_and): Initialize current_stat_info
4256 and extended_header at the start of the loop.
4257 * src/names.c (all_names_found): Check if the argument
4258 contains valid filename. Fixes coredump on `not_a_tar_file'
4259 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
4260 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
4261 Fixes `pax-big-10g' bug.
4263 2003-11-12 Paul Eggert <eggert@twinsun.com>
4265 Fix some C compatibility bugs reported by Joerg Schilling.
4267 * src/common.h (stripped_prefix_len): Fix misspelling
4268 "stripped_path_len" in declaration.
4269 * src/rmt.c (main): Use "return FOO;" rather than
4270 "exit (FOO);"; we no longer have to worry about
4271 pre-ANSI hosts that mishandled returned values from "main".
4272 * src/tar.c (main): Likewise. This avoids warnings on some
4274 * src/system.c: Include signal.h, for 'kill'.
4275 * src/system.h (DEV_BSIZE): Remove.
4276 (DEFAULT_ST_BLKSIZE): New macro.
4277 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
4278 * src/tar.c (enum): Remove comma just before }.
4280 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4282 * src/list.c (decode_header): Initialize st_atime and
4285 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4287 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
4288 Bunk <bunk@fs.tum.de> for reporting.
4289 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
4290 <martin@xemacs.org> for spotting.
4292 2003-11-04 Paul Eggert <eggert@twinsun.com>
4294 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
4297 2003-10-26 Paul Eggert <eggert@twinsun.com>
4299 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
4300 Bug reported by Christian Weisgerber.
4302 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4306 * src/tar.c (decode_options): Removed superfluous archive format
4308 * doc/tar.texi: Documented new features.
4310 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4313 * THANKS: Added Wojciech Polak
4314 * configure.ac: Added checks for missing functions. Raised
4315 version number to indicate alpha release.
4316 * lib/Makefile.am: Added missing headers
4317 * lib/waitpid.c: Added missing includes.
4318 * src/extract.c: Likewise.
4319 * src/names.c: Removed spurious includes.
4320 * src/xheader.c: Likewise.
4321 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
4322 macro overriding broken mkdir prototypes.
4324 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4326 * configure.ac: Check for dev_t and ino_t.
4327 * m4/Makefile.am: Added missing files.
4328 * src/system.c: New file.
4329 * src/Makefile.am: Added system.c
4330 * src/common.h: Prototypes for functions from system.c
4331 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
4332 * src/buffer.c: Moved system dependencies to system.c
4333 * src/compare.c: Likewise.
4334 * src/create.c: Likewise.
4335 * src/delete.c: Likewise.
4336 * src/extract.c: Likewise.
4337 * src/rtapelib.c: Likewise.
4339 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4341 Implemented --occurrence option.
4344 * src/tar.c: New option --occurrence.
4345 * src/common.h (occurrence_option): New global
4346 (struct name): Changed `found' member to `uintmax_t
4348 (names_done): Removed
4349 (all_names_found): Changed prototype.
4350 (ISFOUND,WASFOUND): New macros
4351 * src/delete.c (delete_archive_members): Honor --occurrence
4353 * src/list.c (read_and): Likewise.
4354 * src/names.c: Count number of occurrences of each name in the
4356 (name_match): Honor --occurrence option.
4357 (names_done): Removed
4358 (all_names_found,names_notfound): Rewritten.
4360 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4362 * src/tar.c: Removed extra precaution regarding
4363 subcommand_option == CAT_SUBCOMMAND
4364 * lib/Makefile.am: Updated
4366 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4368 * src/common.h (names_done): New function.
4369 * src/names.c: Likewise.
4370 * src/list.c (read_and): Use all_names_found() as `while'
4372 * src/tar.c: New option --first-copy
4375 2003-09-24 Paul Eggert <eggert@twinsun.com>
4377 * src/rmt.c (main): Don't translate Copyright string; international
4378 law says the word "Copyright" should be in English.
4379 * src/tar.c (decode_options): Likewise.
4381 2003-09-22 Paul Eggert <eggert@twinsun.com>
4383 * doc/tar.texi (extracting untrusted archives): New section.
4385 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
4386 Return size_t, not pointer, so that we don't have to worry about
4387 violating the C standard by converting char const * to char *.
4388 All callers changed.
4389 * src/names.c (stripped_path_len): Likewise. Strip file system
4390 prefix, too. Count adjacent slashes as if they were one slash;
4391 that is the POSIX standard.
4393 2003-09-17 Paul Eggert <eggert@twinsun.com>
4395 * README-alpha: Document maintainer tool assumptions a bit. GNU
4396 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
4397 Debian bug 211447. Fix minor misspellings/whitespace nits.
4399 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
4400 gl_USE_SYSTEM_EXTENSIONS.
4402 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
4403 * m4/.cvsignore: Add restrict.m4, time_r.m4.
4405 2003-09-17 Paul Eggert <eggert@twinsun.com>
4407 * bootstrap: Don't use "for option; do";
4408 Solaris 8 /bin/sh doesn't like that.
4410 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4412 * README-alpha: Updated
4413 * bootstrap: Updated
4415 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4417 * README-alpha: Updated
4418 * bootstrap: Updated
4419 * po/POTFILES.in: Added src/xheader.c
4420 * src/common.h (cut_path_elements): Added proto.
4422 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4424 * src/buffer.c: Use ngettext where appropriate.
4425 * src/compare.c: Likewise.
4426 * src/create.c: Likewise.
4427 * src/misc.c: Likewise.
4428 * src/tar.c: Likewise.
4429 * src/update.c: Likewise.
4431 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4433 * .cvsignore: Added *.shar.gz
4436 * src/common.h (strip_path_elements): New variable.
4437 * src/extract.c (extract_archive): Implemented --strip-path
4438 * src/names.c (cut_path_elements): New function.
4439 * src/tar.c: New option --strip-path=NUM.
4440 (decode_options) Assign boolean values to bool variables.
4442 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4444 * src/delete.c: Fixed deletion from the POSIX archives.
4445 * src/list.c (read_header): Minor change.
4446 * src/tar.c (main): Do not check for volume_label_option
4447 if subcommand_option is not CREATE_SUBCOMMAND.
4448 * src/xheader.c (xheader_decode): Store the header as
4449 well (for eventual delete).
4451 * tests/incremen.sh: Explicitly request GNU format. This will
4452 disappear when GNU extended header keywords are working.
4453 * tests/multiv01.sh: Likewise
4454 * tests/volume.sh: Likewise
4456 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4458 * src/create.c: Support for "linkpath" extended keyword.
4459 * src/xheader.c (decode_record): Reversed the return
4462 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4464 * configure.ac: Allow to redefine the default output format.
4465 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
4466 (archive_format_string): New function.
4467 (usage): Updated help output.
4472 2003-09-02 Paul Eggert <eggert@twinsun.com>
4474 * src/common.h (destroy_stat, xheader_decode, xheader_store,
4475 xheader_read, xheader_finish, xheader_destroy): Add decls;
4478 * src/create.c (write_extended): Remove unused local 'bufsize'.
4480 * src/delete.c (delete_archive_members): Handle case of
4481 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
4482 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
4483 occurs, as it's not possible.
4484 * src/update.c (update_archive): Likewise.
4486 Use "const" when possible in new code.
4487 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
4488 (fmttab): Now const. All uses changed.
4489 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
4490 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
4491 decode_record, xheader_store, xheader_print, code_string, code_time,
4492 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
4493 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
4494 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
4495 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
4496 uid_coder, uid_decoder, uname_coder, uname_decoder):
4497 Use pointers to const when possible.
4498 (xhdr_tab): Now const.
4500 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
4501 (set_archive_format): Report an error if no format name matches,
4502 instead of returning an undefined value.
4504 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
4505 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
4506 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
4507 uid_decoder, uname_decoder): Remove unused keyword arg.
4510 * src/tar.c (set_archive_format): Now static.
4511 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
4513 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
4514 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
4515 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
4516 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
4517 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
4518 Remove forward decls; no longer needed.
4519 (xhdr_tab): Move to end, so that the forward decls aren't needed.
4520 Add a forward declaration.
4522 Use 'bool' in new code, when appropriate.
4523 * src/xheader.c (decode_record): Return bool, not int.
4524 * src/common.h (read_header): Since it accepts bool, change
4525 all callers to use false and true rather than 0 and 1.
4527 * src/xheader.c (decode_record): Fix misspelling in diagnostic
4528 "extended headed" -> "extended header".
4530 GNU coding style fixes.
4531 * src/xheader.c (decode_record, xheader_decode):
4532 Do not use decls like "char *p, *q;".
4535 (xheader_store): Avoid parentheses around object operand of sizeof.
4537 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4539 * src/create.c (start_header): Store long file names
4540 in "path" keyword of an extended header if in POSIX
4542 (finish_header): print header before calling write_extended().
4543 * src/list.c (list_archive): Always decode the header. This
4544 is necessary so the extended header is processed and the correct
4545 filename is printed no matter what the state of verbose_option.
4546 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
4547 for the time being).
4549 2003-09-01 Paul Eggert <eggert@twinsun.com>
4551 Update from gnulib, and correct fnmatch to fnmatch-gnu.
4552 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
4554 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
4556 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
4557 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
4558 copying rules from gnulib module descriptions.
4559 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
4560 Update from gnulib modules alloca, fnmatch, getline, stdbool.
4561 * m4/.cvsignore: Add utimes-null.m4. Sort.
4563 2003-09-01 Sergey Poznyakoff
4565 Added initial support for creating POSIX headers.
4567 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
4568 (string_to_chars): New functions
4569 (struct xheader): Changed structure
4570 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
4572 * src/create.c (string_to_chars): New function.
4573 (write_extended): New function
4574 (start_header): Create extended POSIX headers if necessary.
4575 (finish_header): Likewise.
4576 * src/list.c (print_header): Take user/group from
4578 * src/names.c (gid_to_gname,gname_to_gid)
4579 (uid_to_uname,uname_to_uid): Changed prototypes.
4580 * src/tar.c: New option --format.
4581 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
4582 (struct extra_header): Removed unused structure.
4583 (union block.extra_header): Removed unused member.
4584 * src/xheader.c: Implemented coder functions.
4585 * bootstrap: Added obstack.
4586 * lib/.cvsignore: Likewise.
4587 * configure.ac: Added 'gl_OBSTACK'
4588 * m4/Makefile.am: Added new files.
4589 * m4/.cvsignore: Likewise.
4590 * TODO: Minor formatting change
4592 2003-08-31 Sergey Poznyakoff
4594 Added initial support for POSIX extended and STAR headers
4595 (only for listing/extracting).
4597 * src/xheader.c: New file.
4598 * src/Makefile.am: Added xheader.c
4599 * src/tar.h (struct star_header): New datatype
4600 (XHDTYPE,XGLTYPE): New defines
4601 (enum archive_format:STAR_FORMAT): New member
4602 (struct tar_stat_info): New datatype.
4603 (union block.star_header): New member.
4604 * src/common.h (orig_file_name,current_file_name)
4605 (current_trailing_slash,current_link_name): Removed variables.
4606 (current_stat_info): New variable
4607 (current_stat): Removed
4608 (extended_header): New variable
4609 (decode_header): Changed prototype.
4610 * src/list.c (decode_header): Added initial support for POSIX extended
4612 (skip_member): Check oldgnu_header only if current_format is set
4614 * src/buffer.c: Use current_stat_info
4615 * src/compare.c: Likewise.
4616 * src/create.c: Likewise.
4617 * src/delete.c: Likewise.
4618 * src/incremen.c: Likewise.
4619 * src/mangle.c: Likewise.
4620 * src/update.c: Likewise.
4621 * src/extract.c: Likewise.
4622 (make_directories): Improved check for the existence of the directory
4623 * src/tar.c (destroy_stat): New function.
4625 2003-08-29 Paul Eggert <eggert@twinsun.com>
4627 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
4628 was worth (e.g., different users in en_GB disagree about -ize
4630 * po/en_GB.po: Remove.
4632 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4636 * src/tar.c: Removed support for the obsolete command line
4638 * doc/tar.texi: Removed references to the obsolete command
4641 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4645 * doc/tar.texi: Updated
4646 * src/common.h (check_links_option): New variable
4647 (orig_file_name): New variable
4648 (check_links): New proto.
4649 * src/create.c (struct link.nlink): New member
4650 (link_table): Static for the module.
4651 (dump_file): Update `link' member when adding new links
4653 (check_links): New function.
4654 * src/list.c (print_header): Use orig_file_name.
4655 * src/tar.c: New option --check-links. Changed semantics of
4656 -o to comply to UNIX98 when extracting and to its previous
4657 semantics otherwise.
4658 (main): Call check_links if --check-links. was given.
4660 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4662 * src/list.c (print_header): Revised
4663 * NEWS: Started the entry for 1.13.26
4664 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
4666 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4668 * .cvsignore: Added to the repository.
4669 * doc/.cvsignore: Likewise.
4670 * lib/.cvsignore: Likewise.
4671 * m4/.cvsignore: Likewise.
4672 * po/.cvsignore: Likewise.
4673 * scripts/.cvsignore: Likewise.
4674 * src/.cvsignore: Likewise.
4675 * tests/.cvsignore: Likewise.
4677 * lib/Makefile.am: Added exitfail.[hc]
4678 * src/misc.c (chdir_do): Fixed call to restore_cwd
4679 * src/buffer.c (flush_read): Fixed behavior on short
4680 reads right after opening the new archive (multiv01.sh test).
4681 (new_volume): Special handling for "-".
4682 * src/list.c (print_header): Print trailing slash if
4683 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
4684 * tests/multiv01.sh: Minor changes.
4685 * m4/Makefile.am: Added missing files.
4687 2003-07-05 Paul Eggert <eggert@twinsun.com>
4689 Finish the checkin begin yesterday.
4691 * NEWS: Document the user-visible changes installed in the last
4694 * TODO: New file (actually, resurrected; but with new contents).
4696 * src/list.c (read_and): Give full type for procedure arg.
4697 (read_header): Strip trailing slashes, setting current_trailing_slash.
4698 (tartime): Avoid int overflow when printing year (!).
4699 (print_header): New arg specifying block ordinal. All uses changed.
4700 Print link as 'h' type. Give labels for long links and names.
4702 * src/misc.c (contains_dot_dot): Moved to names.c
4703 (must_be_dot_or_slash): New function.
4704 (safer_rmdir): Use it.
4705 (remove_any_file): Now takes enum as option, not boolean.
4706 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
4707 to unlink a directory.
4708 (deref_stat): Accept bool, not int.
4710 * src/names.c (namelist_match): Allow partial matches only if
4712 (hash_string_hasher): Renamed from hash_avoided_name.
4713 (hash_string_compare): Renamed from compare_avoided_anames.
4714 (hash_string_insert, hash_string_lookup): New functions.
4715 (add_avoided_name, is_avoided_name): Use them.
4716 (safer_name_suffix): New function.
4717 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
4719 * src/rmt.c: Don't include print-copyr.h.
4720 (prepare_input_buffer): New arg FD.
4721 Do not read more than INT_MAX bytes at once,
4722 since it breaks on some brain damaged Tru64 hosts.
4724 when retrying instead of subtracting 1024; for speed.
4725 (main): Use gettext to translate (C), not print_copyright.
4727 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
4728 now that gnulib handles this.
4729 Include <stddef.h> and <limits.h> unconditionally, now that we assume
4731 Assume that offsetof is defined in stddef.h.
4732 Do not include <sys/param.h>.
4733 (realloc, lseek): Do not declare.
4734 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
4735 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
4736 declarations, since we now assume C89 or better.
4737 (PARAMS): Remove, as we now assume C89. All uses changed.
4738 (bindtextdomain, textdomain): Include <gettext.h> to define.
4739 Include <unlocked-io.h>.
4740 (valloc): Define if not defined, and if valloc is not declared.
4741 (xstrdup): Remove decl.
4743 * src/tar.c: Do not include <print-copyr.h>.
4744 Include <getdate.h>.
4745 (get_date): Remove decl.
4746 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
4747 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
4748 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
4749 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
4750 (long_options, decode_options): Use them.
4751 (OVERWRITE_DIR_OPTION): Remove.
4752 (long_options): New options --index-file, --no-overwrite-dir.
4753 Remove --overwrite-dir option.
4754 (usage): Use PACKAGE_BUGREPORT.
4755 (decode_options): Terminate new argv properly.
4756 Use PACKAGE_NAME, PACKAGE_VERSION.
4757 If verbose, report how we grokked any textual date option.
4758 (main): Add support for index-file.
4760 * tests/Makefile.am: Convert to UTF-8.
4761 (AUTOMAKE_OPTIONS): Remove.
4762 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
4763 (INCLUDES): Remove ../intl.
4764 (LDADD): Don't link libtar.a twice.
4766 * tests/genfile.c: Convert to UTF-8.
4767 Don't include <print-copyr.h>.
4768 (DEFAULT_PATTERN): Renamed from DEFAULT.
4769 (ZEROS_PATTERN): Renamed from ZEROS.
4770 (main): Use gettext to translate (C), not print_copyright.
4772 2003-07-04 Paul Eggert <eggert@twinsun.com>
4774 Revamp to meet current standards of autoconf, automake,
4775 gettext, and gnulib, and incorporate new translations.
4777 * config/config.guess, config/config.sub, config/depcomp,
4778 config/install-sh, config/mdate-sh, config/missing,
4779 config/mkinstalldirs, config/texinfo.texi:
4780 Moved here from parent directory, or from doc.
4781 * config.hin: Renamed from config.h.in.
4782 * config/config.rpath: New file.
4784 * intl: Remove this subdirectory.
4786 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
4788 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
4789 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
4790 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
4791 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
4792 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
4793 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
4796 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
4797 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
4798 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
4799 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
4800 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
4801 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
4802 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
4803 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
4804 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
4805 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
4806 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
4807 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
4808 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
4809 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
4810 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
4811 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
4812 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
4813 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
4814 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
4816 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
4817 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
4818 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
4819 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
4820 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
4821 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
4822 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
4823 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
4824 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
4825 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
4826 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
4827 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
4828 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
4829 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
4830 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
4831 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
4832 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
4833 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
4835 Upgrade to latest version from external source. The file "bootstrap"
4836 now grabs these automatically, so we needn't keep track of them
4837 in this change long any longer.
4839 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
4840 (SUBDIRS): Remove intl.
4841 * PORTS: Update for star, Macintosh.
4842 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
4843 Bison 1.875, gettext 0.12.1.
4844 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
4845 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
4846 (AC_CONFIG_AUX_DIR): New.
4847 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
4849 (AC_PREREQ): Bump from 2.52 to 2.57.
4850 (AC_GNU_SOURCE): New.
4851 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
4852 we no longer support K&R C.
4854 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
4855 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
4856 (AC_MBSTATE_T): Remove.
4857 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
4858 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
4859 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
4860 (AM_STDBOOL_H): Add.
4861 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
4862 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
4863 (AC_CHECK_TYPE): Remove ssize_t.
4864 (gt_TYPE_SSIZE_T): Add.
4865 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
4866 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
4867 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
4868 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
4869 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
4870 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
4871 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
4872 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
4873 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
4874 napms, poll, select, strstr, usleep.
4875 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
4876 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
4877 (AM_GNU_GETTEXT): Use external and need-ngettext options.
4878 (AM_GNU_GETTEXT_VERSION): New.
4879 (AC_OUTPUT): Remove intl/Makefile.
4881 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4882 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
4883 * doc/fdl.texi: Update to current GNU version.
4884 * doc/gettext.texi: Update to current coreutils version,
4885 plus a copyright notice.
4886 * doc/tar.texi: Switch to new method for doing copyright notices.
4887 Use @acronym instead of @sc where appropriate.
4888 Remove empty examples. Give a few more examples.
4890 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4891 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
4892 are built up in pieces with +=.
4893 (noinst_HEADERS, INCLUDES): Remove.
4894 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
4895 (libtar_a_LIBADD): Use $ rather than @.
4896 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
4898 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
4899 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
4900 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
4901 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
4902 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
4903 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
4904 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
4905 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
4906 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
4907 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
4908 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
4909 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
4910 prereq.m4, xstrtoimax.m4.
4912 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
4913 be translated, since it's not a user-visible tool.
4915 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4917 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4918 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
4919 consistency with coreutils.
4920 (LDADD): Link LIBINTL after libtar.a, since
4921 it's now external and should stand by itself.
4923 * src/buffer.c (print_total_written): Adjust to new human.h
4925 (child_open_for_compress): Do not increase size to BLOCKSIZE.
4926 (open_archive): Open index file name.
4927 Strip trailing slahes from file names.
4928 (flush_write): Set size to 0 if not saving names.
4929 (flush_write, flush_read): Use safer_name_suffix rather than
4932 * src/common.h: Include <quote.h>.
4933 (absolute_names_option, atime_preserve_option, backup_option,
4934 block_number_option, checkpoint_option, dereference_option,
4935 force_local_option, ignore_failed_read_option, ignore_zeros_option,
4936 incremental_option, interactive_option, multi_volume_option,
4937 numeric_owner_option, one_file_system_option, recursive_unlink_option,
4938 read_full_records_option, remove_files_option, same_order_option,
4939 show_omitted_dirs_option, sparse_option, starting_file_option,
4940 to_stdout_option, totals_option, touch_option, verify_option,
4941 dev_null_output, now_verifying, we_are_root): Now bool, not int.
4942 (current_trailing_slash, index_file_name, recent_long_name_blocks,
4943 recent_long_link_blocks): New vars.
4944 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
4945 (OVERWRITE_OLD_DIRS): Remove.
4946 (enum remove_option): New enum.
4947 (remove_any_file): Use it as option arg, not int.
4948 (is_avoided_name, contains_dot_dot): Return bool, not int.
4949 (safer_name_suffix): New decl.
4951 * src/compare.c (now_verifying): Now bool, not int.
4952 (fill_in_sparse_array): Move to extract.c. Now returns bool;
4953 all callers changed to test for failure.
4954 (diff_sparse_files): Take size from current_stat, not from param.
4955 (diff_archive): Do not count trailing slashes in archives.
4956 (verify_volume): Test for header failure after loop, not before.
4958 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
4959 All callers changed.
4960 (start_header): Clear devmajor and devminor fields, too.
4961 (finish_header): New arg block_ordinal.
4962 (init_sparsearray): Now extern. Set sp_array_size to
4963 SPARSES_IN_OLDGNU_HEADER if it is zero.
4964 (dump_file): Keep link table as a hash.
4965 Do not count "file changed as we read it" as a failure.
4967 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
4968 Move extern decl to common.h.
4970 * src/extract.c (we_are_root): Now bool, not int.
4971 (check_time): Warn about implausibly old time stamps.
4972 (set_stat): Use utimbuf, not stat_info.
4973 (prepare_to_extract): New arg DIRECTORY.
4974 (fill_in_sparse_array): Moved here from compare.c.
4975 (extract_sparse_file): Now returns off_t, giving size left.
4976 Truncate file at end.
4977 (extract_archive): Use safer_name_suffix rather than rolling our own.
4978 Use fill_in_sparse_array rather than rolling our own.
4979 Strip trailing slashes more effectively.
4980 Check for unsafe names.
4982 * src/incremen.c (struct directory): nfs and found are now of type
4984 (gnu_restore): Now takes directory name as argument, not offset
4985 of directory name in a global. All uses changed.
4986 (CURRENT_FILE_NAME): Remove.
4989 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
4992 2002-09-30 Paul Eggert <eggert@twinsun.com>
4994 * src/rmt.c (prepare_input_buffer): Renamed form
4995 prepare_record_buffer. All uses changed. Do not assume that
4996 size_t is the same width as int.
4998 2002-03-29 Paul Eggert <eggert@twinsun.com>
5000 * src/incremen.c (get_directory_contents):
5001 If ignore_failed_read_option, only warn about
5002 get_directory_contents failures. Fix suggested by
5005 2002-01-31 Mark W. Eichin <eichin@thok.org>
5007 * src/buffer.c (child_open_for_compress): Don't try to read
5008 past the end of the buffer.
5010 2001-10-11 Jim Meyering <meyering@lucent.com>
5012 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
5013 and quote_n (1, ... to avoid clobbering a buffer.
5015 2001-09-26 Paul Eggert <eggert@twinsun.com>
5017 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
5019 * src/buffer.c (flush_read): Don't diagnose partial blocks before
5020 end of file; just ignore them silently.
5022 * src/list.c (read_header): Don't keep around extended name
5023 and link info indefinitely; keep it only for the next file.
5024 This fixes a bug introduced in 1.13.24, and removes the need
5025 for some static variables. Set recent_long_name and
5026 recent_long_link to zero if there were no long links; this
5027 avoids a violation of ANSI C rules for pointers in delete.c.
5028 * THANKS: Add Christian Laubscher.
5030 2001-09-26 Jim Meyering <meyering@lucent.com>
5032 * doc/tar.texi (Remote Tape Server): is know -> is known
5034 2001-09-25 Paul Eggert <eggert@twinsun.com>
5036 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
5037 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
5038 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
5039 want to distinguish EINVAL and EILSEQ.
5041 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
5043 * src/extract.c (maybe_recoverable):
5044 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
5046 2001-09-22 Paul Eggert <eggert@twinsun.com>
5048 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
5050 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
5053 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
5054 * PORTS: Add copyright notice, 'star' reference.
5055 * README-alpha: Add copyright notice, autoconf 2.52 patch.
5056 * THANKS: Add Christophe Kalt.
5057 * config.sub: Upgrade to 2001-09-14 version.
5059 * configure.ac (ALL_LINGUAS): Add ko.
5060 * po/ko.po: Resurrected file.
5062 * doc/convtexi.pl: Add coding advice for Emacs.
5064 * doc/getdate.texi: Add copyright notice.
5066 * doc/mdate-sh: Upgrade to automake 1.5 version.
5068 * doc/tar.texi (extracting files): Mention --to-stdout.
5069 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
5070 (Overwrite Old Files): Likewise.
5072 * lib/Makefile.am (noinst_HEADERS):
5073 Remove copysym.h. Add print-copyr.h, unicodeio.h.
5074 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
5076 * lib/copysym.c, lib/copysym.h: Remove.
5077 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
5078 lib/unicodeio.h: New files.
5080 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
5081 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
5083 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
5084 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
5086 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
5087 * m4/isc-posix.m4: Remove.
5089 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
5091 * po/POTFILES.in: Add copyright notice.
5093 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
5095 * tests/Makefile.am (LDADD): Likewise.
5097 * src/buffer.c (write_archive_buffer, close_archive):
5098 If an archive is a socket, treat it like a FIFO.
5099 (records_read, records_written): New vars.
5100 (write_archive_to_stdout): Now bool, not int.
5101 (open_archive, flush_write, flush_read): Keep records_read and
5102 records_written up to date.
5104 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
5105 (write_archive_to_stdout): Now bool, not int.
5106 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
5107 (read_header): Now takes bool arg. Existing callers modified
5108 to pass 0, unless otherwise specified.
5110 * src/delete.c (records_read): Remove; now a global.
5111 (acting_as_filter): Now bool, not int.
5112 (recent_long_name, recent_long_link, recent_long_name_blocks,
5113 recent_long_link_blocks, records_read, records_written): New decls.
5114 (records_skipped): New var.
5115 (move_archive): Don't divide by zero if arg is 0.
5116 Use the above vars to compute how far to move.
5117 (write_recent_blocks): New function.
5118 (delete_archive_member): Pass 1 to read_header, so that it doesn't
5119 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
5120 Keep track of how many records have been skipped.
5121 Let the buffer code count records.
5122 When copying a header, copy any extended headers that came before it.
5124 * src/extract.c (extract_archive): When marking a directory to be
5125 updated after symlinks, stat all directories after it in the
5126 delayed-set-stat list too, since they will be checked after
5127 symlinks. Add support for --overwrite-dir.
5129 * src/list.c (recent_long_name, recent_long_link,
5130 recent_long_name_blocks, recent_long_link_blocks): New vars.
5131 (read_and): Pass 0 to read_header.
5132 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
5133 headers into new vars. Null-terminate incoming symbolic links.
5135 * src/rmt.c: Include print-copyr.h, not copysym.h.
5136 (main): Use print_copyright, not copyright_symbol.
5137 * src/tar.c (decode_options): Likewise.
5138 (OVERWRITE_DIR_OPTION): New constant.
5139 (long_options, usage, decode_options): Add --overwrite-dir.
5141 * src/tar.h: Put copyright notice into documentation.
5143 * tests/Makefile.am (TESTS): Add delete03.sh.
5144 * tests/delete03.sh: New file.
5146 * tests/genfile.c: Include print-copyr.h, not copysym.h.
5147 (main): Use print_copyright, not copyright_symbol.
5148 Include <argmatch.h>.
5149 (pattern_strings): Remove.
5150 (pattern_args, pattern_types): New constants.
5151 (main): Use XARGMATCH, not argmatch.
5153 2001-09-20 Jim Meyering <meyering@lucent.com>
5155 * lib/xstrtol.c (strtoimax): Guard declaration with
5156 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
5157 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
5158 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
5159 (strtoumax): Likewise, for completeness (it wasn't necessary).
5160 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
5161 Check for declaration of strtoimax.
5162 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
5163 Check for declaration of strtoumax.
5165 2001-09-16 Paul Eggert <eggert@twinsun.com>
5167 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
5169 2001-09-14 Paul Eggert <eggert@twinsun.com>
5171 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
5173 * README-alpha: Describe automake patch.
5175 * configure.ac (LIBOBJS):
5176 Remove automake 1.4 workaround, as we're using 1.5 now.
5177 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
5179 * lib/copysym.c: Include stddef.h, for size_t.
5180 Include langinfo.h if needed.
5181 Use locale_charset only if USE_INCLUDED_LIBINTL;
5182 if not, use nl_langinfo (CODESET) if available.
5184 2001-09-13 Paul Eggert <eggert@twinsun.com>
5186 * config.guess, config.sub: Sync with canonical versions.
5188 * configure.ac (jm_PREREQ_XGETCWD): Add.
5190 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
5191 (libtar_a_SOURCES): Add copysym.c.
5192 * copysym.c, copysym.h: New files.
5194 * lib/error.c: Sync with fileutils version.
5196 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
5197 * m4/getcwd.m4: New file.
5198 * m4/uintmax_t.m4: Remove.
5200 * m4/gettext.m4 (AM_WITH_NLS):
5201 Fix bug with calculating version of Bison 1.29.
5202 Reported by Karl Berry.
5204 * src/Makefile.am (datadir): Remove.
5206 * src/rmt.c: Include copysym.h.
5207 (main): Use copyright_symbol to translate copyright notice,
5209 * src/tar.c: Likewise.
5210 * tests/genfile.c: Likewise.
5212 * src/system.h (MB_LEN_MAX): New symbol.
5214 2001-09-11 Paul Eggert <eggert@twinsun.com>
5216 * src/extract.c (struct delayed_set_stat): New member
5218 (delay_set_stat): Initialize it to 0.
5219 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
5220 taking an extra stat ourselves. All callers changed.
5221 (set_stat): Likewise.
5222 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
5223 If false, stop when encountering a struct whose 'after_symlinks'
5224 member is true. Otherwise, go through all structures but check
5225 them more carefully. All callers changed.
5226 (extract_archive): When extracting a deferred symlink, if its parent
5227 directory's status needs fixing, then mark the directory as needing
5228 to be fixed after symlinks.
5229 (extract_finish): Fix status of ordinary directories, then apply
5230 delayed symlinks, then fix the status of directories that are
5231 ancestors of delayed symlinks.
5233 * src/rtapelib.c (rexec):
5234 Remove declaration; it ran afoul of prototypes on Crays.
5235 Reported by Wendy Palm of Cray.
5237 2001-09-06 Paul Eggert <eggert@twinsun.com>
5239 * lib/strtoimax.c (HAVE_LONG_LONG):
5240 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
5241 (strtoimax): Use sizeof (long), not
5242 sizeof strtol (ptr, endptr, base),
5243 to work around bug in IBM C compiler.
5245 2001-09-04 Paul Eggert <eggert@twinsun.com>
5247 * lib/xgetcwd.c: Include "xalloc.h".
5248 (xgetcwd): Do not return NULL when memory is exhausted; instead,
5249 report an error and exit.
5251 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
5252 (jm_PREREQ): Use it.
5254 2001-09-03 Paul Eggert <eggert@twinsun.com>
5256 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
5257 (jm_PREREQ_XGETCWD): New macro.
5259 * lib/exclude.c (fnmatch_no_wildcards):
5260 Fix typo that caused us to do case-folding
5261 search even when that was not desired. This occurred only in the
5264 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
5265 Do not include xalloc.h.
5266 (INITIAL_BUFFER_SIZE): New symbol.
5267 Do not use xmalloc / xrealloc, since the caller is responsible for
5268 handling errors. Preserve errno around `free' during failure.
5269 Do not overrun buffer when using getwd.
5271 * lib/xgetcwd.c (xgetcwd):
5272 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
5273 to decide whether to use getcwd (NULL, 0).
5275 2001-09-02 Paul Eggert <eggert@twinsun.com>
5277 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
5279 2001-09-01 Jim Meyering <meyering@lucent.com>
5281 * exclude.c: Use `""', not `<>' to #include non-system header files.
5282 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
5283 and strncasecmp as r-values. Unixware didn't have declarations.
5285 2001-08-31 Jim Meyering <meyering@lucent.com>
5287 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
5288 Use an initial, malloc'd, buffer of length 128 rather than
5289 a statically allocated one of length 1024.
5291 2001-08-30 Paul Eggert <eggert@twinsun.com>
5293 * lib/utime.c: Include full-write.h.
5294 * lib/xstrtol.c (strtoimax): New decl.
5296 2001-08-29 Paul Eggert <eggert@twinsun.com>
5298 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
5300 * src/create.c (dump_file): Relativize link names before dumping.
5301 This fixes a bug reported by Jose Pedro Oliveira.
5303 * src/create.c (dump_file): Use offsetof when computing sizes for
5304 struct hack; this avoids wasted space in some cases.
5305 * src/incremen.c (note_directory, find_directory): Likewise.
5306 * src/names.c (name_gather, addname): Likewise.
5308 * src/extract.c (extract_archive): Use strcpy, not memcpy,
5309 for consistency with other code that does similar things.
5310 * src/names.c (name_gather): Likewise.
5312 * src/names.c (read_name_from_file, name_next, name_gather,
5313 add_hierarchy_to_namelist): Avoid quadratic behavior when
5314 reallocating buffers. Check for buffer size overflow.
5315 (addname): Avoid unnecessary clearing of memory.
5317 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
5319 * src/extract.c (delay_set_stat): Fix off-by-one error in file
5320 name size allocation that caused core dumps.
5322 2001-08-28 Paul Eggert <eggert@twinsun.com>
5324 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
5326 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
5327 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
5328 (daddr_t): Remove; no longer used.
5329 (jm_PREREQ_HUMAN): Add.
5331 * acconfig.h: Remove; no longer needed.
5333 * config.guess, config.sub:
5334 New files, from automake 1.5. Gettext 0.10.39 needs them.
5335 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
5337 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
5338 (SUBDIRS): Put intl before lib, as gettext requires.
5340 * ABOUT-NLS: Upgrade to gettext 0.10.39.
5341 * intl: Upgrade entire directory to gettext 0.10.39.
5342 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
5343 New files, from gettext 0.10.39.
5344 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
5345 Upgrade to gettext 0.10.39,
5346 * po/Makefile.in.in: Likewise, except fix a typo in its copying
5348 * po/cat-id-tbl.c, po/stamp-cat-id:
5349 Remove; no longer used by gettext 0.10.39.
5350 * po/ChangeLog: New file.
5352 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
5353 $(srcdir)/tar.texi: Likewise.
5354 * doc/freemanuals.texi: New file.
5355 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
5356 `fileds' -> `fields'
5357 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
5359 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
5360 (noinst_HEADERS): Add quote.h.
5361 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
5363 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
5365 * lib/full-write.c, lib/savedir.c: Comment fix.
5367 * lib/pathmax.h: Remove.
5369 * lib/quote.c, lib/quote.h: New files.
5371 * lib/xgetcwd.c: Don't include pathmax.h.
5372 Include stdlib.h and unistd.h if available.
5374 (xmalloc, xstrdup, free): Remove decls.
5375 (xgetcwd): Don't assume sizes fit in unsigned.
5376 Check for overflow when computing sizes.
5377 Simplify reallocation code.
5379 * lib/xmalloc.c: Quote failure tests.
5381 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
5383 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
5384 similar to strtol.c.
5385 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
5386 (verify): New macro.
5387 (strtoumax, uintmax_t, strtoull, strtol): Remove.
5388 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
5389 (strtoimax): Renamed from strtoumax. All uses of unsigned values
5390 changed to signed values. Check sizes at compile-time, not
5391 run-time. Prefer strtol to strtoll if both work.
5394 * lib/xstrtol.h (xstrtoimax): New decl.
5396 * m4/Makefile.am (EXTRA_DIST):
5397 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
5398 longlong.m4, xstrtoimax.m4.
5400 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
5401 Remove; now done by autoconf.
5402 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
5403 Use AC_CHECK_TYPE instead of merely looking for the header.
5405 * m4/uintmax_t.m4: Use shorter comment.
5407 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
5408 Quote first arg of AC_DEFUN.
5409 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
5410 is needed to parse the include file.
5411 Simplify logic behind the args to AC_REPLACE.
5413 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
5415 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
5418 Use "Copyright %d" to simplify the translator's job in the future.
5419 Advise translator about circle-C.
5420 * src/tar.c: (decode_options): Likewise.
5421 * tests/genfile.c (main): Likewise.
5423 2001-08-28 Jim Meyering <meyering@lucent.com>
5425 * lib/argmatch.c: Include "quote.h".
5426 (argmatch_invalid): Quote the context.
5428 * lib/dirname.c (dir_name): Fix typo on PC platforms.
5430 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
5431 Use single-quote for local .h files.
5433 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
5435 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
5438 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
5439 invoking mktime the last time.
5441 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
5443 * lib/rename.c: Major rewrite by Volker Borchert to use system
5444 rename function, but to work around problems with trailing
5447 * lib/strtoll.c: New file, from glibc.
5448 * lib/strtoul.c: Update from glibc.
5450 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
5451 Add support for signed numbers, too.
5452 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
5454 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
5456 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
5457 (main): Use generic names in debugging output.
5458 * lib/strtoimax.c: Plus add the following changes of my own:
5459 (main): Use accurate names in debugging output.
5461 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
5464 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
5465 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
5466 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
5467 m4/utime.m4, m4/utimes.m4:
5468 Quote the first argument in each use of AC_DEFUN.
5470 * m4/getline.m4: Don't use string.h.
5472 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
5474 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
5476 2001-08-27 Paul Eggert <eggert@twinsun.com>
5478 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
5480 The biggest change is the new --exclude semantics and options.
5481 The basic idea was suggested by Gerhard Poul; thanks!
5483 * NEWS: Describe new --exclude semantics and options, and bug fixes.
5484 * README: ignfail.sh fails on some NFS hosts.
5485 * NEWS, README, lib/xstrtol.h: Add copyright notice.
5487 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
5488 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
5489 Remove; the automake bug has been fixed.
5490 * acinclude.m4: Remove.
5492 * configure.ac: Renamed from configure.in.
5493 (AC_PREREQ): Bump from 2.13 to 2.52.
5494 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
5495 1997-05-30) has an encoding error.
5496 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
5497 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
5499 * doc/fdl.texi: Update to current GNU version.
5501 * doc/tar.texi: Put leading '*' in direntry.
5502 Accommodate new gfdl sectioning.
5503 New option --recursion (the default) that is the inverse of
5506 New options --anchored, --ignore-case, --wildcards,
5507 --wildcards-match-slash, and their negations (e.g., --no-anchored).
5508 Along with --recursion and --no-recursion, these control how exclude
5509 patterns are interpreted. The default interpretation of exclude
5510 patterns is now --no-anchored --no-ignore-case --recursion
5511 --wildcards --wildcards-match-slash.
5513 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
5515 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
5516 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
5517 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
5518 Include if available.
5519 (<xalloc.h>): Include
5520 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
5521 (verify): New macro. Use it to verify that EXCLUDE macros do not
5522 collide with FNM macros.
5523 (struct patopts): New struct.
5524 (struct exclude): Use it, as exclude patterns now come with options.
5525 (new_exclude): Support above changes.
5526 (new_exclude, add_exclude_file):
5527 Initial size must now be a power of two to simplify overflow checking.
5528 (free_exclude, fnmatch_no_wildcards): New function.
5529 (excluded_filename): No longer requires options arg, as the options
5530 are determined by add_exclude. Now returns bool, not int.
5531 (excluded_filename, add_exclude):
5532 Add support for the fancy new exclusion options.
5533 (add_exclude, add_exclude_file): Now takes int options arg.
5534 Check for arithmetic overflow when computing sizes.
5535 (add_exclude_file): xrealloc might modify errno, so don't
5536 realloc until after errno might be used.
5538 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
5540 (free_exclude): New decl.
5541 (add_exclude, add_exclude_file): Now takes int options arg.
5542 (excluded_filename): No longer requires options arg, as the options
5543 are determined by add_exclude. Now returns bool, not int.
5545 * lib/prepargs.c: Include <string.h>; required for C99 since
5549 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
5551 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
5552 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
5554 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
5555 Remove inttypes_h.m4, largefile.m4, mktime.m4.
5557 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
5558 subsumed by Autoconf 2.50.
5560 * m4/error.m4: Upgrade to serial 2.
5562 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
5563 remove test for GNU C library. It's not correct, as some
5564 older glibcs are buggy.
5566 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
5568 * m4/prereq.m4: Upgrade to serial 20, but then:
5569 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
5570 (jm_PREREQ_EXCLUDE): New macro.
5571 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
5574 * m4/realloc.m4: Upgrade to serial 4.
5576 * m4/strerror_r.m4: Revert to serial 1002.
5578 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
5580 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
5582 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
5583 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
5584 it is now subsumed by autoconf. Add inttypes.h.
5586 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5587 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
5589 * src/buffer.c (new_volume): Stop if the script exits with an error.
5591 * src/common.h (excluded_with_slash, excluded_without_slash):
5592 Remove, replacing by:
5593 (excluded): New decl.
5594 (link_error): New decl.
5595 (excluded_name): Now returns bool.
5598 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
5599 Support hard links to symbolic links.
5601 (struct delayed_symlink): Remove 'names' member, replacing it with
5602 'sources' and 'target' member. All uses changed.
5604 (struct string_list): New type.
5606 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
5607 for struct hack; this avoids wasted space in some cases.
5609 (extract_archive): Fix test for absolute pathnames and/or "..".
5610 Use link_error to report errors for links.
5611 Remove redundant trailing '/' at "really_dir", for all uses, not
5612 just before invoking mkdir.
5613 If overwriting old files, do not worry so much about existing
5615 Fix mode computation in the case where the directory exists.
5617 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
5618 link, make a copy of the symbolic link.
5620 * src/incremen.c (get_directory_contents):
5621 If ignore_failed_read_option, only warn about
5624 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
5625 However, check for error even for '-' or '+' case.
5627 (print_header): Try parsing uids and gids as unsigned integers first,
5628 and as a uid_t or gid_t only if that fails. This adds support for
5629 listing positive uids and gids that are greater than UID_MAX and
5632 * src/misc.c (link_error): New function.
5634 * src/names.c (collect_and_sort_names):
5635 If ignore_failed_read_option, only warn about
5638 (excluded_name): Now returns bool. Simplify, as the fancy
5639 features are now all in excluded_filename.
5641 * src/rtapelib.c (base_name): Remove decl, as system.h now
5644 * src/system.h: Include stddef.h if available.
5645 (offsetof): Declare if stddef.h doesn't.
5647 Include <dirname.h>.
5648 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
5650 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
5651 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
5652 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
5653 WILDCARDS_MATCH_SLASH_OPTION):
5656 (long_options, usage, decode_options): Add support for --anchored,
5657 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
5658 --no-wildcards-match-slash, --recursion, --wildcards,
5659 --wildcards-match-slash.
5661 (decode_options): Implement the new way of interpreting exclude
5664 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
5666 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
5667 just print error messages suggesting alternatives.
5669 (add_filtered_exclude): Remove.
5671 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
5673 * tests/extrac04.sh (out): Remove
5674 directory/subdirectory/file1, as the new semantics for
5675 --exclude exclude it.
5677 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
5679 2001-08-12 Paul Eggert <eggert@twinsun.com>
5681 * lib/addext.c (<errno.h>): Include.
5682 (errno): Declare if not defined.
5683 (addext): Work correctly on the Hurd, where pathconf returns -1 and
5684 leaves errno alone, because there is no limit. Also, work even if
5685 size_t is narrower than long.
5687 2001-07-08 Paul Eggert <eggert@twinsun.com>
5689 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
5691 2001-05-10 Paul Eggert <eggert@twinsun.com>
5693 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
5694 Include <backupfile.h> and <dirname.h> after size_t is defined.
5695 (addext): Use base_len to trim redundant trailing slashes instead of
5698 * lib/backupfile.c (ISSLASH, base_name):
5699 Remove decls; now in dirname.h.
5700 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
5702 (find_backup_file_name): Rename locals to avoid new functions.
5703 Use base_len instead of rolling it ourselves.
5704 Work even if dirlen is 0.
5705 Use a dir of '.' if given the empty string.
5708 Do not include <stdio.h>, <assert.h>; no longer needed.
5709 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
5710 Include <string.h>, <dirname.h>.
5711 (base_name): Allow file names ending in slashes, other than names
5712 that are all slashes. In this case, return the basename followed
5715 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
5716 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
5717 (dir_len): Renamed from dirlen.
5718 All callers changed.
5720 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
5722 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
5724 2001-02-16 Paul Eggert <eggert@twinsun.com>
5726 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
5727 Do not declare or define if HAVE_MBRTOWC,
5728 since the test for HAVE_MBRTOWC now requires proper declarations.
5730 * lib/alloca.c (malloc): Undef before defining.
5732 2001-02-13 Paul Eggert <eggert@twinsun.com>
5734 * src/compare.c (read_and_process): Use off_t for size.
5735 From Maciej W. Rozycki.
5737 2001-01-26 Paul Eggert <eggert@twinsun.com>
5739 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
5741 2001-01-12 Paul Eggert <eggert@twinsun.com>
5743 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
5745 * lib/savedir.h (savedir): Remove size arg.
5747 * doc/tar.texi: Add @setchapternewpage odd.
5748 Remove -I as an alias for -T, for now.
5750 Update copyright. Remove "Published by".
5751 Dates beginning with / or . are taken to be file names.
5753 * src/tar.c (<time.h>): Do not include;
5754 (time): Do not declare.
5755 (usage): Remove -I as an alias for -T.
5756 (OPTION_STRING): Remove -I.
5757 (decode_options): Dates that look like an absolute path name,
5758 or that start with '.', are presumed to be file names whose
5760 Remove 'I' as an aliase for 'T'.
5763 * src/extract.c (<time.h>): Do not include; system.h now does this.
5764 (make_directories): Skip filesystem prefixes.
5765 Don't assume '/' is the only separator.
5766 (extract_sparse_file): Use new full_write semantics.
5767 On write error, return instead of invoking skip_file.
5768 Do not free sparsearray; caller does this now.
5769 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
5771 (extract_archive): Don't assume file name lengths fit in int.
5772 Report what got stripped from member name; it might be more than '/'.
5773 Use new full_write semantics.
5774 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
5776 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
5778 * src/buffer.c (<time.h>): Do not include; system.h now does this.
5779 (time): Remove decl; likewise.
5780 (child_open_for_uncompress): Use new full_write semantics.
5781 (flush_write): Use ISSLASH instead of testing for '/'.
5782 (flush_read): Likewise.
5784 * src/rmt.h (_remdev): Look for / anywhere in Path.
5786 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
5787 Don't assume '/' is the only separator.
5788 (safer_rmdir): Don't assume '/' is the only separator.
5790 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
5792 * lib/dirname.h (dirlen): New decl.
5794 * src/incremen.c (get_directory_contents):
5795 Remove path_size arg; all callers changed.
5796 Don't assume '/' is the only directory separator.
5797 (gnu_restore): Work even if file name length doesn't fit in int.
5799 * lib/addext.c (ISSLASH): New macro.
5800 (addext): Trim any redundant trailing slashes.
5802 * src/names.c (name_next):
5803 Don't assume '/' is the only directory separator.
5804 (namelist_match): Likewise.
5805 (add_hierarchy_to_namelist): Remove dirsize arg.
5806 Do not assume '/' is the only directory separator.
5807 (new_name): Likewise.
5809 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
5810 (libtar_a_SOURCES): Add dirname.c.
5812 * src/create.c (relativize):
5813 New function, with much of old start_header's guts.
5814 Handle filesystem prefixes.
5815 (start_header): Use this new function.
5816 (init_sparsearray): Don't bother to zero out the new array;
5818 (deal_with_sparse): Fix array allocation bug.
5819 (create_archive): Don't assume '/' is the only separator.
5820 (dump_file): Likewise.
5821 Don't worry about leading / in symlink targets.
5823 * lib/savedir.c (savedir):
5824 Remove size arg; it wasn't portable. All callers changed.
5826 * lib/utime.c (utime_null): Adjust to new full_write convention.
5828 * configure.in (YACC): Avoid portability problem with Ultrix sh.
5830 * lib/backupfile.c: Include <dirname.h>.
5831 (ISSLASH): New macro.
5832 (find_backup_file_name): Use dirlen to calculate directory lengths.
5833 (max_backup_version): Strip redundant trailing slashes.
5835 * src/common.h: Include <full-write.h>.
5836 (get_directory_contents): No longer has size arg.
5837 (gnu_restore): Arg is size_t, not int.
5839 * src/system.h: Include <time.h>.
5840 (time): Declare if not defined.
5842 * lib/full-write.c: Include full-write.h, not safe-read.h.
5843 full_write returns size_t, with short writes meaning failure.
5844 All callers changed.
5846 * src/rtapelib.c: Include full-write.h.
5848 * src/rmt.c: Include full-write.h.
5849 (main): Update copyright.
5851 * doc/getdate.texi: Mention that only English is supported.
5852 Show how to use "date" so that the output is acceptable to getdate.
5853 Mention Z as an abbreviation for UTC.
5855 * lib/full-write.h: New file.
5857 * src/list.c: system.h now does time.h stuff.
5860 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
5862 Do not include string.h, strings.h, or assert.h; no longer needed.
5863 (strrchr, memrchr, malloc): Remove decls; no longer needed.
5865 (base_name): New decl.
5866 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
5867 (dir_name_r): Remove.
5868 (dirlen): New function.
5869 (dir_name): Use dirlen instead of dir_name_r.
5870 (<string.h>, <strings.h>): Include only if test program.
5871 (main): Use "return 0", not "exit (0)".
5873 2000-12-08 Paul Eggert <eggert@twinsun.com>
5875 * lib/dirname.h: New file.
5877 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
5879 * lib/fnmatch.c: Do not comment out all the code if we are using
5880 the GNU C library, because in some cases we are replacing buggy
5881 code in the GNU C library itself.
5883 2000-10-30 Paul Eggert <eggert@twinsun.com>
5885 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
5887 2000-10-29 Paul Eggert <eggert@twinsun.com>
5889 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
5891 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
5893 2000-10-28 Paul Eggert <eggert@twinsun.com>
5895 * doc/tar.texi: --no-recursion now applies to extraction, too.
5896 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
5897 * src/names.c (namelist_match, excluded_name):
5898 Do not match subfiles of a directory
5899 if --no-recursion is specified.
5900 * src/tar.c (NO_RECURSE_OPTION): Remove.
5901 (long_options): Have getopt set the --no-recursion flag.
5902 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
5903 Remove case for NO_RECURSE_OPTION.
5904 * src/common.h (recursion_option):
5905 Renamed from no_recurse_option, with sense
5906 negated, and with FNM_LEADING_DIR being the nonzero value.
5908 * names.c (namelist_match): New function.
5909 (name_match, name_scan): Use it to eliminate duplicate code.
5910 (names_notfound): Remove special case for Amiga.
5912 2000-10-27 Paul Eggert <eggert@twinsun.com>
5914 * src/misc.c (read_error_details, read_warn_details,
5915 read_fatal_details): Don't assume size_t is unsigned long.
5917 * src/buffer.c (flush_read): If read_full_records_option, try to
5918 fill the input buffer, as --delete -f - needs this.
5920 2000-10-24 Paul Eggert <eggert@twinsun.com>
5922 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
5924 * src/buffer.c (check_label_pattern):
5925 Make sure header name is a string before
5926 passing it to fnmatch.
5927 (init_volume_number): Check for global_volno overflow.
5928 (new_volume): Check for global_volno overflow.
5930 * src/tar.c (decode_options):
5931 Check that volume label is not too long to overflow
5932 name in tar header block.
5934 * Makefile.am (EXTRA_DIST): Remove rebox.el.
5936 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
5937 (AC_FUNC_STRERROR_R): Use this instead.
5939 2000-10-23 Paul Eggert <eggert@twinsun.com>
5941 * src/extract.c: Include <time.h>, since we invoke "time".
5943 * lib/prepargs.c (prepend_default_options):
5944 Don't use NULL, for portability.
5946 * m4/fnmatch.m4: Add "working" to message.
5948 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
5950 (getpwuid, getgrgid): Declare only if system headers don't.
5951 (gid_to_gname): Don't invoke setgrent.
5952 (namelist): Now static, not global.
5953 (nametail): New var. All uses of namelast changed to use
5954 nametail, with one extra level of indirection.
5955 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
5956 (name_match): Set nametail too, when setting namelist to null.
5957 (add_hierarchy_to_namelist): Change type of dir arg from char * to
5958 struct name *, so that we don't have to look up the name again
5959 here. Get change_dir from dir rather than as a separate arg. Add
5960 dirsize arg, and pass it along to get_directory_contents. Remove
5961 unnecessary check of directory type.
5962 (new_name): Do not append a slash if PATH already ends in one.
5963 (avoided_names, struct avoided_name): Remove.
5964 (avoided_name_table): New var, replacing avoided_names.
5965 (hash_avoided_name, compare_avoided_names): New function.
5966 (add_avoided_name, is_avoided_name): Use hash table rather than
5969 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
5970 (child_open_for_compress, child_open_for_uncompress,
5971 close_archive): Propagate any failure of the compression process
5973 (open_archive, flush_write, flush_read, close_archive): Do not
5974 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
5975 -1. Instead, allocate an array with the size that's needed.
5976 (open_archive): Don't bother checking S_ISCHR of /dev/null.
5977 (backspace_output): Don't try to backspace past start of archive.
5978 (close_archive): Remove special case for DELETE_SUBCOMMAND.
5980 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
5981 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
5982 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
5983 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
5984 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
5985 WITH_DMALLOC, WITH_REGEX):
5986 Remove; now generated automatically.
5988 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
5989 compatibility for glibc fragments.
5990 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
5991 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
5992 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
5993 that we needn't put an entry into acconfig.h.
5994 (ALL_LINGUAS): Add da.
5995 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
5996 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
5998 (AC_MBSTATE_T): Add.
5999 (RMT): Append $(EXEEXT).
6000 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
6001 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
6002 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
6003 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
6004 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
6005 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
6006 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
6007 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
6008 (EMUL_OPEN3): Remove; no longer needed.
6009 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
6011 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
6013 * src/common.h: Do not include basename.h.
6014 * src/rtapelib.c (base_name): Do not include basename.h;
6015 declare base_name instead.
6017 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
6019 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
6020 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
6021 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
6022 Adjust to the above changes.
6024 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
6026 * src/open3.c: Remove.
6028 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
6029 (tar_SOURCES): Remove open3.c.
6030 (INCLUDES): Remove -I.., as automake does that.
6031 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
6033 The following changes are to put LOCALEDIR into localedir.h instead
6034 of passing it on the command line.
6036 (DISTCLEANFILES): New macro.
6037 (localedir.h): New rule.
6038 (rmt.o tar.o): Now depend on localedir.h.
6040 * tests/delete02.sh, tests/extrac04.sh: New files.
6042 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
6043 (TESTS): Add extrac04.sh, and restore delete02.sh.
6044 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
6045 (INCLUDES): Remove -I.. as automake does this now.
6047 * src/rtapelib.c (rexec): Don't declare unless using it.
6048 (do_command): Simplify signal-handling code slightly.
6050 * src/delete.c (blocks_needed): Remove. All uses changed to use
6051 blocking_factor - new_blocks.
6052 (acting_as_filter): New var.
6053 (write_record, delete_archive_members): Use acting_as_filter
6054 rather than archive == STDIN_FILENO to detect whether we're acting
6055 as a filter, as open can return STDIN_FILENO in some cases.
6056 (delete_archive_members): Ignore zero blocks if
6057 ignore_zeros_option is nonzero. Fix bug that messed up last
6058 output block: write_eot can't be used here, as it gets confused
6059 when the input is at end of file.
6061 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
6062 symbolic link contents length. Pass directory size to
6063 get_directory_contents.
6065 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
6066 m4/strerror_r.m4: New files.
6067 * m4/signedchar.m4: Remove this file.
6068 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
6069 * m4/Makefile.am (EXTRA_DIST): Likewise.
6071 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
6073 * po/da.po: New translation file.
6075 * src/mangle.c (extract_mangle):
6076 Fix diagnostic with wrong number of %s'es.
6078 * lib/fnmatch.c (fnmatch):
6079 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
6080 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
6082 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
6083 fall off a device's end. Detect this.
6085 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
6087 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
6088 include <pathmax.h> and directory include files like <dirent.h>;
6089 no longer used. Include <savedir.h> instead.
6090 (closedir, signed_char): remove macro; no longer used.
6091 (bool, false, true): Include <stdbool.h> if you have the include
6092 file, otherwise define.
6095 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
6096 opendir_warn, readdir_error): Remove; no longer needed.
6097 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
6098 before deciding whether we're trying to remove ".".
6099 (remove_any_file): Try unlink first if we are not root. Use
6100 savedir when recursively removing directories, to avoid exhausting
6102 (savedir_error, savedir_warn, symlink_error): New functions.
6104 * src/list.c: (read_and): Do not invoke
6105 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
6106 responsible for that. Do not invoke apply_delayed_set_stat; our
6107 caller is now responsible for that.
6108 (read_header): Use signed char instead of signed_char. Prevent
6109 later references to current_header from mistakenly treating it as
6111 (from_header): Quote invalid base-64 strings in diagnostics.
6112 (time_from_header): Do not warn about future timestamps in
6113 archive; check_time now does that.
6114 (print_header): Quote unknown file types.
6115 (skip_member): New function, replacing skip_extended_headers and
6116 now skipping the whole member instead of just the extended
6117 headers. All callers changed. This makes the code handle
6118 extended headers uniformly, and fixes some bugs.
6120 * src/update.c (update_archive): Use skip_member.
6122 * src/extract.c (we_are_root): Now global.
6123 (struct delayed_symlink): New type.
6124 (delayed_symlink_head): New var.
6125 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
6126 not apply_delayed_set_stat.
6127 (set_mode, set_stat): Pointer args are now const pointers.
6128 (check_time): New function.
6129 (set_stat): Warn if setting a file's timestamp to be the future.
6130 (make_directories): Do not save and restore errno.
6131 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
6132 intermediate directories.
6133 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
6134 not in caller. Extract potentially dangerous symbolic links more
6135 carefully, deferring their creation until the end, and using a
6136 regular file placeholder in the meantime. Do not remove trailing
6137 / and /. from file names. Do not bother checking for ".." when
6138 checking whether a directory loops back on itself, as loopbacks
6139 can occur with symlinks too. Also, in that case, do not bother
6140 saving and restoring errno; just set it to EEXIST.
6141 (apply_nonancestor_delayed_set_stat): A prefix is a potential
6142 ancestor if it ends in slash too (as well as ending in a char just
6144 (apply_delayed_set_stat): Remove.
6145 (apply_delayed_symlinks, extract_finish): New functions.
6147 * doc/fdl.texi: New file.
6148 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
6149 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
6150 * doc/tar.texi: Add Free Documentation License. New section
6151 "Overwrite Old Files", and revamp that section to make it easier to
6152 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
6153 documentation into getdate.texi. Fix several minor typos. Describe
6154 TAR_OPTIONS. Describe incompatibility between incremental backups and
6155 --atime-preserve. Describe incompatibility between --verify and other
6156 options. Mention that tar normally removes symbolic links rather than
6157 following them, when extracting a file of the same name.
6159 * THANKS: Add gpoul. Change skip's address.
6161 * po/POTFILES.in: Add lib/human.c.
6163 * src/common.h (namelist, namelast): Remove decls.
6164 (we_are_root, extract_finish, skip_member, savedir_error,
6165 savedir_warn, symlink_error, gnu_list_name): New decls.
6166 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
6167 skip_extended_headers, is_dot_or_dotdot, closedir_error,
6168 closedir_warn, opendir_error, opendir_warn, readdir_error,
6169 readdir_warn): Remove decls.
6170 (get_directory_contents): New off_t arg.
6171 (addname): Now returns struct name *.
6173 * src/tar.h, tests/genfile.c: Fix comments.
6175 * src/create.c: Include hash.h.
6176 (gnu_list_name): Remove decl.
6177 (struct link): Remove "next" member.
6179 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
6180 consistency with other diagnostics.
6181 (deal_with_sparse): Check for I/O error when closing the file.
6182 (create_archive): Do not allocate an array of size PATH_MAX, as
6183 PATH_MAX might be (size_t) -1. Instead, allocate an array with
6184 the size that's needed.
6185 (hash_link, compare_links): New functions.
6186 (dump_file): Do not exhaust open file descriptors when descending
6187 deeply into a directory, by using savedir rather than
6188 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
6189 Hash the set of links already created, instead of using a linked
6190 list. Fix some bugs in outputting sparse files which caused the
6191 sparse tables to be incorrect. When a file unexpectedly shrinks,
6192 output zeros rather than garbage. Do not allocate an array of
6193 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
6194 allocate an array with the size that's needed.
6196 * src/incremen.c: Include hash.h.
6197 (struct directory): Remove "next", "dir_text". Change "name" to
6198 be char[1] with struct hack, not const char *. Add "found".
6199 (directory_list): Remove. Replaced by directory_table.
6200 (directory_table): New var.
6201 (nfs_string): Renamed from nfs.
6202 (hash_directory, compare_directories): New functions.
6203 (note_directory): Now returns struct directory *. First arg is
6204 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
6205 Remove text arg. New "found" arg, basically corresponding to the
6206 old text arg not being null. All callers changed.
6207 (note_directory, find_directory): Use hash table rather than
6209 (get_directory_contents): New arg "device". Use savedir to do the
6210 hard work. Save the nfs-ness of stat_data, since it might change
6211 under us. Use note_directory instead of find_directory to save
6212 some work. When adding an "A" record, do it with
6213 add_to_accumulator instead of cheating with strcat.
6214 (read_directory_file): Use "+" flag before device to indicate
6215 whether it was NFS. Fix typo in checking for strtoul error.
6216 (write_directory_file_entry): New function.
6217 (write_directory_file): Use it, and use the hash routines to
6218 traverse the directory table.
6219 (gnu_restore): Use savedir rather than opendir/readdir.
6221 * src/tar.c: Include localedir.h, prepargs.h.
6222 (long_options): Now static.
6223 (long_options, usage, decode_options): -j is now short for
6224 --bzip2, and -I is now an alias for -T.
6225 (decode_options, main): argv is not const pointer now.
6226 (decode_options): Invoke prepend_default_options to support
6227 TAR_OPTIONS. In diagnostic, mention the string that was the
6228 invalid blocking factor, tape length, group, owner, or record
6229 size. --delete is no longer incompatible with -f -, undoing
6231 (main): Invoke extract_finish at end of extraction.
6233 * src/rmt.c: Include localedir.h.
6234 (main): Update copyright date to 2000.
6236 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
6237 following changes: Use @sc where appropriate. Document the ranges of
6238 supported times more precisely. Add Eggert to getdate authors.
6239 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
6240 zone names, as it wasn't correct and people shouldn't be relying on it
6241 anyway. Relative items also account for non-DST adjustments. Fix
6244 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
6246 * tests/ignfail.sh: opendir -> savedir in diagnostics.
6248 * tests/preset.in: Set LANGUAGE to the empty string, for some
6251 2000-10-20 Paul Eggert <eggert@twinsun.com>
6253 * m4/fnmatch.m4: Mention the GNU C library.
6255 2000-10-19 Paul Eggert <eggert@twinsun.com>
6257 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
6260 2000-10-17 Paul Eggert <eggert@twinsun.com>
6262 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
6265 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
6266 (CHAR_BIT): Define if not defined.
6268 2000-09-09 Paul Eggert <eggert@twinsun.com>
6270 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
6272 2000-08-07 Paul Eggert <eggert@twinsun.com>
6274 * lib/xmalloc.c: Memory exhausted -> memory exhausted
6276 * lib/xalloc.h (xalloc_msg_memory_exhausted):
6277 change to array from char *.
6279 2000-08-06 Paul Eggert <eggert@twinsun.com>
6281 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
6282 compatibility with glibc 2.1.3 strftime.c.
6284 2000-07-31 Paul Eggert <eggert@twinsun.com>
6286 * lib/quotearg.c (quotearg_n_options):
6287 Don't make the initial slot vector a constant,
6288 since it might get modified.
6290 * lib/quotearg.c: Add support for more than one preallocated slot.
6292 2000-07-30 Paul Eggert <eggert@twinsun.com>
6294 * lib/quotearg.c (quotearg_n_options):
6295 Preallocate a slot 0 buffer, so that the caller
6296 can always quote one small component of a "memory exhausted" message
6299 2000-07-23 Paul Eggert <eggert@twinsun.com>
6302 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
6303 mbstate_t is always defined.
6305 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
6306 some GCC installations, and this configuration error is likely to be
6309 2000-07-22 Paul Eggert <eggert@twinsun.com>
6312 When the system forces us to redefine mbstate_t, shadow its mbsinit
6313 function. From Bruno Haible.
6315 2000-07-14 Paul Eggert <eggert@twinsun.com>
6317 * lib/xmalloc.c: Simplify exhausted message.
6319 * lib/quotearg.h: Update copyright date; from Jim Meyering.
6321 2000-07-13 Paul Eggert <eggert@twinsun.com>
6323 * lib/quotearg.h (enum quoting style):
6324 New constant clocale_quoting_style.
6327 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
6328 Add support for clocale_quoting_style, undoing previous change to
6329 locale_quoting_style.
6331 2000-07-10 Paul Eggert <eggert@twinsun.com>
6334 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
6335 since otherwise we don't need it.
6336 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
6337 since we don't do multibytes in that case.
6338 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
6339 invoke multibyte primitives.
6341 * m4/mbstate_t.m4 (AC_MBSTATE_T):
6342 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
6343 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
6344 and mbstate_t, to a single-part test that simply defines mbstate_t.
6346 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
6347 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
6348 to decide whether to define the BeOS workaround macro;
6349 this adjusts to the change to AC_MBSTATE_T.
6351 * m4/strerror_r.m4: New file.
6353 2000-07-05 Paul Eggert <eggert@twinsun.com>
6355 * lib/quotearg.c: Use double-quote to quote.
6357 * lib/quotearg.c (N_): New macro.
6358 (gettext_default): New function.
6359 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
6360 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
6363 * lib/quotearg.c (struct quoting_options):
6364 Simplify quote_these_too dimension.
6365 From Bruno Haible <haible@clisp.cons.org>.
6367 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
6368 Test for mbstate_t only if the test
6369 for an object-type mbstate_t fails.
6371 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
6373 2000-07-03 Paul Eggert <eggert@twinsun.com>
6375 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
6376 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
6378 * lib/quotearg.c (mbrtowc):
6379 Assign to *pwc, and return 1 only if result is nonzero.
6380 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
6382 2000-07-02 Paul Eggert <eggert@twinsun.com>
6384 * lib/quotearg.c (mbstate_t):
6385 Do not define; it should be defined with AC_CHECK_TYPE.
6387 2000-06-26 Paul Eggert <eggert@twinsun.com>
6389 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
6390 a bug in glibc 2.1.3.
6392 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
6394 2000-06-19 Paul Eggert <eggert@twinsun.com>
6396 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
6397 inclusion of wctype.h to work around solaris2.6 namespace pollution.
6398 (ISPRINT): Likewise.
6399 Reported by Tom Tromey.
6401 2000-06-15 Paul Eggert <eggert@twinsun.com>
6403 * lib/human.c (adjust_value): New function.
6404 (human_readable_inexact): Apply rounding style even when printing
6407 * lib/human.c: Avoid shadowing warnings.
6410 2000-06-14 Paul Eggert <eggert@twinsun.com>
6412 * lib/human.c (human_readable_inexact): Allow an input block size
6413 that is not a multiple of the output block size, and vice versa.
6415 * lib/getdate.y (get_date): Apply relative times after time zone
6416 indicator, not before.
6418 2000-05-31 Paul Eggert <eggert@twinsun.com>
6420 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
6421 and thus don't need AC_CANONICAL_HOST.
6423 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
6424 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
6425 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
6426 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
6427 changed. Instead of inspecting the output of getconf, try to
6428 compile the test program without and with the macro definition.
6429 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
6430 getconf. Instead, check for the needed flags by compiling test
6433 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
6435 * config.guess, config.sub: Remove these files, for similar reasons.
6437 2000-05-03 Paul Eggert <eggert@twinsun.com>
6439 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
6440 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
6441 bug. This avoids a clash when files like regex.c that define
6444 2000-05-02 Paul Eggert <eggert@twinsun.com>
6446 * m4/largefile.m4 (AC_SYS_LARGEFILE):
6447 Define _GNU_SOURCE if this is needed to make
6448 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
6449 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
6451 * lib/quotearg.c (mbrtowc, mbstat_t):
6452 Add definitions if !HAVE_MBSTATE_T_OBJECT.
6453 (<wctype.h>): Include if HAVE_WCTYPE_H.
6454 (iswprint): Define to 1 if we lack it
6456 2000-04-18 Paul Eggert <eggert@twinsun.com>
6458 * m4/mbstate_t.m4: New file.
6460 2000-04-17 Bruno Haible <haible@clisp.cons.org>
6462 * tests/ignfail.sh: Test for uid 0 along with user "root".
6464 2000-04-05 Paul Eggert <eggert@twinsun.com>
6466 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
6467 Don't use -n32 on IRIX if the installer said
6470 2000-02-28 Paul Eggert <eggert@twinsun.com>
6472 * lib/quotearg.c (ALERT_CHAR): New macro.
6473 (quotearg_buffer_restyled): Use it.
6475 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6477 * src/list.c (tartime): Fix off-by-one error when copying year if
6480 2000-02-18 Paul Eggert <eggert@twinsun.com>
6482 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
6483 (textint): New typedef.
6484 (parser_control): Changed from struct parser_control to typedef
6485 (for consistency). Member year changed from int to textint. All
6487 (YYSTYPE): Removed; replaced by %union with int and textint
6489 (tID): Removed; not used.
6490 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
6491 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
6492 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
6493 (tSNUMBER, tUNUMBER): Now of type <textintval>.
6494 (date, number, to_year): Use width of number in digits, not its
6495 value, to determine whether it's a 2-digit year, or a 2-digit
6497 (yylex): Store number of digits of numeric tokens. Return '?' for
6498 unknown identifiers, rather than (unused) tID.
6500 2000-01-16 Paul Eggert <eggert@twinsun.com>
6502 * lib/quotearg.c (quotearg_buffer_restyled):
6503 Do not quote alert, backslash, formfeed,
6504 and vertical tab unnecessarily in shell quoting style.
6506 2000-01-15 Paul Eggert <eggert@twinsun.com>
6509 Change quoting to be compatible with future autoconf versions.
6511 2000-01-11 Paul Eggert <eggert@twinsun.com>
6513 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
6515 2000-01-07 Paul Eggert <eggert@twinsun.com>
6517 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
6519 Fix bug with fnmatch.h dependency, as follows:
6520 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
6521 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
6523 * src/common.h (apply_nonancestor_delayed_set_stat):
6524 Renamed from apply_delayed_set_stat.
6525 (apply_delayed_set_stat, decode_mode, chmod_error_details,
6526 chown_error_details, close_warn, closedir_warn, mkdir_error,
6527 read_error_details, read_fatal_details, read_warn_details,
6528 seek_error_details, seek_warn_details, utime_error,
6529 write_error_details, write_fatal_details): New decls.
6531 Make diagnostic messages more regular.
6532 * src/create.c (dump_file): Quote file names with colons if possible.
6533 * src/compare.c (diff_archive): Likewise.
6534 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
6535 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
6536 * src/mangle.c (extract_mangle): Likewise.
6537 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
6539 * src/buffer.c (archive_write_error, flush_archive, close_archive,
6540 new_volume, xclose):
6541 Use error message functions to report errors consistently.
6542 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
6543 * src/create.c (finish_sparse_file, dump_file): Likewise.
6544 * src/extract.c (set_mode, set_stat, extract_sparse_file,
6545 extract_archive): Likewise.
6546 * src/list.c (list_archive): Likewise.
6547 * src/update.c (append_file): Likewise.
6548 * src/compare.c (diff_init, diff_sparse_files):
6549 Use xalloc_die to report memory exhaustion.
6550 * src/incremen.c (gnu_restore): Likewise.
6551 * src/list.c (read_header): Likewise.
6552 * src/mangle.c (extract_mangle): Likewise.
6553 * src/misc.c (maybe_backup_file): Likewise.
6554 * src/tar.c (decode_options): Likewise.
6555 * src/compare.c (read_and_process, fill_in_sparse_array,
6557 Use consistent terminology for unexpected-EOF message.
6558 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
6559 * src/list.c (list_archive, read_header, skip_file,
6560 skip_extended_headers): Likewise.
6561 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
6562 (xdup2): Regularize messages with rest of tar.
6564 * src/buffer.c (flush_read): Don't read past EOF.
6566 * src/extract.c (extr_init):
6567 If we run out of memory, invoke apply_delayed_set_stat.
6568 (prepare_to_extract): Don't complain if we can't remove ".".
6569 (apply_delayed_set_stat): New function.
6570 (apply_nonancestor_delayed_set_stat):
6571 Renamed from apply_delayed_set_stat. All uses changed.
6572 Don't remove head if it doesn't apply.
6574 * src/create.c (find_new_file_size):
6575 Return size instead of storing through pointer.
6576 All callers changed.
6577 (deal_with_sparse): Don't keep reading after read errors.
6578 (finish_sparse_file): Just abort if there is an internal error.
6579 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
6580 Don't restore access times on directories during incremental dumps
6581 until after dealing with the directory.
6582 If ignoring failed reads, count closedir, read, and unknown
6583 file errors as warnings, not errors.
6584 Fix buffer overrun problem when dumping sparse files.
6586 * src/list.c (read_and):
6587 Invoke apply_nonancestor_delayed_set_stat on file names
6588 after handling them.
6589 (decode_mode): Remove; moved to misc.c.
6591 * src/misc.c (safer_rmdir): New function.
6592 (remove_any_file): Use it to avoid problems with rmdir(".").
6593 (maybe_backup_file): Regularize diagnostics.
6594 (undo_backup_file): Likewise.
6595 (decode_mode): Moved here from list.c.
6596 (chmod_error_details, chown_error_details, close_fatal,
6597 close_warn, closedir_warn, mkdir_error, read_error_details,
6598 read_warn_details, read_fatal_details, seek_error_details,
6599 seek_warn_details, utime_error, write_error_details,
6600 write_fatal_details): New functions.
6602 * src/delete.c (save_record): Remove static variable (now local).
6603 (move_archive): Don't position before start of archive.
6604 (write_record): Abort if count is zero at inopportune time.
6607 * src/tar.c (decode_options): --delete and -f - are now
6608 incompatible, since we didn't have time to fix their bugs.
6610 * tests/Makefile.am (TESTS): Remove delete02.sh.
6611 * tests/ignfail.sh: Adjust to new quoting scheme again.
6613 2000-01-06 Paul Eggert <eggert@twinsun.com>
6615 * lib/getdate.y: Sync tm_diff with the GNU C Library.
6616 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
6617 (tm_diff): Renamed from difftm. All uses changed.
6618 Replace body with that taken from GNU C Library 2.1.3pre1.
6619 (get_date): Prefer tm_gmtoff to tm_diff if available.
6621 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
6623 * tests/incremen.sh: Invoke stat on newly created file so that its
6624 ctime is updated on Nextstep.
6626 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
6628 * lib/getdate.y (get_date):
6629 Fix typo when checking for time_t overflow in time zone calculations.
6631 1999-12-13 Paul Eggert <eggert@twinsun.com>
6633 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
6635 * README-alpha: New file.
6636 * README: New sections for gzip and bzip2, Solaris.
6637 Remove mention of BACKLOG.
6639 * configure.in (AC_C_BACKSLASH_A): Add.
6640 (AC_CHECK_HEADERS): Add wchar.h.
6641 (AC_CHECK_FUNCS): Add mbrtowc.
6642 (AC_FUNC_CLOSEDIR_VOID): Add.
6644 * tests/Makefile.am (TESTS): Add delete02.sh.
6645 (POSTPONED_TESTS): Remove.
6646 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
6649 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
6651 * tests/ignfail.sh (err): Adjust to new quoting scheme.
6653 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
6655 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
6657 * src/tar.c ("quotearg.h"): New include.
6658 (usage): Now has __attribute__ ((noreturn)).
6659 (confirm): Report errno if we can't open tty.
6660 (confirm, decode_options):
6661 Quote arbitrary strings in diagnostics.
6662 (OVERWRITE_OPTION): New constant.
6663 (long_options, usage, decode_options): New --overwrite option.
6664 (decode_options): --keep-old-files, --overwrite, and --unlink-first
6665 are now mutually exclusive.
6666 Don't assume that gettext preserves errno.
6667 (main): Set default quoting style to escape_quoting_style.
6669 * src/update.c (<quotearg.h>): New include.
6671 Don't assume that gettext preserves errno.
6672 Quote arbitrary strings in diagnostics.
6673 Check for close error.
6675 * src/names.c (<quotearg.h>): New include.
6676 (name_init, name_next, name_close, names_notfound,
6677 collect_and_sort_names): Don't assume that gettext preserves
6678 errno. Quote arbitrary strings in diagnostics.
6679 (excluded_name): Fix typo that caused empty patterns to be
6682 * src/misc.c (<quotearg.h>): New include.
6683 (quote_copy_string): Quote only newline and backslash; the output is no
6684 longer meant for humans, and is locale-independent.
6685 (contains_dot_dot): New function.
6686 (remove_any_file): Don't use lstat; just rmdir the file and then use
6687 unlink if the rmdir fails because the file isn't a directory.
6688 Check for readdir and closedir errors.
6689 (maybe_backup_file): Report "stat" for stat errors.
6690 (maybe_backup_file, chdir_do):
6691 Quote arbitrary strings in diagnostics.
6692 (maybe_backup_file, undo_last_backup):
6693 Don't assume that gettext preserves errno.
6694 (call_arg_error, call_arg_fatal, call_arg_warn,
6695 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
6696 mknod_error, open_error, open_fatal, open_warn, opendir_error,
6697 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
6698 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
6699 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
6700 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
6702 * src/system.h (__attribute__): New macro.
6703 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
6704 (S_ISDOOR): New macro.
6705 (closedir): New macro, if CLOSEDIR_VOID.
6707 * src/rmt.c, src/rtapelib.c (decode_oflag):
6708 O_APPEND might not be defined.
6710 * src/list.c: (read_and, list_archive):
6711 Quote arbitrary strings in diagnostics.
6712 (from_header): Use locale_quoting_style to quote diagnostics.
6713 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
6715 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
6717 * src/Makefile.am: Use ## for copyright comments.
6719 * src/extract.c (<quotearg.h>): New include.
6720 (enum permstatus): New enum.
6721 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
6722 two mallocs. New members file_name_len, invert_permissions, permstatus.
6723 (extr_init): Remove hack that silently adjusted newdir_umask.
6724 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
6725 Use these args to decide whether and how to set modes.
6726 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
6727 Don't assume that gettext preserves errno.
6728 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
6729 (delay_set_stat, repair_delayed_set_stat): New functions.
6730 (make_directories): Avoid mkdir where last part of path is "..".
6731 Create a struct delayed_set_stat for each directory made.
6732 (prepare_to_extract): Renamed from unlink_destination, and
6733 return 0 immediately if to_stdout_option; all callers changed.
6734 (maybe_recoverable): New parameter interdir_made.
6735 Add support for --overwrite.
6736 (extract_sparse_file, extract_archive):
6737 Quote arbitrary strings in diagnostics.
6738 (extract_archive): By default, warn about ".." in member names, and skip them.
6739 Don't open files with O_NONBLOCK or O_APPEND.
6740 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
6741 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
6742 minus the current umask. Keep track of intermediate directories made,
6743 to avoid looping when making x/../x when x doesn't exist; the
6744 earlier code solved this in a different way that didn't fit well
6745 into the new scheme. Don't extract permissions onto existing
6746 directories unless --overwrite is given. Do not add -wx------
6747 permissions to new directories permanently; just do it temporarily.
6748 Remove no-longer-needed hack with MSDOS and directory time stamps.
6749 (apply_delayed_set_stat): New argument specifies which directories to
6750 fix statuses of. Do not wait until the end of extraction to fix
6751 statuses; instead, fix a directory's status once we exit that directory.
6752 This requires less memory and does the right thing in some cases
6753 where the old method didn't.
6754 (fatal_exit): New function.
6756 * src/incremen.c (<quotearg.h>): New include.
6757 (get_directory_contents, gnu_restore):
6758 Check for readdir and closedir errors.
6759 (get_directory_contents, read_directory_file, gnu_restore):
6760 Quote arbitrary strings in diagnostics.
6761 (get_directory_contents, read_directory_file, write_directory_file):
6762 Don't assume that gettext preserves errno.
6764 * src/create.c (<quotearg.h>): New include.
6765 (start_header): Use `member names' to refer to archive member names, not
6766 `archive names'. Warn about `..' in member names.
6767 (finish_sparse_file, dump_file):
6768 Quote arbitrary strings in diagnostics.
6769 (finish_sparse_file, dump_file):
6770 Don't assume that gettext preserves errno.
6771 (dump_file): Don't use `access' to determine whether a directory is readable;
6772 this isn't reliable if tar is setuid. Use `opendir' instead.
6773 Check for readdir and closedir failures.
6774 Don't dump sockets as if they were fifos; just warn and skip.
6776 * src/delete.c (move_archive):
6777 Don't report fatal error merely because sizes don't fit
6778 into struct mtop values; fall back on lseek instead.
6779 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
6780 Say `reposition' instead of `re-position'.
6781 (delete_archive_members):
6782 Set archive to STDOUT_FILENO before outputting trailing buffer.
6784 * src/compare.c (<quotearg.h>): New include.
6785 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
6786 and `Cannot' others.
6787 (report_difference, diff_archive):
6788 Quote arbitrary strings in diagnostics.
6789 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
6790 Don't assume that gettext preserves errno.
6791 (diff_archive): Don't open regular files with O_NONBLOCK.
6792 Preserve access times of files if --atime.
6794 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
6795 (FATAL_ERROR, USAGE): Don't return 0.
6796 (enum old files): New enum.
6797 (old_files_option): New variable, replacing keep_old_files_option and
6798 unlink_first_option.
6799 (apply_delayed_set_stat): Now takes char const * param.
6800 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
6801 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
6802 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
6803 read_fatal, readdir_error, readdir_warn, readlink_error,
6804 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
6805 truncate_error, truncate_warn, unlink_error, waitpid_error,
6806 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
6809 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
6810 archive_write_error, archive_read_error, flush_archive, close_archive,
6811 init_volume_number, new_volume):
6812 Don't assume that gettext preserves errno.
6814 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
6815 (open_archive): Reject multivolume verify attempts a bit earlier.
6816 Rename local variable `access', in case it's defined by system header.
6818 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
6819 `Could not' sometimes and `Cannot' others.
6821 (open_archive, flush_read, flush_archive, close_archive, new_volume):
6822 Quote arbitrary strings in diagnostics.
6824 (read_error): Set archive to STDOUT_FILENO temporarily when writing
6827 (init_volume_number): Check for input and output errors in volno_file.
6829 (new_volume): Use new fatal_exit function to exit, and new xfork
6832 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
6834 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
6836 * doc/tar.texi: Add --overwrite.
6837 --absolute-names rejects ".." in names.
6839 * lib/quotearg.c: Add support for multibyte characters.
6841 (ISPRINT): New macro.
6842 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
6843 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
6844 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
6845 (quotearg_buffer_restyled): New function, with most of the old
6846 quotearg_buffer's contents.
6847 Major rewrite to support multibyte characters.
6848 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
6850 * m4/c-bs-a.m4: New file.
6852 * lib/Makefile.am: Use ## for copyright notice.
6854 * scripts/Makefile.am: Use ## on copyright notice.
6857 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
6859 1999-12-05 Paul Eggert <eggert@twinsun.com>
6861 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
6862 src/ChangeLog, tests/ChangeLog: Remove these files.
6863 * ChangeLog.1: New file, incorporating the above files, plus old
6865 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
6867 1999-12-05 Dale Worley <worley@ariadne.com>
6869 * src/compare.c (<utime.h>, struct utimbuf): Add.
6870 (diff_archive): Restore access times if --atime.
6871 * doc/tar.texi: Explain that --atime also preserves modification time.
6873 1999-12-04 Gerhard Poul <gpoul@gnu.org>
6875 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
6876 * BACKLOG, TODO: Remove.
6877 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
6878 * README: Bring up to date.
6880 1999-12-03 Paul Eggert <eggert@twinsun.com>
6882 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
6884 * src/compare.c (diff_archive):
6885 Do not set errno to EPIPE; we no longer use perror.
6887 * src/create.c (dump_file):
6888 If a parent directory said that a file should be there but it is
6889 absent, diagnose it as being removed in the meantime.
6890 Do not pass meaningless errno to ERROR when reporting that the
6891 file changed as we read it.
6892 Report that a file changed if its ctime changes; this is more
6893 sensitive than mtime+size, and more accurate.
6895 * src/incremen.c (enum children): New type.
6896 (struct directory): Change old char allnew member to new enum children
6899 (get_directory_contents): When doing an incremental dump that does
6900 not cross filesystem boundaries, dump the mount points, even though
6901 they are in a different filesystem. This is for convenience when
6902 restoring, and for consistency with non-incremental dumps.
6903 This requires a 3-way flag for keeping track of which children we want,
6904 so we use enum children rather than boolean.
6906 * src/open3.c (modes): Remove.
6907 (open3): Remove unportable assumptions about flag encodings.
6908 Use `stat' instead of `access' for testing file existence,
6909 to avoid problems with setuid programs.
6911 * src/names.c (name_next): If file names are given both in the
6912 command line (e.g. via -C) and in a file (via -T), do not
6913 ignore the command-line names.
6915 * m4/uintmax_t.m4: Backport to autoconf 2.13.
6917 * doc/tar.texi: Clarify getdate authorship.
6919 1999-11-23 Paul Eggert <eggert@twinsun.com>
6921 * lib/Makefile.am (DISTCLEANFILES): New macro.
6923 * configure.in (tar_fnmatch_hin):
6924 Remove; it runs afoul of a bug in autoconf 2.13.
6925 Instead, always link fnmatch.h to some file, even if it's a throwaway.
6927 1999-11-19 Paul Eggert <eggert@twinsun.com>
6929 * m4/largefile.m4: Update serial.
6931 1999-11-18 Paul Eggert <eggert@twinsun.com>
6933 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
6934 the QNX shell, which doesn't propagate exit status of failed
6935 commands inside shell assignments.
6937 1999-11-07 Paul Eggert <eggert@twinsun.com>
6939 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
6941 * configure.in (AC_PREREQ): Bump to 2.13.
6942 (ALL_LINGUAS): Add pt_BR, ja.
6943 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
6944 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
6945 for AIX crossbuilds.
6947 * doc/tar.texi: New node create options for --ignore-failed-read.
6948 Remove unused version control symbols.
6949 Modernize texinfo usage.
6951 * src/tar.c (usage): Add examples.
6953 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
6954 Include fnmatch.h when testing fnmatch.
6956 * src/common.h (collect_and_sort_names): New decl.
6958 * src/list.c (from_header):
6959 Handle 32-bit two's complement negative time stamps
6960 even if the leading octal digit is 2 or 3.
6962 * src/extract.c (set_stat): Remove duplicate code.
6964 * src/create.c (to_chars): Remove trailing newline from warning.
6965 (dump_file): Ignore doors.
6966 (finish_header): Report block numbers with origin 0, not origin 1.
6968 * src/rmt.c: Include getopt.h.
6969 (long_opts): New constant.
6970 (usage): New function.
6971 (main): Implement --help and --version.
6972 Output usage message if arguments are bad.
6974 1999-10-10 Paul Eggert <eggert@twinsun.com>
6976 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
6978 * README: Remove --with-dmalloc.
6979 Add --disable-largefile.
6980 Remove old NeXT dirent problems, or AIX valloc problems.
6981 Remove old union wait advice, and old %lld advice.
6982 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
6984 * doc/tar.texi: Clarify documentation for portable file names.
6986 * configure.in (AM_WITH_DMALLOC): Remove.
6987 (ALL_LINGUAS): Add ja.
6989 * src/tar.c (decode_options):
6990 Invalid dates are now treated as (time_t) -1.
6991 Redo version message to conform to GNU standards.
6993 * src/create.c (dump_file):
6994 Fix typo: last two args to dump_file were interchanged.
6995 * src/update.c (update_archive): Likewise.
6997 * src/common.h (tartime): New decl.
6999 * src/list.c (tartime): Now extern.
7000 (read_and): Invalid headers cause errors, not warnings.
7002 1999-10-03 Paul Eggert <eggert@twinsun.com>
7004 * lib/getdate.y (__attribute__):
7005 Don't use if GCC claims to be before 2.8; this is
7006 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
7008 1999-09-25 Paul Eggert <eggert@twinsun.com>
7010 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
7011 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
7013 * tests/incremen.sh: Add yet another sleep.
7015 1999-09-24 Paul Eggert <eggert@twinsun.com>
7017 * NEWS: A read error now causes a nonzero exit status.
7019 * src/create.c (to_chars): Fix base-256 output.
7021 * src/buffer.c (write_error):
7022 Read error is an error, not just a warning.
7024 1999-09-24 Paul Eggert <eggert@twinsun.com>
7026 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
7028 * src/tar.c (<time.h>): Include.
7029 (time): Declare if not defined.
7030 (confirm): Don't read past EOF.
7031 (long_options, usage): Add --no-same-owner, --no-same-permissions.
7032 (main): Use clock_gettime if available.
7034 * tests/Makefile.am (TESTS): Add incremen.sh
7035 (INCLUDES): Add -I../lib, for fnmatch.h.
7037 * src/update.c (update_archive):
7038 Remove call to name_expand; had no effect.
7039 Use chdir_do to change into directory.
7040 Use deref_stat instead of stat.
7041 Use add_avoided_name to mark names to be avoided; the old method of
7042 setting a bit with the name caused all descendants of that name to
7043 be avoided, in some circumstances.
7045 * tests/incremen.sh: Remove unnecessary sleeps.
7047 * src/names.c (name_next): Go back to using plain chdir.
7048 (name_gather): Use chdir_arg to keep track of arguments to chdir.
7049 (addname): Likewise.
7050 (name_match): Use chdir_do to act on chdir args.
7051 (merge_sort): Moved here from incremen.c.
7052 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
7054 (name_expand): Remove.
7055 (name_from_list): Skip fake names.
7056 Use chdir_do to act on chdir args.
7057 (struct avoided_name): New struct.
7058 (avoided_names): New var.
7059 (add_avoided_name, is_avoided_name): New functions.
7061 * src/system.h (stat, lstat): Define in terms of statx on
7062 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
7063 (UCHAR_MAX): New macro.
7064 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
7066 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
7068 * src/incremen.c (<time.h>): Remove include; no longer used.
7069 (time): Remove decl.
7071 (get_directory_contents): Use deref_stat.
7072 Consider a subdirectory to be all new only if
7073 listed_incremental_option or if it its timestamp is newer than the
7075 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
7076 (read_directory_file): Now extern. Do not set time_now.
7077 (write_directory_file): Renamed from write_dir_file.
7078 Use start_time instead of time_now.
7079 (compare_names, collect_and_sort_names): Move to names.c.
7081 * src/mangle.c (<time.h>): Remove; not used.
7082 (time): Do not declare.
7084 * src/misc.c (chdir_from_initial_wd): Remove.
7085 (deref_stat): New function.
7086 (struct wd): New struct.
7087 (wd, wds, wd_alloc): New variables.
7088 (chdir_arg, chdir_do): New function.
7090 * src/compare.c (get_stat_data): Use deref_stat.
7092 * src/common.h (name_expand): Remove.
7094 * src/list.c (time): Declare if not defined.
7095 (base_64_digits): Moved here from create.c.
7096 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
7098 (read_and): Don't get time from header unless we need it now;
7099 as getting time can cause duplicate diagnostics if bogus.
7100 Remove "Hmm, " from diagnostic.
7101 Use "Skipping to next header" uniformly.
7102 (from_header): Renamed from from_chars. All uses changed.
7103 Allow different forms for unportable 2's complement numbers.
7104 Don't check for extended forms when parsing checksums.
7105 Parse base-256 output.
7106 (gid_from_header): Renamed from gid_from_chars. All uses changed.
7107 (major_from_header): Renamed from major_from_chars. All uses changed.
7108 (minor_from_header): Renamed from minor_from_chars. All uses changed.
7109 (mode_from_header): Renamed from mode_from_chars. All uses changed.
7110 (off_from_header): Renamed from off_from_chars. All uses changed.
7111 (size_from_header): Renamed from size_from_chars. All uses changed.
7112 (time_from_header): Renamed from time_from_chars. All uses changed.
7113 Warn about future timestamps.
7114 (uid_from_header): Renamed from uid_from_chars. All uses changed.
7115 (uintmax_from_header): Renamed from uintmax_from_chars.
7117 (tartime): New function, incorporating isotime.
7119 (print_header): Use tartime.
7121 * src/create.c (to_chars): Fix typo in decl.
7122 Don't assign through char const *.
7123 Rename name_expand back to collect_and_sort_names.
7125 * src/extract.c (<time.h>): No need to include.
7126 (time): No need to declare.
7127 (now): Remove variable.
7128 (extr_init): Don't initialize `now'.
7129 Increment same_permissions_option and same_owner_option if we_are_root
7130 is nonzero; this supports the new --no-same-owner option.
7131 (set_stat): Use start_time instead of `now'.
7133 * src/create.c (struct link): Remove unused linkcount member.
7134 (base_64_digits): Move to list.c.
7135 (base_8_digits): Remove.
7136 (to_octal): New function, with some of old contents of to_base.
7138 (to_base256): New function.
7139 (to_chars): Use base 256, not base 64, for huge values.
7140 (mode_to_chars): Don't use two's complement in GNU format or POSIX
7142 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
7143 it means we have an incremental dump where we don't know whether this
7144 is a top-level call.
7145 Use deref_stat instead of statx / stat / lstat.
7146 Cast result of alloca.
7147 Check for dates if 0 < top_level, not if listed_incremental_option.
7148 Move multiple-link check after directory check.
7149 Do not dump avoided names.
7150 Dump hard links to symbolic names as links, not as separate
7152 start_header cannot return a null pointer, so don't test for it.
7153 Likewise for find_next_block.
7155 * src/buffer.c, src/common.h (<human.h>): Include.
7156 (read_error): Read error is an error, not just a warning.
7157 (print_total_written): Also print human-readable byte count, and
7159 (open_archive, flush_write): Use start_time, not current time.
7160 (flush_read): Report about garbage bytes ignored at end of archive,
7161 but act on non-garbage bytes (instead of ignoring them).
7162 (new_volume): Use WARN for warnings.
7165 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
7167 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
7169 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
7171 * lib/Makefile.am (noinst_HEADERS):
7172 Rename fnmatch.h to fnmatch.hin; add human.h.
7173 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
7174 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
7176 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
7178 * lib/fnmatch.c (strchrnul):
7179 Define to __strchrnul if _LIBC, to our own replacement otherwise.
7180 Do not define if !_LIBC and if it already exists.
7181 (internal_fnmatch): Use it.
7183 * configure.in (tar_LDADD): New variable, used only when linking tar.
7184 (rmt_LDADD): Similarly, for rmt.
7185 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
7186 fnmatch.c; otherwise, use the system fnmatch.h.
7188 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
7189 Modernize sample backup script.
7191 * THANKS: Martin Goik's email address has changed.
7193 * m4/fnmatch.m4: New file.
7195 1999-09-03 Paul Eggert <eggert@twinsun.com>
7197 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
7200 1999-08-29 Paul Eggert <eggert@twinsun.com>
7202 * lib/getdate.y (get_date):
7203 Rename outermost local `probe' to `quarter'.
7204 Rename latter local `tm' to probe_tm.
7205 From: Jim Meyering <meyering@ascend.com>
7206 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
7208 1999-08-28 Paul Eggert <eggert@twinsun.com>
7210 * lib/getdate.y (PC): New macro; use it when possible.
7211 (number): Handle `Nov 11 1996' example correctly.
7212 See Risks Digest 20.55 (1999-08-27)
7213 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
7215 1999-08-23 Paul Eggert <eggert@twinsun.com>
7217 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
7219 Remove minor cases of lint from many source files: this includes
7220 unnecessary casts, uses of NULL, etc.
7222 * configure.in (AC_PROG_YACC): Remove.
7223 (YACC): Always use bison.
7224 (AC_STRUCT_TIMEZONE): Add.
7225 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
7227 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
7230 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
7231 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
7233 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
7235 * src/common.h (merge_sort): Remove decl; no longer exported.
7237 * src/system.h (voidstar): Remove.
7238 (memcpy, memcmp): Cast args.
7239 ("xalloc.h"): Add include.
7240 (xmalloc, xrealloc): Remove decl.
7242 * src/mangle.c (time): Do not declare if defined.
7243 (first_mangle, mangled_num): Remove.
7245 * src/list.c (from_chars): Report out-of-range values more precisely.
7246 (off_from_chars): Do not allow negative offsets.
7247 (uid_from_chars): Allow negative uids.
7249 * src/create.c (linklist): Now static.
7250 (to_chars): Fix wording of message to match from_chars.
7252 * src/misc.c (merge_sort): Move to incremen.c.
7253 * src/incremen.c (merge_sort): Move here from misc.c; now static.
7254 It's too painful to make it both generic and portable.
7255 (read_directory_file): "timestamp" -> "time stamp" in messages.
7257 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
7258 (usage): Fix misspelling.
7259 (OPTION_STRING): -y is now -I.
7260 (decode_options): Use -1, not EOF, for getopt_long result.
7261 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
7262 Handle operands after any "--" argument.
7263 (main): Report any output errors.
7265 * src/rmt.c (main): status is ssize_t, not long.
7267 * src/names.c (name_gather): Handle trailing -C option correctly.
7268 (addname): use memcpy, not strncpy, to copy a string of known length.
7269 (name_match): Handle trailing -C option correctly.
7270 Propagate -C option to following files.
7271 (name_match, name_scan): Remove redundant matching code.
7273 * src/buffer.c (open_archive): Use American spelling in diagnostic.
7275 * lib/getdate.y: Major rewrite. Add copyright notice.
7276 (<stdio.h>): Include only if testing.
7278 (ISLOWER): New macro.
7279 (<string.h>): Include if HAVE_STRING_H, not USG.
7281 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
7283 (EPOCH_YEAR): Renamed from EPOCH.
7284 (table): Renamed from TABLE.
7285 (meridian): Now an anonymous enum.
7286 (struct parser_control): New type.
7287 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
7288 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
7289 (%pure_parser): Added, so that the parser is pure.
7290 (%union): Removed; the type is now just plain int.
7291 All %type directives removed.
7292 (tLOCAL_ZONE): New %token.
7293 (month_day_table): Renamed from MonthDayTable.
7294 (gmtime, localtime, mktime, time): Declare only if not defined.
7295 (meridian_table): New table.
7296 (dst_table): New table.
7297 (units_table): renamed from UnitsTable.
7298 (relative_time_table): Renamed from OtherTable.
7299 (time_zone_table): Renamed from TimezoneTable. Modernized.
7300 (military_table): Renamed from MilitaryTable.
7301 (to_hour): Renamed from ToHour.
7302 (to_year): Renamed from ToYear.
7303 (lookup_zone): New function.
7304 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
7306 (yylex): Now reentrant. All callers changed.
7307 (get_date): Add support for local time zone abbreviations.
7310 1999-08-20 Paul Eggert <eggert@twinsun.com>
7312 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
7314 * src/create.c (to_chars): Generate GNU base-64 representation
7315 if we are generating an old or new GNU format tar file for a
7316 number that can't be represented with the POSIX format.
7318 * configure.in (AC_CHECK_FUNCS): Add fchdir.
7319 (AM_FUNC_GETLINE): Add.
7320 (LIBOBJS): Add getline.o to workaround comment.
7321 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
7322 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
7323 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
7324 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
7325 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
7326 lib/save-cwd.h, m4/getline.m4: New files.
7328 * src/misc.c (<save-cwd.h>): Include.
7329 (chdir_from_initial_wd): New function.
7331 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
7332 (name_gather): Handle `-C x -C y' correctly.
7333 Do not rely on addname to handle -C.
7334 (addname): New CHANGE_DIR parameter. All callers changed.
7335 Remove ugly calls to getcwd; no longer needed.
7336 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
7338 * src/incremen.c (listed_incremental_stream): New var.
7339 (read_directory_file): Remove arbitrary limits on file name length.
7340 Do not attempt to get the working directory; we can bypass this
7341 on fchdir hosts. Open the listed_incremental_option file for both
7342 read and write instead of opening it twice. Check for I/O errors
7343 when doing I/O to this file. Check for invalid data in the file,
7344 and report line numbers of invalid data.
7345 (write_dir_file): Likewise.
7346 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
7347 Do not invoke write_dir_file; that's our caller's responsibility.
7349 * src/list.c (max): New macro.
7350 (isotime): Now takes time_t, not time_t *. Report the decimal values
7351 of times that can't be broken down.
7352 (print_header): Don't assume that major and minor device numbers can
7355 * src/common.h (struct name): change_dir is now char const *.
7356 (write_directory_file): Remove unused decl.
7357 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
7358 chars; the old `sizeof (b)' broke when b was a pointer not an array.
7359 (chdir_from_initial_wd): New decl.
7360 (addname): New 2nd arg.
7362 * THANKS: Torsten Lull -> Catrin Urbanneck
7364 1999-08-18 Paul Eggert <eggert@twinsun.com>
7366 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
7367 Don't depend on ac_cv_func variables.
7368 From Albert Chin-A-Young <china@thewrittenword.com>.
7370 1999-08-18 Paul Eggert <eggert@twinsun.com>
7372 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
7374 * m4/signedchar.m4: New file.
7375 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
7376 * src/system.h (signed_char): New macro.
7377 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
7378 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
7380 * src/create.c (write_eot): Write at least two zero blocks.
7382 * src/extract.c (extract_archive): Fix sparse array bug:
7383 we did not find end of array correctly.
7385 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
7386 Don't assume find_next_block yields nonnull.
7387 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
7388 * src/list.c (skip_extended_headers): Likewise.
7390 * src/list.c (read_and, list_archive): Simplify code.
7391 (read_header): Fix computation of signed checksums on machines where
7393 Do not consider a block to be zero unless all its bytes are zero,
7394 even the checksum bytes. Do not attempt to parse the checksum of
7395 a zero block. Fix memory leak with long names and links.
7396 (from_chars): Accommodate a buggy tar that outputs leading NUL
7397 if the previous field overflows.
7399 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
7400 \?, for portability to non-ASCII hosts.
7402 1999-08-16 Paul Eggert <eggert@twinsun.com>
7404 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
7406 * src/extract.c (make_directories): Do not chown intermediate
7407 directories, even if we are root.
7409 * src/list.c (read_header): Fix bugs when interpreting
7410 POSIX-compliant headers that do not contain null bytes in the
7411 header or link names.
7413 1999-08-14 Paul Eggert <eggert@twinsun.com>
7415 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
7417 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
7418 (AC_HEADER_SYS_WAIT): Add.
7419 (AC_REPLACE_FUNCS): Add waitpid.
7420 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
7421 * lib/waitpid.c: New file.
7422 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
7423 * src/system.h (WCOREDUMP): Remove; no longer used.
7424 (WIFSTOPPED): Likewise.
7425 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
7426 * src/buffer.c (child_open_for_compress): Undo previous change.
7427 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
7428 (new_volume): Likewise.
7430 * src/buffer.c, src/extract.c, src/incremen.c (time):
7431 Don't declare if defined.
7432 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
7433 * src/incremen.c (read_directory_file):
7434 Invoke `time' the same way everyone else does.
7435 Check validity of --listed-incremental file contents a bit better.
7436 Do not worry about --after-date-option; tar.c now checks this.
7437 * src/list.c (isotime): Report ??? if localtime returns null.
7438 Don't assume years fit into four digits.
7439 Don't append trailing newline.
7440 (print_header): Report ??? if localtime returns null;
7441 Don't assume years fit into four digits.
7443 * src/compare.c (diff_archive): Do not fall back on absolute name
7444 when --absolute-names is not specified.
7446 * src/create.c (start_header):
7447 Include text of ignored filesystem prefix in warning.
7448 (create_archive): Check for excluded names when doing incremental
7449 pass through directory.
7450 (dump_file): Do not dump old files explicitly given on command line
7451 when using --listed-incremental. Do not strip ./ prefix from names.
7453 * src/tar.c: -g now implies after_date_option = 1.
7454 -g and -N are now incompatible options.
7456 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
7458 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
7460 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
7461 incremental headers as POSIX prefixes.
7463 1999-08-11 Paul Eggert <eggert@twinsun.com>
7465 * NEWS, configure.in: Version 1.13.6.
7467 * configure.in (ALL_LINGUAS): Add pt_BR.
7468 * po/pt_BR.po: New file.
7470 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
7471 Renamed from tar.info and header.texi; adjust actions so that
7472 they work in other directories.
7474 * doc/tar.texi: Add -y and --bzip2.
7475 Patterns containing / now exclude only file names whose prefix match.
7477 * lib/exclude.h (excluded_filename): New option parameter.
7478 (add_exclude_file): New ADD_FUNC parameter.
7479 (excluded_pathname): Remove decl.
7480 * lib/exclude.c (_GNU_SOURCE):
7481 Remove; no longer needed since we don't use FNM_ macros.
7482 (excluded_filename): Renamed from excluded_filename_opts.
7483 (excluded_filename, excluded_pathname): Remove.
7484 (add_exclude_file): New ADD_FUNC parameter.
7486 * po/POTFILES.in: Add lib/quotearg.c.
7488 * src/buffer.c (_GNU_SOURCE): Define.
7489 (<fnmatch.h>): Include unconditionally.
7490 (child_open_for_compress): Dup after closing, to avoid possible file
7491 descriptor exhaustion.
7492 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
7493 (flush_read): Likewise.
7495 * src/common.h (LG_8, LG_64): New macros.
7496 (excluded_with_slash, excluded_without_slash): New vars.
7498 (base_64_digits): New decl.
7499 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
7500 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
7502 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
7503 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
7505 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
7506 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
7507 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
7508 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
7509 respectively. All definitions and uses changed.
7510 (excluded_name): New decl.
7512 * src/compare.c (diff_archive):
7513 Open files with O_NONBLOCK instead of O_NDELAY.
7515 * src/create.c (base_64_digits): New constant.
7516 (base_8_digits): New macro.
7517 (MAX_VAL_WITH_DIGITS): New macro.
7518 (to_base): First half of old to_oct. Support base 64 too.
7519 (to_chars): Other half of old to_oct, for 64-bit support.
7520 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
7521 (gid_substitute, uid_substitute): Look up names dynamically if
7522 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
7523 (mode_to_chars): Renamed from mode_to_oct.
7524 Support negative values in all the _to_chars functions.
7525 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
7526 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
7527 (dump_file): Inspect entire pathname, not just new file name
7528 component, when deciding whether to exclude it.
7530 * src/extract.c (extract_archive):
7531 Open files with O_NONBLOCK instead of O_NDELAY.
7533 * src/incremen.c (get_directory_contents):
7534 Inspect entire pathname, not just new file name
7535 component, when deciding whether to exclude it.
7537 * src/list.c (<fnmatch.h>): Do not include.
7538 (from_chars): Renamed from from_oct. New parameter specifying
7539 the negative of the minimum allowed value. Support negative
7541 (base64_map): New var.
7542 (base64_init): New function.
7543 (print_header): Output numeric uids and gids if numeric_owner_option.
7545 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
7547 * src/names.c (_GNU_SOURCE): Define.
7548 (<fnmatch.h>): Include unconditionally.
7549 (excluded_name): New function, taking over duties of excluded_pathname.
7552 * src/rmt.c (decode_oflag): New function.
7553 (main): Use it to support symbolic open flags.
7555 * src/rtapelib.c (encode_oflag): New function.
7556 (rmt_open__): Do not allow newlines in the path.
7557 Propagate errno correctly.
7558 Decode symbolic open flags, if present.
7560 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
7563 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
7564 New -y or --bzip2 option.
7565 (add_filtered_exclude): New function.
7566 (decode_options): Put excluded patterns with / into
7567 excluded_with_slash, and without / into excluded_without_slash.
7568 Compare newer_mtime_option to its new initial value
7569 TYPE_MINIMUM (time_t) when deciding whether more than one
7570 threshold date was specified.
7572 1999-07-20 Paul Eggert <eggert@twinsun.com>
7574 * NEWS, configure.in: Version 1.13.5.
7576 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
7578 * src/buffer.c (new_volume): Likewise.
7579 * src/incremen.c (read_directory_file): Likewise.
7580 * src/tar.c (decode_options):
7581 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
7584 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
7585 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
7587 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
7588 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
7589 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
7590 Define to 0 if the corresponding S_IF* macro is not defined.
7591 (mkfifo): Do not define if already defined, or if S_IFIFO
7594 * src/compare.c (diff_archive): Use HAVE_READLINK, not
7595 S_ISLNK, to determine whether to invoke readlink.
7596 * src/create.c (dump_file): Likewise.
7598 * src/extract.c (set_mode):
7599 Do not chmod unless we are root or the -p option was given;
7600 this matches historical practice.
7601 (unlink_destination): New function, which checks for unlink failures.
7602 (maybe_recoverable): Stay quiet if -U.
7603 (extract_archive): Use O_EXCL if unlink_first_option.
7604 Report unlink failures.
7605 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
7606 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
7609 * src/incremen.c (get_directory_contents): Depend on
7610 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
7612 * src/list.c: Remove S_IS* ifdefs.
7613 * src/misc.c (maybe_backup_file): Likewise.
7615 * src/misc.c (maybe_backup_file):
7616 "Virtual memory exhausted" -> "Memory exhausted",
7617 to conform to the other places this message is issued.
7619 * src/mangle.c (extract_mangle):
7620 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
7622 * src/rtapelib.c (rmt_open__):
7623 Remove typo that caused us to omit the first char
7626 1999-07-16 Paul Eggert <eggert@twinsun.com>
7628 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
7630 * doc/tar.texi: A path name is excluded if any of its file name
7631 components matches an excluded pattern, even if the path name was
7632 specified on the command line.
7633 * src/create.c (create_archive): Likewise.
7634 * src/list.c (read_and): Likewise.
7635 * src/update.c (update_archive): Likewise.
7636 * lib/exclude.h (excluded_pathname): New decl.
7637 * lib/exclude.c (_GNU_SOURCE): Define.
7638 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
7639 (excluded_filename_opts): New function.
7640 (excluded_pathname): New function.
7642 * lib/Makefile.am (EXTRA_DIST):
7643 xstrtol.c moved here from libtar_a_SOURCES.
7644 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
7645 Remove xstrtoul.c; no longer needed.
7646 * lib/xstrtol.c: Remove.
7648 * src/tar.c (decode_options):
7649 Set newer_time_option to TYPE_MINIMUM, so that
7650 negative timestamps are handled correctly.
7651 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
7652 uniformity (and so that we don't need to have the other fns).
7653 (main): Remove call to init_total_written; no longer needed.
7655 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
7656 checks for unsigned long and long long.
7657 * src/arith.c: Remove.
7658 * src/Makefile.am (tar_SOURCES): Remove arith.c.
7659 * po/POTFILES.in: Remove src/arith.c.
7660 * src/arith.h: Use double, to simplify configuration gotchas.
7661 (tarlong): Now double.
7662 (TARLONG_FORMAT): New macro.
7663 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
7664 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
7665 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
7666 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
7667 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
7668 mult_tarlong, print_tarlong): Remove. All callers replaced with
7671 * src/common.h (init_total_written): Remove decl.
7673 * src/buffer.c (total_written):
7674 Remove; replaced with prev_written + bytes_written.
7675 (prev_written): New var.
7676 (init_total_written): Remove.
7677 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
7679 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
7680 Make sure that we can shift, multiply
7681 and divide unsigned long long values; Ultrix cc can't do it.
7683 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
7684 Check for any unknown bits, not just unknown bits left of the leftmost
7687 * lib/quotearg.c (quotearg_buffer):
7688 Don't quote spaces if C quoting style.
7689 * src/list.c (from_oct):
7690 Use C quoting style for error; omit trailing NULs.
7692 1999-07-14 Paul Eggert <eggert@twinsun.com>
7694 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
7696 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
7697 <inttypes.h> defines strtoumax as a macro (and not as a function).
7698 HP-UX 10.20 does this.
7700 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
7701 * PORTS, README, TODO, doc/tar.texi: Likewise.
7703 1999-07-12 Paul Eggert <eggert@twinsun.com>
7705 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
7706 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
7708 * src/list.c (decode_header):
7709 Do not assume that S_IFBLK and S_IFCHR are defined.
7711 * src/create.c (start_header): Do not assume S_IFMT is defined.
7712 (dump_file): Remove unnecessary check for screwy apollo lossage.
7713 Do not assume S_IFBLK and S_IFCHR are defined.
7715 * src/extract.c (extract_archive):
7716 Test whether S_IFCHR and S_IFBLK are nonzero,
7717 not whether they are defined, for consistency with other tests.
7719 * src/buffer.c (is_regular_file):
7720 Don't succeed on files that we can't access due to
7721 permissions problems.
7722 (open_archive): Fix wording on fatal error message.
7723 Don't bother to stat /dev/null if the archive is not a character
7726 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
7727 Report an error, not a warning, for I/O errors.
7728 (process_rawdata, process_dumpdir, diff_sparse_files):
7729 Change ungrammatical "Data differs" to "Contents differ".
7730 (get_stat_data): Find hidden files on AIX.
7731 Accept file name as argument; all uses changed.
7732 (get_stat_data, diff_archive): Use system error message for
7733 nonexistent files rather than rolling our own.
7734 (diff_archive): Unknown file types are errors, not warnings.
7735 Normalize spelling of message to "File type differs".
7736 Use get_stat_data to get link status, for consistency.
7737 Do not inspect st_rdev for fifos.
7738 Do not assume st_mode values contain only file types and mode bits.
7739 Check for mode changes and device number changes separately.
7741 * src/update.c (append_file):
7742 Open the file before statting it, to avoid a race.
7743 Complain about file shrinkage only when we reach EOF.
7745 1999-07-08 Paul Eggert <eggert@twinsun.com>
7747 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
7749 * configure.in (AC_EXEEXT): Add.
7751 * lib/Makefile.am (noinst_HEADERS):
7752 Add basename.h, exclude.h. Remove full-write.h.
7753 (libtar_a_SOURCES): Add exclude.c.
7755 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
7757 * lib/full-write.c: Include safe-read.h instead of full-write.h.
7758 * lib/safe-read.h (safe_read): New decl.
7759 * src/rmt.c: Include safe-read.h.
7760 * src/rtapelib.c: Include basename.h, save-read.h.
7761 (rmt_open__): Use base_name to compute base name.
7764 Include basename.h, exclude.h; don't include full-write.h.
7765 (exclude_option): Remove decl.
7766 (excluded): New decl.
7767 (add_exclude, add_exclude_file, check_exclude): Remove decls.
7769 * src/list.c (read_and):
7770 Use excluded_filename instead of check_exclude.
7771 Check base name of incoming file name, not entire file name, when
7772 deciding whether to exclude it.
7774 * src/create.c (finish_sparse_file):
7775 Use excluded_filename instead of check_exclude.
7776 Don't bother to stat excluded file names.
7777 * src/incremen.c (get_directory_contents): Likewise.
7779 * src/names.c (exclude_pool, exclude_pool_size,
7780 allocated_exclude_pool_size, simple_exclude_array,
7781 simple_excludes, allocated_simple_excludes,
7782 pattern_exclude_array, pattern_excludes,
7783 allocated_pattern_excludes, add_exclude, add_exclude_file,
7785 Remove; now done in ../lib/exclude.c.
7787 * src/tar.c (decode_options): Initialize `excluded'.
7788 Use new add_exclude_file and add_exclude functions.
7790 1999-07-05 Paul Eggert <eggert@twinsun.com>
7792 * m4/gettext.m4: Use changequote rather than [[ ]].
7794 * lib/safe-read.c: Renamed from lib/full-read.c.
7795 (safe_read): Renamed from full_read. All uses changed.
7796 * lib/safe-read.h, lib/full-write.h: New files.
7797 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
7798 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
7799 * lib/full-write.c: Include full-write.h.
7800 * src/common.h: Include full-write.h, safe-read.h.
7801 * src/system.h: (full_read, full_write): Remove decls.
7803 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
7805 * src/system.h (bindtextdomain, textdomain): undef before
7806 defining, to avoid preprocessor warnings with --disable-nls
7807 on hosts whose locale.h includes libintl.h.
7809 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
7810 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
7811 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
7814 1999-07-02 Paul Eggert <eggert@twinsun.com>
7816 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
7817 * m4/mktime.m4: New file.
7818 * m4/Makefile.am.in, m4/README: Remove these files.
7819 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
7820 remove README, Makefile.am.in.
7821 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
7822 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
7825 * src/tar.c: Include signal.h.
7826 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
7827 (main): Ensure SIGCHLD is not ignored.
7829 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
7830 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
7831 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
7832 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
7833 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
7834 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
7835 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
7836 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
7837 they don't overlap with char codes. Use an enum instead of a lot
7840 * src/system.h (ISASCII): Remove.
7841 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
7842 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
7843 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
7844 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
7845 LONG_MAX): New macros.
7847 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
7848 (read_directory_file): Cast ISSPACE arg to unsigned char.
7849 * src/misc.c (ISPRINT): Remove; now in system.h.
7850 (remove_any_file): Add brackets to pacify gcc -Wall.
7851 * src/list.c: Don't include <ctype.h>; system.h already does this.
7852 (ISODIGIT, ISSPACE): Remove; now in system.h.
7853 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
7855 (from_oct): Cast ISSPACE arg to unsigned char.
7857 * src/create.c (mode_to_oct): Translate modes from internal to
7859 * src/list.c (mode_from_oct): Translate modes from external to
7860 internal form. Do not complain about unrecognized mode bits.
7861 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
7862 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
7864 * src/extract.c: (extr_init, make_directories, extract_archive):
7865 Do not assume mode bits have traditional Unix values.
7866 * src/list.c (decode_mode): Likewise.
7867 * src/create.c (start_header, dump_file): Likewise.
7868 * src/buffer.c (child_open_for_compress,
7869 child_open_for_uncompress, open_archive, (close_archive): Likewise.
7870 * src/compare.c (diff_archive): Likewise.
7872 * src/extract.c (set_mode): Use %04 not %0.4 format.
7873 (extract_sparse_file): Do not use data_block uninitialized.
7874 Check for lseek failures.
7876 * src/rtapelib.c (rmt_lseek__):
7877 Convert lseek whence values to portable integers on the wire.
7878 * src/rmt.c (main): Likewise. Check for whence values out of range.
7880 * src/create.c (finish_sparse_file): Use lseek whence macros
7881 instead of integers.
7882 * src/buffer.c (backspace_output): Likewise.
7883 * src/compare.c (diff_archive, verify_volume): Likewise.
7884 * src/delete.c (move_archive): Likewise.
7885 * src/extract.c (extract_sparse_file): Likewise.
7887 * src/create.c (dump_file): Do not invoke finish_sparse_file
7888 on a negative file descriptor.
7890 * src/buffer.c: Add braces to pacify gcc -Wall.
7892 * src/compare.c (diff_sparse_files): Report lseek errors.
7894 * configure.in (ALL_LINGUAS): Add cs, es, ru.
7896 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
7898 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
7899 message to be internationalized; \a doesn't work with msgfmt.
7901 * src/tar.c (long_options, main, usage, OPTION_STRING):
7902 Remove -E or --ending-file.
7903 * src/list.c (read_and): Likewise.
7904 * src/common.h (ending_file_option): Likewise.
7905 * src/buffer.c (close_archive): Likewise.
7907 * tests/after: Don't run two commands together in a pipeline,
7908 as some old shells mishandle pipeline exit status.
7910 1999-06-28 Paul Eggert <eggert@twinsun.com>
7912 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
7913 * NEWS: Describe changes since 1.12.
7914 * README: Update bug reporting address; move paxutils ref to NEWS.
7916 Handle EINTR correctly.
7917 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
7918 * lib/full-read.c, lib/full-write.c: New files.
7919 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
7920 Prefer full_read to read and full_write to write.
7921 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
7922 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
7924 * src/extract.c (extract_sparse_file): Likewise.
7925 * src/rmt.c (get_string, main, report_error_message,
7926 report_numbered_error): Likewise.
7927 * src/rmt.h (rmtread, rmtwrite): Likewise.
7928 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
7929 rmt_write__, rmt_ioctl__): Likewise.
7930 * src/update.c (append_file): Likewise.
7931 * src/system.h (full_read, full_write): New decls.
7933 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
7934 lib/xmalloc.c, src/arith.c, src/misc.c.
7936 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
7937 New macros. All uses of STDIN and STDOUT changed.
7938 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
7939 instead of 0 and STDOUT_FILENO instead of 1.
7940 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
7941 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
7943 * src/rmt.c (private_strerror): Avoid const. Translate results.
7945 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
7946 in the presence of NFS clock skew.
7948 1999-06-25 Paul Eggert <eggert@twinsun.com>
7950 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
7952 * src/buffer.c (write_archive_buffer): New function.
7953 (child_open_for_compress, flush_write, flush_read): Use it to write
7955 (open_archive): Report error if fstat of archive fails.
7956 Improve efficiency of check for /dev/null.
7957 Also, fix some corner cases with remote archives and /dev/null checking.
7958 (close_archive): Test for input fifo only if not remote.
7959 Truncate output archive only if it's not remote.
7961 * src/misc.c (remove_any_file):
7962 Don't terminate if you see . or ..; just skip them.
7964 1999-06-18 Paul Eggert <eggert@twinsun.com>
7966 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
7968 Output sizes using a format that's more compatible with
7969 traditional tar (and with GNU Emacs).
7970 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
7971 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
7972 Don't subtract 1 from size.
7973 * src/create.c (to_oct): Prepend leading zeros, not spaces.
7974 Output a trailing NUL unless the value won't fit without it.
7975 (finish_header): No need to append NUL to chksum, now that
7978 1999-06-16 Paul Eggert <eggert@twinsun.com>
7980 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
7982 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
7983 @INTLLIBS@ might invoke rpl_realloc.
7985 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
7986 (intconv): Remove; use xstrto* fns instead.
7987 ("xstrtol.h"): Include.
7988 (check_decimal): Remove.
7989 (long_options, usage, OPTION_STRING, decode_options):
7990 Remove -y, --bzip2, --unbzip2.
7991 (decode_options): Use xget_version instead of get_version.
7992 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
7993 Replace invocations of check_decimal with xstrtoumax.
7995 * tests/preset.in (echo_n, echo_c): Remove.
7997 * tests/after: Don't rely on $echo_c and $echo_n.
7999 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
8000 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
8001 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
8002 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
8003 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
8004 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
8005 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
8006 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
8007 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
8008 m4/xstrtoumax.m4: New files.
8010 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
8011 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
8012 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
8013 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
8014 (AC_CHECK_FUNCS): Remove lchown.
8015 (AC_REPLACE_FUNCS): Remove basename, dirname.
8016 Add lchown, strtol, strtoul.
8017 (jm_FUNC_MKTIME): Add.
8018 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
8019 are also built via the ANSI2KNR-filtering rules.
8020 Use a no-op line to work around bug in automake 1.4 with malloc and
8022 (AC_OUTPUT): Add m4/Makefile.
8024 * lib/Makefile.am (EXTRA_DIST):
8025 Add lchown.c, malloc.c, mktime.c, realloc.c,
8026 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
8027 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
8028 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
8029 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
8030 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
8032 * src/system.h (uintmax_t): Don't declare; configure now does this.
8034 * src/common.h (backup_type): New decl.
8035 * src/common.h, src/misc.c, src/tar.c:
8036 Move include of backupfile.h to common.h.
8038 * src/misc.c (maybe_backup_file):
8039 Pass backup_type to find_backup_file_name.
8041 * src/list.c (print_header): Change sizes of uform and gform from 11 to
8042 UINTMAX_STRSIZE_BOUND.
8044 * doc/tar.texi: Remove --bzip2.
8045 Fix @xref typos reported by latest makeinfo.
8047 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
8049 (M4DIR, ACINCLUDE_INPUTS): New macros.
8050 ($(srcdir)/acinclude.m4): New rule.
8052 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
8053 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
8054 now generated automatically by autoconf.
8056 1999-05-15 Paul Eggert <eggert@twinsun.com>
8058 * doc/tar.texi: Remove -y.
8060 1999-04-09 Paul Eggert <eggert@twinsun.com>
8062 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
8063 (we were allocating too much storage).
8064 (uintmax_t): Don't declare; configure now does this.
8066 * ABOUT-NLS: Update to gettext 0.10.35 edition.
8068 1999-03-22 Paul Eggert <eggert@twinsun.com>
8070 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
8072 * acinclude.m4 (AC_LFS_FLAGS):
8073 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
8074 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
8075 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
8077 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
8078 New macros; needed for latest GNU xmalloc.c.
8080 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
8081 (libtar_a_SOURCES): Add quotearg.c.
8082 * list.c: Include <quotearg.h>.
8083 (from_oct): Add forward decl.
8084 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
8085 (from_oct): Report an error only if TYPE is nonzero.
8086 Quote any funny characters in bad header.
8088 1999-03-20 Paul Eggert <eggert@twinsun.com>
8090 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
8092 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
8093 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
8095 (AC_LFS): Simplify AIX revision number test.
8097 1999-03-17 Paul Eggert <eggert@twinsun.com>
8099 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
8101 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
8102 Remove; it doesn't work that well
8103 with AC_CANONICAL_HOST.
8104 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
8106 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
8108 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
8110 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
8112 * tar.texi: Fix bug-report addr.
8114 * README: Remove --with-included-malloc.
8115 Upgrade version numbers of build software.
8117 1999-03-07 Paul Eggert <eggert@twinsun.com>
8119 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
8121 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
8122 where bindtextdomain and gettext require -lintl.
8123 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
8124 `no' means it failed.
8125 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
8126 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
8127 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
8128 to add anything to the command line (it's all in config.h).
8129 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
8131 1999-03-01 Paul Eggert <eggert@twinsun.com>
8133 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
8135 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
8137 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
8138 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
8139 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
8140 like OFF_MAX, which are not reliable
8141 (e.g. OFF_MAX in AIX 4.2 is incorrect).
8142 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
8143 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
8145 * src/incremen.c (get_directory_contents):
8146 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
8147 Have statx depend on STX_HIDDEN, not AIX.
8149 * src/create.c (to_oct):
8150 New parameter substitute, giving a substitute value to use
8151 when the original value is out of range. Do not append a space to the
8152 output; modern tars don't. When a value is out of range, specify the
8153 maximum value, not the number of bits.
8154 (GID_NOBODY, UID_NOBODY): New macros.
8155 (gid_to_oct, uid_to_oct): Use them as substitutes.
8156 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
8157 (dump_file): Check whether the file changed as we read it.
8159 * src/rmt.c (main): Remove suspicious AIX/386 code.
8161 1999-02-19 Paul Eggert <eggert@twinsun.com>
8163 * intl/localealias.c (read_alias_file): Don't assume that memcpy
8164 returns a type compatible with char *; it doesn't on SunOS
8165 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
8167 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
8169 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
8170 * doc/tar.texi: Add --bzip2, --unbzip2 options.
8172 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
8174 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
8175 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
8176 * acinclude.m4 (AM_WITH_NLS):
8177 Update to latest gettext version (serial 5).
8178 (AC_LFS_FLAGS): New macro
8179 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
8180 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
8181 Work properly in cross-compilation scenario, by checking for getconf
8182 with AC_CHECK_TOOL and by ditching uname in favor of
8183 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
8185 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
8186 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
8187 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
8188 since getdate.y now uses ANSI code.
8190 * config.guess, config.sub: New files; taken from automake 1.4.
8192 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
8193 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
8194 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
8195 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
8196 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
8197 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
8198 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
8200 1999-02-01 Paul Eggert <eggert@twinsun.com>
8202 * src/tar.c: Update copyright.
8206 1999-02-01 Paul Eggert <eggert@twinsun.com>
8208 * NEWS, configure.in: Version 1.12.64004
8210 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
8212 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
8214 * src/extract.c (extract_archive): Fix bug when extracting sparse
8215 files: they were trashing the tar file header.
8217 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
8218 Add -y or --bzip2 or --bunzip2 option.
8220 1999-01-30 Paul Eggert <eggert@twinsun.com>
8222 * src/names.c (cached_no_such_uname, cached_no_such_gname,
8223 cached_no_such_uid, cached_no_such_gid): New vars.
8224 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
8225 Cache failures, too.
8227 * src/tar.c (decode_options):
8228 Don't pass names longer than UNAME_FIELD_SIZE to
8229 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
8231 1999-01-27 Paul Eggert <eggert@twinsun.com>
8233 * NEWS, configure.in: Version 1.12.64003
8235 * src/buffer.c (backspace_output, close_archive): Cast
8236 rmtlseek position arg to off_t, for benefit of K&R compilers
8238 * src/compare.c (verify_volume): Likewise.
8240 * NEWS, configure.in: Version 1.12.64002
8242 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
8243 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
8244 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
8245 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
8246 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
8247 uid_from_oct): Likewise.
8249 1999-01-25 Paul Eggert <eggert@twinsun.com>
8251 * incremen.sh: Fix timing bug in regression test.
8253 1999-01-22 Paul Eggert <eggert@twinsun.com>
8255 * NEWS, configure.in: Update version
8257 * Makefile.am (localedir): Change to $(datadir)/locale.
8258 (DEFS): New macro, defining LOCALEDIR.
8259 (tar.o, tar._o, rmt.o, rmt._o): Remove.
8260 (INCLUDES): Add -I..
8262 * Makefile.am (localedir): Change to $(datadir)/locale.
8264 1999-01-21 Paul Eggert <eggert@twinsun.com>
8266 * NEWS, README, configure.in: Unofficial version 1.12.64001.
8268 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
8269 * src/Makefile.am (localedir): Likewise.
8270 (DEFS): New macro, defining LOCALEDIR.
8271 (tar.o, tar._o, rmt.o, rmt._o): Remove.
8272 (INCLUDES): Add `-I..'.
8274 * tests/incremen.sh: Fix timing bug.
8276 1999-01-20 Paul Eggert <eggert@twinsun.com>
8278 * NEWS, README, configure.in: Unofficial version 1.12.64000.
8279 `lfs.7' changed to `64000' in version number
8280 to conform to gnits standards.
8282 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
8283 mkinstalldirs, ansi2knr.c: Update to latest public versions.
8285 Rebuild with automake 1.4 and autoconf 2.13, to work around some
8288 1998-12-07 Paul Eggert <eggert@twinsun.com>
8290 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
8292 * src/list.c (read_header):
8293 Accept file names as specified by POSIX.1-1996 section 10.1.1.
8295 1998-11-30 Paul Eggert <eggert@twinsun.com>
8297 * configure.in: Quote the output of uname.
8299 * src/extract.c (set_stat): chmod after chown even when not root;
8300 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
8302 1998-11-15 Paul Eggert <eggert@twinsun.com>
8304 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
8306 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
8307 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
8309 1998-10-28 Paul Eggert <eggert@twinsun.com>
8311 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
8313 * src/system.h (voidstar): Use void * if __STDC__ is defined,
8316 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
8317 On many installations, rexec is disabled.
8319 1998-08-07 Paul Eggert <eggert@twinsun.com>
8321 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
8323 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
8324 for nameless users and groups.
8326 1998-02-17 Paul Eggert <eggert@twinsun.com>
8328 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
8329 * NEWS, README: Add explanation of why this isn't an official version.
8331 1998-02-02 Paul Eggert <eggert@twinsun.com>
8333 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
8334 This is an unofficial version.
8336 1997-12-17 Paul Eggert <eggert@twinsun.com>
8338 * src/incremen.c (ST_DEV_MSB): New macro.
8339 (NFS_FILE_STAT): Use most significant bit of st_dev,
8340 even if it's unsigned.
8342 1997-12-08 Paul Eggert <eggert@twinsun.com>
8344 * src/system.h (ST_NBLOCKS): Fix typo in definition.
8346 1997-11-19 Paul Eggert <eggert@twinsun.com>
8348 * configure.in (HAVE_INTTYPES_H):
8349 Don't ignore cache variable if it's already set.
8351 1997-11-10 Paul Eggert <eggert@twinsun.com>
8353 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
8354 * src/delete.c (records_read): Now off_t.
8355 (move_archive): Don't assume mt_count is of type daddr_t.
8357 1997-10-30 Paul Eggert <eggert@twinsun.com>
8359 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
8360 Set to appropriate values if large file support
8361 needs explicit enabling.
8362 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
8364 New macros to configure.
8365 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
8367 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
8368 major_t, minor_t, ssize_t): New macros.
8370 * src/arith.h (TARLONG_FORMAT):
8371 Fix typo: %uld -> %lu. Use unsigned when long long
8373 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
8374 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
8376 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
8377 2nd arg is now unsigned long.
8379 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
8380 (prepare_record_buffer): Arg is now size_t.
8381 Remove now-useless casts.
8383 (main): Use `long' for status, so that it can store ssize_t.
8384 Use daddr_t, mode_t, size_t, off_t when appropriate.
8385 Convert daddr_t and off_t values ourselves, since they might be longer
8386 than long. Convert other types using `long' primitives.
8387 When processing MTIOCTOP, do not try to pass resulting
8388 count back, since it won't work (it could be too large) and it's
8389 not expected anyway.
8392 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
8393 now-useless casts. Use unsigned long to print *_t types, except use
8394 STRINGIFY_BIGINT for off_t.
8395 (update_archive): Cast -1 to dev_t when necessary.
8397 * src/tar.c (check_decimal):
8398 Now returns 1 if successful, 0 otherwise, and returns
8399 uintmax_t value into new arg. Check for arithmetic overflow.
8400 (decode_options): Avoid overflow if record_size fits in size_t but not int.
8401 Check for overflow on user or group ids.
8403 * src/compare.c (diff_init, process_rawdata, read_and_process,
8404 diff_sparse_files, diff_archive):
8405 Use off_t, pid_t, size_t, ssize_t when appropriate.
8406 Remove now-useless casts. Use unsigned long to print *_t types,
8407 except use STRINGIFY_BIGINT for off_t.
8409 (process_noop, process_rawdata, process_dumpdir, read_and_process):
8410 Size arg is now size_t.
8412 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
8413 when allocating buffer.
8416 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
8417 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
8418 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
8421 (get_status_string, get_status_off): New function.
8422 (get_status): Now returns long, so that it can store ssize_t.
8423 Invoke get_status_string to do the real work.
8424 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
8425 (rmt_lseek__): Now returns off_t, using new get_status_off function.
8426 (rmt_ioctl__): Convert mt_count by hand,
8427 since it might be longer than long.
8429 * src/mangle.c (extract_mangle):
8430 Check for overflow when converting off_t to size_t.
8431 Use off_t, size_t when appropriate. Remove now-useless casts.
8433 * src/system.h (mode_t): Remove; now done by autoconf.
8434 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
8435 Return number of ST_NBLOCKSIZE-byte blocks,
8436 not number of 512-byte blocks;
8437 this also helps to avoid overflow.
8438 (st_blocks): Declare if needed.
8439 (ST_NBLOCKSIZE): New macro.
8440 (<limits.h>, <inttypes.h>): Include if available.
8441 (CHAR_BIT): New macro.
8442 (uintmax_t): New typedef.
8443 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
8444 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
8445 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
8447 * src/names.c (name_init):
8448 Fix typo in error message: FILE* was passed, but char*
8451 (read_name_from_file, name_gather, addname, name_match, name_scan,
8452 add_exclude): Use size_t when appropriate. Remove now-useless casts.
8454 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
8456 * src/extract.c (newdir_umask, current_umask): Now mode_t.
8457 (extract_sparse_file): Args now use off_t.
8459 (set_mode, set_stat, make_directories, extract_sparse_file,
8460 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
8461 now-useless casts. Use unsigned long to print *_t types, except use
8462 STRINGIFY_BIGINT for off_t.
8464 * src/misc.c (quote_copy_string):
8465 Use size_t when appropriate. Remove now-useless casts.
8467 * src/list.c (read_and, list_archive, read_header, decode_mode,
8468 print_header, print_for_mkdir):
8469 Use mode_t, off_t, size_t when appropriate. Remove
8470 now-useless casts. Use unsigned long to print *_t types, except use
8471 STRINGIFY_BIGINT for off_t.
8473 (read_header): Check for overflow when converting header size.
8475 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
8476 const char *. Size arg is now size_t. Now takes new type and maxval
8477 args. Compute result using uintmax_t, not long. Report error if
8478 field does not contain octal number in range.
8479 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
8480 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
8481 uintmax_from_oct): New functions.
8483 (stringify_uintmax_t_backwards): New function.
8485 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
8486 (skip_file): Offset arg is now off_t.
8488 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
8489 real_s_totsize, real_s_sizeleft, current_block_ordinal):
8491 (write_error): Arg is now ssize_t.
8492 (child_pid): Now pid_t.
8493 (available_space_after): Now size_t.
8495 (child_open_for_compress, child_open_for_uncompress, flush_write,
8496 open_archive, flush_write, write_error, flush_read, close_archive):
8497 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
8498 casts. Use unsigned long to print *_t types, except use
8499 STRINGIFY_BIGINT for off_t.
8501 * src/delete.c (records_read): Now daddr_t.
8502 (move_archive): Arg is now daddr_t. Check for overflow when
8504 (move_archive, delete_archive_members): Use daddr_t, off_t when
8505 appropriate. Remove now-useless casts.
8507 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
8508 (rmt_lseek): Now returns off_t.
8510 * src/create.c (to_oct):
8511 Now static. Value arg is now uintmax_t. Accept new args
8512 giving name of type of octal field, for error messages. Report an
8513 error if the value is too large to fit in the field.
8514 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
8515 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
8517 (write_eot, write_long, finish_header, deal_with_sparse,
8518 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
8519 appropriate. Remove now-useless casts. Use unsigned long to print
8520 *_t types, except use STRINGIFY_BIGINT for off_t.
8522 (find_new_file_size): 1st arg is now off_t*.
8523 (finish_sparse_file): Args now use off_t, not long.
8524 Check for lseek error.
8525 (create_archive, dump_file): Cast -1 to dev_t when necessary.
8526 (dump_file): Device arg is now dev_t.
8527 Avoid overflow when testing whether file has holes
8528 by using the new ST_NBLOCKSIZE macro.
8530 * src/incremen.c (struct accumulator, add_to_accumulator,
8531 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
8532 Use size_t for sizes.
8533 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
8534 Use dev_t, ino_t for devices and inodes.
8535 (gnu_restore): Use off_t for file offsets.
8536 (struct directory): Use char for flags. Add new flag `nfs'.
8538 (NFS_FILE_STAT): New macro.
8539 (note_directory): Accept struct stat * instead of
8540 device and inode number. All callers changed.
8541 (note_directory, get_directory_contents):
8542 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
8543 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
8545 * src/common.h (record_size, struct name, struct sp_array,
8546 available_space_after):
8547 Use size_t for sizes.
8548 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
8549 Use off_t for file offsets.
8550 (struct name): dir_contents is now const char *, not char *.
8551 (dump_file, get_directory_contents): Use dev_t for devices.
8552 (to_oct): Remove decl.
8553 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
8554 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
8555 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
8556 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
8557 UINTMAX_FROM_OCT): New macros.
8558 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
8559 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
8560 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
8561 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
8562 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
8563 (print_for_mkdir): 2nd arg is now mode_t.
8567 See ChangeLog.1 for earlier changes.
8571 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
8572 Free Software Foundation, Inc.
8574 This file is part of GNU tar.
8576 GNU tar is free software; you can redistribute it and/or modify
8577 it under the terms of the GNU General Public License as published by
8578 the Free Software Foundation; either version 3, or (at your option)
8581 GNU tar is distributed in the hope that it will be useful,
8582 but WITHOUT ANY WARRANTY; without even the implied warranty of
8583 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8584 GNU General Public License for more details.
8586 You should have received a copy of the GNU General Public License
8587 along with GNU tar; see the file COPYING. If not, write to
8588 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
8589 Boston, MA 02110-1301, USA.
8593 version-control: never