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