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