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