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