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