1 2010-10-25 Sergey Poznyakoff <gray@gnu.org.ua>
4 * configure.ac, NEWS: Version 1.24
5 * bootstrap: Restore tar-specific code lost during last
6 sync from gnulib (241b72ffad).
7 * src/misc.c (chdir_do): Remove unused automatic variable.
9 2010-10-16 Paul Eggert <eggert@cs.ucla.edu>
11 tar: use more-accurate diagnostic when intermediate mkdir fails
12 Without this change, if tar tried to extract a file A/B/C, noticed
13 that A/B didn't exist, attempted to mkdir A/B, and the mkdir
14 failed, it did not diagnose the mkdir failure, but simply reported
15 the failure to open A/B/C. This sometimes led to confusion
16 because it wasn't clear what tar was trying to do, in particular
17 that tar tried to mkdir A/B. With this patch, tar issues two
18 diagnostics in this case: one for A/B and the other for A/B/C.
19 Problem reported by Hauke Laging in
20 <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00020.html>.
21 * gnulib.modules: Remove faccessat.
22 * src/extract.c (make_directories): New arg INTERDIR_MADE.
23 Diagnose mkdir failure. Return 0 on success, nonzero on failure,
24 as opposed to nonzero iff some directory was created. All callers
25 changed. Simplify the code when mkdir fails, by checking whether
26 the desired file exists unless errno==EEXIST: this is more robust.
27 * tests/extrac15.at: New test, to check this.
28 * tests/Makefile.am (TESTSUITE_AT): Add it.
29 * tests/testsuite.at: Include it.
31 tests: port to NFS file servers with clock skew
32 Several of the tests assumed that a newly created file cannot
33 have a time stamp dated in the future. This assumption is not
34 true when files are served by a remote host whose clock is
35 slightly in advance of ours. Fix the problems that I observed
36 when running "make check" a couple of times on such a server.
38 * tests/backup01.at: Use --warning=no-timestamp to suppress
40 * tests/chtype.at, tests/comprec.at, tests/exclude06.at:
41 * tests/extrac01.at, tests/extrac03.at, tests/extrac05.at:
42 * tests/extrac06.at, tests/extrac08.at, tests/extrac13.at:
43 * tests/extrac14.at, tests/incr01.at, tests/incr03.at,
45 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at:
46 * tests/pipe.at, tests/rename02.at, tests/rename03.at:
47 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
51 2010-10-12 Paul Eggert <eggert@cs.ucla.edu>
53 gnulib: sync from latest gnulib, notably bootstrap and
55 * bootstrap: Sync from gnulib.
56 * doc/.gitignore: Rename getdate.texi to parse-datetime.texi.
57 * doc/Makefile.am (tar_TEXINFOS): Likewise.
58 * doc/tar.texi (Top): Adjust to renaming of getdate to
60 * gnulib.modules: Likewise. Also, remove ftruncate (now
62 And add inttostr (we missed this dependency).
63 * src/tar.c: Include parse-datetime.h, not getdate.h. All calls
64 to get_date replaced with parse_datetime.
66 2010-09-24 Paul Eggert <eggert@cs.ucla.edu>
68 tar: -x -C symlink fix
69 * src/misc.c (chdir_do): Don't use O_NOFOLLOW when opening the
70 argument to -C. This is for consistency with "tar -c -C FOO", and
71 matches the new documentation.
72 * tests/extrac14.at: New file.
73 * tests/Makefile.am (TESTSUITE_AT): Add it.
74 * tests/testsuite.at: Include it.
76 tar: --dereference consistency
77 This closes another race condition, that occurs when overwriting a
78 symlink with a regular file.
79 * NEWS (--dereference consistency): New section.
80 * doc/tar.texi (Option Summary): Describe new --deference
82 (dereference): Likewise. Remove discussion that I didn't follow,
83 even before --dereference was changed.
84 * src/common.h (deref_stat, set_file_atime): Adjust signatures.
85 * src/compare.c (diff_file, diff_multivol): Respect
87 instead of rolling our own flags. This implements the new
90 (diff_file, diff_dumpdir): Likewise, for fstatat_flags.
91 * src/create.c: Adjust to set_file_atime signature change.
92 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
94 * src/incremen.c (try_purge_directory): Likewise.
95 * src/misc.c (maybe_backup_file): Likewise.
96 * src/extract.c (file_newer_p): New arg STP. All callers changed.
97 (maybe_recoverable): New arg REGULAR. All callers changed.
98 Handle the case of overwriting a symlink with a regular file,
99 when --overwrite is specified but --dereference is not.
100 (open_output_file): Add O_CLOEXEC, O_NOCTTY, O_NONBLOCK for
101 consistency with file creation. Add O_NOFOLLOW if
102 overwriting_old_files && ! dereference_option.
103 * src/incremen.c (update_parent_directory): Use fstat, not
105 there's less to go wrong.
106 * src/misc.c (deref_stat): Remove DEREF arg. All callers changed.
107 Instead, use fstatat_flags.
108 (set_file_atime): Remove ATFLAG arg. All callers changed.
109 Instead, use fstatat_flags.
110 * src/names.c, src/update.c: Adjust to deref_stat signature
112 * src/tar.c (get_date_or_file): Use stat, not deref_stat, as this
113 is not a file to be archived.
114 * tests/Makefile.am (TESTSUITE_AT): Add extrac13.at.
115 * tests/extrac13.at: New file.
116 * tests/testsuite.at: Include it.
118 2010-09-20 Paul Eggert <eggert@cs.ucla.edu>
120 tar: do not crash with --listed-incremental
121 Problem reported by Frantisek Hanzlik in
122 <https://bugzilla.redhat.com/635318> via Kamil Dudka in
123 <http://lists.gnu.org/archive/html/bug-tar/2010-09/msg00066.html>.
124 I don't understand this code either, but Sergey can take a look at
125 this patch, and perhaps install a better one, when he has
127 * src/incremen.c (append_incremental_renames): Don't actually
129 anything to DIR if DIR is null.
131 2010-09-19 Paul Eggert <eggert@cs.ucla.edu>
133 tar: prefer openat-style functions
134 This change replaces traditional functions like 'open' with the
135 POSIX.1-2008 functions like 'openat'. Mostly this is an internal
136 refactoring change, in preparation for further changes to close
138 * gnulib.modules: Add faccessat, linkat, mkfifoat, renameat,
141 * src/Makefile.am (tar_LDADD): Add $(LIB_EACCESS).
142 * tests/Makefile.am (LDADD): Likewise.
143 * src/common.h (chdir_fd): New extern var.
144 * src/compare.c (diff_file, diff_multivol): Use openat instead
146 * src/create.c (create_archive, restore_parent_fd): Likewise.
147 * src/extract.c (create_placeholder_file): Likewise.
148 * src/names.c (collect_and_sort_names): Likewise.
149 * src/update.c (append_file): Likewise.
150 * src/compare.c (diff_symlink): Use readlinkat instead of
152 * src/compare.c (diff_file): Use chdir_fd instead of AT_FDCWD.
153 * src/create.c (subfile_open, dump_file0): Likewise.
154 * src/extract.c (fd_chmod, fd_chown, fd_stat, set_stat):
155 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
157 * src/extract.c (mark_after_links, file_newer_p, extract_dir):
158 (extract_link, apply_delayed_links):
159 Use fstatat rather than stat or lstat.
160 * src/misc.c (maybe_backup_file, deref_stat): Likewise.
161 * src/extract.c (make_directories): Use mkdirat rather than mkdir.
162 Use faccessat rather than access. This fixes a minor permissions
163 bug when tar is running setuid (who would want to do that?!).
164 (open_output_file): Use openat rather than open.
165 In the process, this removes support for Masscomp's O_CTG files,
166 which aren't compatible with openat's signature. Masscomp! Wow!
167 That's a blast from the past. As far as I know, that operating
168 system hasn't been supported for more than 20 years.
169 (extract_link, apply_delayed_links):
170 Use linkat rather than link.
171 (extract_symlink, apply_delayed_links):
172 Use symlinkat rather than symlink.
173 (extract_node): Use mknodat rather than mknod.
174 (extract_fifo): Use mkfifoat rather than mkfifo.
175 (apply_delayed_links): Use unlinkat rather than unlink or rmdir.
176 * src/misc.c (safer_rmdir, remove_any_file): Likewise.
177 * src/unlink.c (flush_deferred_unlinks): Likewise.
178 * src/extract.c (rename_directory): Use renameat rather than
180 * src/misc.c (maybe_backup_file, undo_last_backup): Likewise.
181 * src/misc.c: Don't include <save-cwd.h>; no longer needed now
182 that we're using openat etc.
183 (struct wd): Add member fd. Remove members err and fd. All uses
185 (CHDIR_CACHE_SIZE): New constant.
186 (wdcache, wdcache_count, chdir_fd): New vars.
187 (chdir_do): Use openat rather than save_cwd. Keep the cache up
188 to date. This code won't scale well, but is good enough for now.
189 * src/update.c (update_archive): Use openat + fdopendir +
190 streamsavedir rather than savedir.
192 This file is a placeholder. It will be replaced with the actual
194 by make dist. Run make ChangeLog if you wish to create it
197 2010-09-18 Paul Eggert <eggert@cs.ucla.edu>
199 tar: add utimens.h includes
200 * src/extract.c: Include <utimens.h>, needed for fdutimens
202 * src/misc.c: Likewise.
204 tar: switch to gnulib fdutimensat module
205 * gnulib.modules: Add fdutimensat.
206 * src/common.h (fd_utimensat): Remove decl.
207 * src/extract.c (set_stat): Call fdutimensat, not fd_utimensat.
208 * src/misc.c (set_file_atime): Likewise.
209 (fd_utimensat): Remove.
211 2010-09-17 Paul Eggert <eggert@cs.ucla.edu>
213 tar: extract permissions for . last
214 * src/common.h (must_be_dot_or_slash): New decl.
215 * src/extract.c (mark_after_links): New function, taking code
216 that used to be in create_placeholder_file.
217 (create_placeholder_file): Use it.
218 (delay_set_stat): Always delay setting status for . and /.
219 * src/misc.c (must_be_dot_or_slash): Now extern.
220 * tests/extrac12.at: New file.
221 * tests/Makefile.am (TESTSUITE_AT): Add it.
222 * tests/testsuite.at: Likewise.
224 tar: don't check for getdtablesize; use AC_CHECK_FUNCS_ONCE
225 * configure.ac: Don't check for getdtablesize; no longer needed.
226 Use AC_CHECK_FUNCS_ONCE rather than AC_CHECK_FUNCS, for
229 tar: extract symlink attributes, close some symlink-related races
230 * NEWS: Describe symlink-extraction improvements.
231 * src/extract.c (enum permstatus): Remove.
232 (fchmod, fchown): Define dummy replacement macros if the system
233 does not supply them.
234 (implemented): New function.
235 (struct delayed_set_stat): Remove members invert_permissions,
236 permstatus. They were too confusing, and tried to do too much
237 in too-little space. Instead, add members current_mode,
238 current_mode_mask, interdir, atflag. All users changed.
239 (struct delayed_link): Add members mode, atime, mtime, to support
240 platforms such as BSD where symlinks have these attributes.
242 (fd_chmod): Renamed from fdchmod. New argument atflag. Check for
243 operation not supported at run-time, not at configure-time. Put
244 fd argument first. All callers changed.
245 (fd_chown): Likewise, renaming from fdchown.
246 (fd_stat): Likewise, renaming from fdstat.
247 (set_mode): Remove args stat_info, cur_info, invert_permissions,
248 permstatus. Add args mode, mode_mask, current_mode,
250 atflag. All callers changed. Close some races. Use an easier-to
251 understand method for computing permissions. Work around POSIX
252 incompatibility in Linux fchmodat. Support extraction of symlink
253 modes, if the OS allows it.
254 (set_stat): Remove args cur_info, invert_permissions, permstatus.
255 Add args current_mode, current_mode_mask, interdir, atflag.
256 All callers changed. Close some races. Support extraction of
257 attributes on symlinks, if the OS allows it.
258 (delay_set_stat): Remove args invert_permissions, permstatus.
259 Add args current_mode, current_mode_mask, mode, atflag.
260 The ST arg can be null now, indicating that it's an intermediate
261 directory. All callers changed.
262 (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat):
264 (extract_dir): Also be paranoid if only --same-permissions, due
265 to semantics of setgid and setuid directories on some hosts.
266 This closes a race on those hosts. Simplify calculation of
267 delay_set_stat arguments; the old code was truly strange and
268 probably wrong in some border cases.
269 (extract_dir, extract_file, extract_node, extract_fifo): Don't
271 unspecified behavior in mode arg of open, mknod, etc. Instead,
272 mask out those bits when creating the file, and add them later via
274 (open_output_file): file_name is now const. Add arg current_mode,
275 current_mode_mask. All callers changed. When overwriting
277 refuse to overwrite something that is not a regular file, since
278 we're extracting a regular file.
279 (extract_file): Remove the FIXME comment. Whatever the protection
280 issues were, they should be fixed now. As a result of all
282 API changes, we now use fchmod etc. rather than chmod etc.,
285 (create_placeholder_file, apply_delayed_links): Record desired
286 mode and times for symlinks, for OSes that support that.
288 2010-09-16 Paul Eggert <eggert@cs.ucla.edu>
290 tar: tar -x without --incremental no longer sets atime again
291 * src/extract.c (set_stat): Use UTIME_OMIT rather than UTIME_NOW.
292 The UTIME_NOW was there only to emulate the previous behavior of
293 using the current time, and the previous behavior was there only
294 because before we started assuming POSIX.1-2008 there was no
295 portable way to get the effect of UTIME_NOW.
297 tar: another --atime-preserve race fix
298 * src/common.h (set_file_atime): Add parentfd arg.
299 * src/compare.c (diff_file): Use it.
300 * src/create.c (dump_file0): Likewise. This closes yet another
301 race condition with symbolic links.
302 * src/misc.c (set_file_atime): Add parentfd arg.
304 tar: --atime-preserve fixes for races etc.
305 This patch fixes a race condition in the --atime-preserve=replace
306 option, which might cause tar to improperly follow a symbolic
309 It also drops the use of the _FIOSATIME ioctl of Solaris 2.x
310 and later, which loses resolution on time stamps. Modern Solaris
311 systems support full-resolution time stamps in the kernel, and
312 it's not worth the hassle of testing this call, useful only in
313 no-longer-supported Solaris variants.
315 Also, it undoes a change I recently introduced to the --compare
316 option, which caused it to not follow symbolic links unless the
317 --dereference option was also used. Quite possibly this change is
318 a good idea, but the old behavior was documented and the change
319 should not have been installed casually.
321 * configure.ac: Don't check for stropts.h and sys/filio.h.
322 * gnulib.modules: Add futimens, utimensat. Remove futimens.
323 * src/common.h (fd_utimensat): New decl.
324 * src/compare.c (diff_file, diff_multivol):
325 Don't use open_read_flags: those are for --create only.
326 * src/create.c (dump_file0): Adjust to set_file_atime changes.
327 Pass fstatat_flags to set_file_atime, so that symbolic links are
328 not followed inadvertantly.
329 * src/extract.c: Don't include utimens.h.
330 (set_stat): Use fd_utimensat ant UTIME_NOW rather than fdutimens.
331 * src/misc.c: Don't include utimens.h, stropts.h, sys/filio.h.
332 (fd_utimensat): New function.
333 (set_file_atime): Use it. New arg atflag, controlling symlink
334 handling. All callers changed.
336 2010-09-14 Paul Eggert <eggert@cs.ucla.edu>
338 * configure.ac: tar: close some race conditions when extracting
339 * configure.ac: Check for fchmod and fchown. Don't check
341 * src/extract.c (fdchmod, fdchown, fdstat): New functions.
342 (set_mode, set_stat): New arg FD. All callers changed.
343 This avoids some race conditions between closing a regular file
344 and setting its metadata, and it's a bit faster.
346 2010-09-13 Paul Eggert <eggert@cs.ucla.edu>
348 tar: don't worry about fdopendir closing its argument
349 * NEWS: Don't mention dirfd; no longer needed.
350 * gnulib.modules: Remove dirfd.
351 * src/create.c (get_directory_entries): Remove the code dealing
352 with dirfd failures, as the new fdopendir replacement doesn't
353 close its argument so we don't need to call dirfd. See
354 <http://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00208.html>
355 and gnulib commit 970c9038e4cca46e1b037ae0a6d574dfae6a7327.
357 * NEWS: Fix wording typo in previous change.
358 Reported by Jim Meyering.
360 tar: live within system-supplied limits on file descriptors
361 * NEWS: Note the change. Mention dirfd and fdopendir.
362 * gnulib.modules: Add dirfd and fdopendir. The code was already
363 using fdopendir; dirfd is a new need.
364 * src/common.h (open_searchdir_flags, get_directory_entries):
365 (subfile_open, restore_parent_fd, tar_stat_close): New decls.
366 (check_exclusion_tags): Adjust signature to match code change.
367 * src/create.c (IMPOSTOR_ERRNO): New constant.
368 (check_exclusion_tags): First arg is now a struct tar_stat_info
369 const *, not an fd. All callers changed.
370 (dump_regular_file, dump_file0): A zero fd represents an unused
371 slot, so play it safe if the fd member is zero here. A negative
372 fd represents the negation of an errno value, so play it safe and
373 do not assign -1 to fd merely because an open fails.
374 (open_failure_recover, get_directory_entries, restore_parent_fd):
375 (subfile_open): New functions. These help to recover from file
376 descriptor exhaustion.
377 (dump_dir, dump_file0): Use them.
378 (dump_file0): Use tar_stat_close instead of rolling our own close.
379 * src/incremen.c (scan_directory): Use get_directory_entries,
380 subfile_open, etc., to recover from file descriptor exhaustion.
381 * src/names.c (add_hierarchy_to_namelist): Likewise.
382 (collect_and_sort_names): A negative fd represents the negation
383 of an errno value, so play it safe and do not assign -1 to fd.
384 * src/tar.c (decode_options): Set open_searchdir_flags.
385 Add O_CLOEXEC to all the open flags.
386 (tar_stat_close): New function, which knows how to deal with
387 new convention for directory streams and file descriptors.
388 Diagnose 'close' failures.
389 (tar_stat_destroy): Use it.
390 * src/tar.h (struct tar_stat_info): New member dirstream.
391 fd now has the negative of an errno value, not merely -1, if
392 the file could not be opened, so that failures to reopen
394 are better-diagnosed later.
395 * tests/Makefile.am (TESTSUITE_AT): Add extrac11.at.
396 * tests/testsuite.at: Likewise.
397 * tests/extrac11.at: New file.
399 2010-09-08 Paul Eggert <eggert@cs.ucla.edu>
401 tar: improve documentation of reliability and security issues
402 * doc/tar.texi (Reliability and security, Reliability):
403 (Permissions problems, Data corruption and repair, Race
405 (Security, Privacy, Integrity, Live untrusted data):
406 (Security rules of thumb): New nodes.
408 2010-09-06 Paul Eggert <eggert@cs.ucla.edu>
410 tar: more reliable directory traversal when creating archives
411 * NEWS: Document this.
412 * gnulib.modules: Add openat, readlinkat.
413 * src/common.h (open_read_flags, fstatat_flags): New global
415 (cachedir_file_p, dump_file, check_exclusion_tags,
417 Adjust to new signatures, described below.
418 (name_fill_directory): Remove.
419 * src/compare.c (diff_file, diff_multivol): Use open_read_flags.
420 * src/create.c (struct exclusion_tag): Exclusion predicates
422 a file descriptor, not a file name.
423 (add_exclusion_tag): Likewise. All uses changed.
424 (cachedir_file_p): Likewise.
425 (check_exclusion_tags): The directory is now a file descriptor,
426 not a file name. All uses changed. Use openat for better
428 (file_dumpable_p): Arg is now a struct stat, not a struct
429 tar_stat_info. All uses changed. Check the arg's file types too.
430 (dump_dir0, dump_dir, dump_file0, dump_file): Omit top_level and
431 parent_device args, since st->parent tells us that now. All uses
433 (dump_dir): Likewise. Also, omit fd arg for similar reasons.
434 Apply fdsavedir to a dup of the file descriptor, since we need a
435 file descriptor for openat etc. as well, and fdsavedir (perhaps
436 unwisely) consumes its file descriptor when successful.
437 Do not consume st->fd when successful; this simplifies the caller.
438 (create_archive): Allocate a file descriptor when retraversing
439 a directory, during incremental dumps.
440 (dump_file0): Use fstatat, openat, and readlinkat for better
442 When opening a file, use the result of fstat on the file
444 rather than the fstatat on the directory entry, to avoid some race
445 conditions. No need to reopen the directory since we now
447 close it. Change "did we open the file?" test from 0 <= fd to
448 0 < fd since fd == 0 now represents uninitialized.
449 (dump_file): Now accepts struct tar_stat_info describing parent,
450 not parent_device. Also, accept basename and fullname of entry.
452 * src/incremen.c (update_parent_directory): Accept struct
453 tar_stat_info for parent, not name. All callers changed.
454 Use fstatat for safer directory traversal.
455 (procdir): Accept struct tar_stat_info, not struct stat and
456 dev_t, for info about directory. All callers changed.
457 (scan_directory): Accept struct tar_stat_info, not name,
458 device, and cmdline, for info about directory. All callers
459 changed. Do not consume the file descriptor, since caller
460 might need it. Use fstatat and openat for safer directory
461 traversal; also, use fstat after opening to double-check.
462 (name_fill_directory): Remove.
463 * src/names.c (add_hierarchy_to_namelist): Accept struct
464 tar_stat_info instead of device and cmdline. All callers changed.
465 When descending into a subdirectory, use openat and fstat for
466 safer directory traversal.
467 (collect_and_sort_names): Use open and fstat for safer directory
468 traversal. Set up struct tar_stat_info for callee's new API.
469 * src/tar.c (decode_options): Initialize open_read_flags
471 (tar_stat_destroy): Close st->fd if it is positive (not zero!).
472 * src/tar.h (struct tar_stat_info): New members parent, fd.
473 * src/update.c (update_archive): Adjust to dump_file's API change.
474 * tests/filerem02.at: Ignore stderr since its contents now depend
475 on the file system implementation.
477 2010-09-05 Paul Eggert <eggert@cs.ucla.edu>
479 tar: remove lint discovered by Sun C compiler
480 * src/common.h (WARN_ALL): Don't mask with 0xffffffff; on a 32-bit
481 host, 0xffffffff is of type 'unsigned int', which makes WARN_ALL
482 an unsigned int value that is too large to fit into an int, and
483 the C standard says that this has undefined behavior. The mask is
484 not needed, so omit it.
486 2010-09-04 Paul Eggert <eggert@cs.ucla.edu>
488 tar: restore macros that are used in some cases
489 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
490 Restore these macros, undoing the previous change to this file.
491 The macros are used after all, in some cases. Sorry about that.
493 2010-09-03 Paul Eggert <eggert@cs.ucla.edu>
495 tar: remove unused macros
496 * src/create.c (UINTMAX_TO_CHARS): Remove; no longer used.
497 * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM):
499 * src/incremen.c (DIR_IS_NEW): Comment out; not used.
500 Mark this with a FIXME, since it looks like it should be used.
502 2010-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
504 Fix --remove-files in update/append mode.
505 * src/update.c (update_archive): Call finish_deferred_unlinks when
508 2010-08-26 Paul Eggert <eggert@cs.ucla.edu>
510 tar: avoid assumptions about root access and chmod -w in test
512 * tests/extrac07.at, tests/extrac09.at, tests/listed03.at: Use
513 AT_UNPRIVILEGED_PREREQ, since this test requires non-root
515 * tests/extrac07.at: Don't use "chmod -w", as POSIX says it's not
516 portable to start a chmod permissions-list with "-" as it may be
517 confused with an option. Use "chmod a-w" instead.
519 tar: fix bug with -C and delayed setting of metadata
520 * src/common.h (chdir_current): New decl.
521 * src/extract.c (struct delayed_set_stat, struct delayed_link):
522 New member change_dir.
523 (delay_set_stat, create_placeholder_file): Set it.
524 (apply_nonancestor_delayed_set_stat, apply_delayed_links): Use it.
525 (extract_link): Check that the links are all relative to the same
527 (extract_archive): Restore the current directory after
528 apply_nonancestor_delayed_set_stat has possibly changed it.
529 * src/misc.c (chdir_current): New external var; this used to
530 be the private static variable 'previous' inside chdir_dir.
532 * tests/Makefile.am (TESTSUITE_AT): New test extrac10.at.
533 * tests/extrac10.at: New file.
534 * tests/testsuite.at: Include it.
536 2010-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
538 Don't apply file transformations to volume names.
539 * src/list.c (decode_header): Don't apply file transformations
541 * tests/xform01.at: New testcase.
542 * tests/xform-h.at (xform): Rename macro to xformtest. Use
544 * tests/Makefile.am, tests/testsuite.at: Add xform01.at
546 2010-08-25 Paul Eggert <eggert@cs.ucla.edu>
548 tar: optimize -c --sparse when file is entirely sparse
549 * src/sparse.c (sparse_scan_file): If the file is entirely sparse,
550 that is, if ST_NBLOCKS is zero, don't bother scanning for nonzero
551 blocks. Idea by Kit Westneat, communicated by Bernd Schubert in
552 <http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00038.html>.
553 Also, omit unnecessary lseek at start of file.
555 tar: don't assume size of a sparse file chunk fits in size_t
556 * src/tar.h (struct sp_array): Change numbytes from size_t
559 * scripts/xsparse.c (struct sp_array): Likewise.
560 Include <stdint.h>, for SIZE_MAX.
561 (expand_sparse): Don't try to allocate a buffer bigger than
563 * src/common.h (SIZE_TO_CHARS, size_to_chars, SIZE_FROM_HEADER):
564 (size_from_header): Remove decls.
565 * src/create.c (size_to_chars): Remove.
566 * src/list.c (size_from_header): Remove.
567 * src/sparse.c (sparse_extract_region, check_data_region):
568 (oldgnu_add_sparse, oldgnu_store_sparse_info, pax_decode_header):
569 Don't assume chunk sizes fit in size_t.
570 (oldgnu_add_sparse): Check for off_t overflow.
571 * src/xheader.c (sparse_numbytes_decoder, sparse_map_decoder):
574 tar: use ctime, not mtime, when checking placeholders
575 * src/extract.c (struct delayed_link): Rename member mtime
577 All uses changed to use ctime rather than mtime.
579 2010-08-24 Paul Eggert <eggert@cs.ucla.edu>
581 tar: add comment to link04.at test
582 * tests/link04.at: Add explanatory comment at head.
584 tar: fix 1.23 Solaris regression related to PRIV_SYS_LINKDIR
585 The idea was suggested by Petr Sumbera in the thread starting
587 http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00000.html
588 * src/extract.c (set_mode): Save the errno of the chmod that
589 failed, for the benefit of chmod_error_details. Do not bother
590 retrying chmod unless the mode suggests setuid is the issue.
591 (extract_archive): Remove redundant call to
592 priv_set_remove_linkdir.
593 * src/system.c: Include priv-set.h.
594 (sys_spawn_shell, sys_child_open_for_compress):
595 (sys_child_open_for_uncompress, sys_exec_command):
596 (sys_exec_info_script, sys_exec_checkpoint_script):
597 Invoke priv_set_restore_linkdir before execv or execlp, so that
598 the subprocess has the same privileges that tar originally did.
600 tar: handle files that occur multiple times but have link count 1
601 This patch was inspired by the following patch that addressed a
602 similar problem in GNU coreutils du:
603 http://git.savannah.gnu.org/gitweb/?p=coreutils.git;h=efe53cc72b599979ea292754ecfe8abf7c839d22
604 * src/common.h (name_count): New decl.
605 * src/create.c (trivial_link_count): New static var.
606 (create_archive): Initialize it.
607 (dump_hard_link, file_count_links): Use it, so that files with
608 link count 1 are handled correctly when they are found multiple
610 * src/names.c (allocated_entries): Renamed from allocated_names,
611 since the identifier's name was misleading. All uses changed.
612 (entries): Renamed from names. All uses changed.
613 (scanned): Renamed from name_index. All uses changed.
614 (name_count): New var.
615 (name_add_name): Increment it.
616 * tests/link04.at: New file.
617 * tests/testsuite.at: Add it.
618 * tests/Makefile.am (TESTSUITE_AT): Likewise.
620 2010-08-23 Paul Eggert <eggert@cs.ucla.edu>
622 tar: use nlink_t for link counts
623 * src/create.c (struct link): nlink is now of type nlink_t,
626 tar: don't export names that aren't used elsewhere
627 * src/common.h (file_dumpable_p, gid_to_chars, major_to_chars):
628 (minor_to_chars, mode_to_chars, uid_to_chars, uintmax_to_chars):
629 (string_to_chars, dumpdir_creat0, dumpdir_create, dumpdir_free):
630 (dumpdir_locate, dumpdir_next, dumpdir_first, gid_from_header):
631 (major_from_header, minor_from_header, mode_from_header):
632 (time_from_header, uid_from_header, quote_copy_string,
634 (xheader_init, transform_header_name):
635 Remove declarations; these are no longer exported from their
637 (GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS):
638 (UID_TO_CHARS, UINTMAX_TO_CHARS, UNAME_TO_CHARS, GNAME_TO_CHARS):
639 Move to src/create.c, since no other module uses these.
640 (GID_FROM_HEADER, MAJOR_FROM_HEADER, MINOR_FROM_HEADER):
641 (MODE_FROM_HEADER, TIME_FROM_HEADER, UID_FROM_HEADER):
642 Move to src/extract.c, since no other module uses these.
643 (dumpdir_t, dumpdir_iter_t): Remove; no longer used.
644 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars):
645 (mode_to_chars, uid_to_chars, uintmax_to_chars, string_to_chars):
646 (file_dumpable_p): Now static.
647 * src/incremen.c (dumpdir_create0, dumpdir_create, dumpdir_free):
648 (dumpdir_locate, dumpdir_next, dumpdir_first): Now static.
649 (scan_directory, write_directory_file_entry):
650 Use struct dumpdir_iter * rather than dumpdir_iter_t.
651 * src/list.c (gid_from_header, major_from_header,
653 (mode_from_header, time_from_header, uid_from_header):
654 (transform_member_name): Now static.
655 * src/misc.c (quote_copy_string): #if 0 out, as it's not used
657 * src/system.c (wait_for_grandchild): Now static.
658 * src/tar.c (request_stdin): Now static.
659 * src/xheader.c (xheader_init): Now static.
661 tar: fix misspelled identifier "set_comression_program_by_suffix"
662 * src/suffix.c (set_compression_program_by_suffix): Renamed from
663 set_comression_program_by_suffix.
664 * src/buffer.c, src/common.h, src/tar.c: All uses changed.
666 2010-08-20 Paul Eggert <eggert@cs.ucla.edu>
668 tar: change interdir_made from int to bool
669 * src/extract.c (maybe_recoverable, create_placeholder_file):
670 Change interdir_made from int * to bool *, since the flag has just
671 two values 0 and 1. All uses changed. This does not affect tar's
674 tar: remove trailing white space from source files
675 * ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README:
676 * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi:
677 * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el:
678 * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi:
679 * doc/value.texi, lib/Makefile.am, scripts/backup-specs:
680 * scripts/dump-remind.in, scripts/tar-snapshot-edit,
682 * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c:
683 * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c:
684 * src/tar.h, src/update.c, src/warning.c, src/xheader.c:
685 * tests/append01.at, tests/append02.at, tests/atlocal.in:
686 * tests/delete03.at, tests/exclude.at, tests/exclude06.at:
687 * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at:
688 * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at:
689 * tests/incr01.at, tests/incr02.at, tests/incr03.at,
691 * tests/label02.at, tests/label03.at, tests/label04.at:
692 * tests/label05.at, tests/link02.at, tests/link03.at:
693 * tests/listed01.at, tests/listed02.at, tests/long01.at:
694 * tests/longv7.at, tests/multiv01.at, tests/multiv02.at:
695 * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at:
696 * tests/multiv07.at, tests/multiv08.at, tests/options.at:
697 * tests/options02.at, tests/remfiles03.at, tests/rename01.at:
698 * tests/rename02.at, tests/rename03.at, tests/rename04.at:
699 * tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
700 * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at:
701 * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at:
702 * tests/star/README, tests/star/gtarfail2.at:
703 * tests/star/multi-fail.at:
704 * tests/star/pax-big-10g.at, tests/star/quicktest.sh:
705 * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at:
706 * tests/update01.at, tests/update02.at, tests/volsize.at:
708 Remove trailing spaces and tabs from lines, and remove
709 trailing empty lines from files. This makes it a bit easier
710 to share code among coreutils and other projects that do this.
712 2010-08-19 Paul Eggert <eggert@cs.ucla.edu>
714 tar: update licenses to latest versions from www.gnu.org
715 * COPYING: Update to latest version; this is just minor
717 * doc/fdl.texi: Update from GFDL 1.2 to 1.3.
718 * doc/tar.texi: Adjust to new format of fdl.texi. Omit trailing
721 2010-07-18 Paul Eggert <eggert@cs.ucla.edu>
723 * src/misc.c (struct wd): Fix comment to match code.
725 2010-07-18 Paul R. Eggert <eggert@cs.ucla.edu>
727 tar: no need to report getcwd error if never using the result
728 * src/misc.c (struct wd): Rename 'saved' to 'err', with new
730 (chdir_arg, chdir_do): Adjust to new semantics. Do not report an
731 error merely because save_cwd fails; report an error only if
732 save_cwd's result is needed later.
733 * tests/extrac09.at: New file, to test for bug that was fixed.
734 * tests/testsuite.at: Include it.
735 * tests/Makefile.am (TESTSUITE_AT): Add it.
737 tar: go back to absolutifying filenames in normalize_filename
739 * src/misc.c (normalize_filename): For now, go back to making
740 filenames absolute, even though this causes 'tar' to fail when
741 getcwd fails. However, do not attempt to resolve ".." as this
742 does not work with symlinks. Also, do the right thing with
743 leading file system prefixes and on hosts where // != /.
745 2010-07-17 Sergey Poznyakoff <gray@gnu.org.ua>
747 Allow for size suffixes in -L and --record-size options.
748 * src/tar.c (TAR_SIZE_SUFFIXES): New define.
749 (parse_opt): Allow for size suffixes in arguments to
750 -L and --record-size options.
751 * NEWS, doc/tar.texi: Update.
753 2010-07-15 Paul R. Eggert <eggert@cs.ucla.edu>
755 tar: don't crash if getcwd fails
756 * src/extract.c: Don't include xgetcwd.h.
757 (extract_dir): stat "." rather than statting getcwd's output.
758 * src/misc.c (normalize_filename_x): Rewrite so as not to resolve
759 /../, which can't be done reliably in the presence of symlinks.
760 Don't reject valid names such as ".".
761 (normalize_filename): Don't make it absolute; that way, we don't
762 have to invoke xgetcwd which might fail. Don't bother to realloc
763 at the end, since that uses time and now saves little space.
764 (chdir_do): Don't crash if xgetcwd fails.
765 * tests/Makefile.am (TESTSUITE_AT): Add listed03.at.
766 * tests/listed03.at: New file.
767 * tests/testsuite.at: Include listed03.at.
769 2010-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
771 Keep a detailed map of archive members stored in the record
773 A separate map (bufmap) provides information for creating
774 multi-volume continuation headers.
776 * src/buffer.c (bufmap): New struct.
777 (bufmap_head, bufmap_tail, inhibit_map): New variables.
778 (mv_begin_write): New function.
779 (mv_begin): Rename to mv_begin_read. Rewrite using mv_begin_write.
781 (mv_total_size): Remove.
782 (bufmap_locate, bufmap_free, bufmap_reset): New functions.
783 (_flush_write): Update bufmap.
784 (close_archive): Free bufmap.
785 (add_chunk_header): Take a bufmap argument.
786 (gnu_add_multi_volume_header): Likewise.
787 (add_multi_volume_header): Likewise.
788 (_gnu_flush_write): Rewrite using bufmap.
789 (real_s_name, real_s_totsize)
791 (save_name, save_totsize, save_sizeleft): Removed. All
793 (mv_size_left): Update bufmap_head.
795 (multi_volume_sync): Remove.
797 * src/common.h (mv_begin_write): New prototype.
798 (mv_begin): Rename to mv_begin_read.
799 * src/create.c: Use mv_begin_write instead of mv_begin.
800 Remove calls to mv_size_left and mv_end.
801 * src/sparse.c: Likewise.
803 * tests/multiv07.at: Close stdin.
804 * tests/spmvp00.at: Update AT_KEYWORDS.
805 * tests/spmvp10.at: Likewise.
807 * tests/multiv08.at: New testcase.
808 * tests/Makefile.am, tests/testsuite.at: Add multiv08.at.
811 * NEWS, configure.ac: Version 1.23.90
812 * doc/tar.texi: Document the use of lbzip2.
814 2010-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
816 Fix exclusion of long file names when extracting from pax format
818 * src/list.c (read_and): Call decode_header before attempting
820 (list_archive): Remove call to decode_header.
822 * src/compare.c (diff_archive): Remove call to decode_header.
823 * src/extract.c (extract_archive): Likewise.
825 * test/exclude06.at: New test case.
826 * tests/testsuite.at: Include exclude06.at.
827 * tests/Makefile.am (TESTSUITE_AT): Add exclude06.at.
830 * src/buffer.c (magic): Split the character constant to help
831 cc recognize character boundaries (7 is a valid hex character).
833 2010-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
836 * src/buffer.c (magic): Fix xz magic.
838 2010-06-16 Paul Eggert <eggert@cs.ucla.edu>
840 Remove some lint, found by gcc -W etc.
841 * src/common.h (label_notfound): New decl.
842 * src/buffer.c (set_volume_start_time, compress_type):
843 (guess_seekable_archive, open_compressed_archive, init_buffer):
844 (_flush_write, archive_is-dev, increase_volume_number):
845 (change_tape_menu, try_new_volume, add_chunk_header):
847 Declare as 'static' if it's not exported.
848 Use function prototype (void) rather than old-style ().
849 * src/checkpoint.c (expand_checkpoint_string): Likewise.
850 * src/incremen.c (dirlist_replace_prefix, makedumpdir,
853 * src/list.c (print_volume_label): Likewise.
854 * src/misc.c (normalize_filename_x): Likewise.
855 * src/names.c (make_name, free_name, check_name_alloc,
858 * src/tar.c (tar_list_quoting_style, add_exclude_array):
859 (set_stat_signal): Likewise.
860 * src/transform.c (new_transform,
861 _single_transform_name_to_obstack):
862 (_transform_name_to_obstack): Likewise.
863 * src/unlink.c (dunlink_alloc): Likewise.
865 * src/buffer.c (struct zip_magic): Use const when appropriate.
866 * src/incremen.c (obstack_code_rename,
867 write_directory_file_entry):
869 * src/sparse.c (COPY_STRING): Likewise.
870 * src/system.c (dec_to_env, time_to_env, oct_to_env, str_to_env):
871 (chr_to_env): Likewise.
872 * src/tar.c (tar_list_quoting_style, set_stat_signal): Likewise.
874 * src/extract.c (extract_node): Don't return garbage.
876 * src/names.c: Remove old-style declarations of getgrnam etc.
877 All modern systems declare these, and it's not worth the hassle
878 of ignoring the warnings on modern systems for old-style decls.
880 2010-05-17 Sergey Poznyakoff <gray@gnu.org.ua>
883 * src/incremen.c (make_directory): Retain the slash if it is the
884 only character in a filename.
886 2010-04-02 Sergey Poznyakoff <gray@gnu.org.ua>
888 Recode NEWS back to UTF-8
890 2010-04-01 Sergey Poznyakoff <gray@gnu.org.ua>
892 Fix the gzip.at test case.
893 * tests/gzip.at: Suppress gzip error output, as it can differ
894 depending on its version etc. Bug reported by Ludovic Courtès.
896 2010-03-28 Sergey Poznyakoff <gray@gnu.org.ua>
898 New option --full-time.
899 * src/common.h (full_time_option): New global.
900 * src/tar.c (FULL_TIME_OPTION): New constant.
901 (options): New option --full-time.
902 (parse_opt): Handle the --full-time option.
903 * src/list.c (simple_print_header): Pass full_time_option
904 as the 2nd argument to tartime.
905 * doc/tar.texi: Update.
908 2010-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
910 Minor fixes in the testsuite.
911 * tests/extrac07.at: Fix a typo (invalid number
912 of arguments before format list).
913 * tests/link02.at: Use `ln' instead of `link'.
914 * tests/link03.at: Likewise.
917 * src/names.c (collect_and_sort_names): Remove
918 entry from the table before freeing it.
920 Fix dead loop on extracting existing symlinks with the -k option.
921 * src/extract.c (create_placeholder_file)
922 (extract_link, extract_symlink)
923 (extract_node, extract_fifo): Handle all possible
924 return values from maybe_recoverable. This complements
925 8f390db92fc. Reported by Ico Doornekamp <bug-tar@zevv.nl>.
928 2010-03-20 Sergey Poznyakoff <gray@gnu.org.ua>
930 Fix undesired error exit on receiving SIGPIPE.
931 * src/tar.c: Do not ignore SIGPIPE.
932 * tests/sigpipe.at: New testcase.
933 * tests/Makefile.am, tests/testsuite.at: Add sigpipe.at
934 * tests/remfiles01.at: Fix error code expectation.
937 2010-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
940 Tar --remove-files relied on canonicalize_file_name,
941 which replaces symlinks in file name components with
942 the directories they point to. Due to this, tar
943 effectively ignored existence of symbolic links and
944 was unable to remove a directory that contained any
945 (Alexander Kozlov <akozlov@nada.kth.se>, 2010-03-15).
947 * gnulib.modules: Remove canonicalize.
948 * src/misc.c (normalize_filename): Rewrite
949 from scratch. The function operates only on
950 its input string, it makes no attempt to test
951 components for existence or to resolve symbolic
953 * tests/Makefile.am (TESTSUITE_AT): Add remfiles03.at.
954 * tests/testsuite.at: Likewise.
955 * tests/remfiles03.at: New test case.
958 2010-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
961 * src/buffer.c (check_label_pattern): Initialize result.
962 * tests/remfiles01.at: Skip if run with root privileges.
964 2010-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
966 Fix `--test-label' and `--label -r' behavior.
967 * doc/tar.texi (Including a Label in the Archive): Revise
971 * src/buffer.c (open_archive): Check volume label on
972 ACCESS_UPDATE as well.
973 * src/list.c (test_archive_label): Rewrite to match the
975 * src/names.c (regex_usage_warning): Return int.
976 (names_notfound): Rewrite the conditional.
977 (label_notfound): New function.
979 * tests/label03.at: New testcase.
980 * tests/label04.at: New testcase.
981 * tests/label05.at: New testcase.
982 * tests/Makefile.am: Add new testcases.
983 * tests/testsuite.at: Likewise.
986 * doc/tar.texi: Consistently use lowercase `see' within sentences.
987 More fixes spotted by Denis Excoffier.
990 Shut up a gcc warning message.
991 * src/tar.c (tar_help_filter): Use a separate const
992 variable to hold returns from gettext. Reported by
996 * src/names.c (collect_and_sort_names): Initialize prev_name.
997 Reported by Dmitry V. Levin.
999 2010-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
1002 * configure.ac, NEWS: Update version number.
1007 * doc/snapshot.texi, doc/snapshot.texi,
1008 doc/sparse.texi, doc/tar-snapshot-edit.texi,
1009 doc/tar.texi: Spellchecked and proof-read. Thanks
1011 * gnulib.modules: Remove utime.
1013 2010-03-08 Kamil Dudka <kdudka@redhat.com>
1015 Fix possible overflow in code_timespec (tiny change)
1016 * src/misc.c (code_timespec): ignore invalid values of ns
1018 2010-03-08 Sergey Poznyakoff <gray@gnu.org.ua>
1020 Minor fix in the testsuite.
1021 * tests/extrac05.at: Skip test if creating
1024 Fix eventual memory override and fd exhaustion in create.c
1025 Both bugs reported by Kamil Dudka.
1027 * src/create.c (check_exclusion_tags): Do not keep
1028 pointer to a location within tagname: it may change
1029 after xrealloc. Use byte offset instead.
1030 (dump_file0): Close fd before returning without
1031 dumping the directory.
1033 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
1036 * doc/tar.texi: Improve some wording.
1038 2010-03-02 Antonio Diaz Diaz <ant_diaz@teleline.es>
1041 * configure.ac: Add TAR_COMPR_PROGRAM(lzip)
1042 * doc/tar.texi: Reflect lzip support.
1043 * src/buffer.c (compress_type) <ct_lzip>: New constant.
1044 (magic): Add magic for lzip.
1045 * src/suffix.c (compression_suffixes): Add lz.
1046 * src/tar.c: New option --lzip.
1048 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
1051 * tests/exclude05.at: Rewrite awk invocation to avoid
1052 overflowing awk's file table on Solaris.
1054 2010-03-02 Eric Blake <ebb9@byu.net>
1056 Fix large file support.
1057 * scripts/xsparse.c (read_map): Use fseeko.
1058 * src/incremen.c (write_directory_file): Likewise.
1060 2010-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
1063 * src/buffer.c (seek_archive): Rewrite size computation
1064 to prevent it from reaching negative values. Based on
1065 report by Denis Excoffier <Denis.Excoffier@free.fr>.
1067 2010-02-25 Sergey Poznyakoff <gray@gnu.org.ua>
1069 Supply more information to the --to-command script.
1070 * src/system.c (stat_to_env): Pass information about the current
1071 volume in variables TAR_ARCHIVE, TAR_VOLUME, TAR_BLOCKING_FACTOR,
1073 * doc/tar.texi: Document new environment variables.
1075 * configure.ac: Version number 1.22.91.
1077 2010-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
1080 * src/names.c (regex_usage_warning): Fix warning message.
1082 2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
1086 2010-02-05 OndÅ™ej VaÅ¡Ãk <ovasik@redhat.com>
1088 Bugfix (tiny change)
1089 * src/xheader.c (xheader_read): Remove unnecessary call
1092 2010-01-26 Sergey Poznyakoff <gray@gnu.org.ua>
1094 Enable silent build mode.
1095 * configure.ac: Require automake 1.11, autoconf 2.63. Enable
1098 * lib/Makefile.am (rmt-command.h): Silent the rule.
1100 2010-01-25 Sergey Poznyakoff <gray@gnu.org.ua>
1102 Read POSIX multivolume archives split at the header boundary.
1103 * src/common.h (read_header_mode): New enum.
1104 (read_header): Change type of the 3rd argument.
1105 * src/list.c (read_header): Change type of the 3rd argument.
1106 All callers updated.
1107 * src/buffer.c (try_new_volume): Allow for volumes split at the
1108 extended/ustar header boundary. This is against POSIX specs, but
1109 we must be able to read such archives anyway.
1111 * tests/multiv07.at: New test case.
1112 * tests/Makefile.am: Add multiv07.at
1113 * tests/testsuite.at: Likewise.
1115 * src/compare.c: Update calls to read_header.
1116 * src/delete.c: Likewise.
1117 * src/update.c: Likewise.
1119 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
1123 * doc/tar.texi: Update.
1124 * src/create.c (finish_header): Minor change.
1126 2010-01-24 Rob Vermaas <rob.vermaas@gmail.com>
1128 Bugfix (tiny change).
1129 * src/tar.c (format_default_settings)[REMOTE_SHELL]: Fix
1132 2010-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
1135 * src/incremen.c (read_incr_db_01)
1136 (read_directory_file): Initialize bufsize to 0.
1137 Suggested by noordsij@cs.helsinki.fi.
1139 Improve handling of --test-label.
1140 * src/list.c (print_volume_label): New function.
1141 (print_header): Call print_volume_label.
1142 (test_archive_label): New function.
1143 * src/buffer.c (VOLUME_LABEL_APPEND): Remove.
1144 (VOLUME_TEXT, VOLUME_TEXT_LEN): New macros
1145 (drop_volume_label_suffix): New function.
1146 (check_label_pattern): Use drop_volume_label_suffix.
1147 * src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND.
1148 (test_label_option): Remove.
1149 (drop_volume_label_suffix): New proto.
1150 (test_archive_label): New proto.
1151 * src/names.c (all_names_found): Remove test for
1153 * src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND.
1154 (set_subcommand_option): Improve diagnostics.
1155 (parse_opt): Set subcommand if --test-label is given.
1156 (main): Handle TEST_LABEL_SUBCOMMAND.
1158 Fix listing of volume labels (in particular in PAX archives).
1159 * src/buffer.c (match_volume_label): Call set_volume_label.
1160 (check_label_pattern): Get label string
1162 (match_volume_label): Handle volume labels stored in
1164 * src/common.c (print_header,read_header): Change signature.
1165 (read_header_primitive): Remove prototype.
1166 * src/list.c (recent_global_header): New static.
1167 (list_archive): Always print volume labels.
1168 (read_header_primitive): Remove.
1169 (read_header): Change the signature (all callers updated)
1170 Save the recent global header.
1171 (volume_label_printed): New static.
1172 (simple_print_header): New function (ex-print_header).
1173 (print_header): Change the signature (all callers updated).
1174 For POSIX formats, print first volume header (if set).
1175 * src/xheader.c (xheader_write_global): Write the data
1176 accumulated in xhdr->stk even if keyword_global_override_list
1178 (xheader_read): On unexpected EOF, report error instead of
1180 (XHDR_PROTECTED, XHDR_GLOBAL): New defines.
1181 (struct xhdr_tab): Remove `protected' with `flags'. All uses
1183 (decg): If XHDR_GLOBAL bit is set, call the keyword's decode
1184 method instead of adding it to `kwl'.
1186 * src/compare.c: Update calls to read_header.
1187 * src/create.c: Likewise.
1188 * src/delete.c: Likewise.
1189 * src/update.c: Likewise.
1190 * src/extract.c: Likewise.
1191 (extract_volhdr): Do not print "Reading <label>" statement,
1193 it is inconsistent: it is not printed if the volume begins with a
1194 member continued from the previous volume.
1196 * tests/label01.at: New testcase.
1197 * tests/label02.at: New testcase.
1198 * tests/Makefile.am, tests/testsuite.at: Add new testcases.
1200 2010-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
1202 Fix prefix length calculation in ustar mode.
1203 * src/create.c (split_long_name): Fix prefix length
1205 (write_ustar_long_name): Improve ustar mode compatibility
1206 with the Sun version.
1208 2009-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
1210 Rewrite update algorithm.
1211 * src/common.h (namebuf_t): New typedef.
1212 (namebuf_create, namebuf_free)
1213 (namebuf_name): New prototypes.
1214 (remname): New prototype.
1215 * src/misc.c (struct namebuf): New structure.
1216 (namebuf_create, namebuf_free)
1217 (namebuf_name): New functions.
1218 * src/create.c (dup_dir0): Remove is_avoided_name
1219 checks. This is taken care of in update_archive.
1220 * src/incremen.c (scan_directory): Use namebuf
1221 to produce full file names.
1222 * src/names.c (nametail): Remove extra level of
1223 indirection. All uses updated.
1224 (avoided_name_table, add_avoided_name)
1225 (is_avoided_name): Remove.
1226 * src/update.c (update_archive): Change algorithm.
1227 Instead of adding unmodified files to the avoided_name
1228 table, create namelist so that it contains only
1231 * tests/Makefile.am: Add update01.at, update02.at
1232 * tests/testsuite.at: Likewise.
1233 * tests/update.at (AT_KEYWORDS): Add update00.
1236 * src/tar.c (main): Ignore SIGPIPE.
1237 * src/system.c (sys_child_open_for_compress)
1238 (sys_child_open_for_uncompress): Reset SIGPIPE
1239 in child to default.
1240 * tests/remfiles01.at: Avoid race conditions.
1241 * tests/remfiles02.at: Likewise.
1244 * src/buffer.c (_open_archive): Call guess_seekable_archive
1245 only if the call to open_compressed_archive succeeded.
1247 2009-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
1249 Improve previous changes.
1250 * acinclude.m4: Fix typos.
1251 * gnulib.modules: Add xvasprintf.
1252 * src/common.h: Include xvasprintf.h.
1253 * src/tar.c (options): Remove docstrings for --gzip, --bzip2,
1254 --compress, --lzop, --lzma and --xz.
1255 (tar_help_filter): Generate these using actual values of
1256 *_PROGRAM constants.
1257 (format_default_settings): Use xasprintf.
1258 (parse_opt): Use *_PROGRAM defines instead of hardcoded
1261 Allow installers to specify alternative program names for
1262 compression programs.
1263 This adds --with-gzip, --with-bzip2 etc. switches to the
1265 one can do, e.g. ./configure --with-bzip2=lbzip2 and have
1267 whenever user calls `tar --bzip2'.
1269 * acinclude.m4: New file.
1270 * configure.ac: Add TAR_COMPR_PROGRAM invocations for
1271 the supported compressors.
1272 * src/buffer.c (magic): Use *_COMPRESSOR defines instead
1273 of hardcoded program names.
1274 * src/suffix.c (compression_suffixes): Likewise.
1276 2009-10-09 Sergey Poznyakoff <gray@gnu.org.ua>
1279 * src/buffer.c (magic): Fix `xz' entry: add the name of the
1281 * src/suffix.c (compression_suffixes, nsuffixes): Mark as static.
1283 2009-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
1285 Provide a way to explicitly set mtime for extended header
1287 * src/tar.c (struct textual_date): ts is a copy of the structure,
1288 not a pointer to it. Date is a copy as well, hence the `const' is
1290 (get_date_or_file): Return 0/1 depending on success/failure.
1291 Copy timestamp to the `ts' member. Store a copy of the string
1293 (report_textual_dates): Report only if verbose_option is set,
1294 but always free the list.
1295 (expand_pax_option): New function.
1296 (parse_opt): Preprocess the argument to xheader_set_option with
1298 (decode_options): Call report_textual_dates unconditionally.
1299 * src/xheader.c (exthdr_mtime_option, exthdr_mtime)
1300 (globexthdr_mtime_option, globexthdr_mtime): New statics.
1301 (xheader_set_keyword_equal): handle exthdr.mtime and
1303 (xheader_write): Override `t' argument if a corresponding
1304 exthdr.mtime or globexthdr.mtime option is set.
1306 * doc/tar.texi: Document the changes.
1308 Use file's mtime as mtime for its extended header.
1309 This makes two pax archives binary equivalent if they
1310 have the same contents and care is taken to make extended
1311 headers otherwise reproducible, e.g. by using:
1313 --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0
1315 Proposed by Michael D. Adams <mdmkolbe@gmail.com>.
1317 * src/common.h (start_private_header): Take time_t as 3rd param.
1318 (xheader_write): Likewise.
1319 * src/create.c (start_private_header): Take time_t as 3rd param.
1320 All callers updated.
1321 (write_extended): Use file's mtime as mtime for its extended
1323 Use current time stamp as mtime for global headers.
1324 (xheader_write): Take time_t as 3rd param.
1326 Fix bugs in handling the --remove-files option.
1327 Make sure the files are deleted only if they were succesfully
1331 * src/exit.c: New file.
1332 * src/unlink.c: New file.
1333 * src/Makefile.am (tar_SOURCES): Add exit.c and unlink.c.
1334 * src/common.h: Include progname.h
1335 (program_name): Remove global.
1336 (records_written): New extern.
1337 (queue_deferred_unlink, finish_deferred_unlinks): New prototypes.
1338 (fatal_exit_hook): New extern.
1339 * src/create.c (create_archive): Call finish_deferred_unlinks.
1340 (dump_hard_link, dump_file0): Don't actually unlink the file,
1341 queue it to deferred_unlinks instead.
1342 * src/delete.c (records_written): Remove extern: declared in
1344 * src/extract.c (extract_archive): Set fatal_exit_hook.
1345 (fatal_exit, xalloc_die): Move to exit.c
1346 * src/system.c (sys_wait_for_child): Exit immediately
1347 if the child dies or exits with a non-zero status.
1348 (sys_child_open_for_compress)
1349 (sys_child_open_for_uncompress): Use set_program_name,
1350 instead of setting program_name directly.
1351 * src/tar.c (main): Use set_program_name,
1352 instead of setting program_name directly.
1354 * tests/Makefile.am (TESTSUITE_AT): Add remfiles01.at
1356 * tests/testsuite.at: Likewise.
1357 * tests/gzip.at: Reflect the above changes.
1359 2009-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
1361 Fix bug in OLDGNU format creation.
1362 See tests/append02.at for a detailed description
1364 * src/common.h (MODE_FROM_HEADER): Take additional argument.
1365 (mode_from_header): Likewise.
1366 * src/create.c (mode_to_chars): Store all mode bits if
1367 using OLDGNU_FORMAT. This reverses f4e4adea80a.
1368 * src/list.c (decode_header): Use header mode field
1369 to discern between GNU and OLDGNU formats.
1370 (mode_from_header): Store unrecognized mode bits (from 10th up)
1371 in the location pointed to by the third parameter.
1372 * tests/append02.at: Update documentation and references.
1374 2009-09-16 Sergey Poznyakoff <gray@gnu.org.ua>
1376 Restore extra help output.
1377 * src/tar.c (tar_list_quoting_styles): Change first argument to
1379 (format_default_settings): New function.
1380 (show_default_settings)
1381 (show_default_settings_fs): Removed.
1382 (tar_help): Removed.
1383 (tar_help_filter): New function.
1384 (argp): Set help_filter.
1385 (parse_opt): Fix error message.
1387 2009-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
1389 Improve command line option handling.
1390 * gnulib.modules: Add argp-version-etc and progname,
1391 use getopt-gnu instead of getopt.
1392 * src/tar.c (HANG_OPTION, USAGE_OPTION)
1393 (VERSION_OPTION): Remove.
1394 (options): Remove corresponding options. Let argp
1396 (parse_opt): Likewise.
1397 (_argp_hang): Removed.
1398 (tar_authors): New variable.
1399 (decode_options): Call argp_version_setup.
1400 Do not use ARGP_NO_HELP flag in the call to argp_parse.
1402 Avoid overwriting exit_status with a value indicating less
1403 important condition.
1404 * src/tar.c (set_exit_status): New function.
1405 * src/common.h (set_exit_status): New prototype.
1406 * src/compare.c: Use set_exit_status instead of
1407 exit_status assignments.
1408 * src/create.c: Likewise.
1409 * src/misc.c: Likewise.
1411 * src/system.c (wait_for_grandchild): Use auto variable
1412 instead of the global exit_status.
1413 * src/incremen.c (scan_directory): Use file_removed_diag
1414 instead of stat_diag.
1416 Automatic detection of seekable archives.
1417 * src/buffer.c (guess_seekable_archive): New function.
1418 (_open_archive): Call guess_seekable_archive for archives
1420 (new_volume): Likewise.
1421 * src/common.h (seek_option): New global.
1422 * src/tar.c (options): New option --no-seek.
1423 (parse_opt): --seek and --no-seek set seek_option,
1424 not seekable_archive.
1425 (decode_options): Initialize seek_option to -1.
1428 * doc/tar.texi: Update.
1430 2009-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
1433 * tests/extrac08.at: Ensure a predictable umask value.
1434 * tests/xform-h.at (xform): do not depend on file name
1437 2009-08-13 Sergey Poznyakoff <gray@gnu.org.ua>
1439 Fix interaction between --listed-incremental and -C
1440 * src/incremen.c (read_directory_file): Execute eventual -C dir
1441 after opening the snapshot file.
1442 (collect_and_sort_names): Remove call to chdir_do
1443 * tests/incr05.at, tests/incr06.at: Use relative file names for
1446 2009-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
1448 Update for new exclude module from gnulib. Add testcases by
1450 * src/names.c (is_pattern): Remove.
1451 (regex_usage_warning): Use fnmatch_pattern_has_wildcards
1454 * src/tar.c: New option --exclude-backups.
1455 (vcs_file_table, backup_file_table): New globals.
1456 (add_exclude_array): New function.
1457 * tests/exclude01.at, tests/exclude02.at,
1458 tests/exclude03.at, tests/exclude04.at,
1459 tests/exclude05.at: New testcases. Supplied by Phil Proudman.
1460 * tests/Makefile.am (TESTSUITE_AT): Add new tests.
1461 * tests/testsuite.at: Add new tests.
1464 2009-08-10 Sergey Poznyakoff <gray@gnu.org.ua>
1466 Remove src/version.c (reappeared after migration to Git)
1468 2009-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
1471 * src/misc.c (file_removed_diag): Set exit code to
1474 2009-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
1478 Fix handling of files removed during incremental dumps.
1479 Changes to src/create.c and src/incremen.c are partially
1480 based on patch from Alexander Peslyak <solar at openwall.com>.
1482 The new testcases require paxutils commit f653a2b or later.
1484 * src/common.h (struct name): New member `cmdline'.
1485 (dump_file): Change type of the 2nd argument to bool.
1486 (file_removed_diag, dir_removed_diag): New prototypes.
1487 (addname): New argument `cmdline'.
1488 (name_from_list): Change return value.
1489 * src/create.c (dump_dir0, dump_dir): top_level is bool.
1490 (create_archive): Update calls to name_from_list.
1491 Take advantage of the name->cmdline to set top_level argument
1492 during incremental backups.
1493 (dump_file0): top_level is bool.
1494 Do not bail out if a no-top-level file disappears during
1496 backup, use file_removed_diag instead.
1497 (dump_filed): top_level is bool.
1498 * src/incremen.c (update_parent_directory): Silently ignore
1499 ENOENT. It should have already been reported elsewhere.
1500 (scan_directory): Use dir_removed_diag to report missing
1502 * src/misc.c (file_removed_diag, dir_removed_diag): New functions.
1503 * src/names.c (name_gather): Set ->cmdname.
1504 (addname): Likewise. All uses updated.
1505 (name_from_list): Return struct name const *. All uses updated.
1507 * tests/filerem01.at: New testcase.
1508 * tests/filerem02.at: New testcase.
1509 * tests/Makefile.am, tests/testsuite.at: Add filerem01.at,
1511 * tests/grow.at, test/truncate.at: Use new syntax for genfile
1515 * doc/tar.texi: Minor fix.
1517 Optimize searches for directory structures by keeping a pointer
1518 to struct directory in struct name.
1519 * src/common.h (struct name): New member `directory' replaces
1520 dir_contents. Rearrange members.
1521 (rebase_directory): Change signature.
1522 (scan_directory): Change signature.
1523 (name_fill_directory)
1524 (directory_contents, safe_directory_contents): New prototypes.
1525 (append_incremental_renames): Change signature.
1526 (replace_prefix): New proto.
1527 * src/compare.c (diff_dumpdir): Use directory_contents +
1530 * src/incremen.c (replace_prefix): Move to misc.c
1531 (rebase_directory): Rewrite.
1532 (scan_directory): Return pointer to struct directory.
1533 (directory_contents, safe_directory_contents): New functions.
1534 (get_directory_contents): Remove.
1535 (name_fill_directory): New function.
1536 (append_incremental_renames): Rewrite. This also fixes a memory
1538 * src/names.c (name_gather, addname): Reflect changes in struct
1540 (add_hierarchy_to_namelist): Rewrite using name_fill_directory and
1542 (rebase_child_list): Update call to rebase_directory.
1543 (collect_and_sort_names): Optimize
1545 * src/misc.c (replace_prefix): New function.
1546 * src/names.c (add_hierarchy_to_namelist): Use new
1547 get_directory_contents.
1549 * tests/incr05.at: New test case.
1550 * tests/incr06.at: New test case.
1551 * tests/Makefile.am, test/testsuite.at: Add incr05.at and
1554 * doc/Makefile.am (check-options): Improve rule.
1555 * doc/tar.texi, NEWS: Update.
1557 2009-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
1560 * src/common.h (rebase_directory): New prototype.
1561 * src/incremen.c (rebase_directory): Use replace_prefix.
1562 * src/names.c (collect_and_sort_names): Abort if
1565 Improve listed incremental dumps.
1566 The modified algorithm tries to avoid dumping the same
1567 directory twice and ensures the order of the directories
1568 in the resulting archive is the same, whatever their order
1569 on the command line. It also fixes the operation of
1570 --listed-incremental -C.
1572 * gnulib.modules: Add canonicalize
1573 * src/common.h (incremental_level): New global.
1574 (check_exclusion_tags): first argument is const.
1575 (get_directory_contents): Add third argument.
1576 (zap_slashes, normalize_filename): New prototypes.
1577 (chdir_count): New prototype.
1578 (WARN_VERBOSE_WARNINGS): New define.
1579 (WARN_ALL): Exclude WARN_VERBOSE_WARNINGS.
1580 * src/compare.c (diff_dumpdir): Update the call to
1581 get_directory_contents.
1582 * src/create.c (check_exclusion_tags): First argument is const.
1583 Use ISSLASH and DIRECTORY_SEPARATOR instead of referring to '/'.
1585 * src/incremen.c (struct directory): New member `caname'.
1586 (hash_directory_name): Rename to
1587 hash_directory_canonical_name. Operate
1588 on the canonical name.
1589 (compare_directory_names): Rename to
1590 compare_directory_canonical_names.
1591 Operate on the canonical name.
1592 (make_directory): Take two arguments.
1593 (free_directory): Free caname.
1594 (attach_directory): Create caname.
1595 (find_directory): Use caname for lookups.
1596 (PD_VERBOSE): Remove.
1597 (PD_FORCE_INIT): New define.
1598 (procdir): First argument is const.
1599 Reinitialize directory if PD_FORCE_INIT bit is set.
1600 Do not use PD_VERBOSE or verbose_option for issuing warnings.
1601 Rely on WARNOPT instead.
1603 (scan_directory): Take three arguments. The third one is a boolean
1604 which is true if the directory is explicitly mentioned on
1607 (get_directory_contents): Remove. Use scan_directory instead.
1608 All callers updated.
1609 (read_directory_file): Truncate the file if --level=0 is given.
1610 * src/misc.c: Include canonicalize.h
1611 (zap_slashes, normalize_filename): New functions.
1612 (chdir_count): New function.
1613 * src/names.c (add_hierarchy_to_namelist): Take three arguments,
1615 get_directory_contents and scan_directory.
1616 (collect_and_sort_names): Allow at most one -C, before file name
1618 Read directory file after eventual changing to another directory.
1619 Avoid adding the same directory under different pathnames to
1621 * src/tar.c: New option --level.
1623 * tests/incr03.at, tests/incr04.at, tests/listed01.at,
1624 tests/listed02.at, tests/rename01.at, tests/rename02.at,
1625 tests/rename03.at: Update for new tar behavior.
1626 * tests/multiv01.at: Do not use --listed-incremental.
1628 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
1630 Forgotten to push src/warning.c
1632 Implement the --warning option.
1633 * src/warning.c: New file.
1634 * src/Makefile.am: Add warning.c
1635 * src/common.h: Provide definitions for warning classes.
1636 (warning_option): New global.
1637 (WARNOPT): New define.
1638 (set_warning_option): New prototype.
1639 * src/tar.c: New option `--warning'.
1640 * src/compare.c: When applicable WARNOPT instead of WARN.
1641 * src/create.c: Likewise.
1642 * src/extract.c: Likewise.
1643 * src/incremen.c: Likewise.
1644 * src/list.c: Likewise.
1646 * NEWS, doc/tar.texi: Update.
1648 2009-08-05 Carl Worth <cworth@cworth.org>
1650 Fix descriptions of some options (tiny change)
1652 2009-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
1654 Fix backup handling and restoring file modes of existing
1656 * NEWS, THANKS: Update
1657 * src/extract.c (extract_dir): reset status to 0 if the
1658 directory already exists.
1659 * src/misc.c (maybe_backup_file): Assign before_backup_name
1660 and clear after_backup_name before checking if we really need
1662 * tests/backup01.at: New testcase.
1663 * tests/extrac08.at: New testcase.
1664 * tests/Makefile.am, tests/testsuite.at: Add extrac08.at and
1667 2009-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
1669 Fix hard links recognition with -c --remove-files
1670 * src/create.c (dump_hard_link): Always look up in the link table
1671 if remove_files_option is set. Patch suggested by Theodore Ts'o
1673 (check_links): Remove extra newline from the warning message.
1674 * tests/link02.at, tests/link03.at: New testcases.
1675 * tests/Makefile.am (TESTSUITE_AT): Add link02.at and link03.at
1676 * tests/testsuite.at: Include link02.at and link03.at
1678 Fix handling of hard link targets by -c --transform
1679 * src/create.c (file_count_links): Transform link target
1681 * tests/xform-h.at: New test case.
1682 * tests/Makefile.am (TESTSUITE_AT): Add xform-h.at.
1683 * tests/testsuite.at: Add xform-h.at
1685 2009-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
1688 * src/extract.c (file_newer_p): Do not report error on ENOENT
1690 2009-06-19 Sergey Poznyakoff <gray@gnu.org.ua>
1692 Remove rebox.el (reappeared after migration to Git)
1694 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
1696 Remove files that were removed in CVS, but reappeared after
1699 2009-06-18 David Bartley <dtbartle@csclub.uwaterloo.ca>
1701 Fix Solaris bug where chmod fails if we don't have
1703 * gnulib.modules: Add priv-set.
1704 * src/extract.c (set_mode, extract_archive): Restore
1705 PRIV_SYS_LINKDIR on chmod failure.
1706 * src/tar.c (main): Drop PRIV_SYS_LINKDIR on startup.
1708 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
1710 Ensure default behavior for SIGPIPE
1711 * src/tar.c (main): Install default handler for SIGPIPE.
1712 Proposed by Bastian Blank.
1714 2009-06-18 Eric Blake <ebb9@byu.net>
1716 Follow autoconf recommendation for TESTSUITEFLAGS.
1717 * tests/Makefile.am (check-local, installcheck-local): Honor
1720 2009-06-18 Sergey Poznyakoff <gray@gnu.org.ua>
1722 Fix handling of sub-subprocess returns.
1723 * src/system.c (wait_for_grandchild): New function.
1724 (sys_child_open_for_compress)
1725 (sys_child_open_for_uncompress): Use wait_for_grandchild
1726 to manage grandchild return.
1728 2009-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
1730 Report record size only if the archive refers to a device.
1731 * Makefile.am (INCLUDES): Add ../lib, for rmt-command.h
1732 * src/buffer.c (short_read): Report the actual record size
1733 only if the archive descriptor refers to a device.
1734 * tests/pipe.at, tests/shortrec.at,
1735 tests/sparsemvp.at: Reflect the above change.
1736 * NEWS, configure.ac: Version 1.22.90
1738 2009-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
1740 Do not issue errors on existing files when given the -k option
1741 * Makefile.am (dist-hook): Fix rule.
1742 * src/extract.c (maybe_recoverable): Return three-state value.
1743 (extract_dir): Skip extraction if maybe_recoverable indicates so.
1744 (extract_file): Likewise.
1746 2009-05-12 Eric Blake <ebb9@byu.net>
1748 Avoid undefined behavior
1749 * src/xheader.c (xheader_set_keyword_equal): Pass correct type to
1751 * src/transform.c (run_case_conv): Likewise.
1753 2009-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
1755 Remove src/Makefile.in
1757 2009-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
1760 * bootstrap (symlink_to_dir): Fix symlink calculation.
1761 * doc/tar.texi: Minor fixes by Victor Villa and Stepan Kasal.
1763 2009-03-07 Sergey Poznyakoff <gray@gnu.org.ua>
1769 2009-03-05 Sergey Poznyakoff <gray@gnu.org.ua>
1771 * src/incremen.c: --no-recursive works with --incremental.
1773 2009-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
1777 * src/buffer.c, src/suffix.c: Add support for xz compression.
1778 * src/tar.c: New option --xz, for compression/decompression using xz.
1779 Re-assign -J as a short equivalent of --xz.
1781 2009-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
1783 * doc/tar.texi: Fix typo.
1785 2008-12-29 Sergey Poznyakoff <gray@gnu.org.ua>
1787 * bootstrap.conf: Include size_max.
1788 * gnulib.modules: Remove memset, rmdir. Replace strdup with
1789 strdup-posix. Patch by Eric Blake.
1790 * src/tar.c: Implement -I as a shorthand for --use-compress-program.
1791 * doc/tar.texi: Document -I.
1792 * tests/pipe.at, tests/shortrec.at: Account for eventual 'Record
1794 * tests/testsuite.at (AT_TAR_CHECK_HOOK): New define
1795 (AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros.
1797 2008-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
1799 * src/xheader.c: Remove duplicate inclusion of fnmatch.h. Reported
1802 2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
1804 Do not try to drain the input pipe before closing the
1807 * src/buffer.c (close_archive): Remove call to
1808 sys_drain_input_pipe. Pass hit_eof as the second
1809 argument to sys_wait_for_child.
1810 * src/common.h (sys_drain_input_pipe): Remove
1811 (sys_wait_for_child): Declare second argument.
1812 * src/system.c (sys_drain_input_pipe): Remove.
1813 (sys_wait_for_child): Take two arguments. The second one helps to
1814 decide whether to tolerate child termination on SIGPIPE.
1816 2008-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
1818 * src/buffer.c (_write_volume_label): Fix typo, which prevented
1819 `-V label -M' from working.
1821 2008-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
1823 * NEWS, configure.ac: Version 1.20.91
1824 * doc/tar.texi: Document transformation scope flags.
1825 * src/common.h (transform_symlinks_option): Remove in favor of
1826 transformation scope flags.
1827 (XFORM_REGFILE, XFORM_LINK, XFORM_SYMLINK, XFORM_ALL): New macros.
1828 (transform_name, transform_member_name, transform_name_fp): Take
1829 an additional argument, specifying scope flags.
1830 * src/create.c: Reflect changes to transform_name.
1831 * src/extract.c (extract_link, extract_symlink): Remove calls to
1832 transform_member_name. It is done in read_header.
1833 * src/list.c (decode_xform): Reflect change in data type of 2nd
1835 (transform_member_name): 2nd arg is int.
1836 (decode_header): Transform file name and link target names.
1837 * src/tar.c: Remove --transform-symlinks.
1838 * src/transform.c (struct transform): New member `flags'.
1839 (transform_flags): New variable.
1840 (parse_transform_expr): Parse transformation scope flags. Allow to
1841 set global flags using `flags=' syntax.
1842 (_transform_name_to_obstack, transform_name_fp)
1843 (transform_name): Take an additional argument, specifying scope
1846 2008-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
1848 * THANKS: Add Ed Leaver.
1849 * src/buffer.c (short_read): Remove !read_full_records condition,
1850 which was always false on a first record and thus disabled record
1851 size autodetection. Thanks Ed Leaver for the patch.
1852 (_gnu_flush_read): Handle blocking_factor == 1.
1853 * tests/sparsemv.at: Reflect changes to buffer.c.
1854 * tests/sparsemvp.at: Likewise.
1855 * tests/volsize.at: Likewise.
1858 2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
1860 * src/common.h (transform_symlinks_option): New global.
1861 * src/create.c (dump_file0): Transform symlink targets only if
1862 explicitly required. Thanks Cyril Strejc for reporting the
1864 * src/tar.c (parse_opt): New options --transform-symlinks and
1865 --no-transform-symlinks. New alias --xform to the --transform
1867 * doc/tar.texi: Document --transform-symlinks
1871 * src/names.c (name_gather): Use xzalloc.
1872 * src/buffer.c (short_read): Move record size detection before
1875 2008-10-07 Sergey Poznyakoff <gray@gnu.org.ua>
1877 * src/tar.c (options): Add --lzop option.
1879 2008-10-05 Xavier Hienne <xavier.hienne@free.fr> (tiny change)
1881 * src/checkpoint.c (checkpoint_compile_action): Add missing
1884 2008-09-24 Sergey Poznyakoff <gray@gnu.org.ua>
1887 * doc/tar.texi: Update.
1888 * src/tar.c: New option --no-null.
1890 2008-09-23 Sergey Poznyakoff <gray@gnu.org.ua>
1892 * src/common.h (filename_terminator): Remove global.
1893 * src/tar.c (filename_terminator): New static.
1894 * src/names.c (name_next_elt): Do not depend on
1895 filename_terminator, this was a leftover from 1.13.
1897 2008-09-18 Sergey Poznyakoff <gray@gnu.org.ua>
1899 * doc/tar.texi: Remove incorrect example.
1901 2008-09-07 Sergey Poznyakoff <gray@gnu.org.ua>
1903 * src/incremen.c (dumpdir_create0): Eliminate gcc warning.
1904 (attach_directory): Bugfix - add missing return statement.
1905 * THANKS: Add Enric Hernandez
1907 2008-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
1909 * src/incremen.c (struct directory): New member `next'. Change
1911 (dirhead, dirtail): New statics.
1912 (make_directory): Reflect changes to struct directory.
1913 (free_directory, attach_directory): New functions.
1914 (dirlist_replace_prefix): New function.
1915 (note_directory): Use attach_directory, instead of make_directory,
1916 (find_directory, find_directory_meta): Use free_directory.
1917 (procdir): Replace directory prefixes in directory list to avoid
1918 marking subdirectories as renamed after renaming their parent
1920 (append_incremental_renames): Iterate over directory list, not
1921 hash table, to preserve logical ordering of renames.
1922 * tests/rename04.at, tests/rename05.at: New test cases.
1923 * tests/Makefile.am, tests/testsuite.at: Add rename04.at and
1925 * tests/atlocal.in (decho): New function.
1926 * tests/multiv06.at: Use decho instead of echo2.
1927 * tests/incremental.at: Raise wait interval to 2 seconds.
1929 2008-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
1931 * src/tar.c (decode_options): Do not allow volume length less
1933 * src/buffer.c (_gnu_flush_write): Compensate for the effect
1934 of eventual flush_archive occurring in the middle of buffer
1936 Increment records_written only if _flush_write was able to write
1938 * tests/multiv06.at: New testcase.
1939 * tests/Makefile.am, test/testsuite.at: Add tests/multiv06.at
1941 2008-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
1943 * configure.ac, NEWS: Version 1.20.90
1944 * doc/tar.texi: Document -J, --no-auto-compress, etc.
1945 * src/buffer.c (ct_tar): New constant.
1946 (magic): Add lzop support. Proposed by Kevin Day
1947 <thekevinday@gmail.com>.
1948 (check_compressed_archive): Do not use autodetect if the
1949 compression program was specified explicitly.
1950 Fall back to analyzing archive name, if the autodetection fails.
1951 * src/suffix.c: Add .lzo
1952 * src/tar.c: New options --lzop and --no-auto-compress.
1953 New short option -J (alias for --lzma).
1955 * src/buffer.c (try_new_volume): Print more information with error
1957 (_gnu_flush_write): Improve error checking. Adjust
1958 real_s_sizeleft before calling new_volume to avoid creating
1959 malformed multivolume headers.
1960 * tests/delete05.at, tests/gzip.at, tests/ignfail.at,
1961 tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
1962 tests/shortfile.at: Update to match new diagnostic wording
1967 2008-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
1969 * doc/tar.texi (exclude): Document support for new VCS.
1972 * tests/multiv05.at: Fix typos.
1973 * tests/volsize.at: Remove a TZ dependency.
1975 2008-06-14 Dan Drake <dan@dandrake.org> (tiny change)
1977 * src/tar.c (exclude_vcs_files): Support for Bazaar, Mercurial and
1980 2008-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
1982 * src/tar.c (main): Reword the "delayed error" message. New
1983 wording proposed by Karl Berry.
1985 2008-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
1987 * configure.ac: Raise version number to 1.20
1988 * src/compare.c (diff_dumpdir): const.
1989 * src/common.h (dumpdir_t,dumpdir_iter_t): New data types.
1990 (dumpdir_create0,dumpdir_create,dumpdir_free,dumpdir_locate)
1991 (dumpdir_first,dumpdir_next): New functions.
1992 * src/incremen.c (dumpdir_create0,dumpdir_create,dumpdir_free)
1993 (dumpdir_first,dumpdir_next): New functions.
1994 (dumpdir_locate): Rewrite using binary search.
1995 (struct directory): Change members char *contents, *icontents to
1996 struct dumpdir *dump, *idump. All references updated.
1997 (note_directory): Last arg is const.
1998 * src/names.c (add_hierarchy_to_namelist): buffer is const.
1999 * tests/incr03.at, tests/incr04.at, tests/rename02.at,
2000 tests/rename03.at: Insert calls to sleep between creation of files
2001 and adding them to the archive.
2003 2008-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
2005 * src/create.c (dump_file0): Count links only for actually dumped
2008 2008-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
2010 * NEWS: Document --no-check-device and --check-device.
2011 * doc/rendition.texi: Change the way FIXME-*refs are handled in
2013 * doc/intern.texi, doc/tar.texi: Update.
2014 * doc/untabify.el: New file.
2015 * doc/Makefile.am (EXTRA_DIST): Add untabify.el
2016 (untabify, final, check-format, check-refs, check-fixmes)
2017 (check-unrevised, all-check-docs, check-docs): New rules.
2019 * src/common.h (check_device_option): New global.
2020 * src/incremen.c (procdir): Use boolean and instead of bitwise
2021 one. Patch by Jean-Louis Martineau.
2022 Compare device numbers only if check_device_option is set.
2023 * src/tar.c: New command line options --no-check-device and
2024 --check-device. Proposed by Jean-Louis Martineau.
2025 (parse_opt): Hanlde new options.
2026 (decode_options): Initialize check_device_option to true.
2030 2008-03-06 Sergey Poznyakoff <gray@gnu.org.ua>
2032 * bootstrap: Use rsync to get translations.
2033 * doc/tar.texi: Minor change.
2034 * lib/.cvsignore: Update
2035 * po/.cvsignore: Update
2036 * src/system.c: Remove include setenv.h.
2037 * tests/atlocal.in (STAR_DATA_URL): Update.
2038 * tests/star/README: Update URL.
2040 2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
2042 * doc/tar.texi: Fix a typo. Reported by Denis Excoffier.
2044 2008-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
2047 * configure.ac: Version 1.19.90
2048 * po/POTFILES.in: Add missing files.
2049 * src/compare.c (verify_volume): Honor --ignore-zeros.
2050 Proposed by Jan-Benedict Glaw.
2051 * tests/shortfile.at (AT_KEYWORDS): Add shortfile0.
2053 2008-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
2056 * src/create.c (dump_file0): Apply transform_name to symlink
2059 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua>
2061 * src/transform.c: Support multiple --transform options. Support
2062 semicolon-separated lists of replace expressions.
2063 * NEWS, tar.texi: Document changes to the --transform option.
2065 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2067 * doc/tar.texi: Update Back-Cover text to reflect new GNU wording.
2069 2007-12-17 Paul Eggert <eggert@cs.ucla.edu>
2071 Exit with nonzero status if a close fails on an archive.
2072 Problem (and initial trivial fix)
2073 * src/buffer.c (close_archive, new_volume): close_error, not
2076 2007-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
2078 * src/buffer.c (check_compressed_archive): Do not bail out if the
2079 file is too short, set boolean flag, passed as an argument
2080 instead. This fixes a bug introduced on 2007-08-24. See also
2083 * tests/Makefile.am, tests/testsuite.at: Add shortupd.at.
2084 * tests/shortupd.at: New test.
2086 2007-11-12 Jim Meyering <meyering@redhat.com>
2088 Don't read from name[-1].
2089 * src/incremen.c (make_directory): Handle namelen == 0, since
2090 find_directory_meta calls make_directory ("").
2092 2007-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
2094 * bootstrap (checkout): Use URL of the gnulib CVS mirror.
2095 * gnulib.modules: Add fseeko and snprintf.
2097 2007-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
2099 * src/checkpoint.c: New actions: bell and ttyout
2100 * src/system.c (sys_exec_info_script)
2101 (sys_exec_checkpoint_script): pass the current blocking factor in
2102 TAR_BLOCKING_FACTOR environment variable.
2103 * doc/tar.texi: Update
2106 2007-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
2108 * doc/Makefile.am: Use texi2html and the CVS version of gendocs.sh
2109 to create HTML versions of the manual.
2110 * doc/gendocs_template: Likewise.
2111 * doc/tar.texi: Document --hard-dereference and
2112 --checkpoint-action options. Improve documentation of
2115 2007-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
2118 * configure.ac: Version 1.19.1
2119 * po/POTFILES.in: Add src/checkpoint.c
2120 * src/Makefile.am (tar_SOURCES): add checkpoint.c
2121 * src/checkpoint.c: New file - checkpoint handling.
2122 * src/buffer.c (checkpoint, do_checkpoint): Remove.
2123 (_flush_write, simple_flush_read, _gnu_flush_read): Use
2125 * src/common.h (enum checkpoint_style): Remove.
2126 (checkpoint_style): Remove.
2127 (DEFAULT_CHECKPOINT): New define.
2128 (hard_dereference_option): New variable.
2129 (sys_exec_checkpoint_script): New declaration.
2130 * src/create.c (file_count_links): do nothing if
2131 hard_dereference_option is set.
2132 * src/system.c (sys_exec_checkpoint_script): New function.
2133 (sys_exec_info_script): Restore SIGPIPE handler.
2134 * src/tar.c: (parse_opt): New options --hard-dereference,
2135 --checkpoint-action.
2136 (decode_options): Call checkpoint_finish_compile.
2138 * src/system.c (sys_exec_info_script): Initialize buf. Problem
2139 reported by Bengt-Arne Fjellner.
2141 2007-10-18 Jim Meyering <jim@meyering.net>
2143 Avoid compiler warnings.
2144 * src/list.c (read_header_primitive): Define two locals, to
2145 avoid incorrect "may be used uninitialized" warnings.
2146 * src/incremen.c (procdir): Remove decl of unused local, "len".
2148 2007-10-18 Sergey Poznyakoff <gray@gnu.org.ua>
2150 * doc/tar.texi (gzip): Remove compression patent
2151 warning. According to Brett Smith, the patent is
2154 2007-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
2156 * src/suffix.c: New file. Compress format detection by archive
2157 suffix (when creating). Suggested by Jean-Pierre Demailly.
2158 * src/Makefile.am: Add suffix.c
2159 * src/buffer.c (magic): Add an entry for new lzma format. Proposed
2161 * src/common.h (set_comression_program_by_suffix): New prototype.
2162 * src/tar.c: New options --auto-compress (-a) and --lzma
2163 * THANKS: Add Lasse Collin and Jean-Pierre Demailly.
2165 * doc/tar.texi: Update
2167 2007-10-12 Paul Eggert <eggert@cs.ucla.edu>
2169 * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1
2170 warning about "comparison is always true due to limited range of
2171 data type" when char is unsigned.
2173 2007-10-11 Paul Eggert <eggert@cs.ucla.edu>
2175 Adjust to recent gnulib changes.
2176 * configure.ac: Dont' check for strerror, since gnulib now does this.
2177 * .cvsignore: Add m4, tar-[0-9]*.
2178 * lib/.cvsignore: Adjust to various gnulib file name changes.
2179 Add .deps, rmt-command.h.
2181 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
2183 * configure.ac, NEWS: Raise version number to 1.19
2184 * tests/star/README: Update
2186 2007-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
2188 * src/create.c (dump_regular_file): Fix file padding in case of
2189 truncation to zero size.
2192 2007-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
2194 * tests/T-null.at: Use AT_DATA for sample output.
2196 2007-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
2198 * src/incremen.c (try_purge_directory): Ensure that arguments to T
2201 2007-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
2203 * src/incremen.c (obstack_code_rename): Apply safer_name_suffix to
2204 name arguments before storing them in T and R records. Reported by
2207 2007-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
2209 * configure.ac: Raise version number to 1.18.90
2212 * doc/snapshot.texi: Document version 2.
2213 * doc/dumpdir.texi: Update.
2215 Implement --exclude-tag* and --exclude-cache* options for listed
2216 incremental archives.
2217 New option --exclude-vcs to exclude VCS-specific files and
2221 * doc/tar.texi: Document --exclude-vcs option
2222 * src/common.h (exclusion_tag_warning, check_exclusion_tags): New
2224 * src/create.c (exclusion_tag_warning, check_exclusion_tags):
2225 Remove static qualifier.
2226 (check_exclusion_tags): account for dirname without terminating
2228 (dump_dir0): exclusion_tag_all is handled elsewhere.
2229 * src/incremen.c (struct directory): New member tagfile
2230 (make_directory): Initialize tagfile to NULL
2231 (procdir): New argument: entry
2232 Hanlde exclusion tags.
2233 (makedumpdir): Take into account directory->tagfile.
2234 (scan_directory): Hanlde exclusion tags.
2235 * src/tar.c: New option --exclude-vcs
2236 (exclude_vcs_files): New function
2238 2007-09-14 Paul Eggert <eggert@cs.ucla.edu>
2240 * AUTHORS: Remove unnecessary information. Just list the
2242 * THANKS: Remove info duplicated from AUTHORS.
2244 2007-08-25 Jim Meyering <jim@meyering.net>
2246 Don't include <getline.h>. No longer needed.
2247 * src/incremen.c: Don't include <getline.h>. No longer needed.
2248 * src/buffer.c: Likewise.
2249 * src/system.c: Likewise.
2250 * src/tar.c: Likewise.
2252 Avoid shadowing and unused-variable warnings.
2253 * src/create.c (check_exclusion_tags): Remove declaration of unused
2255 * src/compare.c (diff_dumpdir): Rename stat->stat_data to avoid
2256 shadowing the syscall.
2257 * src/buffer.c (do_checkpoint): Don't shadow the write syscall.
2258 (try_new_volume): Avoid shadowing "access".
2259 * src/tar.c (decode_options): Rename index->idx to avoid shadowing.
2260 (find_argp_option): Rename option->o to avoid shadowing.
2261 * src/incremen.c (scan_directory): Rename local, dir_name->dir,
2262 to avoid shadowing the function.
2263 (get_directory_contents): Likewise.
2264 * src/system.c (global_pid): Rename from "pid", to avoid being
2266 * src/extract.c (apply_nonancestor_delayed_set_stat):
2267 Rename st->sb to avoid shadowing another local.
2269 2007-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
2271 * configure.ac, NEWS: Raise version number to 1.18.1
2273 * src/buffer.c (check_compressed_archive): Detect files smaller
2275 * tests/shortfile.at: New test case for the above change.
2276 * tests/testsuite.at, tests/Makefile.am: Add shortfile.at
2278 2007-08-19 Sergey Poznyakoff <gray@gnu.org.ua>
2280 * bootstrap: Gnulib initialization destroyed paxutils m4 files.
2281 Initialize paxutils structure after that of gnulib.
2283 2007-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
2285 * src/names.c (contains_dot_dot): Fix double-dot recognition in
2286 case of duplicate /. Patch by Dmitry V. Levin.
2288 * bootstrap (symlink_to_gnulib): Make sure the target directory
2289 exists and create it if it does not.
2291 * doc/tar.texi: Fix a typo.
2293 2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
2295 * bootstrap: Update for the change of the TP URL
2297 2007-06-27 Sergey Poznyakoff <gray@gnu.org.ua>
2299 Relicense under GPLv3
2301 2007-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
2303 * tests/testsuite.at (AT_TAR_MKHIER): Skip test if genfile is
2304 unable to create the file
2305 * tests/lustar01.at: Likewise
2307 2007-06-21 Eric Blake <ebb9@byu.net>
2309 Resolve testsuite failures 40-42 on cygwin.
2310 * tests/testsuite.at (AT_TAR_MKHIER): Skip tests when long
2311 file names cannot be created.
2313 2007-06-16 Sergey Poznyakoff <gray@gnu.org.ua>
2315 * doc/Makefile.am (tar_TEXINFOS): Add tar-snapshot-edit.texi
2316 * doc/tar-snapshot-edit.texi: New file
2317 * doc/tar.texi (Fixing Snapshot Files): New appendix
2319 * scripts/tar-snapshot-edit: New file
2320 * tests/extrac07.at: Add back write permissions on dir
2322 2007-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
2324 * tests/exclude.at: Sort the output.
2326 2007-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
2328 * configure.ac, NEWS: Raise version number to 1.17
2330 * doc/tar.texi, doc/intern.texi: Replace: s/filename/file name/;
2331 s/(ASCII|ID|BSD)/@acronym{&}/;s/"[^"]+"/``&''/
2332 Use `path' only when it refers to search paths, use
2333 `file name' otherwise.
2334 Fix various errors (based on patch by Benno Schulenberg)
2336 * doc/tar.texi (Operation Summary): Restore alphabetical order of
2339 2007-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
2341 Fix bug, introduced on 2007-03-30.
2343 * src/common.h (xform_type): New data type
2344 (transform_member_name): Last argument is of xform_type type
2347 * src/extract.c: Update calls to transform_member_name
2348 * src/list.c (decode_xform): Exempt symbolic links from component
2349 stripping and name suffix normalization.
2351 * tests/extrac07.at: Update
2353 2007-05-30 Sergey Poznyakoff <gray@gnu.org.ua>
2355 * src/xheader.c (decx): Unknown pax keywords produce a warning,
2358 2007-05-29 Paul Eggert <eggert@cs.ucla.edu>
2360 * src/misc.c (set_file_atime): Use gl_futimens, not futimens,
2361 due to gnulib change.
2363 2007-05-19 Sergey Poznyakoff <gray@gnu.org.ua>
2365 * src/common.h (buffer_write_global_xheader): New function
2366 (struct xheader): Move definition to tar.h
2367 (extended_header): Remove global
2368 (xheader_init): New function
2369 (xheader_decode_global,xheader_store,xheader_read)
2370 (xheader_write_global,xheader_write,xheader_string_begin)
2371 (xheader_string_add,xheader_string_end): Take xhdr as first
2373 * src/tar.h (struct xheader): New definition
2374 (struct tar_stat_info): New member xhdr (extended header).
2376 * src/xheader.c (xheader_init): New function
2377 (xheader_decode_global,xheader_store,xheader_read)
2378 (xheader_write_global,xheader_write,xheader_string_begin)
2379 (xheader_string_add,xheader_string_end): Take xhdr as first
2382 * src/buffer.c (buffer_write_global_xheader): New function
2383 Update to use new xheader calls.
2385 * src/compare.c, src/create.c, src/delete.c, src/list.c,
2386 src/sparse.c, src/tar.c, src/update.c: Global extended_header
2387 removed, use new xheader calls instead.
2389 * tests/T-null.at: Minor fix
2390 * tests/atlocal.in (tarball_prereq): Discard eventual md5sum
2393 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua>
2395 * src/create.c (dump_file0): Original ctime cannot be used as a
2396 directory change indicator if --remove-files is given.
2398 2007-04-12 Paul Eggert <eggert@cs.ucla.edu>
2400 Adjust to latest Gnulib.
2401 * lib/.cvsignore: Add dirfd.c, dirfd.h, float+.h, mbscasecmp.c,
2402 stdio.h, stdio_.h, stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
2403 Remove exit.h, getcwd.h, mempcpy.h, memrchr.h, mkdtemp.h, stpcpy.h,
2404 strcase.h, strchrnul.h, strdup.h, strndup.h, strnlen.h, time_r.h,
2406 * m4/.cvsignore: Remove localedir.h. Sort.
2408 2007-04-03 Paul Eggert <eggert@cs.ucla.edu>
2410 * src/common.h (closeopen): Remove decl.
2411 * src/misc.c: Don't include <sys/time.h>, <sys/resource.h>; no longer
2413 (get_max_open_files, closeopen): Remove. All callers removed.
2414 (chdir_dir): Use a different technique, which doesn't rely on closing
2416 * src/tar.c (main): Don't call closeopen.
2418 2007-04-04 Sergey Poznyakoff <gray@gnu.org.ua>
2421 * doc/tar.texi: Update
2422 * src/system.c (sys_exec_info_script): Store the
2423 inter-communication fd in the environment variable TAR_FD
2425 2007-04-03 Sergey Poznyakoff <gray@gnu.org.ua>
2427 * src/tar.c (main): Move closeopen after decode_options to
2428 allow shell process substitution to work.
2429 * tests/extrac07.at: Expect a warning on stderr.
2431 2007-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
2433 * src/common.h (transform_name_fp): Change signature
2434 (transform_member_name): New function
2435 * src/extract.c (extract_link, extract_symlink): Use
2436 transform_member_name instead of safer_name_suffix so that
2437 --transform and --strip-components affect links as well.
2438 * src/list.c (transform_member_name): New function
2439 (decode_header): Use transform_member_name
2440 * src/names.c (all_names_found): Remove check for matching_flags.
2444 * bootstrap (slurp): Remove any occurrences of $bt from the
2446 * src/incremen.c: Do not include mkdtemp.h
2448 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2450 Adjust to recent gnulib changes.
2451 * lib/.cvsignore: Add fchownat.c, rmt-command.h, strerror.c, string.h,
2452 string_.h, sys, sys_time_.h, unistd_.h, wchar_.h, wctype_.h.
2453 Remove localedir.h, size_max.h, xsize.h.
2454 * src/xheader.c: Don't include stpcpy.h; no longer needed, now that
2455 gnulib string.h defines stpcpy on all platforms.
2457 2007-01-23 Sergey Poznyakoff <gray@gnu.org.ua>
2459 * doc/tar.texi: Document --exclude-caches* and --exclude-tag*
2461 * src/common.h (exclude_caches_option): Remove
2462 (enum exclusion_tag_type): New data type
2463 (add_exclude_tag): Rename to add_exclusion_tag
2464 (cachedir_file_p): New prototype
2465 * src/create.c (struct exclude_tag): rename to exclusion_tag
2466 (check_exclusion_tags): New function
2467 (cachedir_file_p): New function (from check_cache_directory)
2468 (dump_dir0,dump_file0): Use check_exclusion_tags
2469 * src/tar.c: New options --exclude-caches-all,
2470 --exclude-caches-under, --exclude-tag-all, --exclude-tag-under
2471 * tests/exclude.at: New file
2472 * tests/Makefile.am (TESTSUITE_AT): Add exclude.at
2473 * tests/testsuite.at: Add exclude.at
2475 2007-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
2477 * gnulib.modules: Require strerror
2478 * doc/gendocs_template: Fix typos
2479 * scripts/xsparse.c (expand_sparse): use ftruncate to handle the
2481 * src/sparse.c (sparse_skip_file,pax_dump_header_1)
2482 (pax_decode_header): Keep track of the number of bytes
2484 * configure.ac: Version 1.16.2
2487 2007-01-04 Sergey Poznyakoff <gray@gnu.org.ua>
2489 * src/compare.c (diff_dumpdir): Compare directory contents using
2490 dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
2491 incremental directory table in the inconsistent state and trigger
2493 (read_and_process): Process dumpdirs no matter what the archive
2495 * src/incremen.c (list_dumpdir): Minor fixes.
2497 * src/compare.c (read_and_process): Fix type of "size"
2499 2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
2501 * tests/T-null.at: Skip the test if genfile is not able to create
2502 the filename with an embedded newline.
2504 2006-12-12 Paul Eggert <eggert@cs.ucla.edu>
2506 Port to Forte Developer 7 C 5.4 and C99.
2507 * src/common.h (add_exclude_tag): Add decl; C99 requires this
2508 and Forte warns about it.
2509 * src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
2511 * src/misc.c (get_max_open_files): Rewrite to avoid code that
2512 Forte C complains about as being unreachable.
2513 * src/xheader.c (mtime_code): Rewrite to avoid Forte error
2514 reported by Trond Hasle Amundsen.
2516 * src/incremen.c (compare_dirnames): Rewrite to avoid casts.
2517 * src/utf8.c (string_ascii_p): Likewise.
2518 * src/xheader.c (mtime_coder, volume_size_coder, volume_offset_coder):
2521 2006-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
2523 * bootstrap: Add paxutils files to dot_ignore.
2525 * configure.ac: Raise version number to 1.16.1
2526 * bootstrap (slurp): Create .(cvs|git)ignore if not present
2527 * po/.cvsignore, m4/.cvsignore: Remove automatically generated
2530 2006-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
2533 * Makefile.am (distclean-local): Fixed
2534 * doc/tar.texi: Update documentation of --exclude-tag
2535 * src/create.c (dump_dir0): Move checks for exclude tags to
2537 (dump_dir): Move calls to ensure_slash to dump_file0
2538 * src/extract.c (extract_file): Call skip_member if open fails.
2539 Patch proposed by Jan-Benedict Glaw <jbglaw@lug-owl.de>
2540 * tests/truncate.at: Use genfile instead of dd, because on some
2541 systems /dev/zero is not available.
2543 2006-12-04 Paul Eggert <eggert@cs.ucla.edu>
2545 * NEWS: Fix some race conditions with tar -x --same-owner.
2546 * src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
2547 S_IRWXG | S_IRWXO might be masked out.
2548 (set_mode): Set the mode if some bits were masked out originally.
2549 (set_stat): Don't chmod before chown, as that might temporarily
2550 grant permissions that we don't want to grant. The chmod was
2551 there only to work around broken hosts, so add a comment advising
2552 users not to use those broken hosts instead.
2553 (repair_delayed_set_stat, extract_dir):
2554 Remember to mask out current umask before inverting permissions.
2555 (extract_dir): If the owner might change, or if the mode has
2556 special bits, create the directory 700 at first, but restore it later.
2557 (open_output_file): New arg mode; all uses changed.
2558 (extract_file, extract_node, extract_fifo): If the owner might
2559 change, omit group and other bits at first, but restore them after
2562 2006-12-04 Jim Meyering <jim@meyering.net>
2564 * doc/tar.texi (Long Options): Remove doubled word.
2566 2006-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
2568 * src/xheader.c (xheader_read): Remove unused variable
2570 * po/POTFILES.in: Remove src/mangle.c
2572 * bootstrap: Implement --update-po and .bootstrap
2574 * src/create.c (dump_dir0): Implement --exclude-tag option
2575 * src/tar.c: Likewise
2576 * doc/tar.texi (exclude): Document --exclude-tag
2578 2006-11-29 Paul Eggert <eggert@cs.ucla.edu>
2580 * NEWS: Remove support for mangled names.
2581 * doc/tar.texi (verbose tutorial): Likewise.
2582 * src/Makefile.am (tar_SOURCES): Remove mangle.c.
2583 * src/common.h (extract_mangle): Remove decl.
2584 * src/extract.c (extract_mangle_wrapper): Remove.
2585 (prepare_to_extract): Remove support for mangled names.
2586 * src/list.c (read_and, print_header): Likewise.
2587 * src/mangle.c: Remove.
2588 * src/tar.h (GNUTYPE_NAMES): Remove.
2590 Port to latest gnulib. There were a lot of changes, so the
2591 simplest way to get this up and running was to switch to coreutils
2592 bootstrap procedure. I noticed one feature missing after this
2593 merge: the ability to update a single .po file. I can add that
2595 * README-cvs, bootstrap.conf: New files.
2596 * lib/.cvsignore: Remove Makefile.am, printf-parse.c, vasnprintf.c.
2597 Add fstatat.c, gnulib.mk, openat-proc.c, same-inode.h, stat_.h,
2598 tempname.c, tempname.h, uinttostr.c.
2599 * lib/printf-parse.c, lib/vasnprintf.c: New files, from coreutils,
2600 to override gnulib, so that we don't need xsize.h.
2601 * bootstrap: Replace with coreutils bootstrap, except add support
2603 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Remove, as gl_EARLY now
2605 (gl_EARLY, gl_INIT): Add.
2606 (tar_GNULIB): Remove.
2607 * gnulib.modules: Add configmake.
2608 * lib/Makefile.tmpl: Remove, replacing with....
2609 * lib/Makefile.am: New file.
2610 * src/Makefile.am (tar.o): Remove dependency: Automake does this
2612 * src/tar.c: Include <configmake.h> and <rmt-command.h>, not
2615 2006-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
2617 * src/xheader.c (mtime_coder): Treat non-null data as a pointer to
2618 struct timespec, overriding st->mtime
2619 * src/create.c (start_header): Pass mtime as a call-specific data
2622 * tests/truncate.at: Do not use 'k' modifier in dd options.
2623 * tests/append02.at: Do not depend on command timing.
2625 2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
2627 * src/tar.c (enum read_file_list_state.file_list_skip): New value
2628 (read_name_from_file): Skip zero-length entries
2630 * tests/T-empty.at: New test case
2631 * tests/T-null.at: New test case
2632 * tests/extrac07.at: New test case
2633 * tests/Makefile.am: Add new test cases.
2634 * tests/testsuite.at: Add new test cases.
2635 * tests/extrac02.at: Add more keywords
2636 * tests/extrac04.at: Likewise
2637 * tests/extrac06.at: Likewise
2638 * tests/shortrec.at: Do not assume tar's default archive is stdout
2640 2006-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
2642 * src/extract.c, src/xheader.c: Call last_component instead of
2643 base_name. The latter returns a malloced string since 2006-03-11.
2645 2006-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
2647 * NEWS, configure.ac: Version 1.16
2648 * Makefile.am (distclean-local): New rule
2650 2006-10-17 Sergey Poznyakoff <gray@gnu.org.ua>
2652 * src/tar.c: Fix help output formatting. Thanks Benno
2655 2006-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
2657 * Makefile.am (dist-hook): Create a cpio archive.
2660 2006-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
2662 * doc/tar.texi (Synopsis): Document tar exit codes.
2663 * src/create.c (dump_regular_file,dump_file0): Set exit_status to
2664 TAREXIT_DIFFERS if the file being dumped was truncated or
2666 * src/tar.c: Do not attempt to close stderr after call to
2668 * tests/grow.at: New test case
2669 * tests/Makefile.am: New test grow.at
2670 * tests/testsuite.at: Likewise
2671 * tests/truncate.at (AT_KEYWORDS): Keyword `filechange'
2672 Test tar exit status.
2674 * src/buffer.c (_open_archive): Make sure stdlis is set to stderr
2675 when we are writing archive to stdout (unless --index-file is
2676 used). Bug introduced on 2006-07-06.
2677 * tests/Makefile.am: New test verbose.at
2678 * tests/testsuite.at: Likewise
2679 * tests/indexfile.at (AT_KEYWORDS): Add stdout keyword
2680 * tests/verbose.at: New test case
2682 2006-10-02 Sergey Poznyakoff <gray@gnu.org.ua>
2684 * THANKS: Add Joerg Weilbier
2685 * src/buffer.c (new_volume): Initialize current_block
2686 * src/xheader.c (xheader_string_end): Fix diagnostic message.
2687 * tests/multiv05.at: New testcase.
2688 * tests/Makefile.am, tests/testsuite.at: Add multiv05.at
2690 2006-09-27 Sergey Poznyakoff <gray@gnu.org.ua>
2692 * bootstrap: Use ${package} instead of hardcoding package name
2693 * doc/tar.texi: Minor fix
2694 * src/tar.c (doc0, doc1, initialize_argp_doc): Removed. Rely on
2695 the new argp method instead.
2697 2006-09-12 Sergey Poznyakoff <gray@gnu.org.ua>
2699 * README: Fix a typo
2701 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
2703 Adjust to latest gnulib.
2704 * lib/.cvsignore: Add at-func.c, configmake.h, fchmodat.c,
2705 fcntl.h, fcntl_.h, inttypes_.h, lstat.c, lstat.h.
2706 * tests/testsuite.at (AT_TAR_MKHIER): Use install-sh -d
2707 rather than the no-longer-included mkinstalldirs.
2709 2006-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
2711 * src/incremen.c (try_purge_directory): Initialize struct st. Fix
2712 condition for selecting candidates for removal.
2713 * README-alpha: List texinfo among build prerequisites for the CVS
2716 * bootstrap (intl_files_to_remove): Do not remove m4/inttypes-h.m4
2717 and m4/inttypes-pri.m4
2719 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2721 * bootstrap: Set XGETTEXT_OPTIONS to flag our printf-format functions,
2722 so that translators are warned about strings that are formats but
2723 don't look like formats. This might help prevent core dumps.
2724 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
2725 Suggested by Eric Blake to avoid problems like
2726 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
2727 (AM_GNU_GETTEXT_VERSION): Upgrade from 0.12.1 to 0.15. The gettext
2728 manual says we should use the version number normally expected of
2729 maintainers, neither more nor less.
2731 * bootstrap (get_translations):
2732 Don't exclude ky.po; it is working again.
2734 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
2736 * bootstrap (get_translations):
2737 Don't exclude ja.po; it is working again.
2738 Don't remove all old .po files if we're merely updating one.
2739 * po/.cvsignore: Add Makevars.
2741 2006-08-07 Paul Eggert <eggert@cs.ucla.edu>
2743 * src/tar.c: Work around limitation imposed by gettext 0.15
2744 by concatenating strings with "\v" after translation.
2745 (doc): Remove, splitting into:
2746 (doc0, doc1): New constants.
2747 (argp): Don't use doc; just initialize to NULL.
2748 (initialize_argp_doc): New function.
2749 (decode_options): Use it.
2751 * bootstrap: Redo po file retrieval to match Bison's method,
2752 since the translation project changed its index format.
2753 Don't use --assume-autoconf; it's now replaced
2754 by looking in configure.ac.
2755 (m4/codeset.m4, m4/intdiv.m4, m4/inttypes-pri.m4, m4/isc-posix.m4):
2756 (m4/lcmessage.m4, m4/onceonly_2_57.m4, m4/gettext.m4, m4/glibc21.m4):
2757 (m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4):
2758 (m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4):
2759 Don't rename to ..._gl.m4, as this is no longer needed.
2760 (m4/geteext.m4): Patch to remove the need for intl/*.
2761 Use autopoint manually, then remove the intl files,
2762 then undo changes to gnulib files that autoreconf made,
2763 and then run aclocal/autoconf/autoheader/automake.
2764 This makes our bootstrap procedure closer to Bison's.
2765 (po/Makevars): Generate automatically.
2766 * configure.ac (AC_PREREQ): Update from 2.59 to 2.60.
2767 (gl_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Remove.
2768 * gnulib.modules: Add inttypes, stdint.
2769 * lib/.cvsignore: Add close-stream.c, close-stream.h,
2770 stdint.h, stdint_.h.
2771 * po/Makefile: Remove; now automatically generated.
2773 * src/incremen.c (read_incr_db_01): Check input strings more
2774 carefully. Do not pass arbitrary char values to isspace, as
2775 this has undefined behavior. Likewise for assigning arbitrary
2776 uintmax_t values to other types.
2777 (read_negative_num, read_unsigned_num, read_timespec):
2778 New functions, to check input values a bit more carefuly.
2779 (read_num): Use read_unsigned_num. New arg MAX_VAL;
2780 all callers changed.
2781 (read_incr_db_2): Use these new functions.
2782 Use a consistent diagnostic for unexpected EOF.
2783 (read_directory_file): Do not assign arbitrary uintmax_t value
2785 (read_timespec, write_directory_file_entry, write_directory_file):
2786 Handle negative time_t values correctly. We don't bother to do
2787 this with pre-2 formats, since presumably the time stamps were
2790 * src/tar.c (doc): Don't use \v in an argument to gettext;
2791 gettext 0.15 rejects this.
2793 2006-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
2795 * src/tar.c (decode_options): Do not require -L with -M -Hpax.
2796 It could be needed in future, but currently it is not.
2797 * src/create.c (to_chars_subst): Update comment regarding OLDGNU
2798 vs. GNU format differences.
2799 (mode_to_chars): Treat OLDGNU_FORMAT same as GNU_FORMAT. Fixes bug
2800 reported by TAMUKI Shoichi <tamuki@linet.gr.jp>, which caused
2801 equivalent `tar cf ...' and `tar rf ...' commands to produce
2804 * tests/append02.at: New test case
2805 * tests/Makefile.am, tests/testsuite.at: Add append02.at
2807 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
2809 * bootstrap: Adjust to today's change to gnulib-tool by invoking
2810 it with --assume-autoconf='latest-stable'.
2812 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
2814 Adjust to recent gnulib changes.
2815 * lib/.cvsignore: Remove atexit.c, exit.c, getndelim2.c, getndelim2.h,
2816 pathmax.h, paxconvert.c, paxerror.h, xstrdup.c.
2817 Add inttypes.h, mktime.c, wcwidth.h, xstrndup.c, xstrndup.h.
2818 * src/create.c (start_header): Adjust to API change to mode_adjust.
2820 2006-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
2822 * THANKS: Add Ralf Wildenhues
2825 2006-07-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2827 * doc/dumpdir.texi, doc/snapshot.texi, doc/sparse.texi,
2828 doc/tar.texi: Fix some typos.
2830 2006-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
2832 tar --index-file=FILE --file=- sent the archive to FILE, and
2833 the listing to stderr. Bug reported by Marcin Gryszkalis
2836 * src/buffer.c (_open_archive): Remove stdlis initialization
2837 * src/tar.c (decode_options): Initialize stdlis
2838 * tests/indexfile.at: New test case
2839 * tests/testsuite.at: Include indexfile.at
2840 * tests/Makefile.am (TESTSUITE_AT): Add indexfile.at
2842 2006-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
2844 * doc/Makefile.am (manual): Fix TEXINPUTS
2845 * doc/rendition.texi (FIXME): Do not use deprecated @quote-args.
2846 Do not use @allow-recursion. In its current form the macro is not
2849 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
2851 * bootstrap (update_po): Fix single translation update
2853 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
2855 * configure.ac (AC_CHECK_FUNCS): Check for getdtablesize
2856 * src/common.h (closeopen): New function
2857 * src/misc.c (chdir_arg): Use x2nrealloc to reallocate wd.
2858 (get_max_open_files,closeopen): New functions
2859 (chdir_do): Do not use save_cwd if it was already used more than
2860 max_open_files-4 times to avoid running off the file
2862 * src/tar.c (main): Call closeopen
2863 * doc/tar.texi: Update --directory description
2866 2006-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
2868 * doc/tar.texi: Update. Add cross-references.
2869 * doc/sparse.texi: Add cross-references.
2871 2006-06-25 Sergey Poznyakoff <gray@gnu.org.ua>
2873 * scripts/xsparse.c: A sample utility to expand sparse files
2874 extracted by third-party tars. It is not meant to be installed nor
2875 to be included in the distribution. It is here, so that it can be
2876 obtained either from CVS or from the tar web site.
2877 * doc/Makefile.am (tar_TEXINFOS): Sorted
2878 * doc/tar.texi (Other Tars): New node describing how to extract
2879 GNU-specific member formats using third-party tars.
2880 * src/common.h (sparse_file_p): Remove
2881 * src/sparse.c: Likewise
2882 * src/create.c: Use ST_IS_SPARSE instead of sparse_file_p (update
2884 * src/tar.c: --sparse-version turns on --sparse
2886 2006-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
2888 * src/buffer.c (print_total_stats): Add default case.
2889 * src/common.h (name_init): New prototype.
2890 (xheader_string_end): Return bool.
2891 * src/extract.c (extract_volhdr): Add missing return
2892 * src/incremen.c: Remove not used variables
2893 * src/sparse.c (pax_dump_header_0): Return false if
2894 xheader_string_end fails (for 0.1 formats).
2895 (pax_dump_header): Return meaningful value
2896 * src/transform.c (segm_count): Change type to size_t
2897 * src/xheader.c (xhdr_tab.decoder): pass keyword as a second
2898 argument. All callers changed.
2899 (decode_record): Check for numeric overflow
2900 (xheader_string_end): Return boolean value. Check for possible
2903 2006-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
2905 * doc/sparse.texi: New file
2906 * doc/Makefile.am (tar_TEXINFOS): Add sparse.texi
2907 * doc/intern.texi (Sparse Formats): New node
2908 * doc/tar.texi: Update master menu
2910 * src/common.h (tar_sparse_major,tar_sparse_minor): New globals.
2911 * src/sparse.c: Implement sparse format versioning. Implement new
2912 version (1.0) of PAX sparse format.
2913 (pax_sparse_member_p): Fix condition
2914 (pax_dump_header): A dispatcher function
2915 (pax_dump_header_0,pax_dump_header_1): New functions.
2917 (oldgnu_dump_header): Minor fix: make sure
2918 sparse_header.isextended is set before calling
2919 set_next_block_after
2920 * src/tar.c: New option --sparse-version
2921 * src/tar.h (struct tar_stat_info.sparse_major,sparse_minor): New
2923 * src/xheader.c: Implement new keywords: GNU.sparse.name,
2924 GNU.sparse.major, GNU.sparse.minor, GNU.sparse.realsize
2926 * tests/spmpv00.at, tests/spmvp01.at, tests/spmvp10.at: New
2929 * tests/Makefile.am: Add spmvp00.at, spmpv01.at, spmpv10.at
2930 * tests/shortrec.at: Explicitely give `-f -' to the tar invocation
2931 * tests/sparsemvp.at: Rewritten as an include file.
2932 (TAR_MVP_TEST): New macro
2933 * tests/testsuite.at: Include sparsemvp.at, spmvp00.at,
2934 spmvp01.at, spmvp10.at
2936 2006-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
2938 * doc/tar.texi (Overriding File Metadata): New node
2939 Document --mtime option.
2940 * src/common.h (set_mtime_option,mtime_option): New globals
2941 * src/create.c (start_header): Override mtime if requested
2942 * src/tar.c: Implement new option, --mtime, allowing to set
2943 modification times for all archive members during creation.
2944 (struct tar_args): textual_date_option replaced with a linked list
2945 textual_date. All references updated.
2946 (get_date_or_file,report_textual_dates): New functions.
2947 * configure.ac: Raise version number to 1.15.92
2950 2006-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
2952 * src/common.h (struct name.explicit): Remove
2953 Use variable names in all declarations
2954 (name_scan): Remove second argument
2955 * src/delete.c: Remove second argument from calls to name_scan
2956 * src/update.c: Likewise
2957 * src/incremen.c (procdir): Use is_individual_file to check for
2958 files explicitely specified in the command line. Fixes bug
2959 reported by Dat Head on 19 Jun 2006 (descending into mountpoints
2960 with --one-file-system in use)
2961 * src/misc.c (maybe_backup_file): Second argument is bool
2962 * src/names.c (name_next_elt): Call register_individual_file
2963 (namelist_match): Remove third argument
2964 (name_match): Change return type to bool
2965 (name_scan): Remove second argument
2966 * src/sparse.c (pax_dump_header): Store original sparse file name
2967 in GNU.sparse.name variable. The name field in the ustar header
2968 now contains generated name (%d/GNUSparseFile.%p/%f), so that
2969 non-pax-aware tars won't extract the file under the original
2971 * src/xheader.c (GNU.sparse.name): New variable for storing sparse
2974 2006-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
2976 * doc/Makefile.am (check-options): Expand macros before grepping
2978 * doc/rendition.texi (FIXME) [!PROOF_FOOTNOTED]: Enclose in a
2980 * doc/tar.texi: Define op as codeindex. Use special macros to
2982 Consequently prefer @dfn{long options} over @dfn{mnemonic
2984 Document --unquote, --no-unquote
2985 (Short Option Summary): Build a table of cross-references to the
2986 corresponding long options.
2987 (Using Multiple Tapes,Multi-Volume Archives): Rewritten
2989 * doc/value.texi (xopindex,opsummary): New macros
2991 * doc/Makefile.am (check-options): New goal
2992 * doc/tar.texi: Update
2993 * src/tar.c: Implement --overwrite-dir option (long ago
2996 2006-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
2998 * doc/tar.texi: Document better the --totals option
3000 * src/buffer.c (total_blocks_deleted): New variable
3001 (set_start_time): Set volume_start_time and last_stat_time as well
3002 (set_volume_start_time): New function
3003 (compute_duration): Do not call set_start_time, update
3004 last_stat_time instead. Use it in calculation instead of
3005 start_time, which is now set only once, upon startup.
3006 (print_total_written): Removed.
3007 (print_total_stats): New function for printing byte/speed statistics.
3008 (_open_archive): Detect attempts to update compressed archives.
3009 (_gnu_flush_write): Always update prev_written.
3010 (open_archive): Call set_volume_start_time.
3011 * src/common.h (volume_start_time,last_stat_time): New globals
3012 (print_total_written): Replaced with:
3013 (print_total_stats): New function
3014 * src/delete.c (records_skipped): Remove static qualifier, the
3015 variable is used by print_total_stats in buffer.c
3016 * src/extract.c (check_time): Use volume_start_time when checking
3017 for timestamp plausability.
3018 * src/tar.c: (options, parse_opt): Allow for optional argument to
3019 the --totals option, which specifies a signal upon delivery of which
3020 the statistics must be output.
3021 (main): Call print_total_stats if total_option is set.
3023 2006-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
3025 * src/xheader.c (xheader_set_single_keyword): Fix typo.
3026 (decode_time): Avoid using gotos.
3028 * doc/mastermenu.el: New file
3029 * doc/Makefile.am (master-menu): New goal
3030 * doc/tar.texi: Update master menu
3032 2006-06-10 Sergey Poznyakoff <gray@gnu.org.ua>
3034 * doc/tar.texi: Remove leftover include
3036 2006-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
3038 * doc/Makefile.am (tar_TEXINFOS): Add intern.texi
3039 (EXTRA_DIST): Remove convtexi.pl, add texify.sed
3040 * doc/intern.texi: New file
3041 * doc/convtexi.pl: Remove
3042 * doc/texify.sed: Auxiliary script to convert ../src/tar.h to
3044 * doc/rendition.texi: Fix typo
3045 * doc/tar.texi: Update
3046 * src/tar.h: Fix indentation, introduce end-of-format marker for
3049 * THANKS: Add Jason Armistead
3050 * doc/tar.texi: Update
3052 * src/buffer.c: Implement more flexible checkpoint style
3053 * src/common.h (checkpoint_option): Change type to unsigned
3054 (checkpoint_style): New variable.
3055 * src/tar.c: --checkpoint takes an optional argument specifying
3056 number of records between two successive checkpoints (proposed
3057 by Jason Armistead on 2004-06-22). Optional dot starting the
3058 argument means "print dots instead of textual checkpoints".
3059 (tar_help): New function
3060 * src/transform.c: Minor fixes.
3062 2006-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
3064 * gnulib.modules: Add mkdtemp
3065 * doc/dumpdir.texi: New file
3066 * doc/Makefile.am (tar_TEXINFOS): Add dumpdir.texi
3067 * doc/tar.texi: Document dumpdir format
3068 * src/incremen.c (dumpdir_locate,obstack_code_rename):
3069 (purge_directory): Re-implement renaming. Introduce
3071 (make_tmp_dir_name): Remove
3073 * src/transform.c (set_transform_expr,_transform_name_to_obstack):
3074 Implement NUMBER flag.
3075 (add_char_segment): Fix length assignement
3077 * doc/tar.texi: Update
3079 2006-06-07 Sergey Poznyakoff <gray@gnu.org.ua>
3081 * src/transform.c (transform_name_fp): Run fun even if
3082 _transform_name_to_obstack returns false.
3083 (_transform_name_to_obstack,set_transform_expr): Implement GNU
3084 extension case conversion operations.
3086 * doc/tar.texi (transform): Document the option.
3088 2006-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
3091 * src/common.h (set_transform_expr): New function
3092 * tests/Makefile.am: Add incr04.at
3093 * tests/testsuite.at: Likewise
3094 * tests/incr04.at: New test case
3095 * tests/long01.at: Fix typo in the comment
3096 * tests/multiv04.at: Use genfile --files-from
3098 (Above changes need new genfile.c from paxutils)
3102 * doc/tar.texi: Update
3103 * src/transform.c: New file
3104 * src/Makefile.am (tar_SOURCES): New module transform.c
3105 * src/common.h (transform_name, transform_name_fp): New functions
3106 (show_stored_names_option): Renamed to
3107 show_transformed_names_option. All uses changed
3108 * src/create.c (dump_file0): Transform file name
3109 * src/extract.c (extract_archive): safer_name_suffix and
3110 stripped_prefix_len are now called by decode_header
3111 * src/list.c (print_header): Update displayable name selection.
3112 * src/tar.c: New option --transform
3113 New option --show-transformed-names generalizes
3114 --show-stored-names. The latter is retained as an alias.
3116 2006-05-31 Sergey Poznyakoff <gray@gnu.org.ua>
3118 * src/incremen.c (make_directory): Fix initialization of struct
3121 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
3123 * doc/tar.texi: Document use of globbing patterns.
3124 * src/tar.c (parse_opt): Add comment before --preserve case.
3126 2006-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
3129 * doc/tar.texi: Update
3130 * configure.ac (AM_INIT_AUTOMAKE): Use tar-ustar option. Raise
3131 version requirement to 1.9
3132 * src/common.h (struct name): Refactured
3133 (warn_regex_usage): New variable.
3134 (dump_file): First argument is const char*.
3135 (name_init,name_add): Removed
3136 (name_add_name,name_add_dir): New functions
3137 (name_next): Return const char*.
3138 * src/create.c: (dump_file,dump_file0): First argument is const
3139 char*. All callers updated.
3140 * src/names.c: Rewritten handling of member names in the command
3141 line. Tar no longer attempts to guess globbing patterns, instead
3142 it relies on --wildcard option.
3143 (init_names): Removed.
3144 (struct name_elt): New structure.
3145 (name_array): Change type to struct name_elt. All references updated
3146 (name_add_name,name_add_dir): New functions
3147 (name_next_elt): New function
3148 (name_next): Rewritten using name_next_elt.
3149 (namelist_match): Rewritten pattern matching using
3151 (names_notfound): Warn if globbing patterns were used without
3153 * src/tar.c (options): Move globbing-related options into a
3154 separate group. Set -l as an alias to --check-links, as required
3156 (struct tar_args): New fields
3157 wildcards,matching_flags,include_anchored
3158 (MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS): New macros
3159 (parse_opt): Use x2nrealloc to grow archive_name_array.
3160 Use MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS to create appropriate
3161 fnmatch options, and name_add_name,name_add_dir to handle member
3162 name and -C arguments.
3163 (decode_options): Likewise
3164 (main): Remove call to init_names.
3166 * tests/append.at, tests/append01.at, tests/extrac01.at,
3167 tests/options.at, tests/options02.at, tests/same-order01.at,
3168 tests/same-order02.at: Make AT_SETUP more readable.
3170 2006-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
3172 * src/buffer.c (change_tape_menu): Fix typo (uninitialized
3173 variable) introduced yesterday.
3175 2006-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
3177 * doc/tar.texi: Use @var{file_name} instead of @var{file name}
3178 * src/buffer.c (change_tape_menu): Break the loop after obtaining
3179 new archive name. Check for empty input line.
3181 2006-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
3183 * tests/atlocal.in (XFAILFILE): New variable
3184 * tests/version.at: Create $XFAILFILE on failure
3185 * tests/testsuite.at (AT_TAR_CHECK): Declare expected failure if
3188 2006-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
3191 * src/buffer.c (read_header0): Use read_header_primitive to avoid
3192 clubbering current_tar_info. All callers updated.
3193 * src/common.h (read_header_primitive): New function
3194 * src/extract.c (extract_volhdr): New function
3195 (prepare_to_extract): Use extract_volhdr as extractor for volume
3197 * src/list.c (read_header_primitive): New function
3198 (read_header): Front end for read_header_primitive
3199 * tests/chtype.at: New file
3200 * tests/volsize.at: New file
3201 * tests/Makefile.am (TESTSUITE_AT): Add chtype.at, volsize.at
3202 (check-full): New target.
3203 * tests/atlocal.in (TEST_DATA_URL,STAR_DATA_URL)
3204 (STAR_TESTSCRIPTS): Provide default values.
3205 (tarball_prereq): New function
3206 * tests/testsuite.at (AT_TARBALL_PREREQ): New defun
3207 (AT_STAR_PREREQ): Rewrite using tarball_prereq
3208 Include chtype.at and volsize.at
3209 * tests/volume.at: Add keywords.
3211 * tests/star/gtarfail.at, tests/star/gtarfail2.at,
3212 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
3213 tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at
3214 (AT_STAR_PREREQ): Provide md5 sum.
3216 * lib/.cvsignore: Update
3218 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
3220 * tests/testsuite.at (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New
3223 * tests/extrac04.at, tests/incr03.at, tests/listed02.at,
3224 tests/pipe.at, tests/rename01.at, tests/rename02.at,
3225 tests/rename03.at, tests/same-order01.at: Call
3226 AT_SORT_PREREQ. Remove fd 2 redirection after calls to sort
3227 * ignfail.at: Call AT_UNPRIVILEGED_PREREQ
3229 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
3231 Listed incremental backups: keep more information about
3232 directories. Handle renamed directories more effectively
3233 (initial implementation, more updates to follow).
3234 Source tree before this point is tagged
3235 alpha_1_15_90_incremental_1.
3238 * configure.ac: Raise version number to 1.15.91
3239 * src/common.h (rename_directory,append_incremental_renames): New
3241 * src/extract.c (rename_directory): New function
3242 * src/incremen.c (struct directory.contents, flags): New members
3243 (nfs,found,new): Remove. Replaced by appropriate bitmask values in
3244 `flags' field. All uses updated.
3245 (directory_meta_table): New table.
3246 (hash_directory): Rename to hash_directory_name
3247 (compare_directories): Rename to compare_directory_names
3248 (hash_directory_meta,compare_directory_meta,find_directory_meta):
3250 (compare_dirents): Removed
3251 (note_directory): Get 7th argument: directory contents.
3253 (dumpdir_locate,makedumpdir): New functions
3254 (scan_directory): Rewritten. Use makedumpdir to create a sorted
3255 dumpdir array. This makes the obstack argument unnecessary. Besides,
3256 ALL_CHILDREN flag is set only for new directories.
3257 (procdir): Change return type to struct directory. Return
3258 immediately if the directory was already initialized. Discover
3259 directory renames using directory_meta_table.
3260 (append_incremental_renames): New function.
3261 (read_directory_file, write_directory_file): Use new snapshot file
3263 * src/names.c (collect_and_sort_names): Update dir_contents of the
3264 first non-fake name entry when in listed incremental mode.
3266 * tests/incr03.at: New testcase
3267 * tests/rename01.at: New testcase
3268 * tests/rename02.at: New testcase
3269 * tests/rename03.at: New testcase
3270 * tests/Makefile.am: Add
3271 incr03.at,rename01.at,rename02.at,rename03.at
3272 * tests/testsuite.at: Likewise.
3273 * tests/listed02.at: Update for the new behavior
3274 * tests/multiv04.at (AT_KEYWORDS): Add missing incremental kw.
3276 2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
3278 * src/buffer.c (try_new_volume): Attempt to continue if the name
3279 is apparently truncated in a GNU format volume.
3281 * tests/comprec.at, tests/delete01.at, tests/delete02.at,
3282 tests/delete04.at, tests/delete05.at, tests/extrac05.at,
3283 tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
3284 tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
3285 tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
3286 this enables extra error checking.
3288 * tests/multiv03.at: Attempt to extract a member with truncated
3289 file name from the archive.
3291 * src/buffer.c (_open_archive): Remove unnecessary argument to
3292 check_compressed_archive.
3294 2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
3296 * tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
3297 tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
3298 system does not support sparse files.
3299 * doc/tar.texi (@copying): Remove the reference to not existing
3302 2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
3304 * src/extract.c (extract_dir): Fix toggling existing directory
3305 permissions (Debian bug #361077). Use parts of patch provided by
3306 Ian Jackson <iwj@ubuntu.com>.
3307 * src/compare.c: Minor changes
3308 * src/incremen.c (directory.new): New member
3309 (note_directory,find_directory: Use make_directory to create
3310 struct directory entries
3311 (procdir): Avoid duplicating directories in the incremental
3313 * tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
3314 * tests/testsuite.at: Include extrac06.at
3316 2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
3318 * tests/atlocal.in (PATH): Add build-aux from the source tree,
3321 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
3323 * THANKS: Add Benno Schulenberg
3325 2006-03-13 Jim Meyering <jim@meyering.net>
3327 * tests/listed02.at: Sort the two lines of stderr from the
3328 first `tar -v --listed-incremental'. They would come out
3329 reversed and provoke a test failure on a tmpfs
3332 2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
3334 * doc/tar.texi: Minor fixes.
3335 * src/tar.c (options): Consistently begin help messages with a
3338 2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
3340 * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
3342 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
3344 * src/buffer.c (record_buffer_aligned): New var.
3345 (init_buffer): Use it to ensure that the buffer is aligned.
3346 This doesn't result in any measurable performance improvement
3347 on my host (Debian GNU/Linux 3.1 stable, with default block size),
3348 but I assume it does help on some hosts.
3350 * lib/.cvsignore: Sort.
3352 2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
3354 * tests/shortrec.at: Use -f - to read from stdin.
3356 2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
3358 * doc/tar.texi: Fix typo: --to-command instead of --to-program
3360 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
3362 * tests/multiv04.at (split directory members in a MV archive):
3363 Don't use %X in an awk printf format; this doesn't work with
3364 Solaris 10 /usr/bin/awk. Use %x instead.
3366 2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
3368 * src/create.c (split_long_name): Fix maximum length estimation.
3370 * tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
3372 * tests/atlocal.in: Add build-aux to the PATH
3373 * tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
3374 * tests/longv7.at: Reword test title
3375 * tests/lustar01.at: New test
3376 * tests/lustar02.at: New test
3377 * tests/lustar03.at: New test
3378 * tests/testsuite.at (AT_TAR_MKHIER): New macro
3379 (lustar01.at,lustar02.at,lustar03.at): New tests.
3381 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
3383 * bootstrap: Don't claim lib/Makefile.am is generated automatically
3386 Avoid installation glitches on Solaris 8 with Sun C 5.4.
3387 * lib/.cvsignore: Add system-ioctl.h.
3388 * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
3389 * src/buffer.c: Include system-ioctl.h.
3390 * src/compare.c: Likewise.
3391 * src/delete.c: Likewise.
3392 * src/system.c: Include <getline.h>, <setenv.h>.
3393 * src/tar.c: Include <getline.h>.
3395 2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
3397 * src/buffer.c (add_chunk_header): Free st.orig_file_name after
3398 calling finish_header().
3399 (new_volume): Prompt the user for archive name if unable to open
3402 * src/create.c (dump_file0): Restore file_count_links,
3403 accidentally removed on 2005-11-29.
3404 * configure.ac: Raise version number to 1.15.90
3407 2006-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
3409 * src/tar.c (tar_set_quoting_style): Provide second argument to
3410 the format spec: program_invocation_short_name. Reported by Jim
3413 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
3415 * gnulib.modules: Add closeout, exitfial.
3416 * lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
3418 * src/buffer.c: Incluse closeout.h.
3419 (_open_archive): Use freopen rather than fopen, so
3420 that stdlis is always either stdout or stderr. Use
3421 close_stdout_set_file_name to report its name.
3422 * src/tar.c: Include closeout.h and exitfail.h.
3423 (parse_opt, usage): Call close_stdout as appropriate, to check for
3425 (decode_options): Exit with status TAREXIT_FAILURE, not 1.
3426 (main): Set exit_failure, to exit with proper status on memory
3427 allocation failure and the like.
3428 Use close_stdout rather than rolling our own test.
3430 * NEWS: --version now outputs copyright etc., to conform to the
3431 GNU coding standards. Remove --license.
3432 * gnulib.modules: Add version-etc-fsf.
3433 * doc/tar.texi: Document the change.
3434 * lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
3435 * scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
3436 * scripts/backup.in: Remove --license. Change --version to conform
3438 * scripts/restore.in: Likewise.
3439 * scripts/backup.sh.in (license): Output briefer license in the
3440 style of coreutils, for consistency with other changes.
3441 * src/tar.c: Include <version-etc.h>.
3442 (LICENSE_OPTION): Remove.
3443 (options): Remove --license.
3445 (parse_opt): Use version_etc instead of rolling it ourselves.
3447 * tests/version.at (tar --version): Check only the first line of
3450 * ChangeLog, NEWS, src/common.h, src/extract.c, src/incremen.c:
3451 * src/list.c, src/names.c, src/tar.h, src/xheader.c:
3452 Update copyright year to 2006.
3454 2006-02-07 Jim Meyering <jim@meyering.net>
3456 * src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
3458 2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
3460 * src/common.h (get_gnu_dumpdir): Remove prototype
3461 (is_dumpdir): New function
3462 * src/extract.c (prepare_to_extract): Use is_dumpdir member to
3464 * src/incremen.c (get_gnu_dumpdir): Static
3465 (is_dumpdir): New function
3466 (purge_directory): Use is_dumpdir
3467 * src/list.c (list_archive): Use is_dumpdir
3468 Do not wrap skip_member in mv_begin/mv_end, the function itself
3470 (decode_header): Set stat_info->is_dumpdir
3471 (skip_member): Do nothing if skipped is true
3472 * src/tar.h (struct tar_stat_info): New members is_dumpdir and skipped.
3474 2006-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
3476 * src/tar.c (decode_options): Refuse using --delete with
3477 compression options.
3479 2006-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
3482 * configure.ac (DEFAULT_QUOTING_STYLE): New configuration variable
3483 * doc/tar.texi: Initial documentation for --quoting-style,
3484 --quote-chars and --no-quote-chars option.
3485 * src/tar.c: Implement new options --quoting-style, --quote-chars
3486 and --no-quote-chars.
3488 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
3490 * bootstrap: Default to pserver, and switch to cvs.sv.gnu.org,
3491 to accommodate recent changes to the GNU CVS server.
3492 * lib/.cvsignore: Add argp-pin.c, mkdirat.c, openat-priv.h.
3494 2005-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
3496 * src/names.c (name_scan): Take an additional argument requesting
3498 * src/common.h (name_scan): Change prototype.
3499 * src/delete.c, src/incremen.c, src/update.c: Update invocations
3502 2005-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
3504 * src/common.h (struct name): New member `explicit'. Remove unused
3506 * src/incremen.c (procdir): If name_scan() returns something,
3507 check if it was explicitely given in the command line
3508 * src/names.c (addname,add_hierarchy_to_namelist): Initialize
3509 explicit member appropriately.
3511 * src/incremen.c (procdir): If --one-file-system is given and a
3512 directory is found to be on another device, *and* this directory
3513 is explicitely given in the command line, then do not omit it.
3515 2005-12-11 Sergey Poznyakoff <gray@gnu.org.ua>
3518 * doc/tar.texi: Document --delay-directory-restore option.
3519 (Configuring Help Summary): Document usage of ARGP_HELP_FMT
3520 variable to customize help output.
3521 * src/common.h (delay_directory_restore_option): New global.
3522 * src/extract.c (directories_first): Replaced by
3523 delay_directory_restore_option. All uses changed.
3524 * src/tar.c (options,parse_opt): New options
3525 --delay-directory-restore and --no-delay-directory-restore
3527 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
3529 * src/buffer.c (open_archive): Add default case to shut up gcc.
3530 * src/common.h (set_file_atime): Add prototype.
3531 * src/create.c (to_chars_subst): Remove unused variable
3532 Make sure useful result code is returned.
3533 * src/incremen.c (read_directory_file): Fix format string
3534 Thanks Eric Blake for reporting.
3536 2005-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
3538 * doc/tar.texi (Current status): Renamed to 'Changes' and moved to
3540 (Large or Negative Values): Rewritten
3541 * src/common.h (gid_to_chars, major_to_chars, minor_to_chars)
3542 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
3543 (uid_to_chars, uintmax_to_chars): Return bool
3544 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars)
3545 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
3546 (uid_to_chars, uintmax_to_chars): Return bool
3547 (to_chars): Return bool
3548 (start_header): Check return values of convertion routines. Fail
3549 if unable to store data in the header.
3551 2005-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
3553 * doc/tar.texi: Following the discussion with Karl Berry,
3554 discontinue using @value{} substitutions for Texinfo commands.
3555 Properly index all long options. Print a
3556 separate long option index.
3557 * doc/value.texi: Remove @set's
3559 * doc/tar.texi: Update --info-script documentation
3560 Resolve some more FIXMEs.
3561 * scripts/dump-remind.in: Use TAR_VOLUME instead of reading volno
3563 * src/buffer.c (new_volume): Update invocation
3564 (change_tape_menu): New function. Disable '!' command if given
3566 * src/common.h (sys_exec_info_script): Update declaration
3567 (restrict_option): New global
3568 * src/system.c (sys_exec_info_script): The script can supply new
3569 archive name to use by writing it to file descriptor 3.
3570 * src/tar.c (options): Add --restrict option. Use macros for
3572 (license): Print full list of copyright years
3575 2005-12-06 Eric Blake <ebb9@byu.net> (trivial changes)
3577 * configure.ac (DENSITY_LETTER): Fix m4 overquoting.
3578 * .cvsignore: Ignore .bootstrap.
3580 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
3582 * doc/tar.texi: Document --to-command and --info-script
3583 options. Add missing xrefs.
3584 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
3586 * src/common.h (archive_format_string,subcommand_string)
3587 (sys_exec_info_script): New prototypes.
3588 * src/system.c (sys_exec_info_script): New function.
3589 * src/tar.c (archive_format_string): Remove static qualifier.
3590 (subcommand_string): New function.
3592 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
3594 * src/extract.c: Fix restoring of directory timestamps from
3595 incremental archives.
3596 (directories_first): New variable.
3597 (prepare_to_extract): Set directories_first
3598 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
3599 if not extracting from an incremental archive
3600 (extract_dir): Obtain root_device here, to make sure it works
3603 * src/incremen.c (purge_directory): Skip the member and return if
3604 the archive is not in incremental format.
3605 * tests/incr02.at: New testcase
3606 * tests/Makefile.am: Add incr02.at
3607 * tests/testsuite.at: Likewise
3609 * THANKS: Add Guerkan Karaman.
3612 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
3614 * doc/tar.texi (Option Summary): Rewrite the
3615 --atime-preserve=system description in response to Ian Turner's
3618 2005-11-30 Ian Turner <ian@zmanda.com>
3620 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
3623 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
3625 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
3626 * THANKS: Add Ian Turner.
3628 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
3629 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
3630 * doc/tar.texi: Change "modification time" to "data modification
3631 time", "change time" to "status change time", and "filesystem" to
3632 "file system", so that we use terminology consistent with POSIX.
3633 Use American spacing rather than French for sentence ends.
3634 "non-dependable" -> "undependable".
3635 (Option Summary, Attributes): Explain better the pitfalls of the
3636 --atime-preserve option, and suggest read-only mounts,loopback
3637 mounts, and noatime mounts for older systems.
3638 * doc/value.texi (op-atime-preserve-system): Renamed from
3639 op-atime-preserver-system to fix a misspelling.
3640 * src/common.h (enum atime_preserve): Use lower case for enum values.
3641 * src/compare.c: Don't include utimens.h; no longer needed.
3642 (diff_file): Use set_file_atime rather than utimens; avoid closing
3643 diff_handle until after this, so that we can set the file time stamp
3644 via the file descriptor rather than via its name.
3645 * src/create.c: Don't include utimens.h; no longer needed.
3646 (dump_regular_finish): Remove. All callers now do its work inline.
3647 (dump_dir): New arg FD. All callers changed.
3648 Use fdsavedir rather than savedir.
3649 (unknown_file_error): Arg is a const pointer now.
3650 (dump_file0): 2nd arg is a const pointer now.
3651 Treat directories more like files, with respect to --atime-preserve.
3652 For example, also warn if a directory changes while we are dumping it.
3653 Prefer file descriptors to file names when retrieving/setting file
3654 attributes; this saves path-resolution time and allows us to avoid
3655 changing mtime/ctime on Solaris when restoring atime as root.
3656 Use O_DIRECTORY when opening directories, to avoid some race conditions.
3657 Do not reset atime if mtime has changed. Report an error if
3658 we cannot reset atime.
3660 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
3661 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
3663 2005-11-29 Ian Turner <ian@zmanda.com>
3665 First cut at adding support for --atime-preserve=system.
3666 * doc/tar.texi (Option Summary): First cut at documenting it.
3667 All other uses of --atime-preserve changed to --atime-preserve=replace.
3668 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
3670 (op-atime-preserve): Mention METHOD.
3671 * src/common.h (atime_preserve): New enum.
3672 (atime_preserve_option): Now of the enum type rather than bool.
3674 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
3675 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
3677 * src/tar.c (usage): Mention new usage.
3678 (parse_opt): Parse new usage.
3680 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
3682 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
3683 stable), and consistently use tabs rather than spaces.
3685 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
3687 * src/xheader.c: Remove parts of code prematurely introduced
3688 yesterday. Thanks Eric Blake.
3690 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
3692 * src/xheader.c (xheader_format_name): Fix memory leak.
3694 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
3696 * gnulib.modules: Add rpmatch
3697 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
3698 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
3699 * po/POTFILES.in: Add rpmatch.c
3700 * src/tar.c (confirm): Rewritten using rpmatch.
3701 (decode_options): Minor optimizations
3702 (main): Call stdopen() to ensure the first three descriptors are
3705 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
3706 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
3707 tests/star/multi-fail.at: Close stdin so that if something fails
3708 causing tar to ask for the next volume, it won't hang the
3711 * src/buffer.c (flush_write,flush_read): Change data type.
3712 (flush_archive): Compute actual buffer fill level before calling
3714 (close_archive): Call flush_archive again if the first call
3715 resulted in partially filled buffer.
3716 (try_new_volume): Rewritten handling of initial headers.
3717 (add_chunk_header): New function. Write an additional header
3718 before the continuation chunk. The purpose of the header is to
3719 allow third-party tars to extract the member.
3720 (simple_flush_write): Take an argument.
3721 (_gnu_flush_write): Correctly handle partially filled buffers.
3722 * src/common.h (flush_read,flush_write): Functions, again.
3723 (write_extended): Changed declaration
3724 (xheader_format_name): New declaration
3725 * src/create.c (write_extended): Change type and meaning of
3726 the first argument. All callers updated
3727 * src/xheader.c (xheader_format_name): Remove static
3728 qualifier. Change last argument.
3729 Correct buffer size calculation (allocated too much space).
3730 (xheader_write): Increase global_header_count here ...
3731 (xheader_write_global): ... instead of here
3733 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
3734 * tests/multiv01.at: Update
3735 * tests/multiv02.at: Update
3736 * tests/multiv03.at: Update
3737 * tests/sparsemvp.at: Update
3738 * tests/star/multi-fail.at: Update
3740 * scripts/tarcat: Handle archives in pax format. Improve handling
3741 of traditional archives.
3742 * doc/tar.texi (Tarcat): New node
3744 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
3746 Fix splitting of sparse files between the volumes.
3748 * src/buffer.c (try_new_volume): Bugfix. Always check
3749 continued_file_name. If it is absent, the volume is out
3751 (add_multi_volume_header): Create GNU.volume.filename keyword in
3752 the extended header.
3753 * src/sparse.c (sparse_dump_region): Call mv_size_left.
3754 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
3755 * src/system.c: Do not pad compressed output if it goes to
3757 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
3759 * tests/sparsemv.at: New testcase
3760 * tests/sparsemvp.at: New testcase
3761 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
3762 * tests/testsuite.at: Likewise.
3764 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
3766 * src/buffer.c: Rewritten in a more modular fashion to provide
3767 GNU extensions (multi-volume archives and archive labels) in
3769 NOTICE, that some of the aspects (e.g. splitting the archive
3770 on the extended header boundary) are still not solved, others
3771 (splitting a sparse file between the volume) require additional
3772 testing. Wait for the next commit.
3774 (volume_label,continued_file_name,continued_file_size)
3775 (continued_file_offset): New globals.
3776 (save_name,save_totsize,save_sizeleft): Make static
3777 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
3778 (open_archive,flush_write,flush_read): Rewritten
3780 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
3782 (volume_label,continued_file_name,continued_file_size): New
3784 (flush_read,flush_write): Pointers to functions
3785 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
3786 (write_extended): New function.
3788 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
3789 src/list.c: Use mv_.* functions uniformly instead of fiddling
3790 with the global variables.
3791 * src/sparse.c: Use mv_.* functions where necessary.
3792 * src/tar.c (decode_options): Allow to use --multi-volume and
3793 --label with pax archives.
3794 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
3796 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
3797 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
3798 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
3799 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
3800 tests/listed01.at, tests/listed02.at, tests/long01.at,
3801 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
3802 tests/multiv03.at, tests/multiv04.at, tests/options.at,
3803 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
3804 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
3805 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
3806 of related tests in groups.
3808 * doc/tar.texi: Update
3810 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
3812 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
3813 not void *, to avoid create.c warning from GCC "passing argument 3
3814 of 'xheader_store' discards qualifiers from pointer target type".
3815 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
3816 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
3817 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
3818 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
3819 (xheader_store): Likewise.
3820 * src/common.h (xheader_store): Likewise.
3822 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
3823 and Paul Eggert <eggert@cs.ucla.edu>
3825 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
3826 (tar_timespec_cmp): New function. Wrapper over
3827 timespec_cmp using the timespec precision provided by the
3828 current archive format.
3829 * src/common.h (tar_timespec_cmp): New declaration.
3830 * src/compare.c (diff_file): Use tar_timespec_cmp.
3831 * src/extract.c (file_newer_p): Likewise.
3832 * src/update.c (update_archive): Likewise.
3833 * tests/truncate.at: Reverted changes
3834 * tests/update.at: Reverted changes
3836 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
3838 Support for incremental formats in pax archives.
3839 Fixed POSIX compatibility of `sparse' extended header keywords.
3841 * src/common.h (dumpdir_size,get_gnu_dumpdir)
3842 (xheader_string_begin,xheader_string_add)
3843 (xheader_string_end): New functions.
3844 * src/create.c (dump_dir0): Handle incremental backups in pax
3846 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
3847 (purge_directory): Use stat_info.dumpdir instead of getting its
3849 * src/list.c (list_archive): Handle incremental backups in pax
3851 (decode_header): Initialize stat_info.dumpdir
3852 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
3853 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
3854 variable has been explicitely deleted, use GNU.sparse.offset/
3855 GNU.sparse.numbytes variables.
3856 * src/tar.c (decode_options): Incremental options are allowed with
3858 (tar_stat_destroy): Free dumpdir
3859 * src/tar.h (struct tar_stat_info.dumpdir): New member.
3860 * src/xheader.c (xheader_keyword_deleted_p): Remove static
3862 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
3863 values to contain embedded nulls, so take an extra argument
3864 specifying the length of the string.
3865 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
3866 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
3867 (path_decoder,size_decoder,uid_decoder,uname_decoder)
3868 (sparse_size_decoder,sparse_numblocks_decoder)
3869 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
3870 (decode_record): Pass value length to the handler
3871 (run_override_list): Pass value length to the decoder
3872 (xheader_print_n): New function
3873 (xheader_print): Rewritten using xheader_print_n
3874 (xheader_finish): Do not rely om strlen to compute the length of
3875 the collected string: it can contain embedded nulls
3876 (xheader_string_begin,xheader_string_add,xheader_string_end): New
3878 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
3879 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
3880 (xhdr_tab): Add new variables.
3882 * tests/incr01.at: Test gnu, oldgnu, and posix formats
3883 * tests/incremental.at: Likewise
3885 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
3887 * NEWS: Minor language and white space fixes.
3889 * tests/truncate.at: Create files whose time stamps must fall on
3890 1-second boundaries. This prevents tests from failing on hosts
3891 like Solaris 8 that have nanosecond-resolution file time stamps.
3892 * tests/update.at: Likewise.
3894 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
3897 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
3899 * doc/tar.texi: Properly document incremental dumps
3900 * doc/value.texi: Likewise.
3901 * doc/snapshot.texi: Likewise.
3903 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
3905 Improve listed incremental format:
3907 * src/common.h (update_parent_directory): New prototype.
3908 * src/create.c (dump_file): Call update_parent_directory.
3909 * src/incremen.c (struct directory.mtime): New member.
3910 (note_directory): Take additional arguments. All callers updated.
3911 (scan_directory): Updated to use more metadata. In particular,
3912 this allows to correctly detect renamed files.
3913 (read_directory_file,write_directory_file)
3914 (write_directory_file_entry): Support new directory file format.
3915 * tests/listed01.at: Sleep 1 sec before creating second file.
3916 * tests/listed02.at: Never skip the test. It should work on any
3919 * doc/snapshot.texi: New file
3920 * doc/tar.texi: Update.
3921 * doc/Makefile.am: Update.
3923 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
3925 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
3926 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
3928 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
3930 * bootstrap: Fix quoting in help output.
3931 (update_po): Use backward-compatible wget option --cache instead
3932 of deprecated -C to accomodate for wget 1.10.
3933 Changes proposed by Eric Blake
3934 * THANKS: Add Eric Blake
3936 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
3938 * doc/tar.texi: Consistently put two spaces after sentences,
3939 and put commas after "i.e." and "e.g.". This is the usual GNU
3942 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
3943 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
3946 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
3948 * src/compare.c (diff_dumpdir): Pass a valid device number to
3949 get_directory_contents.
3951 * THANKS: Add John Thomas McDole
3953 * bootstrap: If file `.bootstrap' exists in the cwd and is
3954 readable, prepend its contents to the command line
3956 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
3958 * tests/link01.at: Skip test if ln fails (suppose the OS does
3959 not support hard links).
3961 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
3963 * src/tar.c (decode_options): Report error if -A or -r is used
3964 together with compression option.
3966 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
3968 * doc/tar.texi: Use @option and @kbd consistently.
3969 Document new options.
3971 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
3974 * src/common.h (show_stored_names_option): New variable
3975 * src/list.c (print_header): If show_stored_names_option is given,
3976 list member names as stored in the archive. Patch proposed by Erik
3977 Cumps <erik.cumps@icos.be>
3978 * src/tar.c: Implement --show-stored-names option
3980 * src/common.h (test_label_option): New variable;
3981 * src/list.c (print_header): Special handling if test_label_option
3983 * src/names.c (all_names_found): If test_label_option is set
3985 * src/tar.c: New option --test-label tests the archive volume
3986 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
3988 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3990 * tests/Makefile.am (clean-local): Don't attempt to run
3991 $(TESTSUITE) if it doesn't exist. Problem reported by
3994 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3996 Don't filter time stamps through the resolution supported
3997 by struct stat; keep them to full nanosecond resolution.
3998 This affects behavior only on older hosts or file systems
3999 that have lower-resolution time stamps.
4000 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
4001 (OLDER_TAR_STAT_TIME): New macro.
4002 (code_timespec): New function.
4003 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
4004 * src/compare.c (diff_file): Use full time stamp resolution.
4005 * src/create.c (start_header, dump_file0): Likewise.
4006 (start_header, dump_file0): Adjust to new structure layout.
4007 (dump_regular_finish): Simplify by using timespec_cmp.
4008 * src/extract.c (struct delayed_set_stat): Don't store stat info
4009 that we don't need, to save space. All uses changed.
4010 (struct delayed_set_stat, struct delayed_link, file_newer_p):
4011 (create_placeholder_file, extract_link, apply_delayed_links):
4012 Use full time stamp resolution.
4013 (check_time): Use code_timespec rather than rolling our own code.
4014 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
4015 avoid losing time information. All callers changed.
4016 * src/list.c (read_and, decode_header, print_heaeder):
4017 Use full time stamp resolution.
4018 * src/misc.c (code_timespec): New function.
4019 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
4020 separately, for benefit of hosts with lower resolution.
4021 * src/update.c (update_archive): Use full time stamp resolution.
4022 * src/xheader.c (code_time): Use new code_timespec function
4024 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
4025 (mtime_coder, mtime_decoder): Use full time stamp resolution.
4027 Report time stamps to full resolution in environment.
4028 Report memory allocation failures rather than ignoring them.
4029 * src/system.c (time_to_env): New function.
4030 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
4031 (stat_to_env): Report full resolution in time stamps.
4033 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
4035 Merge changes from gnulib for file system sub-second time stamps.
4036 * configure.ac: Remove checks for struct stat.st_spare1, struct
4037 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
4038 stat.st_atimensec, as gnulib now does this for us.
4039 Similarly for LIB_CLOCK_GETTIME.
4040 * gnulib.modules: Add stat-time.
4041 * lib/.cvsignore: Add stat-time.h.
4042 * src/common.h: Include stat-time.h.
4043 (timespec_lt): Remove. All callers changed to use timespec_cmp.
4044 (get_stat_atime, get_stat_ctime, get_stat_mtime):
4045 (set_stat_atime, set_stat_ctime, set_stat_mtime):
4046 Remove; now defined by stat-time.h.
4048 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
4050 * src/incremen.c (list_dumpdir): New function. Used to dump
4051 contents of GNUTYPE_DUMPDIR blocks.
4052 * src/common.h (list_dumpdir): Likewise.
4053 * src/list.c (list_archive): Use list_dumpdir() to display
4054 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
4057 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
4059 * lib/.cvsignore: Adjust to current gnulib and modules used.
4060 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
4061 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
4062 strnlen1.h, unistd--.h.
4063 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
4065 Treat fishy-looking hard links like fishy-looking symlinks.
4066 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
4067 member to after_links. All uses changed.
4068 (struct delayed_link): Renamed from struct delayed_symlink.
4069 All uses changed. New member is_symlink.
4070 (delayed_link_head): Renamed from delayed_symlink_head. All uses
4072 (create_placeholder_file): New function, taken from extract_symlink.
4073 (extract_link): Create placeholders for fishy-looking hard links.
4074 (extract_symlink): Move code into create_placeholder_file.
4075 (apply_delayed_links): Renamed from apply_delayed_symlinks.
4076 All uses changed. Create both hard links and symlinks.
4078 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
4080 * README-alpha: Modernize description of software required for
4083 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
4085 * gnulib.modules: Add strdup
4086 * src/incremen.c (purge_directory): Do not dereference symbolic
4087 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
4088 David Brown <davidb@davidb.org>
4089 * tests/incr01.at: New test.
4090 * tests/Makefile.am: Add incr01.at
4091 * tests/testsuite.at: Likewise
4094 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
4096 * src/incremen.c (read_directory_file): Use strtoumax to read
4097 snapshot file contents.
4098 (write_directory_file_entry): Use umaxtostr().
4100 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
4102 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
4103 sparse files to /dev/null with --totals option.
4104 * tests/update.at: Remove dependency on file order.
4106 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4108 * doc/tar.texi: Fix typo.
4110 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4112 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
4114 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4116 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
4117 sparse_select_optab(). All callers updated.
4118 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
4120 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4122 * src/sparse.c (pax_sparse_member_p): Checking member size
4123 vs. file size is not reliable enough. Use sparse_map_avail.
4125 * tests/star/gtarfail.at: Adapt to the new output format
4126 * tests/star/gtarfail2.at: Likewise
4127 * tests/star/multi-fail.at: Likewise
4128 * tests/star/pax-big-10g.at: Likewise
4129 * tests/star/ustar-big-2g.at: Likewise
4130 * tests/star/ustar-big-8g.at: Likewise
4132 * tests/sparse03.at: New test.
4133 * tests/Makefile.am: Add sparse03.at
4134 * tests/testsuite.at: Likewise
4136 * src/xheader.c (size_decoder): Do not set archive_file_size.
4138 Fix bugs introduced yesterday:
4140 * src/sparse.c (tar_sparse_init): Initialize
4142 (sparse_scan_file): Initialize archive_file_size to 0. The
4143 variable keeps size of the file *as stored in the archive*, not
4144 the size reported by stat.
4146 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
4148 A sweep of the sparse code prompted by a bug report by Jim Meyering.
4149 * src/sparse.c: Include <inttostr.h>.
4150 (struct tar_sparse_file): offset and dumped_size are off_t, not
4151 size_t. optab is now const *.
4152 (dump_zeros): Return bool success flag, not off_t.
4153 All callers changed.
4154 Use a constant-zero buffer rather than clearing a buffer each time.
4155 Don't mess up if write fails.
4156 (dump_zeros, check_sparse_region):
4157 Don't assume off_t is no wider than size_t.
4158 (tar_sparse_init): Don't bother clearing a field that is already clear.
4159 (zero_block_p): First arg is const *, not *.
4160 (clear_block, SPARSES_INIT_COUNT): Remove.
4161 (sparse_add_map): First arg is now struct start_stat_info *, not
4162 struct tar_sparse_file *. All callers changed.
4163 Use x2nrealloc to check for size_t overflow.
4164 (parse_scan_file): Cache commonly-used parts of file.
4165 Use an auto buffer, not a static one.
4166 Don't bother clearing the buffer; not needed.
4167 Don't bother clearing items that are already clear.
4168 (oldgnu_optab, star_optab, pax_optab): Now const.
4169 (sparse_dump_region): Don't bother clearing the buffer before
4170 reading into it; just clear the parts that aren't read into.
4171 (sparse_dump_file): Clear the whole local variable 'file'.
4172 (diff_buffer): Remove; now a local var.
4173 (check_sparse_region): Don't bother clearing buffer before
4174 reading into it. Don't assume off_t is promoted to long.
4175 (oldgnu_get_sparse_info, star_get_sparse_info):
4176 Use an auto status, not static.
4177 * src/tar.h (struct tar_stat_info): had_trailing_slash is
4179 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
4180 Rewrite to avoid cast.
4181 (sparse_offset_decoder, sparse_numbytes_decoder):
4182 Diagnose excess entries rather than crashing.
4184 2005-06-22 Jim Meyering <jim@meyering.net>
4186 * src/common.h (timespec_lt): Add a return type: bool.
4188 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
4190 Further improvements inspired by Jim Meyering's fixes.
4192 * NEWS: Better support for full-resolution time stamps.
4193 The -v option now prints time stamps only to 1-minute resolution.
4194 * gnulib.modules: Add utimens.
4195 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
4196 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
4197 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
4198 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
4199 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
4201 * src/buffer.c (set_start_time, compute_duration, start_time):
4202 Use gettime rather than rolling our own code.
4203 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
4204 (newer_ctime_option): Remove.
4205 (timespec_lt): New function.
4206 (OLDER_STAT_TIME): Use it.
4207 (string_to_chars): First arg is char const *, not char *.
4208 (tartime): Time arg is now struct timespec. New bool arg.
4209 All callers changed.
4210 (code_ns_fraction): New decl.
4211 (sys_stat_nanoseconds): Remove decl.
4212 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
4213 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
4214 * src/compare.c: Include utimens.h rather than rolling our own.
4215 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
4217 (diff_dumpdir, diff_multivol): Prototype.
4218 (diff_file): Support higher-resolution time stamps.
4219 * src/create.c: Include utimens.h rather than rolling our own.
4220 (MAX_OCTAL_VAL): New macro.
4221 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
4222 the destination is already zeroed.
4223 (string_to_chars): First arg is char const *.
4224 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
4225 for minor device number.
4226 (write_header_name, dump_hard_link, dump_file0):
4227 Simplify test for old GNU format.
4228 (start_header): Put in placeholders for uid, etc., even when
4229 using extended headers, for benefit of older "tar" implementations.
4230 Don't assume uintmax_t is wider than 32 bits.
4231 Output extended header for mtime if needed.
4232 (dump_regular_finish, dump_file0):
4233 Support extended time stamp resolution.
4234 * src/extract.c: Include utimens.h rather than rolling our own.
4235 (check_time): Support extended time stamp resolution.
4236 * src/list.c: Include <inttostr.h>.
4237 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
4238 * src/xheader.c: Include <inttostr.h>.
4239 Do not include <xstrtol.h>.
4240 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
4241 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
4242 (BILLION, LOG10_BILLION): New constants.
4243 (to_decimal): Remove; superseded by inttostr. All callers changed
4245 (xheader_format_name): Don't assume pids and uintmax_t values
4246 fit in 63 bytes (!) when printed.
4247 (decode_record): Don't bother to check for ERANGE; an out of range
4248 value must be treater than len_max anyway.
4249 If the length is out of range, output it in the diagnostic.
4250 (format_uintmax): Remove; all callers changed to use umaxtostr.
4251 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
4252 (out_of_range_header): New function.
4253 (decode_time): Use it.
4254 (code_time): Accept struct timespec, not time_t and unsigned long.
4255 All callers changed. Size sbuf properly, and remove unnecessary check.
4256 Don't assume time stamps can fit in 199 bytes.
4257 Handle negative time stamps. Handle fractional time stamps
4258 more consistently. Don't output unnecessary trailing zeros.
4259 (decode_time): Yield struct timespec, not time_t and unsigned long.
4260 All callers changed.
4261 Handle negative time stamps. Truncate towards minus infinity
4262 consistently. Improve overflow checks, and output a better
4263 diagnostic on overflow.
4264 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
4265 (decode_num): New function, for better diagnostics.
4266 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
4267 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
4268 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
4269 (sparse_offset_decoder, sparse_numbytes_decoder):
4270 Use decode_num, etc., instead of xstrtoumax, etc.
4272 2005-06-21 Jim Meyering <jim@meyering.net>
4274 Carefully crafted invalid headers can cause buffer overrun.
4275 Invalid header fields go undiagnosed.
4276 Some valid time strings are ignored.
4278 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
4279 of `calloc'. Use xcalloc instead.
4280 (decode_time, gid_decoder, size_decoder, uid_decoder):
4281 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
4282 Ensure that the result of calling xstrtoumax is no larger than
4283 the maximum value for the target type. Upon any failure, exit with
4285 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
4286 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
4287 (decode_time): Rewrite to accept time strings like
4288 1119018481.000000000. Before, such strings were always ignored.
4290 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4292 * src/create.c (dump_file0): Check for is_avoided_name()
4293 first. Fixes bug reported by Martin Lohmeier
4294 <martin@mein-horde.de>
4295 * tests/update.at: New file
4296 * tests/Makefile.am (TESTSUITE_AT): Add update.at
4297 * tests/testsuite.at: Likewise
4299 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4301 * configure.ac (AC_STRUCT_ST_BLKSIZE)
4302 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
4304 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
4306 * src/names.c (excluded_name): excluded_filename ->
4307 excluded_file_name, because the name was changed in gnulib.
4309 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4311 * src/tar.c (read_name_from_file,update_argv): Automatically
4312 detect nul-terminated list files.
4315 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4317 * scripts/backup.sh.in: Bugfixes.
4319 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4321 * scripts/backup.in: Minor fixes
4322 * scripts/backup.sh.in (mt_begin,mt_rewind)
4323 (mt_offline,mt_status): Use $MT to invoke mt
4324 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
4326 * doc/tar.texi: Document new backup scripts behavior
4328 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4330 * lib/.cvsignore: Updated
4331 * lib/Makefile.tmpl: Add new paxutils files
4332 * po/POTFILES.in: Likewise
4333 * src/buffer.c: Update invocations of safer_name_suffix()
4334 * src/create.c: Likewise
4335 * src/extract.c: Likewise
4336 * src/xheader.c: Likewise
4337 * src/common.h: Include paxlib.h instead of paxerror.h
4338 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
4339 imported from paxutils
4340 * src/names.c (hash_string_hasher,hash_string_compare)
4341 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
4342 (safer_name_suffix): Moved to paxutils
4344 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4346 * bootstrap (copy_files): Accept optional third argument: a prefix
4347 to be appended to destination file names.
4348 Import paxutils/paxlib files.
4349 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
4351 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
4353 * po/POTFILES.in: Likewise.
4354 * src/common.h: Remove defines and declarations imported from
4356 * src/misc.c: Likewise
4357 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
4359 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
4361 * src/misc.c (remove_any_file): Fix typo in previous change.
4363 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
4365 Port to Solaris 10's treatment of unlinking directories.
4366 * gnulib-modules: Add unlinkdir.
4367 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
4368 * src/common.h (we_are_root): Remove extern decl; it's now static.
4369 * src/extract.c (we_are_root): Now static.
4370 * src/misc.c: Include <unlinkdir.h>.
4371 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
4373 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
4374 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
4375 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
4376 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
4377 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
4378 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
4379 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
4380 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
4381 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
4382 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
4383 src/xheader.c, tests/Makefile.am, tests/append.at,
4384 tests/append01.at, tests/comprec.at, tests/delete01.at,
4385 tests/delete02.at, tests/delete03.at, tests/delete04.at,
4386 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
4387 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
4388 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
4389 tests/link01.at, tests/listed01.at, tests/listed02.at,
4390 tests/long01.at, tests/longv7.at, tests/multiv01.at,
4391 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
4392 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
4393 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
4394 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
4395 tests/testsuite.at, tests/truncate.at, tests/version.at,
4396 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
4397 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
4398 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
4399 tests/star/ustar-big-8g.at:
4400 Update FSF postal mail address.
4402 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4406 * bootstrap: Install files from paxutils/doc
4407 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
4408 * doc/tar.texi (Genfile): New appendix
4409 * src/compare.c (diff_file): diff_handle was not initialized
4410 * src/create.c (dump_regular_file): Correctly pad archive members
4411 that shrunk during archiving. Repored by Frank Heckenbach.
4412 * src/extract.c (file_newer_p): Return false if file does not
4414 (prepare_to_extract): Correct warning wording.
4415 * tests/truncate.at: New test case
4416 * tests/Makefile.am: Add truncate.at
4417 * tests/testsuite.at: Likewise.
4419 * doc/.cvsignore: Updated
4420 * lib/.cvsignore: Updated
4421 * tests/.cvsignore: Updated
4423 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
4425 * tests/multivol04.at: Tell awk to read from /dev/null.
4427 Adjust to recent gnulib changes.
4428 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
4429 * src/common.h (initial_umask): New var.
4430 * src/create.c (start_ueader): Use it, and adjust to new modechange
4432 (hash_link): unsigned -> size_t parameters and result.
4433 * src/incremen.c (hash_directory): Likewise.
4434 * src/names.c (hash_string_hasher): Likewise.
4435 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
4437 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4439 * tests/Makefile.am: Add shortrec.at.
4441 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
4443 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
4444 (short_read): Don't warn about short reads; they're normal.
4445 * tests/shortrec.at: New file.
4446 * tests/testsuite.at: Include it.
4448 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
4449 it is sometimes left behind as a garbage file (maybe due to the
4452 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4454 * src/list.c: Handle Solaris 'X' type flag
4455 * src/tar.h (SOLARIS_XHDTYPE): New define
4457 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
4459 * src/tar.c: Minor fixes to text messages. Proposed by Benno
4461 * src/extract.c: Likewise
4462 (extract_file): Assign orig_file_name
4463 to save_name uniformly over the program. This fixes matching
4464 directory names at the start of an archive volume.
4465 * src/buffer.c (flush_write): Warn when the name of the archive
4466 straddling volume boundary is longer than 100 characters. Earlier
4467 behavior was to issue a fatal error.
4468 (struct zip_magic): Reverted part of changes from 2005-04-04.
4469 They make the maintenance too costly. Removing `unsigned'
4470 qualifier from `magic' member should be enough.
4471 * src/compare.c (diff_init): Read directory file if in listed
4472 incremental. This prevents spurious 'Contents differ' diagnostics.
4473 (diff_archive): Minor fixes to text messages
4474 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
4475 to save_name uniformly over the program. This fixes matching
4476 directory names at the start of an archive volume.
4477 * src/create.c: Assign orig_file_name
4478 to save_name uniformly over the program. This fixes matching
4479 directory names at the start of an archive volume.
4480 * src/list.c: Likewise
4482 * tests/multiv03.at: Modified to match the new behavior
4483 * tests/multiv04.at: New file. Test splittind directory members between
4484 the archive volumes.
4485 * tests/Makefile.am: Add multiv04.at
4486 * tests/testsuite.at: Likewise.
4488 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
4490 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
4491 for reasons discussed in the thread beginning at
4492 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
4493 * .cvsignore: Remove config; add build-aux.
4495 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
4496 The unsigned char * pointer ran afoul of pedantic C compilers, and
4497 we didn't need pointers anyway. Put the size field before the
4498 data to avoid unnecessary padding. All uses changed.
4499 (magic) Make it const, since it doesn't change. All uses changed.
4501 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
4503 * src/xheader.c (decode_record): Don't dump core when given
4504 a corrupted extended header. Problem reported by Jim Meyering.
4505 Also, check for other ways that the header might be invalid,
4506 e.g., missing newline at end. Do not allow keys with nulls.
4507 Allow blanks before and after length, as POSIX requires.
4508 Do not allow leading "-" in length. Check for length overflow.
4509 (xheader_decode, xheader_decode_global): Let decode_record
4510 check for exhaustion of record.
4511 (xheader_read): Null-terminate the extended record;
4512 decode_record relies on this.
4514 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4516 * bootstrap (TP_URL): Change from
4517 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
4518 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
4519 some redirection glitches.
4520 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
4521 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
4522 * lib/.cvsignore: Add intprops.h (new gnulib file).
4524 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4526 * src/list.c (print_header): Print UID/GID in case of
4527 empty user/group name. This could occur when dumping
4528 files belonging to non-existing users and when listing
4530 Reported by Igor Lautar.
4532 * src/create.c: Correctly parse empty uname/gname
4533 * src/sparse.c (sparse_scan_file): Bugfix. offset had
4536 * scripts/backup.in: Use `head -n 1'. Provide missing
4537 argument to ${MT_STATUS}. Proposed by Jan Merka.
4538 * scripts/backup.sh.in: Likewise. Fixed typo in
4539 MT_OFFLINE assignment.
4540 * scripts/restore.in (restore_fs): Use root_fs
4542 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4544 * src/create.c: Replace strdup with xstrdup
4545 * src/names.c: Likewise
4546 * src/tar.c: Likewise
4548 * tests/append01.at: Added reference to bug-tar archive
4549 * tests/listed02.at: Use -print with find.
4551 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4553 * THANKS: Added Tim Adye. Fixed UTF.
4554 * src/list.c (read_header): Removed assignment to
4555 oldgnu_header.isextended. It was breaking append mode.
4557 * tests/append01.at: New test.
4558 * tests/Makefile.am: Added append01.at
4559 * tests/testsuite.at: Likewise
4561 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4563 * gnulib.modules: New file. List of required gnulib
4565 * bootstrap: Merge list of required modules from
4566 paxutils with that from tar proper.
4567 * src/tar.c: Various fixes in help and diagnostic messages.
4569 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4571 * src/common.h (EXTRACT_OVER_PIPE): New macro
4572 * src/compare.c: Code clean up.
4573 * src/extract.c (extract_archive): Do not check for
4574 EXTRACT_OVER_PIPE, decode_options() does this.
4575 * src/misc.c (exec_error,fork_error,dup2_error)
4576 (pipe_error): Removed unneeded functions.
4577 * src/system.c (sys_exec_command): Use xclose, xpipe,
4578 xfork, xdup2 and exec_fatal.
4579 * src/tar.c (options): Improved sorting. Document --backup=off.
4580 (decode_options): Clear backup_option if necessary.
4582 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4584 Initial implementation of --to-command option proposed
4587 * bootstrap: Get setenv module from gnulib
4588 * src/buffer.c: Do not use 8-bit chars in comments
4589 * src/common.h (to_command_option)
4590 (ignore_command_error_option): New globals
4591 (sys_exec_command,sys_wait_command): New commands
4592 * src/extract.c (extract_file): Handle to_command_option
4593 Fix error recovery: decrease `size' by `written', not
4594 by `count', otherwise tar misses the next header
4595 Do not diagnose write error if to_command_option
4596 is set, since the command may have exited prematurely.
4597 It would be better to check for sigpipe, though.
4598 (prepare_to_extract): Handle to_command_option
4599 * src/misc.c (exec_error, fork_error, dup_error)
4600 (pipe_error): New functions
4601 * src/system.c (sys_exec_command)
4602 (sys_wait_command): New functions
4603 * src/tar.c: Handle new options --to-command,
4604 --ignore-command-error
4605 * THANKS: Added Hansjoerg Lipp
4607 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
4609 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
4610 All uses changed. Fix typo that sometimes suppressed all "Archive
4611 contains obsolescent base-64 headers" warnings, not just the first
4613 (tar_checksum): Accept only octal checksums, since they aren't
4614 supposed to overflow into weird formats.
4616 Adjust to gnulib changes.
4617 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
4618 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
4619 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
4620 this file). Sort entries.
4622 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4624 * src/extract.c: Further rewrite.
4625 * src/buffer.c: Removed unused variables.
4626 * src/list.c: Likewise
4627 * src/tar.c (update_argv): Changed type to void
4629 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
4630 * src/create.c (start_private_header,write_header_name)
4631 (dump_hard_link): Restore compatibility with 1.13.25
4632 * src/extract.c (extract_archive): Rewritten
4633 * src/list.c: Add translators' comments
4634 * src/tar.c (options) Minor spelling fix
4635 * tests/star/quicktest.sh: Determine path to the tar executable.
4637 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4639 * po/POTFILES.in: Added tests/genfile.c
4640 * src/buffer.c (short_read): Use ngettext()
4641 (new_volume): use quote().
4642 * src/create.c: Use quote()
4643 * src/extract.c: Likewise
4644 * src/xheader.c: Likewise
4645 * src/misc.c: Add comments to translators
4647 * tests/same-order01.at: sort ls output
4648 * tests/sparse01.at (RE_CHECK): Added missing space
4650 * tests/sparse02.at: Test extracting sparse files over a pipe.
4651 * tests/Makefile.am: Added sparse02.at
4652 * tests/testsuite.at: Likewise
4653 * tests/listed02.at: Skip the test on filesystems that do not
4654 update ctime of a file when renaming it. To be reverted when
4655 the new incremental mode is ready.
4656 * tests/sparse01.at: Extract and compare sparse file
4658 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4660 * src/sparse.c: Extract sparse files even if the output
4663 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4665 * bootstrap: Add a comment to lib/Makefile.am saying that this
4666 is an autogenerated file.
4667 Exit with code 1 if any of autotools fails.
4668 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
4669 * tests/Makefile.am: Add append.at
4671 * m4/.cvsignore: Ignore all *.m4 files
4673 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4675 Rewritten handling of -T (--files-from) option. Now it
4676 inserts the file names immediately into argv array which allows
4678 1) any valid tar options (including another -T) to be used in the file
4679 2) any number of -T options to be given in command line
4681 * configure.ac: Raised version number to 1.15.2
4682 * src/common.h: Include obstack.h
4683 (files_from_option): Removed
4684 (unquote_option): New variable
4685 (stat_fatal): New function
4686 (name_close): Removed function.
4687 * src/incremen.c: Remove inclusion of obstack.h
4688 * src/xheader.c: Likewise.
4689 * src/misc.c (stat_fatal): New function
4690 * src/names.c (name_file): Removed variable.
4691 (read_name_from_file): Removed function. All callers changed.
4692 (name_close): Removed function. All callers changed.
4693 * src/tar.c: New options --unquote (--no-unquote) and
4695 (add_file_id,read_name_from_file,update_argv): New functions
4696 (parse_opt): Rewritten handling of -T option. Handle hidden
4697 --HANG option for debugging purposes.
4698 (decode_options): Init unquote_option to true. Init argv_stk.
4699 Remove unneeded references to files_from_option
4701 * doc/tar.texi: Document new options.
4702 Moved rendition macros and option value definitions into
4704 * doc/rendition.texi: New file
4705 * doc/value.texi: New file
4706 * doc/Makefile.am: Updated
4708 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
4710 * tests/testsuite.at (RE_CHECK): Use "join - file", not
4711 "join file -", to work around a bug in Solaris 8 join.
4712 Problem reported by Tomohiro Suzuki.
4714 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4716 * src/list.c (read_header): Fixed calculation of the
4717 size for GNU long name/link. Tar was reading one block
4718 more if name_size was divisible by 512. Thanks Josef
4720 * tests/long01.at: New file. Test listing of GNU long names
4722 * tests/pipe.at: Sort tar output.
4723 * tests/Makefile.am: Added long01.at
4724 * tests/testsuite.at: Likewise.
4725 * THANKS: Added Josef Bauer
4726 * lib/.cvsignore: Updated
4727 * m4/.cvsignore: Updated
4730 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4732 * directory: Updated for 1.15.1
4733 * doc/Makefile.am: Use gendocs.sh to generate web documentation
4734 * doc/gendocs_template: Template file for gendocs.sh
4735 * doc/tar.texi: Updated docs for --[no-]same-permissions
4736 * src/tar.c: Reworded docstrings for --[no-]same-permissions
4738 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4740 * bootstrap: Create m4/paxutils.m4
4741 * configure.ac: Call tar_PAXUTILS
4742 * tests/options02.at: Test that tar correctly handles non-option
4743 arguments interspersed with options.
4744 * tests/Makefile.am: Add options02.at
4745 * tests/testsuite.at: Likewise
4746 * tests/listed02.at: Do not create useless directory
4748 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4750 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
4751 Mike Frysinger <vapier@gentoo.org> for reporting.
4753 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
4755 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
4756 needless sed command. Problem reported by Paul Jarc.
4758 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
4760 Accommodate latest gnulib.
4761 * doc/.cvsignore: Add getdate.texi.
4762 * bootstrap: Do not treat alloca-opt specially; this is no
4763 longer needed (and breaks builds) with latest gnulib.
4765 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4767 * src/tar.c (main): Reverted recent changes (#ifdef).
4769 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4771 * configure.ac: Raise version number to 1.15.1
4773 * NEWS: Entry for 1.15.1
4774 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
4775 broke extraction from stdin.
4776 * src/list.c (from_header, tar_checksum): Changed declaration.
4777 All callers updated.
4778 * src/common.h: Likewise
4779 * src/tar.c (main): Protect invocation of setlocale by
4782 * tests/comprec.at: New test
4783 * tests/pipe.at: New test
4784 * tests/Makefile.am (comprec.at,pipe.at): New tests
4785 * tests/testsuite.at: Likewise
4786 * tests/gzip.at: Use AT_GZIP_PREREQ
4787 * tests/star/pax-big-10g.at: Likewise
4788 * tests/star/ustar-big-2g.at: Likewise
4789 * tests/star/ustar-big-8g.at: Likewise
4791 * tests/extrac04.at: Discard stderr from sort, on some
4792 systems it spits out lots of irrelevant info.
4793 * tests/listed02.at: Likewise
4795 * doc/index.html.in: Rewritten in xhtml to follow recent
4799 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4801 Released version 1.15. Sources up to this point are
4802 tagged release_1_15.
4804 * configure.ac: Raised version number to 1.15
4806 * directory: Updated
4807 * bootstrap (update_po): Give -r to wget. Always remove index.html
4808 Ignore alloca-opt module (it duplicates alloca)
4810 * tests/Makefile.am: Distribute star/quicktest.sh
4811 * tests/star/README: Document quicktest.sh
4812 * tests/star/qucktest.sh: Removed.
4813 * tests/star/quicktest.sh: New file.
4815 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4818 * doc/tar.texi: Document auto-detection of compressed archive
4820 * src/tar.c (decode_options): Ignore --seek if used with --delete.
4821 Delete.c is based on the assumption that the archive is being
4822 actually read, not lseeked.
4824 * tests/delete05.at: New file
4825 * tests/extrac02.at: Fixed typo in AT_SETUP
4826 * tests/Makefile.am: Added delete05.at
4827 * tests/testsuite.at: Likewise.
4829 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4831 * src/delete.c (delete_archive_members): Bugfix: when
4832 attempting to delete an nonexistent member, the last
4833 blocking_factor blocks were zeroed.
4835 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4837 * TODO: Mention sub-second resolution, lutimes, lchmod.
4839 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
4841 Adjust to recent gnulib changes.
4842 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
4843 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
4844 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
4845 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
4846 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
4847 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
4849 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
4850 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
4851 pathmax.m4, realloc.m4.
4853 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4855 * configure.ac: Raised version number to 1.14.91
4856 * scripts/tarcat: New file
4857 * scripts/Makefile.am: Added tarcat
4858 * src/buffer.c (hit_eof): Changed type to boolean
4859 (read_full_records,reading_from_pipe): New variables
4860 (check_compressed_archive,open_compressed_archive): New functions
4861 (open_archive): Autodetect compressed archives and act accordingly.
4862 Set reading_from_pipe. This fixes controversial set of changes
4863 introduced 2004-05-11,2004-03-22.
4864 * src/list.c (tar_checksum): New function
4865 (read_header): Use tar_checksum().
4866 * src/common.h (tar_checksum): New function
4868 * tests/star/README: Updated
4872 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4874 * src/tar.c (decode_options): Fixed -o semantics. Thanks
4875 Jean Delvare <khali@linux-fr.org>
4877 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4879 * bootstrap: Add localcharset
4880 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
4881 makefile snippet from localcharset uses '+=' on them.
4882 * src/Makefile.am (LDADD): Add LIBICONV
4883 * src/list.c (decode_header): Set uname/gname to NULL if their
4884 header counterparts are empty
4885 * src/tar.c (options): Use OPTION_NO_TRANS
4886 * src/utf8.c: Use locale_charset() from gnulib
4888 * tests/star/README: Updated
4893 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4895 * THANKS: Added Bryan Ford
4896 * doc/Makefile.am (.text): Fixed rule
4897 * po/POTFILES.in: Added argp-help.c
4899 2004-10-04 Bryan Ford <baford@mit.edu>
4901 * src/tar.c: New option --exclude-caches, to exclude
4902 cache directories automatically on archive creation.
4903 Cache directories are directories containing a
4904 standardized tag file, as specified at:
4905 http://www.brynosaurus.com/cachedir/spec.html
4906 * src/common.h: New variable exclude_caches_option.
4907 * src/create.c: New function check_cache_directory(),
4908 called from dump_dir0() if exclude_caches_option is set,
4909 to check for a cache directory tag and exclude the directory
4910 if such a tag is found.
4911 * doc/tar.texi: Updated accordingly.
4913 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4915 * doc/tar.texi: Minor fix
4916 * src/tar.c (options): Minor fix
4918 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4921 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
4922 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
4923 * src/extract.c: Normalized use of remove_any_file().
4924 * src/misc.c: Likewise.
4925 * src/tar.c (parse_opt): Emit warning if -l option is used.
4926 (show_default_settings): REMOTE_SHELL may be undefined
4928 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4930 Test suite rewritten in autotest.
4932 * configure.ac: Updated for autotest
4933 * src/tar.c (argp_program_version): Modified.
4934 * tests/Makefile.am: Rewritten for autotest.
4936 * tests/.cvsignore: Updated
4937 * tests/append.at: New file
4938 * tests/atlocal.in: New file
4939 * tests/delete01.at: New file
4940 * tests/delete02.at: New file
4941 * tests/delete03.at: New file
4942 * tests/delete04.at: New file
4943 * tests/extrac01.at: New file
4944 * tests/extrac02.at: New file
4945 * tests/extrac03.at: New file
4946 * tests/extrac04.at: New file
4947 * tests/extrac05.at: New file
4948 * tests/gzip.at: New file
4949 * tests/ignfail.at: New file
4950 * tests/incremental.at: New file
4951 * tests/link01.at: New file
4952 * tests/listed01.at: New file
4953 * tests/listed02.at: New file
4954 * tests/longv7.at: New file
4955 * tests/multiv01.at: New file
4956 * tests/multiv02.at: New file
4957 * tests/multiv03.at: New file
4958 * tests/old.at: New file
4959 * tests/options.at: New file
4960 * tests/recurse.at: New file
4961 * tests/same-order01.at: New file
4962 * tests/same-order02.at: New file
4963 * tests/sparse01.at: New file
4964 * tests/testsuite.at: New file
4965 * tests/version.at: New file
4966 * tests/volume.at: New file
4967 * tests/star/gtarfail.at: New file
4968 * tests/star/gtarfail2.at: New file
4969 * tests/star/multi-fail.at: New file
4970 * tests/star/pax-big-10g.at: New file
4971 * tests/star/ustar-big-2g.at: New file
4972 * tests/star/ustar-big-8g.at: New file
4974 * tests/preset.in: Removed
4975 * tests/before: Removed
4976 * tests/after: Removed
4977 * tests/version.sh: Removed.
4978 * tests/append.sh: Removed.
4979 * tests/delete01.sh: Removed.
4980 * tests/delete02.sh: Removed.
4981 * tests/delete03.sh: Removed.
4982 * tests/delete04.sh: Removed.
4983 * tests/extrac01.sh: Removed.
4984 * tests/extrac02.sh: Removed.
4985 * tests/extrac03.sh: Removed.
4986 * tests/extrac04.sh: Removed.
4987 * tests/extrac05.sh: Removed.
4988 * tests/gzip.sh: Removed.
4989 * tests/incremen.sh: Removed.
4990 * tests/ignfail.sh: Removed.
4991 * tests/link01.sh: Removed.
4992 * tests/listed01.sh: Removed.
4993 * tests/listed02.sh: Removed.
4994 * tests/longv7.sh: Removed.
4995 * tests/multiv01.sh: Removed.
4996 * tests/multiv02.sh: Removed.
4997 * tests/multiv03.sh: Removed.
4998 * tests/old.sh: Removed.
4999 * tests/options.sh: Removed.
5000 * tests/same-order01.sh: Removed.
5001 * tests/same-order02.sh: Removed.
5002 * tests/volume.sh: Removed.
5003 * tests/recurse.sh: Removed.
5004 * tests/sparse01.sh: Removed.
5005 * tests/star/gtarfail.sh: Removed.
5006 * tests/star/gtarfail2.sh: Removed.
5007 * tests/star/multi-fail.sh: Removed.
5008 * tests/star/ustar-big-2g.sh: Removed.
5009 * tests/star/ustar-big-8g.sh: Removed.
5010 * tests/star/pax-big-10g.sh: Removed.
5012 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5014 * bootstrap: Install genfile.c from paxutils
5015 * tests/genfile.c: Removed. Integrated into
5017 * tests/mksparse.c: Removed. Integrated into
5018 (paxutils) genfile.c
5019 * tests/Makefile.am: Removed mksparse
5020 * tests/sparse01.sh: Use genfile instead of mksparse
5022 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5024 Started merging with cpio into paxutils. Sources before
5025 this point are tagged alpha-1_14_90
5027 * Makefile.am: Updated for use with paxutils
5028 * README-alpha: Likewise
5029 * bootstrap: Likewise
5030 * configure.ac: Likewise
5031 * lib/Makefile.tmpl: Likewise
5032 * po/POTFILES.in: Likewise
5033 * src/Makefile.am: Likewise
5034 * src/buffer.c: Likewise
5035 * src/common.h: Likewise
5036 * src/compare.c: Likewise
5037 * src/create.c: Likewise
5038 * src/delete.c: Likewise
5039 * src/extract.c: Likewise
5040 * src/incremen.c: Likewise
5041 * src/list.c: Likewise
5042 * src/mangle.c: Likewise
5043 * src/misc.c: Likewise
5044 * src/names.c: Likewise
5045 * src/sparse.c: Likewise
5046 * src/system.c: Likewise
5047 * src/tar.c: Likewise
5048 * src/update.c: Likewise
5049 * src/utf8.c: Likewise
5050 * src/xheader.c: Likewise
5052 * src/system.h: Removed
5053 * src/rmt.c: Removed
5054 * src/rmt.h: Removed
5055 * src/rtapelib.c: Removed
5057 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5059 * tests/listed02.sh: Do not depend on any particular ordering
5062 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5064 * doc/tar.texi: Document the use of -C option in
5065 file lists. Document --seek option.
5066 * configure.ac: New option --with-rmt. New configuration variable
5067 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
5068 * src/Makefile.am: Install rmt into rmtdir
5069 * src/tar.c (usage): Minor fix.
5073 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5075 * configure.ac: Raised version number to 1.14.90
5076 * src/common.h (is_individual_file): New prototype
5077 * src/create.c (dump_file0): Fix bug introduced
5079 * src/names.c (register_individual_file)
5080 (is_individual_file): New functions.
5081 * tests/listed01.sh: Use genfile instead of dd.
5082 * tests/listed02.sh: New file.
5083 * tests/Makefile.am: Added listed02.sh
5087 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5089 * src/sparse.c (sparse_add_map): Fixed improper initializations
5090 of sparse_map_size. We assume that whatever number it contains
5091 describes adequately the current size of sparse_map. The only
5092 number we need to reset is sparse_map_avail.
5093 * src/compare.c (verify_volume): Call set_next_block_after
5094 if read_header returns HEADER_FAILURE
5095 Destroy and reinitialize content of current_stat_info and
5096 extended_header after each iteration (bug reported by
5097 John L. Males <jlmales@yahoo.com>).
5098 Issue a warning if the created archive contains some members
5099 whose file names were stripped off their leading prefixes.
5100 This is a temporary fix of the issue reported by Bdale Garbee
5101 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
5102 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
5104 * src/names.c (removed_prefixes_p): New function.
5106 * src/buffer.c: When computing write rate do not take
5107 into account the time needed to verify the archive(s).
5108 The bug reported by John L. Males <jlmales@yahoo.com>
5109 (set_start_time,compute_duration): New functions.
5110 (print_total_written): Use the result of compute_duration().
5111 (close_archive): Call compute_duration.
5112 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
5113 * src/list.c (decode_header): Fixed initialization
5114 of stat_info->is_sparse
5115 * src/tar.c (main): Call set_start_time().
5117 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
5118 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
5123 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5125 * src/tar.c: Fix copy-n-paste errors in the license
5127 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5129 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
5130 Use ROOT_FS with -C option. Do not send mail
5131 if ADMINISTRATOR is set to NONE.
5132 * scripts/backup.sh.in (test_root): Append / to
5133 ROOT_FS if it does not already end in it.
5134 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
5135 New option -a (--all). Do not start restore unless
5136 -a or patterns are given.
5137 (restore_fs,restore_files): Fixed use of --listed option.
5138 * doc/tar.texi: Updated
5141 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5143 * src/tar.c (find_argp_option): Fixed typo
5145 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
5147 Merge argp, getopt, xalloc changes from gnulib.
5148 * bootstrap (gnulib_modules): Add xalloc-die.
5149 Remove code to test for patches; we don't have patches now.
5150 Set LC_ALL=C so that file names sort consistently.
5151 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5152 lib-ld.m4, lib-prefix.m4, po.m4 too.
5154 * patches/getopt.diff: Remove; gnulib now works unpatched.
5155 * configure.ac (_getopt_long_only_r): Remove check.
5156 gl_ARGP now does this for us.
5157 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
5159 * src/extract.c: Adjust to changes to gnulib xalloc module.
5160 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
5161 (xalloc_die): New function.
5163 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5167 * src/buffer.c (flush_write): Limit filenames
5168 of the members that straddle multivolume archive
5169 boundary to 100 characters.
5170 (flush_read): Use strncmp when comparing multivolume member
5172 * tests/multiv03.sh: New file
5173 * tests/Makefile.am: Added multiv03.sh
5175 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5177 * src/list.c (read_and): Call decode_header before
5178 calling skip_member()
5179 (skip_member): Use is_sparse field to determine if the
5180 member is a sparse file.
5182 * tests/Makefile.am: Added extrac05.sh
5183 * tests/extrac05.sh: New file
5184 * tests/append.sh: Rearranged leading comments. Added explicit
5185 references to report messages wherever available.
5186 * tests/delete01.sh: Likewise
5187 * tests/delete02.sh: Likewise
5188 * tests/delete03.sh: Likewise
5189 * tests/delete04.sh: Likewise
5190 * tests/extrac01.sh: Likewise
5191 * tests/extrac02.sh: Likewise
5192 * tests/extrac03.sh: Likewise
5193 * tests/extrac04.sh: Likewise
5194 * tests/gzip.sh: Likewise
5195 * tests/ignfail.sh: Likewise
5196 * tests/incremen.sh: Likewise
5197 * tests/link01.sh: Likewise
5198 * tests/listed01.sh: Likewise
5199 * tests/longv7.sh: Likewise
5200 * tests/multiv01.sh: Likewise
5201 * tests/multiv02.sh: Likewise
5202 * tests/old.sh: Likewise
5203 * tests/options.sh: Likewise
5204 * tests/recurse.sh: Likewise
5205 * tests/same-order01.sh: Likewise
5206 * tests/same-order02.sh: Likewise
5207 * tests/sparse01.sh: Likewise
5208 * tests/version.sh: Likewise
5209 * tests/volume.sh: Likewise
5211 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5213 * bootstrap: Extended --update-po option to take an
5214 optional argument specifying the po file to update.
5215 * src/create.c: Improved compatibility with 1.13.25
5216 * tests/link01.sh: New file.
5217 * tests/Makefile.am: Added link01.sh
5219 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
5223 * patches/argp.diff: Remove; no longer needed.
5225 * lib/.cvsignore: Add stat-macros.h.
5226 Remove addext.c, malloc.c, realloc.c.
5228 * src/extract.c: Include <getcwd.h>.
5229 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
5230 * src/extract.c (make_directories):
5231 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
5232 * src/misc.c (must_be_dot_or_slash): Likewise.
5233 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
5235 * src/tar.c (parse_opt): Likewise.
5236 * src/incremen.c (purge_directory): Fix format buffer typos in warning
5238 * src/tar.c (options): Add missing initializers to pacify gcc.
5239 (decode_options): Remove unused var.
5241 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
5243 * bootstrap (gnulib_modules): Add getpagesize.
5244 * configure.ac (valloc): Remove check; valloc no longer used.
5245 * lib/.cvsignore: Add getpagesize.h.
5246 * m4/.cvsignore: Add getpagesize.m4.
5247 * src/buffer.c (record_buffer): New var.
5248 (open_archive): Don't use valloc; on older or buggy hosts, you can't
5249 free the result. Use page_aligned_alloc instead.
5250 * src/compare.c (diff_init): Likewise.
5251 * src/buffer.c (open_archive): Record the pointer to be freed
5253 (close_archive): Free record_buffer.
5254 * src/common.h (page_aligned_alloc): New decl.
5255 * src/misc.c (quote_n, quote): Remove these redundant functions.
5256 (ptr_align): New function, from coreutils/src/system.h.
5257 (page_aligned_alloc): New function.
5258 * src/system.h (valloc): Remove.
5260 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
5262 * src/extract.c (extract_archive): Do not report an error
5263 when hard-linking X to X when X exists. Problem reported by
5265 * lib/.cvsignore: Add fchown-stub.c.
5267 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5270 * src/common.h (root_device): New global.
5271 (gnu_restore): Renamed to purge_directory().
5272 * src/extract.c (extr_init): Save the device number
5274 (extract_archive): Renamed gnu_restore() to purge_directory().
5275 * src/incremen.c (gnu_restore): Renamed to purge_directory().
5276 Do not attempt to purge the directory if it is on a different
5277 device and one_file_system_option is set.
5279 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5281 * doc/tar.texi: The actual default for exclude patterns
5282 is --no-anchored. Fixed.
5283 * src/tar.c (options): Likewise.
5284 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
5286 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5288 * doc/tar.texi: Fixed several inconsistencies.
5289 * src/tar.c: Fixed docstring for --checkpoint option.
5291 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5293 * src/buffer.c (seek_archive): New function
5294 * src/common.h (seek_archive): New function
5295 (seekable_archive): New global.
5296 * src/list.c (skip_file): Use seek_archive() if
5298 * src/tar.c (struct fmttab): Accept 'pax' as alias
5300 (options): New option -n (--seek).
5301 * src/update.c: Determine type of the archive before
5306 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5308 * bootstrap: New option --update-po
5309 * src/tar.c: New option -H (short alias to --format)
5310 * doc/tar.texi: Document -H option
5311 * src/names.c (safer_name_suffix): Fixed bug introduced
5314 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5316 * bootstrap: Apply patches from patch subdirectory
5318 * patches/argp.diff: New file
5319 * patches/getopt.diff: New file
5320 * configure.ac: Check for _getopt_long_only_r and
5321 force using included version of getopt if the function
5323 * src/tar.c: Use argp for command line parsing.
5324 * src/system.h: Minor formatting fix
5325 * m4/.cvsignore: Updated
5326 * lib/.cvsignore: Updated
5327 * doc/tar.texi: Minor fix.
5328 * src/extract.c: Fix improper use of 'path' term
5329 * src/incremen.c: Likewise
5330 * src/list.c: Likewise
5331 * src/misc.c: Likewise
5332 * src/names.c: Likewise
5333 * src/rmt.h: Likewise
5334 * src/rtapelib.c: Likewise
5335 * src/update.c: Likewise
5336 * src/xheader.c: Likewise
5337 * tests/star/README: Minor fix
5339 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5341 * configure.ac: Raised version number to 1.14.1
5342 * src/tar.c: Renamed --strip-path to --strip-components
5343 Changed improper use of _() to ngettext().
5344 * src/extract.c: Renamed strip_path_option to strip_components_option
5345 * src/common.h: Likewise.
5347 * doc/tar.texi: Updated
5349 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5351 * src/system.c (sys_child_open_for_uncompress): Do not
5352 set read_full_records_option: the compressed archive is
5353 likely not to contain integer number of records. Should
5354 the user wish to use reblocking, he may always give tar
5355 -B option. This is a minor improvement over the change
5357 * src/buffer.c (open_archive): Removed assignment to
5358 read_full_records_option.
5360 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
5361 as the format argument, rather than a possibly-translated variable
5362 string. Patch provided by Jim Meyering <jim@meyering.net>
5363 * src/tar.c (decode_options): Fixed typo in the comment.
5364 * tests/star/README: Minor correction
5366 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5368 * directory: New file. GNU directory entry for tar.
5369 * doc/Makefile.am: Rewritten. Added rules for generating
5370 documentation for the project's website.
5371 * doc/.cvsignore: Updated
5372 * doc/index.html.in: New file.
5374 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5376 * configure.ac: Raised version number to 1.14
5378 * tests/after: Added copyleft statement
5379 * tests/before: Added copyleft statement
5380 * tests/preset.in: Added copyleft statement
5382 Tar 1.14 is released. Sources up to this point are tagged
5385 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5387 * configure.ac: Fixed prerequisite headers for sys/buf.h
5389 * src/system.h: Likewise.
5390 * tests/after (compare): Fixed argument quoting under eval
5391 * tests/before: Quote TAR_ARCHIVE_FORMATS
5393 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5398 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
5399 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
5400 the pathname of the rmt utility.
5401 New option --enable-backup-scripts.
5402 * doc/tar.texi: Updated
5403 * scripts/Makefile.am: Install the scripts only if requested
5405 * scripts/backup.in: Fixed --version output.
5406 Fixed initialization of the listing files and printing
5407 the time of the last previous level dump.
5408 * scripts/restore.in: Fixed --version output.
5409 * src/Makefile.am (localedir.h rule): Generate correct
5410 DEFAULT_RMT_COMMAND variable.
5411 * src/common.h (rmt_command_option): New variable.
5412 * src/list.c (read_and): Print block number before
5413 issuing 'Skipping to next header' diagnostics, if
5414 requested by block_number_option.
5415 * src/rtapelib.c: Use rmt_command_option instead of
5416 hardcoded "/etc/rmt".
5417 * src/tar.c: New option --rmt-command.
5418 (decode_options): Handle --rmt-command. Initialize
5419 rmt_command_option to DEFAULT_RMT_COMMAND.
5421 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5423 * doc/tar.texi: Further update.
5425 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5427 * configure.ac: Minor fix
5428 * scripts/Makefile.am: Updated
5429 * scripts/backup-specs: Updated
5430 * scripts/backup.in: Minor fixes
5431 * scripts/backup.sh: Removed
5432 * scripts/backup.sh.in: New file. Source for backup.sh
5433 * scripts/restore.in: New file
5434 * scripts/.cvsignore: Updated
5435 * scripts/WARNING: Removed
5436 * doc/tar.texi: Updated
5439 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5441 * src/names.c (name_gather): Bugfix: Honor single -C with
5443 * tests/same-order01.sh: New file
5444 * tests/same-order02.sh: New file
5445 * tests/Makefile.am: Updated
5447 * tests/append.sh: Added copyleft header
5448 * tests/delete01.sh: Likewise
5449 * tests/delete02.sh: Likewise
5450 * tests/delete04.sh: Likewise
5451 * tests/extrac01.sh: Likewise
5452 * tests/extrac02.sh: Likewise
5453 * tests/extrac03.sh: Likewise
5454 * tests/extrac04.sh: Likewise
5455 * tests/gzip.sh: Likewise
5456 * tests/ignfail.sh: Likewise
5457 * tests/incremen.sh: Likewise
5458 * tests/multiv01.sh: Likewise
5459 * tests/old.sh: Likewise
5460 * tests/options.sh: Likewise
5461 * tests/recurse.sh: Likewise
5462 * tests/version.sh: Likewise
5463 * tests/volume.sh: Likewise
5464 * tests/star/gtarfail.sh: Likewise
5465 * tests/star/gtarfail2.sh: Likewise
5466 * tests/star/multi-fail.sh: Likewise
5467 * tests/star/pax-big-10g.sh: Likewise
5468 * tests/star/qucktest.sh: Likewise
5469 * tests/star/ustar-big-2g.sh: Likewise
5470 * tests/star/ustar-big-8g.sh: Likewise
5472 * doc/.cvsignore: Updated
5474 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5476 * configure.ac: Check whether date accepts +format argument
5477 (for backup scripts).
5478 * scripts/level-0: Removed
5479 * scripts/level-1: Removed
5480 * scripts/weekly.new: Removed
5481 * scripts/dump-remind: Removed
5482 * scripts/backup.in: New file
5483 * scripts/backup.sh: New file
5484 * scripts/dump-remind.in: New file
5485 * scripts/backup-specs: Updated
5486 * scripts/Makefile.am: Updated for new directory contents.
5487 * scripts/.cvsignore: Updated
5489 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5492 * doc/tar.texi: Updated
5493 * src/tar.c: --utc implies -vv
5495 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5497 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
5498 does not define it if it fails to find iconv.h.
5500 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5502 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
5503 and parts of configure.ac
5504 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
5505 * lib/Makefile.am: Removed
5506 * lib/Makefile.tmpl: New file.
5507 * lib/.cvsignore: Updated
5508 * m4/.cvsignore: Updated
5509 * src/xheader.c: Include stpcpy.h
5511 * src/create.c: Produce an error, not warning, if the
5512 filename is too long.
5513 * tests/longv7.sh: Synchronized with the recent changes.
5515 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5517 * configure.ac: Fixed test for iconv_t
5518 * src/rmt.h: Bugfix by Jürgen Weigert
5519 * THANKS: Add Jürgen Weigert
5520 * tests/star/README: Fixed typo
5522 2004-04-04 Paul Eggert <eggert@twinsun.com>
5524 Merge getdate documentation changes from coreutils.
5526 * doc/getdate.texi: Update from coreutils CVS.
5527 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
5529 Merge recent gnulib changes, and remove some lint.
5531 Improve support for nanosecond-resolution time stamps.
5532 * bootstrap: Add gettime, timespec modules.
5533 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
5534 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
5536 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
5537 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
5538 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
5539 * src/common.h (newer_mtime_option): Now a struct timespec, not
5540 time_t. All uses changed.
5541 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
5542 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
5543 * src/incremen.c (scan_path): Likewise.
5544 * src/list.c (read_and): Likewise.
5545 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
5546 whether newer_mtime_option is initialized.
5547 * src/tar.c (decode_options): Likewise.
5548 * src/tar.c (decode_options): Adjust to new signature for get_date.
5550 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
5551 result of safe_read, full_write, and similar functions.
5552 Detect safe_read error by comparing to SAFE_READ_ERROR;
5553 detect full_write error by comparing to 0.
5555 * src/common.h (write_error_details, sys_write_archive_buffer):
5557 * src/misc.c (write_error_details): Likewise.
5558 * src/rmt.c (main): Likewise.
5559 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
5560 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
5561 * src/sparse.c (sparse_scan_file, sparse_dump_region,
5562 check_sparse_region, check_data_region): Likewise.
5563 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
5564 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
5565 * src/update.c (append_file): Likewise.
5567 * src/buffer.c (clear_read_error_count): Use explicit (void)
5568 to indicate a function with no arguments.
5569 * src/create.c (check_links): Likewise.
5570 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
5571 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
5572 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
5573 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
5575 * src/utf8.c (get_input_charset): Likewise.
5576 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
5577 xheader_decode_global, extended_header_init): Likewise.
5578 * tests/mksparse.c (usage): Likewise.
5580 * src/buffer.c (new_volume): Rename local variables to avoid
5582 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
5583 sparse_file_p, sparse_member_p, sparse_fixup_header,
5584 sparse_dump_file, sparce_extract_file, sparse_skip_file,
5585 sparse_diff_file): Likewise.
5586 * src/compare.c (diff_archive): Likewise.
5587 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
5588 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
5590 * src/extract.c (repair_delayed_set_stat): Likewise.
5591 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
5593 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
5594 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
5595 sparse_dump_file, sparse_file_p, sparse_member_p,
5596 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
5597 check_data_region, sparse_diff_file): Likewise.
5598 * src/system.c (sys_stat_nanoseconds): Likewise.
5599 * src/xheader.c (xheader_format_name): Likewise.
5601 * src/common.h (enum old_files): Remove comma before }; not portable.
5603 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
5604 * src/rmt.c (usage): Likewise.
5605 * src/xheader.c (xheader_set_single_keyword): Likewise.
5606 * tests/genfile.c (usage): Likewise.
5607 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
5610 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
5612 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
5613 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
5614 langtab.charset, charset_lookup): Likewise.
5616 * src/common.h (name_init): Remove unused args. All callers changed.
5617 * src/names.c (name_init): Likewise.
5619 * src/common.h (usage, xheader_write, xheader_write_global,
5620 sys_reset_uid_gid): New decls.
5622 * src/compare.c (report_difference, process_noop): Add
5623 __attribute__ ((unused)) for unused attributes.
5624 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
5626 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
5627 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
5628 path_coder, size_coder, uid_coder, uname_coder,
5629 sparse_numblocks_coder): Likewise.
5631 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
5632 dump_file0): Now static.
5633 * src/utf8.c (charset_lookup): Likewise.
5634 * src/xheader.c (xheader_protected_pattern_p,
5635 xheader_protected_keyword_p, xheader_set_single_keyword,
5636 xheader_keyword_deleted_p, xheader_keyword_override_p,
5637 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
5639 * tests/genfile.c (usage): Likewise.
5640 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
5643 * src/create.c (hash_link): Rewrite to avoid cast.
5645 * src/extract.c (file_newer_p): Use parameter, not global var.
5646 * src/misc.c (write_error_details): Likewise.
5648 * src/extract.c (prepare_to_extract): Remove directory arg; not
5649 used. All callers changed.
5651 * src/misc.c (close_fatal): Remove; not used.
5652 * src/system.c (sys_utimes): Likewise.
5654 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
5656 * src/rmt.c (main): Update copyright date to 2004.
5657 * src/tar.c (decode_options): Likewise.
5659 * src/rtapelib.c (get_status_string): Don't lose errno when
5660 skipping the error messages.
5661 (get_status): Report an error if atol returns a negative number.
5663 * src/utf8.c (struct langtab, langtab, charset_lookup,
5664 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
5666 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
5667 Use macros, not definitions, to avoid type clashes with system
5669 (charset_lookup): Local var is now auto, not static.
5670 (utf8_convert): Use ICONV_CONST instead of const, to avoid
5673 * src/utf8.c (langtab): Initialize all elements of struct, to
5675 * src/xheader.c (xhdr_tab): Likewise.
5677 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
5679 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
5681 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
5684 * configure.ac: Raised version number to 1.13.94
5685 * src/system.h: Protect inclusion of <sys/time.h>
5687 Declare time() if HAVE_DECL_TIME is 0
5688 * tests/.cvsignore: Added mksparse
5690 * tests/sparse01.sh: New file
5691 * tests/multiv02.sh: New file
5692 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
5693 * tests/longv7.sh: Added missing call to 'after'
5695 * src/common.h: Added missing prototypes
5696 * src/compare.c (diff_archive): Use is_sparse member
5697 instead of GNUTYPE_SPARSE.
5698 * src/create.c: Removed unused variables
5699 * src/extract.c (extract_archive): Use sparse_member_p instead
5701 Removed unused variables
5702 * src/list.c (decode_header): Use sparse_fixup_header to correct
5704 (print_header): Do not rely on GNUTYPE_SPARSE type.
5705 Use st->stat.st_size to print real file size.
5706 (skip_member): Assign stat_info.file_name to save_name. This fixes
5707 bug reported by Mads Martin Joergensen <mmj@suse.de>
5708 Use sparse_skip_file() to skip sparse members.
5709 * src/rtapelib.c: include "common.h"
5710 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
5711 (struct tar_sparse_optab.fixup_header): New member
5712 (tar_sparse_member_p): New function.
5713 (tar_sparse_init): Return true if decode_header is not provided
5714 (tar_sparse_fixup_header)
5715 (sparse_member_p,sparse_fixup_header)
5717 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
5718 (star_fixup_header, pax_sparse_member_p): New function
5719 (pax_decode_header): Remove
5720 * src/system.h: Include <sys/time.h> and <utime.h> when available
5721 * src/tar.c (usage): Prototype moved to common.h
5722 * src/tar.h (struct tar_stat_info.is_sparse): New member
5723 * src/utf8.c (utf8_convert): Changed prototype
5724 (get_input_charset): Removed unused variable
5725 * src/xheader.c: include <fnmatch.h>
5726 (size_decoder): Assign to both st->archive_file_size and
5728 (st->stat.st_size): Assign to st->stat.st_size
5729 (sparse_numbytes_decoder): Removed unused variable
5730 * src/.cvsignore: Added .gdbinit
5731 * THANKS: Added Mads Martin Joergensen
5733 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5735 * src/create.c (write_long_name): Do not allow more than
5736 NAME_FIELD_SIZE-1 characters in a file name for V7 format
5738 * tests/longv7.sh: New file.
5739 * tests/Makefile.am: Add longv7.sh
5741 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5743 * src/buffer.c (open_archive): Clear read_full_records_option
5744 if reading from a pipe.
5745 (short_read): Display warning about the deduced record size
5747 * tests/star/pax-big-10g.sh: Updated to match the above changes.
5748 * tests/star/ustar-big-2g.sh: Likewise.
5749 * tests/star/ustar-big-8g.sh: Likewise.
5751 * configure.ac: Added gl_FUNC_STRTOULL
5752 * src/create.c (start_header): Check for GNU_FORMAT
5753 if incremental_option is set.
5754 * src/xheader.c (to_decimal): New function.
5755 (xheader_format_name): Use to_decimal() instead of snprintf.
5756 * tests/listed01.sh: Use genfile instead of dd
5757 * tests/multiv01.sh: Likewise.
5759 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5761 * src/list.c (read_and): Stop processing the archive after
5762 encountering a single zero record. Many old archives contain
5763 arbitrary garbage after it.
5764 The warning is issued anyway.
5766 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5768 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
5769 conversion buffer was not null terminated. Fix provided
5770 by Leland Lucius <llucius@tiny.net>
5771 * THANKS: Added Leland Lucius
5772 * src/utf8.c (utf8_convert): Indentation fix.
5774 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5776 * src/buffer.c (flush_read): Bugfix: the
5777 condition at line 714 included
5779 || (status > 0 && !read_full_records_option)
5781 which is grossly wrong, since even if new_volume() below succeeds,
5782 the subsequent call to rmtread will overwrite the chunk of data
5783 already read in the buffer and thus spoil everything.
5784 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
5786 * tests/star/multi-fail.sh: New test.
5787 * tests/Makefile.am: Added multi-fail.sh
5788 * tests/star/README: Updated
5790 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5793 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
5794 * src/common.h (utc_option): new global
5795 (enum old_files.KEEP_NEWER_FILES): New element
5796 * src/extract.c: Handle --keep-newer-files option
5797 * src/list.c (tartime): Print UTC if --utc was given.
5798 * src/tar.c: New options: --utc and keep-newer-files
5800 * tests/Makefile.am: Added new tests
5801 * tests/after: Rewritten
5802 * tests/before: Rewritten
5803 * tests/preset.in: Rewritten
5804 * tests/delete03.sh: Accommodate for the new testsuite logic
5805 * tests/gzip.sh: Likewise
5806 * tests/incremen.sh: Likewise
5807 * tests/listed01.sh: Likewise
5808 * tests/multiv01.sh: Likewise
5809 * tests/old.sh: Likewise
5810 * tests/options.sh: Likewise
5811 * tests/version.sh: Likewise
5812 * tests/volume.sh: Likewise
5814 * tests/star: New directory
5815 * tests/star/README: New file
5816 * tests/star/gtarfail.sh: New file
5817 * tests/star/gtarfail2.sh: New file
5818 * tests/star/pax-big-10g.sh: New file
5819 * tests/star/qucktest.sh: New file
5820 * tests/star/ustar-big-2g.sh: New file
5821 * tests/star/ustar-big-8g.sh: New file
5823 2004-02-26 Paul Eggert <eggert@twinsun.com>
5825 * doc/tar.texi (dircategory Individual utilities): Append period,
5826 as suggested by Karl Berry.
5828 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5830 * src/list.c (decode_header): Call xheader_decode before
5831 the assignment to current_stat_info.archive_file_size.
5833 2004-02-23 Paul Eggert <eggert@twinsun.com>
5835 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
5837 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5842 * tests/before: Move testing of the prerequisite archive formats
5843 to the separate function 'prereq'. Do not expect any arguments
5844 * tests/delete03.sh: Use prereq() instead of passing arguments
5846 * tests/incremen.sh: Likewise.
5847 * tests/listed01.sh: Likewise.
5848 * tests/multiv01.sh: Likewise.
5850 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5852 Added UTF-8 support. Finished global extended header
5856 * configure.ac: Detect libiconv
5857 * src/utf8.c: New file. Conversions to and from utf-8.
5858 * src/Makefile.am: Added utf8.c
5859 * src/create.c (write_header_name) In pax format, use
5860 "path" keyword if the file name is not ASCII
5861 (start_header): Likewise for uname and gname.
5862 * src/list.c: Decode encountered global headers.
5863 * src/xheader.c: Use keywords from the global
5865 Correctly handle UTF-8 conversions.
5866 (xheader_list_destroy): New function.
5867 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
5868 missing gettext markers
5869 (decode_record): Rewritten using caller-provided handler and
5871 * tests/listed01.sh: Give credit to Andreas Schuldei.
5873 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5875 * src/create.c (dump_file0): The conditional at line
5876 1296 prevented incremental backups on individual files
5877 from working, as reported by Andreas Schuldei
5878 <andreas@schuldei.org>.
5880 This is due to the condition
5882 (0 < top_level || !incremental_option)
5884 Removing it makes incremental backups work for individual
5885 files as well as for directories. On the other hand, it does
5886 not affect other functionality, as shown by the reasoning below:
5888 To begin with, the two parts of this condition are mutually
5889 superfluous, because
5891 1) when top_level < 0, incremental_option == 1
5892 so the condition yields false
5893 2) when top_level >= 0, incremental_option == 0
5894 so the condition yields true.
5896 In other words, it is completely equivalent to
5898 (!incremental_option)
5900 Now, let's consider the effect of its removal. There are two cases:
5902 1) when incremental_option==1
5903 This means incremental backup in progress. In this case dump_file
5904 is invoked only for directories or for files marked with 'Y' by
5905 get_directory_contents. The latter are those that did not meet the
5906 condition in incremen.c:242, which is exactly the same condition
5907 as this at create.c:1296. So, for these files the check
5908 (!incremental_option) is useless, since the rest of the
5909 conditional will yield false anyway. On the other hand, if
5910 dump_file is invoked on a directory, the conditional will yield
5911 false due to !S_ISDIR assertion, so these will be processed as usual.
5913 Thus, for this case the extra condition (!incremental_option) is
5914 irrelevant, and its removal won't alter the behavior of tar,
5915 *except* that it will enable incremental backups on individual
5916 files, which is the wanted effect.
5918 2) when incremental_option==0
5919 In this case the condition yields true and its removal does not
5920 affect the functionality.
5923 * configure.ac: Raised patchlevel to 93
5924 * src/incremen.c: Minor stylistic fixes.
5925 * tests/listed01.sh: New test. Check listed incremental
5926 backups on individual files.
5927 * tests/Makefile.am: Added listed01.sh
5929 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5931 * src/common.h (simple_finish_header,start_private_header): New
5933 (xheader_ghdr_name): Changed declaration
5934 * src/create.c (start_private_header): Removed static qualifier.
5935 (write_extended): Removed superfluous last argument. Use
5937 (simple_finish_header): New function.
5938 (finish_header): Use simple_finish_header() to break recursive
5939 dependency between this function and write_extended().
5940 * src/tar.c (assert_format): Do not bail out if several
5941 --format arguments are given. This is a common case when
5942 TAR_OPTIONS are used.
5943 (decode_options): New option --show-defaults displays the
5944 compiled-in defaults.
5945 Use POSIX format if no --format option was given and
5946 --pax-option was specified.
5947 Do not allow to use --pax-option unless the archive format is
5948 set to POSIX (or reading subcommand is requested).
5950 * src/update.c (update_archive): Write global extended header if
5952 * src/xheader.c (xheader_format_name): Bugfix.
5953 (xheader_xhdr_name): Changed the default extended header name
5954 to '%d/PaxHeaders.%p/%f', as POSIX requires.
5955 (xheader_ghdr_name): Removed unused argument.
5956 (xheader_write,xheader_write_global): New function.
5957 (xheader_decode): Modified to honor overrides whatever
5958 the current archive format is.
5960 * src/delete.c (delete_archive_members): Call xheader_decode
5962 * src/list.c (decode_header): Likewise.
5963 * src/incremen.c (sort_obstack): Fixed typo in the comment
5965 * doc/tar.texi: Document new default for extended
5968 * tests/before: Accept an optional list of allowed archive
5969 formats. Exit with the status 77 if the current archive
5970 format does not match any of them.
5971 * tests/delete03.sh: Require gnu, oldgnu or posix format
5972 * tests/incremen.sh: Require gnu or oldgnu format
5973 * tests/multiv01.sh: Likewise
5975 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5977 * doc/tar.texi (Option Summary): Documented --pax-option
5978 * src/tar.c: Likewise.
5980 * src/create.c (to_chars): Added a comment.
5981 * src/tar.h: Comment to GNU_FORMAT
5983 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
5986 * configure.ac: Added stpcpy
5987 * bootstrap: Likewise
5988 * lib/Makefile.am: Likewise
5989 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
5991 * src/create.c (write_extended): Call xheader_xhdr_name
5992 instead of using hardcoded "././@PaxHeader" name.
5993 * src/tar.c: New option --pax-option (equivalent to -o option
5995 * src/xheader.c: Implement pax -o option. Fixed misleading
5996 heading comment (introduced 2003-09-02).
5997 * src/incremen.c: Minor fixes
5998 * m4/.cvsignore: Updated
6000 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6002 * src/incremen.c: Removed accumulator stuff in favor of obstack.
6003 (get_directory_contents): Split into two functions
6004 * src/update.c: Minor changes
6005 * doc/tar.texi: Fixed typo
6007 2004-02-15 Paul Eggert <eggert@twinsun.com>
6009 Fix Debian bug 230872, originally reported by Jeff King in
6010 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
6012 * doc/tar.texi (posix compliance): Remove. The whole section
6013 was a misunderstanding of what POSIXLY_CORRECT is supposed to
6014 mean. The GNU Coding Standards says that POSIXLY_CORRECT
6015 is for disabling extensions that are incompatible with POSIX:
6016 it is not for disabling compatible extensions. All references
6017 to this section removed.
6018 (posix): This format is created only if the posix format is
6019 specified; it is no longer created if gnu format is specified
6020 and POSIXLY_CORRECT is set.
6021 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
6022 POSIX does not specify the behavior of tar, so we should
6023 not worry about POSIXLY_CORRECT here.
6025 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6027 * Makefile.am: Removed m4
6028 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
6030 * README-alpha: Updated
6031 * bootstrap: Updated TP URL, improved help output. Default
6032 to :ext:anoncvs and set CVS_RSH, unless already set.
6033 * m4/Makefile.am: Removed
6035 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6037 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
6038 Use $option instead of $1 so all options will be parsed.
6040 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6042 Started rewriting buffer.c ...
6044 * bootstrap: New option --no-po
6045 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
6046 (time_to_start_writing): Changed data type
6047 (file_to_switch_to): Removed. Variable never assigned to.
6048 (open_archive) Moved option compatibility checks to tar.c
6049 Other minor changes.
6050 * src/common.h (maybe_backup_file): Changed return type
6051 * src/misc.c: Likewise.
6052 * src/create.c: Updated invocations of safer_name_suffix
6053 * src/extract.c: Likewise
6054 * src/delete.c: Updated assignment to write_archive_to_stdout
6055 * src/tar.c (decode_options): More option compatibility checks
6056 (moved from buffer.c)
6057 * src/update.c (time_to_start_writing): Changed data type.
6058 * tests/recurse.sh: New test case.
6059 * tests/mksparse.c: New file.
6060 * tests/Makefile.am: Added recurse.sh and mksparse.c
6062 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6064 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
6065 Martin Simmons for the patch.
6066 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
6067 <pius@pld-linux.org> for the patch.
6069 2003-12-26 Paul Eggert <eggert@twinsun.com>
6071 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
6072 and translation website.
6074 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
6075 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
6076 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
6077 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
6078 files are replaced by autoreconf. Also, there seems to be a bug
6079 in gettext/autoconf/automake if we try to omit these files after
6080 autoreconf has replaced them, even though the gettext manual says
6081 they're optional. So give up and just include them for now, even
6082 though they make 'configure' longer and slower.
6084 Change translation URL from
6085 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
6086 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
6087 accommodate translator website revamp.
6089 Fail if autoreconf fails.
6091 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
6092 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
6093 ignore files now supplied by gettext 0.13.1.
6095 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6097 Synchronized with the backup repository on Mirddin
6099 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6101 * configure.ac: Check for varios members of struct stat
6102 that may represent file modification times with a subsecond
6104 Check for utimes (for future use)
6105 * src/buffer.c (short_read): Issue a warning on short reads.
6106 * src/common.h (sys_stat_nanoseconds): New function
6107 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
6108 * src/list.c (read_and): Treat only two successive zero
6109 filled blocks as an EOF indicator. Issue a warning if
6110 a single one is encountered.
6111 * src/system.c (sys_stat_nanoseconds): New function
6112 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
6114 * src/xheader.c (code_time,decode_time): Support for subsecond
6116 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
6117 (mtime_coder,mtime_decoder): Update invocations of code_time and
6119 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
6120 (sparse_numblocks_decoder,sparse_offset_decoder)
6121 (sparse_numbytes_decoder): Updated
6123 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6125 * src/names.c (safer_name_suffix): Reverted change made
6126 2003-11-14. Reason: Discussion with Paul Eggert and
6127 Jean-Louis Martineau. See also ChangeLog entry from
6129 * tests/delete03.sh: Likewise.
6130 * tests/extrac04.sh: Likewise.
6131 * tests/multiv01.sh: Likewise.
6133 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6135 * src/incremen.c (write_directory_file): Use sys_truncate
6136 * src/list.c (print_header): Use archive_file_size member
6137 when printing real file size.
6138 * src/sparse.c (sparse_scan_file): Correctly handle files with
6140 (sparse_dump_region,sparse_extract_region): Allow for zero size
6143 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6145 * configure.ac: Raised version number to 1.13.92
6146 * src/list.c (decode_header): Discern between pax and ustar
6148 Initialize current_stat_info.archive_file_size.
6150 NOTE: Modifications from this date on are temporarily
6151 stored on local CVS on mirddin. This repository will
6152 be synchronized with Savannah as soon as the latter
6153 becomes operational again.
6155 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6158 * src/sparse.c: Initial implementation of GNU/pax sparse
6160 * src/common.h (xheader_store): Changed prototype.
6161 * src/create.c: Update calls to xheader_store
6162 * src/extract.c (extract_archive): Check reported size vs.
6163 archive file size to determine if we have to do with a
6165 * src/tar.c (usage): Cleaned up the sample argument to --newer
6167 (decode_options): Allow --sparse for POSIX_FORMAT archives.
6168 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
6170 Implemented GNU.sparse.* keywords.
6172 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6174 * configure.ac: Check for setlocale. Thanks Bruno Haible for
6177 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6179 * src/create.c (write_gnu_long_link): Use oldgnu
6180 magic with @LongLink blocks.
6182 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6184 * src/tar.h: Support for star sparse format.
6185 * src/sparse.c: Likewise.
6187 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6189 * src/sparse.c (sparse_diff_file): New function
6190 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
6191 (sys_compare_uid_gid): Removed.
6192 (sys_compare_links,report_difference): Changed prototype
6193 (sparse_diff_file): New function
6194 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
6195 (sys_compare_uid_gid): Removed.
6196 (sys_compare_links): Changed declaration
6197 * src/compare.c (diff_archive): Use sparse_diff_file.
6199 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6201 Rewritten sparse file handling.
6203 * src/sparse.c: New file. Provides a universal framework
6204 for various methods for sparse files handling.
6205 * src/Makefile.am: Added sparse.c
6206 * src/common.h (struct sp_array,sparsearray,sp_array_size)
6207 (init_sparsearray,fill_in_sparse_array): Removed
6208 (enum dump_status): New data type
6209 (pad_archive,close_diag,open_diag,read_diag_details)
6210 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
6212 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
6214 (print_header): Changed prototype declaration.
6215 * src/tar.h (struct sp_array): Declaration from common.h
6216 (struct tar_stat_info): New members archive_file_size,
6217 sparse_map_avail,sparse_map.
6218 * src/create.c: Major rewrite.
6219 * src/extract.c: Use new sparse file interface.
6220 * src/compare.c (diff_sparse_files): Temporary placeholder.
6222 * src/buffer.c: Minor changes
6223 * src/tar.c: Likewise.
6224 * src/list.c: Likewise.
6225 * src/misc.c (close_diag,open_diag,read_diag_details)
6226 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
6227 diagnostics functions.
6228 * src/incremen.c: Use new diagnostics functions.
6229 * src/names.c: Likewise.
6231 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6233 * configure.ac: Fixed check for setsockopt
6235 * src/create.c: Do not zero-terminate name field if
6236 the name is exactly 100 characters long.
6237 (write_ustar_long_name): Fixed cheking for unsplittable
6240 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6242 * src/create.c (start_header): Removed debugging hook
6243 (dump_file): Fixed handling of linkname field.
6244 * src/names.c (safer_name_suffix): If the input
6245 file name ends with a slash, output one should do so
6247 * doc/tar.texi: Documented --format=ustar
6249 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6251 * src/tar.h (archive_format): USTAR_FORMAT: New type.
6252 * src/create.c: Added POSIX.1-1988 support.
6253 * src/names.c (safer_name_suffix): Skip leading ./
6254 * src/tar.c: New option --format=ustar forces
6255 POSIX.1-1988 archive format.
6256 * tests/delete03.sh: Updated.
6257 * tests/extrac04.sh: Updated.
6258 * tests/multiv01.sh: Updated.
6260 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6262 * src/list.c (read_and): Initialize current_stat_info
6263 and extended_header at the start of the loop.
6264 * src/names.c (all_names_found): Check if the argument
6265 contains valid filename. Fixes coredump on `not_a_tar_file'
6266 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
6267 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
6268 Fixes `pax-big-10g' bug.
6270 2003-11-12 Paul Eggert <eggert@twinsun.com>
6272 Fix some C compatibility bugs reported by Joerg Schilling.
6274 * src/common.h (stripped_prefix_len): Fix misspelling
6275 "stripped_path_len" in declaration.
6276 * src/rmt.c (main): Use "return FOO;" rather than
6277 "exit (FOO);"; we no longer have to worry about
6278 pre-ANSI hosts that mishandled returned values from "main".
6279 * src/tar.c (main): Likewise. This avoids warnings on some
6281 * src/system.c: Include signal.h, for 'kill'.
6282 * src/system.h (DEV_BSIZE): Remove.
6283 (DEFAULT_ST_BLKSIZE): New macro.
6284 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
6285 * src/tar.c (enum): Remove comma just before }.
6287 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6289 * src/list.c (decode_header): Initialize st_atime and
6292 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6294 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
6295 Bunk <bunk@fs.tum.de> for reporting.
6296 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
6297 <martin@xemacs.org> for spotting.
6299 2003-11-04 Paul Eggert <eggert@twinsun.com>
6301 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
6304 2003-10-26 Paul Eggert <eggert@twinsun.com>
6306 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
6307 Bug reported by Christian Weisgerber.
6309 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6313 * src/tar.c (decode_options): Removed superfluous archive format
6315 * doc/tar.texi: Documented new features.
6317 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6320 * THANKS: Added Wojciech Polak
6321 * configure.ac: Added checks for missing functions. Raised
6322 version number to indicate alpha release.
6323 * lib/Makefile.am: Added missing headers
6324 * lib/waitpid.c: Added missing includes.
6325 * src/extract.c: Likewise.
6326 * src/names.c: Removed spurious includes.
6327 * src/xheader.c: Likewise.
6328 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
6329 macro overriding broken mkdir prototypes.
6331 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6333 * configure.ac: Check for dev_t and ino_t.
6334 * m4/Makefile.am: Added missing files.
6335 * src/system.c: New file.
6336 * src/Makefile.am: Added system.c
6337 * src/common.h: Prototypes for functions from system.c
6338 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
6339 * src/buffer.c: Moved system dependencies to system.c
6340 * src/compare.c: Likewise.
6341 * src/create.c: Likewise.
6342 * src/delete.c: Likewise.
6343 * src/extract.c: Likewise.
6344 * src/rtapelib.c: Likewise.
6346 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6348 Implemented --occurrence option.
6351 * src/tar.c: New option --occurrence.
6352 * src/common.h (occurrence_option): New global
6353 (struct name): Changed `found' member to `uintmax_t
6355 (names_done): Removed
6356 (all_names_found): Changed prototype.
6357 (ISFOUND,WASFOUND): New macros
6358 * src/delete.c (delete_archive_members): Honor --occurrence
6360 * src/list.c (read_and): Likewise.
6361 * src/names.c: Count number of occurrences of each name in the
6363 (name_match): Honor --occurrence option.
6364 (names_done): Removed
6365 (all_names_found,names_notfound): Rewritten.
6367 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6369 * src/tar.c: Removed extra precaution regarding
6370 subcommand_option == CAT_SUBCOMMAND
6371 * lib/Makefile.am: Updated
6373 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6375 * src/common.h (names_done): New function.
6376 * src/names.c: Likewise.
6377 * src/list.c (read_and): Use all_names_found() as `while'
6379 * src/tar.c: New option --first-copy
6382 2003-09-24 Paul Eggert <eggert@twinsun.com>
6384 * src/rmt.c (main): Don't translate Copyright string; international
6385 law says the word "Copyright" should be in English.
6386 * src/tar.c (decode_options): Likewise.
6388 2003-09-22 Paul Eggert <eggert@twinsun.com>
6390 * doc/tar.texi (extracting untrusted archives): New section.
6392 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
6393 Return size_t, not pointer, so that we don't have to worry about
6394 violating the C standard by converting char const * to char *.
6395 All callers changed.
6396 * src/names.c (stripped_path_len): Likewise. Strip file system
6397 prefix, too. Count adjacent slashes as if they were one slash;
6398 that is the POSIX standard.
6400 2003-09-17 Paul Eggert <eggert@twinsun.com>
6402 * README-alpha: Document maintainer tool assumptions a bit. GNU
6403 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
6404 Debian bug 211447. Fix minor misspellings/whitespace nits.
6406 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
6407 gl_USE_SYSTEM_EXTENSIONS.
6409 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
6410 * m4/.cvsignore: Add restrict.m4, time_r.m4.
6412 2003-09-17 Paul Eggert <eggert@twinsun.com>
6414 * bootstrap: Don't use "for option; do";
6415 Solaris 8 /bin/sh doesn't like that.
6417 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6419 * README-alpha: Updated
6420 * bootstrap: Updated
6422 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6424 * README-alpha: Updated
6425 * bootstrap: Updated
6426 * po/POTFILES.in: Added src/xheader.c
6427 * src/common.h (cut_path_elements): Added proto.
6429 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6431 * src/buffer.c: Use ngettext where appropriate.
6432 * src/compare.c: Likewise.
6433 * src/create.c: Likewise.
6434 * src/misc.c: Likewise.
6435 * src/tar.c: Likewise.
6436 * src/update.c: Likewise.
6438 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6440 * .cvsignore: Added *.shar.gz
6443 * src/common.h (strip_path_elements): New variable.
6444 * src/extract.c (extract_archive): Implemented --strip-path
6445 * src/names.c (cut_path_elements): New function.
6446 * src/tar.c: New option --strip-path=NUM.
6447 (decode_options) Assign boolean values to bool variables.
6449 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6451 * src/delete.c: Fixed deletion from the POSIX archives.
6452 * src/list.c (read_header): Minor change.
6453 * src/tar.c (main): Do not check for volume_label_option
6454 if subcommand_option is not CREATE_SUBCOMMAND.
6455 * src/xheader.c (xheader_decode): Store the header as
6456 well (for eventual delete).
6458 * tests/incremen.sh: Explicitly request GNU format. This will
6459 disappear when GNU extended header keywords are working.
6460 * tests/multiv01.sh: Likewise
6461 * tests/volume.sh: Likewise
6463 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6465 * src/create.c: Support for "linkpath" extended keyword.
6466 * src/xheader.c (decode_record): Reversed the return
6469 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6471 * configure.ac: Allow to redefine the default output format.
6472 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
6473 (archive_format_string): New function.
6474 (usage): Updated help output.
6479 2003-09-02 Paul Eggert <eggert@twinsun.com>
6481 * src/common.h (destroy_stat, xheader_decode, xheader_store,
6482 xheader_read, xheader_finish, xheader_destroy): Add decls;
6485 * src/create.c (write_extended): Remove unused local 'bufsize'.
6487 * src/delete.c (delete_archive_members): Handle case of
6488 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
6489 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
6490 occurs, as it's not possible.
6491 * src/update.c (update_archive): Likewise.
6493 Use "const" when possible in new code.
6494 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
6495 (fmttab): Now const. All uses changed.
6496 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
6497 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
6498 decode_record, xheader_store, xheader_print, code_string, code_time,
6499 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
6500 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
6501 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
6502 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
6503 uid_coder, uid_decoder, uname_coder, uname_decoder):
6504 Use pointers to const when possible.
6505 (xhdr_tab): Now const.
6507 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
6508 (set_archive_format): Report an error if no format name matches,
6509 instead of returning an undefined value.
6511 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
6512 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
6513 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
6514 uid_decoder, uname_decoder): Remove unused keyword arg.
6517 * src/tar.c (set_archive_format): Now static.
6518 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
6520 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
6521 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
6522 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
6523 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
6524 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
6525 Remove forward decls; no longer needed.
6526 (xhdr_tab): Move to end, so that the forward decls aren't needed.
6527 Add a forward declaration.
6529 Use 'bool' in new code, when appropriate.
6530 * src/xheader.c (decode_record): Return bool, not int.
6531 * src/common.h (read_header): Since it accepts bool, change
6532 all callers to use false and true rather than 0 and 1.
6534 * src/xheader.c (decode_record): Fix misspelling in diagnostic
6535 "extended headed" -> "extended header".
6537 GNU coding style fixes.
6538 * src/xheader.c (decode_record, xheader_decode):
6539 Do not use decls like "char *p, *q;".
6542 (xheader_store): Avoid parentheses around object operand of sizeof.
6544 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6546 * src/create.c (start_header): Store long file names
6547 in "path" keyword of an extended header if in POSIX
6549 (finish_header): print header before calling write_extended().
6550 * src/list.c (list_archive): Always decode the header. This
6551 is necessary so the extended header is processed and the correct
6552 filename is printed no matter what the state of verbose_option.
6553 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
6554 for the time being).
6556 2003-09-01 Paul Eggert <eggert@twinsun.com>
6558 Update from gnulib, and correct fnmatch to fnmatch-gnu.
6559 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
6561 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
6563 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
6564 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
6565 copying rules from gnulib module descriptions.
6566 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
6567 Update from gnulib modules alloca, fnmatch, getline, stdbool.
6568 * m4/.cvsignore: Add utimes-null.m4. Sort.
6570 2003-09-01 Sergey Poznyakoff
6572 Added initial support for creating POSIX headers.
6574 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
6575 (string_to_chars): New functions
6576 (struct xheader): Changed structure
6577 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
6579 * src/create.c (string_to_chars): New function.
6580 (write_extended): New function
6581 (start_header): Create extended POSIX headers if necessary.
6582 (finish_header): Likewise.
6583 * src/list.c (print_header): Take user/group from
6585 * src/names.c (gid_to_gname,gname_to_gid)
6586 (uid_to_uname,uname_to_uid): Changed prototypes.
6587 * src/tar.c: New option --format.
6588 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
6589 (struct extra_header): Removed unused structure.
6590 (union block.extra_header): Removed unused member.
6591 * src/xheader.c: Implemented coder functions.
6592 * bootstrap: Added obstack.
6593 * lib/.cvsignore: Likewise.
6594 * configure.ac: Added 'gl_OBSTACK'
6595 * m4/Makefile.am: Added new files.
6596 * m4/.cvsignore: Likewise.
6597 * TODO: Minor formatting change
6599 2003-08-31 Sergey Poznyakoff
6601 Added initial support for POSIX extended and STAR headers
6602 (only for listing/extracting).
6604 * src/xheader.c: New file.
6605 * src/Makefile.am: Added xheader.c
6606 * src/tar.h (struct star_header): New datatype
6607 (XHDTYPE,XGLTYPE): New defines
6608 (enum archive_format:STAR_FORMAT): New member
6609 (struct tar_stat_info): New datatype.
6610 (union block.star_header): New member.
6611 * src/common.h (orig_file_name,current_file_name)
6612 (current_trailing_slash,current_link_name): Removed variables.
6613 (current_stat_info): New variable
6614 (current_stat): Removed
6615 (extended_header): New variable
6616 (decode_header): Changed prototype.
6617 * src/list.c (decode_header): Added initial support for POSIX extended
6619 (skip_member): Check oldgnu_header only if current_format is set
6621 * src/buffer.c: Use current_stat_info
6622 * src/compare.c: Likewise.
6623 * src/create.c: Likewise.
6624 * src/delete.c: Likewise.
6625 * src/incremen.c: Likewise.
6626 * src/mangle.c: Likewise.
6627 * src/update.c: Likewise.
6628 * src/extract.c: Likewise.
6629 (make_directories): Improved check for the existence of the directory
6630 * src/tar.c (destroy_stat): New function.
6632 2003-08-29 Paul Eggert <eggert@twinsun.com>
6634 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
6635 was worth (e.g., different users in en_GB disagree about -ize
6637 * po/en_GB.po: Remove.
6639 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6643 * src/tar.c: Removed support for the obsolete command line
6645 * doc/tar.texi: Removed references to the obsolete command
6648 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6652 * doc/tar.texi: Updated
6653 * src/common.h (check_links_option): New variable
6654 (orig_file_name): New variable
6655 (check_links): New proto.
6656 * src/create.c (struct link.nlink): New member
6657 (link_table): Static for the module.
6658 (dump_file): Update `link' member when adding new links
6660 (check_links): New function.
6661 * src/list.c (print_header): Use orig_file_name.
6662 * src/tar.c: New option --check-links. Changed semantics of
6663 -o to comply to UNIX98 when extracting and to its previous
6664 semantics otherwise.
6665 (main): Call check_links if --check-links. was given.
6667 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6669 * src/list.c (print_header): Revised
6670 * NEWS: Started the entry for 1.13.26
6671 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
6673 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
6675 * .cvsignore: Added to the repository.
6676 * doc/.cvsignore: Likewise.
6677 * lib/.cvsignore: Likewise.
6678 * m4/.cvsignore: Likewise.
6679 * po/.cvsignore: Likewise.
6680 * scripts/.cvsignore: Likewise.
6681 * src/.cvsignore: Likewise.
6682 * tests/.cvsignore: Likewise.
6684 * lib/Makefile.am: Added exitfail.[hc]
6685 * src/misc.c (chdir_do): Fixed call to restore_cwd
6686 * src/buffer.c (flush_read): Fixed behavior on short
6687 reads right after opening the new archive (multiv01.sh test).
6688 (new_volume): Special handling for "-".
6689 * src/list.c (print_header): Print trailing slash if
6690 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
6691 * tests/multiv01.sh: Minor changes.
6692 * m4/Makefile.am: Added missing files.
6694 2003-07-05 Paul Eggert <eggert@twinsun.com>
6696 Finish the checkin begin yesterday.
6698 * NEWS: Document the user-visible changes installed in the last
6701 * TODO: New file (actually, resurrected; but with new contents).
6703 * src/list.c (read_and): Give full type for procedure arg.
6704 (read_header): Strip trailing slashes, setting current_trailing_slash.
6705 (tartime): Avoid int overflow when printing year (!).
6706 (print_header): New arg specifying block ordinal. All uses changed.
6707 Print link as 'h' type. Give labels for long links and names.
6709 * src/misc.c (contains_dot_dot): Moved to names.c
6710 (must_be_dot_or_slash): New function.
6711 (safer_rmdir): Use it.
6712 (remove_any_file): Now takes enum as option, not boolean.
6713 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
6714 to unlink a directory.
6715 (deref_stat): Accept bool, not int.
6717 * src/names.c (namelist_match): Allow partial matches only if
6719 (hash_string_hasher): Renamed from hash_avoided_name.
6720 (hash_string_compare): Renamed from compare_avoided_anames.
6721 (hash_string_insert, hash_string_lookup): New functions.
6722 (add_avoided_name, is_avoided_name): Use them.
6723 (safer_name_suffix): New function.
6724 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
6726 * src/rmt.c: Don't include print-copyr.h.
6727 (prepare_input_buffer): New arg FD.
6728 Do not read more than INT_MAX bytes at once,
6729 since it breaks on some brain damaged Tru64 hosts.
6731 when retrying instead of subtracting 1024; for speed.
6732 (main): Use gettext to translate (C), not print_copyright.
6734 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
6735 now that gnulib handles this.
6736 Include <stddef.h> and <limits.h> unconditionally, now that we assume
6738 Assume that offsetof is defined in stddef.h.
6739 Do not include <sys/param.h>.
6740 (realloc, lseek): Do not declare.
6741 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
6742 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
6743 declarations, since we now assume C89 or better.
6744 (PARAMS): Remove, as we now assume C89. All uses changed.
6745 (bindtextdomain, textdomain): Include <gettext.h> to define.
6746 Include <unlocked-io.h>.
6747 (valloc): Define if not defined, and if valloc is not declared.
6748 (xstrdup): Remove decl.
6750 * src/tar.c: Do not include <print-copyr.h>.
6751 Include <getdate.h>.
6752 (get_date): Remove decl.
6753 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
6754 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
6755 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
6756 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
6757 (long_options, decode_options): Use them.
6758 (OVERWRITE_DIR_OPTION): Remove.
6759 (long_options): New options --index-file, --no-overwrite-dir.
6760 Remove --overwrite-dir option.
6761 (usage): Use PACKAGE_BUGREPORT.
6762 (decode_options): Terminate new argv properly.
6763 Use PACKAGE_NAME, PACKAGE_VERSION.
6764 If verbose, report how we grokked any textual date option.
6765 (main): Add support for index-file.
6767 * tests/Makefile.am: Convert to UTF-8.
6768 (AUTOMAKE_OPTIONS): Remove.
6769 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
6770 (INCLUDES): Remove ../intl.
6771 (LDADD): Don't link libtar.a twice.
6773 * tests/genfile.c: Convert to UTF-8.
6774 Don't include <print-copyr.h>.
6775 (DEFAULT_PATTERN): Renamed from DEFAULT.
6776 (ZEROS_PATTERN): Renamed from ZEROS.
6777 (main): Use gettext to translate (C), not print_copyright.
6779 2003-07-04 Paul Eggert <eggert@twinsun.com>
6781 Revamp to meet current standards of autoconf, automake,
6782 gettext, and gnulib, and incorporate new translations.
6784 * config/config.guess, config/config.sub, config/depcomp,
6785 config/install-sh, config/mdate-sh, config/missing,
6786 config/mkinstalldirs, config/texinfo.texi:
6787 Moved here from parent directory, or from doc.
6788 * config.hin: Renamed from config.h.in.
6789 * config/config.rpath: New file.
6791 * intl: Remove this subdirectory.
6793 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
6795 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
6796 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
6797 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
6798 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
6799 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
6800 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
6803 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
6804 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
6805 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
6806 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
6807 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
6808 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
6809 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
6810 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
6811 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
6812 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
6813 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
6814 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
6815 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
6816 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
6817 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
6818 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
6819 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
6820 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
6821 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
6823 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
6824 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
6825 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
6826 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
6827 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
6828 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
6829 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
6830 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
6831 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
6832 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
6833 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
6834 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
6835 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
6836 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
6837 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
6838 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
6839 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
6840 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
6842 Upgrade to latest version from external source. The file "bootstrap"
6843 now grabs these automatically, so we needn't keep track of them
6844 in this change long any longer.
6846 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
6847 (SUBDIRS): Remove intl.
6848 * PORTS: Update for star, Macintosh.
6849 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
6850 Bison 1.875, gettext 0.12.1.
6851 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
6852 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
6853 (AC_CONFIG_AUX_DIR): New.
6854 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
6856 (AC_PREREQ): Bump from 2.52 to 2.57.
6857 (AC_GNU_SOURCE): New.
6858 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
6859 we no longer support K&R C.
6861 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
6862 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
6863 (AC_MBSTATE_T): Remove.
6864 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
6865 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
6866 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
6867 (AM_STDBOOL_H): Add.
6868 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
6869 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
6870 (AC_CHECK_TYPE): Remove ssize_t.
6871 (gt_TYPE_SSIZE_T): Add.
6872 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
6873 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
6874 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
6875 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
6876 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
6877 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
6878 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
6879 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
6880 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
6881 napms, poll, select, strstr, usleep.
6882 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
6883 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
6884 (AM_GNU_GETTEXT): Use external and need-ngettext options.
6885 (AM_GNU_GETTEXT_VERSION): New.
6886 (AC_OUTPUT): Remove intl/Makefile.
6888 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6889 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
6890 * doc/fdl.texi: Update to current GNU version.
6891 * doc/gettext.texi: Update to current coreutils version,
6892 plus a copyright notice.
6893 * doc/tar.texi: Switch to new method for doing copyright notices.
6894 Use @acronym instead of @sc where appropriate.
6895 Remove empty examples. Give a few more examples.
6897 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6898 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
6899 are built up in pieces with +=.
6900 (noinst_HEADERS, INCLUDES): Remove.
6901 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
6902 (libtar_a_LIBADD): Use $ rather than @.
6903 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
6905 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
6906 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
6907 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
6908 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
6909 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
6910 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
6911 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
6912 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
6913 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
6914 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
6915 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
6916 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
6917 prereq.m4, xstrtoimax.m4.
6919 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
6920 be translated, since it's not a user-visible tool.
6922 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6924 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6925 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
6926 consistency with coreutils.
6927 (LDADD): Link LIBINTL after libtar.a, since
6928 it's now external and should stand by itself.
6930 * src/buffer.c (print_total_written): Adjust to new human.h
6932 (child_open_for_compress): Do not increase size to BLOCKSIZE.
6933 (open_archive): Open index file name.
6934 Strip trailing slahes from file names.
6935 (flush_write): Set size to 0 if not saving names.
6936 (flush_write, flush_read): Use safer_name_suffix rather than
6939 * src/common.h: Include <quote.h>.
6940 (absolute_names_option, atime_preserve_option, backup_option,
6941 block_number_option, checkpoint_option, dereference_option,
6942 force_local_option, ignore_failed_read_option, ignore_zeros_option,
6943 incremental_option, interactive_option, multi_volume_option,
6944 numeric_owner_option, one_file_system_option, recursive_unlink_option,
6945 read_full_records_option, remove_files_option, same_order_option,
6946 show_omitted_dirs_option, sparse_option, starting_file_option,
6947 to_stdout_option, totals_option, touch_option, verify_option,
6948 dev_null_output, now_verifying, we_are_root): Now bool, not int.
6949 (current_trailing_slash, index_file_name, recent_long_name_blocks,
6950 recent_long_link_blocks): New vars.
6951 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
6952 (OVERWRITE_OLD_DIRS): Remove.
6953 (enum remove_option): New enum.
6954 (remove_any_file): Use it as option arg, not int.
6955 (is_avoided_name, contains_dot_dot): Return bool, not int.
6956 (safer_name_suffix): New decl.
6958 * src/compare.c (now_verifying): Now bool, not int.
6959 (fill_in_sparse_array): Move to extract.c. Now returns bool;
6960 all callers changed to test for failure.
6961 (diff_sparse_files): Take size from current_stat, not from param.
6962 (diff_archive): Do not count trailing slashes in archives.
6963 (verify_volume): Test for header failure after loop, not before.
6965 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
6966 All callers changed.
6967 (start_header): Clear devmajor and devminor fields, too.
6968 (finish_header): New arg block_ordinal.
6969 (init_sparsearray): Now extern. Set sp_array_size to
6970 SPARSES_IN_OLDGNU_HEADER if it is zero.
6971 (dump_file): Keep link table as a hash.
6972 Do not count "file changed as we read it" as a failure.
6974 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
6975 Move extern decl to common.h.
6977 * src/extract.c (we_are_root): Now bool, not int.
6978 (check_time): Warn about implausibly old time stamps.
6979 (set_stat): Use utimbuf, not stat_info.
6980 (prepare_to_extract): New arg DIRECTORY.
6981 (fill_in_sparse_array): Moved here from compare.c.
6982 (extract_sparse_file): Now returns off_t, giving size left.
6983 Truncate file at end.
6984 (extract_archive): Use safer_name_suffix rather than rolling our own.
6985 Use fill_in_sparse_array rather than rolling our own.
6986 Strip trailing slashes more effectively.
6987 Check for unsafe names.
6989 * src/incremen.c (struct directory): nfs and found are now of type
6991 (gnu_restore): Now takes directory name as argument, not offset
6992 of directory name in a global. All uses changed.
6993 (CURRENT_FILE_NAME): Remove.
6996 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
6999 2002-09-30 Paul Eggert <eggert@twinsun.com>
7001 * src/rmt.c (prepare_input_buffer): Renamed form
7002 prepare_record_buffer. All uses changed. Do not assume that
7003 size_t is the same width as int.
7005 2002-03-29 Paul Eggert <eggert@twinsun.com>
7007 * src/incremen.c (get_directory_contents):
7008 If ignore_failed_read_option, only warn about
7009 get_directory_contents failures. Fix suggested by
7012 2002-01-31 Mark W. Eichin <eichin@thok.org>
7014 * src/buffer.c (child_open_for_compress): Don't try to read
7015 past the end of the buffer.
7017 2001-10-11 Jim Meyering <meyering@lucent.com>
7019 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
7020 and quote_n (1, ... to avoid clobbering a buffer.
7022 2001-09-26 Paul Eggert <eggert@twinsun.com>
7024 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
7026 * src/buffer.c (flush_read): Don't diagnose partial blocks before
7027 end of file; just ignore them silently.
7029 * src/list.c (read_header): Don't keep around extended name
7030 and link info indefinitely; keep it only for the next file.
7031 This fixes a bug introduced in 1.13.24, and removes the need
7032 for some static variables. Set recent_long_name and
7033 recent_long_link to zero if there were no long links; this
7034 avoids a violation of ANSI C rules for pointers in delete.c.
7035 * THANKS: Add Christian Laubscher.
7037 2001-09-26 Jim Meyering <meyering@lucent.com>
7039 * doc/tar.texi (Remote Tape Server): is know -> is known
7041 2001-09-25 Paul Eggert <eggert@twinsun.com>
7043 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
7044 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
7045 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
7046 want to distinguish EINVAL and EILSEQ.
7048 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
7050 * src/extract.c (maybe_recoverable):
7051 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
7053 2001-09-22 Paul Eggert <eggert@twinsun.com>
7055 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
7057 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
7060 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
7061 * PORTS: Add copyright notice, 'star' reference.
7062 * README-alpha: Add copyright notice, autoconf 2.52 patch.
7063 * THANKS: Add Christophe Kalt.
7064 * config.sub: Upgrade to 2001-09-14 version.
7066 * configure.ac (ALL_LINGUAS): Add ko.
7067 * po/ko.po: Resurrected file.
7069 * doc/convtexi.pl: Add coding advice for Emacs.
7071 * doc/getdate.texi: Add copyright notice.
7073 * doc/mdate-sh: Upgrade to automake 1.5 version.
7075 * doc/tar.texi (extracting files): Mention --to-stdout.
7076 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
7077 (Overwrite Old Files): Likewise.
7079 * lib/Makefile.am (noinst_HEADERS):
7080 Remove copysym.h. Add print-copyr.h, unicodeio.h.
7081 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
7083 * lib/copysym.c, lib/copysym.h: Remove.
7084 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
7085 lib/unicodeio.h: New files.
7087 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7088 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
7090 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7091 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7093 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
7094 * m4/isc-posix.m4: Remove.
7096 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
7098 * po/POTFILES.in: Add copyright notice.
7100 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
7102 * tests/Makefile.am (LDADD): Likewise.
7104 * src/buffer.c (write_archive_buffer, close_archive):
7105 If an archive is a socket, treat it like a FIFO.
7106 (records_read, records_written): New vars.
7107 (write_archive_to_stdout): Now bool, not int.
7108 (open_archive, flush_write, flush_read): Keep records_read and
7109 records_written up to date.
7111 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
7112 (write_archive_to_stdout): Now bool, not int.
7113 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
7114 (read_header): Now takes bool arg. Existing callers modified
7115 to pass 0, unless otherwise specified.
7117 * src/delete.c (records_read): Remove; now a global.
7118 (acting_as_filter): Now bool, not int.
7119 (recent_long_name, recent_long_link, recent_long_name_blocks,
7120 recent_long_link_blocks, records_read, records_written): New decls.
7121 (records_skipped): New var.
7122 (move_archive): Don't divide by zero if arg is 0.
7123 Use the above vars to compute how far to move.
7124 (write_recent_blocks): New function.
7125 (delete_archive_member): Pass 1 to read_header, so that it doesn't
7126 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
7127 Keep track of how many records have been skipped.
7128 Let the buffer code count records.
7129 When copying a header, copy any extended headers that came before it.
7131 * src/extract.c (extract_archive): When marking a directory to be
7132 updated after symlinks, stat all directories after it in the
7133 delayed-set-stat list too, since they will be checked after
7134 symlinks. Add support for --overwrite-dir.
7136 * src/list.c (recent_long_name, recent_long_link,
7137 recent_long_name_blocks, recent_long_link_blocks): New vars.
7138 (read_and): Pass 0 to read_header.
7139 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
7140 headers into new vars. Null-terminate incoming symbolic links.
7142 * src/rmt.c: Include print-copyr.h, not copysym.h.
7143 (main): Use print_copyright, not copyright_symbol.
7144 * src/tar.c (decode_options): Likewise.
7145 (OVERWRITE_DIR_OPTION): New constant.
7146 (long_options, usage, decode_options): Add --overwrite-dir.
7148 * src/tar.h: Put copyright notice into documentation.
7150 * tests/Makefile.am (TESTS): Add delete03.sh.
7151 * tests/delete03.sh: New file.
7153 * tests/genfile.c: Include print-copyr.h, not copysym.h.
7154 (main): Use print_copyright, not copyright_symbol.
7155 Include <argmatch.h>.
7156 (pattern_strings): Remove.
7157 (pattern_args, pattern_types): New constants.
7158 (main): Use XARGMATCH, not argmatch.
7160 2001-09-20 Jim Meyering <meyering@lucent.com>
7162 * lib/xstrtol.c (strtoimax): Guard declaration with
7163 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
7164 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
7165 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
7166 (strtoumax): Likewise, for completeness (it wasn't necessary).
7167 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
7168 Check for declaration of strtoimax.
7169 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
7170 Check for declaration of strtoumax.
7172 2001-09-16 Paul Eggert <eggert@twinsun.com>
7174 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
7176 2001-09-14 Paul Eggert <eggert@twinsun.com>
7178 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
7180 * README-alpha: Describe automake patch.
7182 * configure.ac (LIBOBJS):
7183 Remove automake 1.4 workaround, as we're using 1.5 now.
7184 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
7186 * lib/copysym.c: Include stddef.h, for size_t.
7187 Include langinfo.h if needed.
7188 Use locale_charset only if USE_INCLUDED_LIBINTL;
7189 if not, use nl_langinfo (CODESET) if available.
7191 2001-09-13 Paul Eggert <eggert@twinsun.com>
7193 * config.guess, config.sub: Sync with canonical versions.
7195 * configure.ac (jm_PREREQ_XGETCWD): Add.
7197 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
7198 (libtar_a_SOURCES): Add copysym.c.
7199 * copysym.c, copysym.h: New files.
7201 * lib/error.c: Sync with fileutils version.
7203 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
7204 * m4/getcwd.m4: New file.
7205 * m4/uintmax_t.m4: Remove.
7207 * m4/gettext.m4 (AM_WITH_NLS):
7208 Fix bug with calculating version of Bison 1.29.
7209 Reported by Karl Berry.
7211 * src/Makefile.am (datadir): Remove.
7213 * src/rmt.c: Include copysym.h.
7214 (main): Use copyright_symbol to translate copyright notice,
7216 * src/tar.c: Likewise.
7217 * tests/genfile.c: Likewise.
7219 * src/system.h (MB_LEN_MAX): New symbol.
7221 2001-09-11 Paul Eggert <eggert@twinsun.com>
7223 * src/extract.c (struct delayed_set_stat): New member
7225 (delay_set_stat): Initialize it to 0.
7226 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
7227 taking an extra stat ourselves. All callers changed.
7228 (set_stat): Likewise.
7229 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
7230 If false, stop when encountering a struct whose 'after_symlinks'
7231 member is true. Otherwise, go through all structures but check
7232 them more carefully. All callers changed.
7233 (extract_archive): When extracting a deferred symlink, if its parent
7234 directory's status needs fixing, then mark the directory as needing
7235 to be fixed after symlinks.
7236 (extract_finish): Fix status of ordinary directories, then apply
7237 delayed symlinks, then fix the status of directories that are
7238 ancestors of delayed symlinks.
7240 * src/rtapelib.c (rexec):
7241 Remove declaration; it ran afoul of prototypes on Crays.
7242 Reported by Wendy Palm of Cray.
7244 2001-09-06 Paul Eggert <eggert@twinsun.com>
7246 * lib/strtoimax.c (HAVE_LONG_LONG):
7247 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
7248 (strtoimax): Use sizeof (long), not
7249 sizeof strtol (ptr, endptr, base),
7250 to work around bug in IBM C compiler.
7252 2001-09-04 Paul Eggert <eggert@twinsun.com>
7254 * lib/xgetcwd.c: Include "xalloc.h".
7255 (xgetcwd): Do not return NULL when memory is exhausted; instead,
7256 report an error and exit.
7258 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
7259 (jm_PREREQ): Use it.
7261 2001-09-03 Paul Eggert <eggert@twinsun.com>
7263 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
7264 (jm_PREREQ_XGETCWD): New macro.
7266 * lib/exclude.c (fnmatch_no_wildcards):
7267 Fix typo that caused us to do case-folding
7268 search even when that was not desired. This occurred only in the
7271 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
7272 Do not include xalloc.h.
7273 (INITIAL_BUFFER_SIZE): New symbol.
7274 Do not use xmalloc / xrealloc, since the caller is responsible for
7275 handling errors. Preserve errno around `free' during failure.
7276 Do not overrun buffer when using getwd.
7278 * lib/xgetcwd.c (xgetcwd):
7279 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
7280 to decide whether to use getcwd (NULL, 0).
7282 2001-09-02 Paul Eggert <eggert@twinsun.com>
7284 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
7286 2001-09-01 Jim Meyering <meyering@lucent.com>
7288 * exclude.c: Use `""', not `<>' to #include non-system header files.
7289 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
7290 and strncasecmp as r-values. Unixware didn't have declarations.
7292 2001-08-31 Jim Meyering <meyering@lucent.com>
7294 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
7295 Use an initial, malloc'd, buffer of length 128 rather than
7296 a statically allocated one of length 1024.
7298 2001-08-30 Paul Eggert <eggert@twinsun.com>
7300 * lib/utime.c: Include full-write.h.
7301 * lib/xstrtol.c (strtoimax): New decl.
7303 2001-08-29 Paul Eggert <eggert@twinsun.com>
7305 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
7307 * src/create.c (dump_file): Relativize link names before dumping.
7308 This fixes a bug reported by Jose Pedro Oliveira.
7310 * src/create.c (dump_file): Use offsetof when computing sizes for
7311 struct hack; this avoids wasted space in some cases.
7312 * src/incremen.c (note_directory, find_directory): Likewise.
7313 * src/names.c (name_gather, addname): Likewise.
7315 * src/extract.c (extract_archive): Use strcpy, not memcpy,
7316 for consistency with other code that does similar things.
7317 * src/names.c (name_gather): Likewise.
7319 * src/names.c (read_name_from_file, name_next, name_gather,
7320 add_hierarchy_to_namelist): Avoid quadratic behavior when
7321 reallocating buffers. Check for buffer size overflow.
7322 (addname): Avoid unnecessary clearing of memory.
7324 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
7326 * src/extract.c (delay_set_stat): Fix off-by-one error in file
7327 name size allocation that caused core dumps.
7329 2001-08-28 Paul Eggert <eggert@twinsun.com>
7331 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
7333 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
7334 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
7335 (daddr_t): Remove; no longer used.
7336 (jm_PREREQ_HUMAN): Add.
7338 * acconfig.h: Remove; no longer needed.
7340 * config.guess, config.sub:
7341 New files, from automake 1.5. Gettext 0.10.39 needs them.
7342 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
7344 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
7345 (SUBDIRS): Put intl before lib, as gettext requires.
7347 * ABOUT-NLS: Upgrade to gettext 0.10.39.
7348 * intl: Upgrade entire directory to gettext 0.10.39.
7349 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
7350 New files, from gettext 0.10.39.
7351 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
7352 Upgrade to gettext 0.10.39,
7353 * po/Makefile.in.in: Likewise, except fix a typo in its copying
7355 * po/cat-id-tbl.c, po/stamp-cat-id:
7356 Remove; no longer used by gettext 0.10.39.
7357 * po/ChangeLog: New file.
7359 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
7360 $(srcdir)/tar.texi: Likewise.
7361 * doc/freemanuals.texi: New file.
7362 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
7363 `fileds' -> `fields'
7364 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
7366 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
7367 (noinst_HEADERS): Add quote.h.
7368 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
7370 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
7372 * lib/full-write.c, lib/savedir.c: Comment fix.
7374 * lib/pathmax.h: Remove.
7376 * lib/quote.c, lib/quote.h: New files.
7378 * lib/xgetcwd.c: Don't include pathmax.h.
7379 Include stdlib.h and unistd.h if available.
7381 (xmalloc, xstrdup, free): Remove decls.
7382 (xgetcwd): Don't assume sizes fit in unsigned.
7383 Check for overflow when computing sizes.
7384 Simplify reallocation code.
7386 * lib/xmalloc.c: Quote failure tests.
7388 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
7390 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
7391 similar to strtol.c.
7392 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
7393 (verify): New macro.
7394 (strtoumax, uintmax_t, strtoull, strtol): Remove.
7395 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
7396 (strtoimax): Renamed from strtoumax. All uses of unsigned values
7397 changed to signed values. Check sizes at compile-time, not
7398 run-time. Prefer strtol to strtoll if both work.
7401 * lib/xstrtol.h (xstrtoimax): New decl.
7403 * m4/Makefile.am (EXTRA_DIST):
7404 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
7405 longlong.m4, xstrtoimax.m4.
7407 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
7408 Remove; now done by autoconf.
7409 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
7410 Use AC_CHECK_TYPE instead of merely looking for the header.
7412 * m4/uintmax_t.m4: Use shorter comment.
7414 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
7415 Quote first arg of AC_DEFUN.
7416 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
7417 is needed to parse the include file.
7418 Simplify logic behind the args to AC_REPLACE.
7420 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
7422 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
7425 Use "Copyright %d" to simplify the translator's job in the future.
7426 Advise translator about circle-C.
7427 * src/tar.c: (decode_options): Likewise.
7428 * tests/genfile.c (main): Likewise.
7430 2001-08-28 Jim Meyering <meyering@lucent.com>
7432 * lib/argmatch.c: Include "quote.h".
7433 (argmatch_invalid): Quote the context.
7435 * lib/dirname.c (dir_name): Fix typo on PC platforms.
7437 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
7438 Use single-quote for local .h files.
7440 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
7442 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
7445 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
7446 invoking mktime the last time.
7448 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
7450 * lib/rename.c: Major rewrite by Volker Borchert to use system
7451 rename function, but to work around problems with trailing
7454 * lib/strtoll.c: New file, from glibc.
7455 * lib/strtoul.c: Update from glibc.
7457 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
7458 Add support for signed numbers, too.
7459 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
7461 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
7463 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
7464 (main): Use generic names in debugging output.
7465 * lib/strtoimax.c: Plus add the following changes of my own:
7466 (main): Use accurate names in debugging output.
7468 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
7471 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
7472 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
7473 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
7474 m4/utime.m4, m4/utimes.m4:
7475 Quote the first argument in each use of AC_DEFUN.
7477 * m4/getline.m4: Don't use string.h.
7479 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
7481 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
7483 2001-08-27 Paul Eggert <eggert@twinsun.com>
7485 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
7487 The biggest change is the new --exclude semantics and options.
7488 The basic idea was suggested by Gerhard Poul; thanks!
7490 * NEWS: Describe new --exclude semantics and options, and bug fixes.
7491 * README: ignfail.sh fails on some NFS hosts.
7492 * NEWS, README, lib/xstrtol.h: Add copyright notice.
7494 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
7495 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
7496 Remove; the automake bug has been fixed.
7497 * acinclude.m4: Remove.
7499 * configure.ac: Renamed from configure.in.
7500 (AC_PREREQ): Bump from 2.13 to 2.52.
7501 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
7502 1997-05-30) has an encoding error.
7503 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
7504 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
7506 * doc/fdl.texi: Update to current GNU version.
7508 * doc/tar.texi: Put leading '*' in direntry.
7509 Accommodate new gfdl sectioning.
7510 New option --recursion (the default) that is the inverse of
7513 New options --anchored, --ignore-case, --wildcards,
7514 --wildcards-match-slash, and their negations (e.g., --no-anchored).
7515 Along with --recursion and --no-recursion, these control how exclude
7516 patterns are interpreted. The default interpretation of exclude
7517 patterns is now --no-anchored --no-ignore-case --recursion
7518 --wildcards --wildcards-match-slash.
7520 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
7522 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
7523 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
7524 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
7525 Include if available.
7526 (<xalloc.h>): Include
7527 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
7528 (verify): New macro. Use it to verify that EXCLUDE macros do not
7529 collide with FNM macros.
7530 (struct patopts): New struct.
7531 (struct exclude): Use it, as exclude patterns now come with options.
7532 (new_exclude): Support above changes.
7533 (new_exclude, add_exclude_file):
7534 Initial size must now be a power of two to simplify overflow checking.
7535 (free_exclude, fnmatch_no_wildcards): New function.
7536 (excluded_filename): No longer requires options arg, as the options
7537 are determined by add_exclude. Now returns bool, not int.
7538 (excluded_filename, add_exclude):
7539 Add support for the fancy new exclusion options.
7540 (add_exclude, add_exclude_file): Now takes int options arg.
7541 Check for arithmetic overflow when computing sizes.
7542 (add_exclude_file): xrealloc might modify errno, so don't
7543 realloc until after errno might be used.
7545 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
7547 (free_exclude): New decl.
7548 (add_exclude, add_exclude_file): Now takes int options arg.
7549 (excluded_filename): No longer requires options arg, as the options
7550 are determined by add_exclude. Now returns bool, not int.
7552 * lib/prepargs.c: Include <string.h>; required for C99 since
7556 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
7558 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
7559 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
7561 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
7562 Remove inttypes_h.m4, largefile.m4, mktime.m4.
7564 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
7565 subsumed by Autoconf 2.50.
7567 * m4/error.m4: Upgrade to serial 2.
7569 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
7570 remove test for GNU C library. It's not correct, as some
7571 older glibcs are buggy.
7573 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
7575 * m4/prereq.m4: Upgrade to serial 20, but then:
7576 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
7577 (jm_PREREQ_EXCLUDE): New macro.
7578 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
7581 * m4/realloc.m4: Upgrade to serial 4.
7583 * m4/strerror_r.m4: Revert to serial 1002.
7585 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
7587 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
7589 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
7590 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
7591 it is now subsumed by autoconf. Add inttypes.h.
7593 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
7594 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
7596 * src/buffer.c (new_volume): Stop if the script exits with an error.
7598 * src/common.h (excluded_with_slash, excluded_without_slash):
7599 Remove, replacing by:
7600 (excluded): New decl.
7601 (link_error): New decl.
7602 (excluded_name): Now returns bool.
7605 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
7606 Support hard links to symbolic links.
7608 (struct delayed_symlink): Remove 'names' member, replacing it with
7609 'sources' and 'target' member. All uses changed.
7611 (struct string_list): New type.
7613 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
7614 for struct hack; this avoids wasted space in some cases.
7616 (extract_archive): Fix test for absolute pathnames and/or "..".
7617 Use link_error to report errors for links.
7618 Remove redundant trailing '/' at "really_dir", for all uses, not
7619 just before invoking mkdir.
7620 If overwriting old files, do not worry so much about existing
7622 Fix mode computation in the case where the directory exists.
7624 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
7625 link, make a copy of the symbolic link.
7627 * src/incremen.c (get_directory_contents):
7628 If ignore_failed_read_option, only warn about
7631 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
7632 However, check for error even for '-' or '+' case.
7634 (print_header): Try parsing uids and gids as unsigned integers first,
7635 and as a uid_t or gid_t only if that fails. This adds support for
7636 listing positive uids and gids that are greater than UID_MAX and
7639 * src/misc.c (link_error): New function.
7641 * src/names.c (collect_and_sort_names):
7642 If ignore_failed_read_option, only warn about
7645 (excluded_name): Now returns bool. Simplify, as the fancy
7646 features are now all in excluded_filename.
7648 * src/rtapelib.c (base_name): Remove decl, as system.h now
7651 * src/system.h: Include stddef.h if available.
7652 (offsetof): Declare if stddef.h doesn't.
7654 Include <dirname.h>.
7655 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
7657 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
7658 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
7659 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
7660 WILDCARDS_MATCH_SLASH_OPTION):
7663 (long_options, usage, decode_options): Add support for --anchored,
7664 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
7665 --no-wildcards-match-slash, --recursion, --wildcards,
7666 --wildcards-match-slash.
7668 (decode_options): Implement the new way of interpreting exclude
7671 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
7673 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
7674 just print error messages suggesting alternatives.
7676 (add_filtered_exclude): Remove.
7678 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
7680 * tests/extrac04.sh (out): Remove
7681 directory/subdirectory/file1, as the new semantics for
7682 --exclude exclude it.
7684 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
7686 2001-08-12 Paul Eggert <eggert@twinsun.com>
7688 * lib/addext.c (<errno.h>): Include.
7689 (errno): Declare if not defined.
7690 (addext): Work correctly on the Hurd, where pathconf returns -1 and
7691 leaves errno alone, because there is no limit. Also, work even if
7692 size_t is narrower than long.
7694 2001-07-08 Paul Eggert <eggert@twinsun.com>
7696 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
7698 2001-05-10 Paul Eggert <eggert@twinsun.com>
7700 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
7701 Include <backupfile.h> and <dirname.h> after size_t is defined.
7702 (addext): Use base_len to trim redundant trailing slashes instead of
7705 * lib/backupfile.c (ISSLASH, base_name):
7706 Remove decls; now in dirname.h.
7707 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
7709 (find_backup_file_name): Rename locals to avoid new functions.
7710 Use base_len instead of rolling it ourselves.
7711 Work even if dirlen is 0.
7712 Use a dir of '.' if given the empty string.
7715 Do not include <stdio.h>, <assert.h>; no longer needed.
7716 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
7717 Include <string.h>, <dirname.h>.
7718 (base_name): Allow file names ending in slashes, other than names
7719 that are all slashes. In this case, return the basename followed
7722 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
7723 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
7724 (dir_len): Renamed from dirlen.
7725 All callers changed.
7727 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
7729 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
7731 2001-02-16 Paul Eggert <eggert@twinsun.com>
7733 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
7734 Do not declare or define if HAVE_MBRTOWC,
7735 since the test for HAVE_MBRTOWC now requires proper declarations.
7737 * lib/alloca.c (malloc): Undef before defining.
7739 2001-02-13 Paul Eggert <eggert@twinsun.com>
7741 * src/compare.c (read_and_process): Use off_t for size.
7742 From Maciej W. Rozycki.
7744 2001-01-26 Paul Eggert <eggert@twinsun.com>
7746 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
7748 2001-01-12 Paul Eggert <eggert@twinsun.com>
7750 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
7752 * lib/savedir.h (savedir): Remove size arg.
7754 * doc/tar.texi: Add @setchapternewpage odd.
7755 Remove -I as an alias for -T, for now.
7757 Update copyright. Remove "Published by".
7758 Dates beginning with / or . are taken to be file names.
7760 * src/tar.c (<time.h>): Do not include;
7761 (time): Do not declare.
7762 (usage): Remove -I as an alias for -T.
7763 (OPTION_STRING): Remove -I.
7764 (decode_options): Dates that look like an absolute path name,
7765 or that start with '.', are presumed to be file names whose
7767 Remove 'I' as an aliase for 'T'.
7770 * src/extract.c (<time.h>): Do not include; system.h now does this.
7771 (make_directories): Skip filesystem prefixes.
7772 Don't assume '/' is the only separator.
7773 (extract_sparse_file): Use new full_write semantics.
7774 On write error, return instead of invoking skip_file.
7775 Do not free sparsearray; caller does this now.
7776 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
7778 (extract_archive): Don't assume file name lengths fit in int.
7779 Report what got stripped from member name; it might be more than '/'.
7780 Use new full_write semantics.
7781 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
7783 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
7785 * src/buffer.c (<time.h>): Do not include; system.h now does this.
7786 (time): Remove decl; likewise.
7787 (child_open_for_uncompress): Use new full_write semantics.
7788 (flush_write): Use ISSLASH instead of testing for '/'.
7789 (flush_read): Likewise.
7791 * src/rmt.h (_remdev): Look for / anywhere in Path.
7793 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
7794 Don't assume '/' is the only separator.
7795 (safer_rmdir): Don't assume '/' is the only separator.
7797 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
7799 * lib/dirname.h (dirlen): New decl.
7801 * src/incremen.c (get_directory_contents):
7802 Remove path_size arg; all callers changed.
7803 Don't assume '/' is the only directory separator.
7804 (gnu_restore): Work even if file name length doesn't fit in int.
7806 * lib/addext.c (ISSLASH): New macro.
7807 (addext): Trim any redundant trailing slashes.
7809 * src/names.c (name_next):
7810 Don't assume '/' is the only directory separator.
7811 (namelist_match): Likewise.
7812 (add_hierarchy_to_namelist): Remove dirsize arg.
7813 Do not assume '/' is the only directory separator.
7814 (new_name): Likewise.
7816 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
7817 (libtar_a_SOURCES): Add dirname.c.
7819 * src/create.c (relativize):
7820 New function, with much of old start_header's guts.
7821 Handle filesystem prefixes.
7822 (start_header): Use this new function.
7823 (init_sparsearray): Don't bother to zero out the new array;
7825 (deal_with_sparse): Fix array allocation bug.
7826 (create_archive): Don't assume '/' is the only separator.
7827 (dump_file): Likewise.
7828 Don't worry about leading / in symlink targets.
7830 * lib/savedir.c (savedir):
7831 Remove size arg; it wasn't portable. All callers changed.
7833 * lib/utime.c (utime_null): Adjust to new full_write convention.
7835 * configure.in (YACC): Avoid portability problem with Ultrix sh.
7837 * lib/backupfile.c: Include <dirname.h>.
7838 (ISSLASH): New macro.
7839 (find_backup_file_name): Use dirlen to calculate directory lengths.
7840 (max_backup_version): Strip redundant trailing slashes.
7842 * src/common.h: Include <full-write.h>.
7843 (get_directory_contents): No longer has size arg.
7844 (gnu_restore): Arg is size_t, not int.
7846 * src/system.h: Include <time.h>.
7847 (time): Declare if not defined.
7849 * lib/full-write.c: Include full-write.h, not safe-read.h.
7850 full_write returns size_t, with short writes meaning failure.
7851 All callers changed.
7853 * src/rtapelib.c: Include full-write.h.
7855 * src/rmt.c: Include full-write.h.
7856 (main): Update copyright.
7858 * doc/getdate.texi: Mention that only English is supported.
7859 Show how to use "date" so that the output is acceptable to getdate.
7860 Mention Z as an abbreviation for UTC.
7862 * lib/full-write.h: New file.
7864 * src/list.c: system.h now does time.h stuff.
7867 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
7869 Do not include string.h, strings.h, or assert.h; no longer needed.
7870 (strrchr, memrchr, malloc): Remove decls; no longer needed.
7872 (base_name): New decl.
7873 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
7874 (dir_name_r): Remove.
7875 (dirlen): New function.
7876 (dir_name): Use dirlen instead of dir_name_r.
7877 (<string.h>, <strings.h>): Include only if test program.
7878 (main): Use "return 0", not "exit (0)".
7880 2000-12-08 Paul Eggert <eggert@twinsun.com>
7882 * lib/dirname.h: New file.
7884 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
7886 * lib/fnmatch.c: Do not comment out all the code if we are using
7887 the GNU C library, because in some cases we are replacing buggy
7888 code in the GNU C library itself.
7890 2000-10-30 Paul Eggert <eggert@twinsun.com>
7892 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
7894 2000-10-29 Paul Eggert <eggert@twinsun.com>
7896 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
7898 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
7900 2000-10-28 Paul Eggert <eggert@twinsun.com>
7902 * doc/tar.texi: --no-recursion now applies to extraction, too.
7903 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
7904 * src/names.c (namelist_match, excluded_name):
7905 Do not match subfiles of a directory
7906 if --no-recursion is specified.
7907 * src/tar.c (NO_RECURSE_OPTION): Remove.
7908 (long_options): Have getopt set the --no-recursion flag.
7909 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
7910 Remove case for NO_RECURSE_OPTION.
7911 * src/common.h (recursion_option):
7912 Renamed from no_recurse_option, with sense
7913 negated, and with FNM_LEADING_DIR being the nonzero value.
7915 * names.c (namelist_match): New function.
7916 (name_match, name_scan): Use it to eliminate duplicate code.
7917 (names_notfound): Remove special case for Amiga.
7919 2000-10-27 Paul Eggert <eggert@twinsun.com>
7921 * src/misc.c (read_error_details, read_warn_details,
7922 read_fatal_details): Don't assume size_t is unsigned long.
7924 * src/buffer.c (flush_read): If read_full_records_option, try to
7925 fill the input buffer, as --delete -f - needs this.
7927 2000-10-24 Paul Eggert <eggert@twinsun.com>
7929 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
7931 * src/buffer.c (check_label_pattern):
7932 Make sure header name is a string before
7933 passing it to fnmatch.
7934 (init_volume_number): Check for global_volno overflow.
7935 (new_volume): Check for global_volno overflow.
7937 * src/tar.c (decode_options):
7938 Check that volume label is not too long to overflow
7939 name in tar header block.
7941 * Makefile.am (EXTRA_DIST): Remove rebox.el.
7943 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
7944 (AC_FUNC_STRERROR_R): Use this instead.
7946 2000-10-23 Paul Eggert <eggert@twinsun.com>
7948 * src/extract.c: Include <time.h>, since we invoke "time".
7950 * lib/prepargs.c (prepend_default_options):
7951 Don't use NULL, for portability.
7953 * m4/fnmatch.m4: Add "working" to message.
7955 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
7957 (getpwuid, getgrgid): Declare only if system headers don't.
7958 (gid_to_gname): Don't invoke setgrent.
7959 (namelist): Now static, not global.
7960 (nametail): New var. All uses of namelast changed to use
7961 nametail, with one extra level of indirection.
7962 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
7963 (name_match): Set nametail too, when setting namelist to null.
7964 (add_hierarchy_to_namelist): Change type of dir arg from char * to
7965 struct name *, so that we don't have to look up the name again
7966 here. Get change_dir from dir rather than as a separate arg. Add
7967 dirsize arg, and pass it along to get_directory_contents. Remove
7968 unnecessary check of directory type.
7969 (new_name): Do not append a slash if PATH already ends in one.
7970 (avoided_names, struct avoided_name): Remove.
7971 (avoided_name_table): New var, replacing avoided_names.
7972 (hash_avoided_name, compare_avoided_names): New function.
7973 (add_avoided_name, is_avoided_name): Use hash table rather than
7976 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
7977 (child_open_for_compress, child_open_for_uncompress,
7978 close_archive): Propagate any failure of the compression process
7980 (open_archive, flush_write, flush_read, close_archive): Do not
7981 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
7982 -1. Instead, allocate an array with the size that's needed.
7983 (open_archive): Don't bother checking S_ISCHR of /dev/null.
7984 (backspace_output): Don't try to backspace past start of archive.
7985 (close_archive): Remove special case for DELETE_SUBCOMMAND.
7987 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
7988 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
7989 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
7990 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
7991 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
7992 WITH_DMALLOC, WITH_REGEX):
7993 Remove; now generated automatically.
7995 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
7996 compatibility for glibc fragments.
7997 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
7998 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
7999 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
8000 that we needn't put an entry into acconfig.h.
8001 (ALL_LINGUAS): Add da.
8002 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
8003 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
8005 (AC_MBSTATE_T): Add.
8006 (RMT): Append $(EXEEXT).
8007 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
8008 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
8009 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
8010 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
8011 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
8012 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
8013 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
8014 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
8015 (EMUL_OPEN3): Remove; no longer needed.
8016 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
8018 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
8020 * src/common.h: Do not include basename.h.
8021 * src/rtapelib.c (base_name): Do not include basename.h;
8022 declare base_name instead.
8024 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
8026 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
8027 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
8028 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
8029 Adjust to the above changes.
8031 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
8033 * src/open3.c: Remove.
8035 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
8036 (tar_SOURCES): Remove open3.c.
8037 (INCLUDES): Remove -I.., as automake does that.
8038 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
8040 The following changes are to put LOCALEDIR into localedir.h instead
8041 of passing it on the command line.
8043 (DISTCLEANFILES): New macro.
8044 (localedir.h): New rule.
8045 (rmt.o tar.o): Now depend on localedir.h.
8047 * tests/delete02.sh, tests/extrac04.sh: New files.
8049 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
8050 (TESTS): Add extrac04.sh, and restore delete02.sh.
8051 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
8052 (INCLUDES): Remove -I.. as automake does this now.
8054 * src/rtapelib.c (rexec): Don't declare unless using it.
8055 (do_command): Simplify signal-handling code slightly.
8057 * src/delete.c (blocks_needed): Remove. All uses changed to use
8058 blocking_factor - new_blocks.
8059 (acting_as_filter): New var.
8060 (write_record, delete_archive_members): Use acting_as_filter
8061 rather than archive == STDIN_FILENO to detect whether we're acting
8062 as a filter, as open can return STDIN_FILENO in some cases.
8063 (delete_archive_members): Ignore zero blocks if
8064 ignore_zeros_option is nonzero. Fix bug that messed up last
8065 output block: write_eot can't be used here, as it gets confused
8066 when the input is at end of file.
8068 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
8069 symbolic link contents length. Pass directory size to
8070 get_directory_contents.
8072 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
8073 m4/strerror_r.m4: New files.
8074 * m4/signedchar.m4: Remove this file.
8075 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
8076 * m4/Makefile.am (EXTRA_DIST): Likewise.
8078 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
8080 * po/da.po: New translation file.
8082 * src/mangle.c (extract_mangle):
8083 Fix diagnostic with wrong number of %s'es.
8085 * lib/fnmatch.c (fnmatch):
8086 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
8087 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
8089 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
8090 fall off a device's end. Detect this.
8092 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
8094 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
8095 include <pathmax.h> and directory include files like <dirent.h>;
8096 no longer used. Include <savedir.h> instead.
8097 (closedir, signed_char): remove macro; no longer used.
8098 (bool, false, true): Include <stdbool.h> if you have the include
8099 file, otherwise define.
8102 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
8103 opendir_warn, readdir_error): Remove; no longer needed.
8104 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
8105 before deciding whether we're trying to remove ".".
8106 (remove_any_file): Try unlink first if we are not root. Use
8107 savedir when recursively removing directories, to avoid exhausting
8109 (savedir_error, savedir_warn, symlink_error): New functions.
8111 * src/list.c: (read_and): Do not invoke
8112 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
8113 responsible for that. Do not invoke apply_delayed_set_stat; our
8114 caller is now responsible for that.
8115 (read_header): Use signed char instead of signed_char. Prevent
8116 later references to current_header from mistakenly treating it as
8118 (from_header): Quote invalid base-64 strings in diagnostics.
8119 (time_from_header): Do not warn about future timestamps in
8120 archive; check_time now does that.
8121 (print_header): Quote unknown file types.
8122 (skip_member): New function, replacing skip_extended_headers and
8123 now skipping the whole member instead of just the extended
8124 headers. All callers changed. This makes the code handle
8125 extended headers uniformly, and fixes some bugs.
8127 * src/update.c (update_archive): Use skip_member.
8129 * src/extract.c (we_are_root): Now global.
8130 (struct delayed_symlink): New type.
8131 (delayed_symlink_head): New var.
8132 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
8133 not apply_delayed_set_stat.
8134 (set_mode, set_stat): Pointer args are now const pointers.
8135 (check_time): New function.
8136 (set_stat): Warn if setting a file's timestamp to be the future.
8137 (make_directories): Do not save and restore errno.
8138 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
8139 intermediate directories.
8140 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
8141 not in caller. Extract potentially dangerous symbolic links more
8142 carefully, deferring their creation until the end, and using a
8143 regular file placeholder in the meantime. Do not remove trailing
8144 / and /. from file names. Do not bother checking for ".." when
8145 checking whether a directory loops back on itself, as loopbacks
8146 can occur with symlinks too. Also, in that case, do not bother
8147 saving and restoring errno; just set it to EEXIST.
8148 (apply_nonancestor_delayed_set_stat): A prefix is a potential
8149 ancestor if it ends in slash too (as well as ending in a char just
8151 (apply_delayed_set_stat): Remove.
8152 (apply_delayed_symlinks, extract_finish): New functions.
8154 * doc/fdl.texi: New file.
8155 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
8156 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
8157 * doc/tar.texi: Add Free Documentation License. New section
8158 "Overwrite Old Files", and revamp that section to make it easier to
8159 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
8160 documentation into getdate.texi. Fix several minor typos. Describe
8161 TAR_OPTIONS. Describe incompatibility between incremental backups and
8162 --atime-preserve. Describe incompatibility between --verify and other
8163 options. Mention that tar normally removes symbolic links rather than
8164 following them, when extracting a file of the same name.
8166 * THANKS: Add gpoul. Change skip's address.
8168 * po/POTFILES.in: Add lib/human.c.
8170 * src/common.h (namelist, namelast): Remove decls.
8171 (we_are_root, extract_finish, skip_member, savedir_error,
8172 savedir_warn, symlink_error, gnu_list_name): New decls.
8173 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
8174 skip_extended_headers, is_dot_or_dotdot, closedir_error,
8175 closedir_warn, opendir_error, opendir_warn, readdir_error,
8176 readdir_warn): Remove decls.
8177 (get_directory_contents): New off_t arg.
8178 (addname): Now returns struct name *.
8180 * src/tar.h, tests/genfile.c: Fix comments.
8182 * src/create.c: Include hash.h.
8183 (gnu_list_name): Remove decl.
8184 (struct link): Remove "next" member.
8186 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
8187 consistency with other diagnostics.
8188 (deal_with_sparse): Check for I/O error when closing the file.
8189 (create_archive): Do not allocate an array of size PATH_MAX, as
8190 PATH_MAX might be (size_t) -1. Instead, allocate an array with
8191 the size that's needed.
8192 (hash_link, compare_links): New functions.
8193 (dump_file): Do not exhaust open file descriptors when descending
8194 deeply into a directory, by using savedir rather than
8195 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
8196 Hash the set of links already created, instead of using a linked
8197 list. Fix some bugs in outputting sparse files which caused the
8198 sparse tables to be incorrect. When a file unexpectedly shrinks,
8199 output zeros rather than garbage. Do not allocate an array of
8200 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
8201 allocate an array with the size that's needed.
8203 * src/incremen.c: Include hash.h.
8204 (struct directory): Remove "next", "dir_text". Change "name" to
8205 be char[1] with struct hack, not const char *. Add "found".
8206 (directory_list): Remove. Replaced by directory_table.
8207 (directory_table): New var.
8208 (nfs_string): Renamed from nfs.
8209 (hash_directory, compare_directories): New functions.
8210 (note_directory): Now returns struct directory *. First arg is
8211 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
8212 Remove text arg. New "found" arg, basically corresponding to the
8213 old text arg not being null. All callers changed.
8214 (note_directory, find_directory): Use hash table rather than
8216 (get_directory_contents): New arg "device". Use savedir to do the
8217 hard work. Save the nfs-ness of stat_data, since it might change
8218 under us. Use note_directory instead of find_directory to save
8219 some work. When adding an "A" record, do it with
8220 add_to_accumulator instead of cheating with strcat.
8221 (read_directory_file): Use "+" flag before device to indicate
8222 whether it was NFS. Fix typo in checking for strtoul error.
8223 (write_directory_file_entry): New function.
8224 (write_directory_file): Use it, and use the hash routines to
8225 traverse the directory table.
8226 (gnu_restore): Use savedir rather than opendir/readdir.
8228 * src/tar.c: Include localedir.h, prepargs.h.
8229 (long_options): Now static.
8230 (long_options, usage, decode_options): -j is now short for
8231 --bzip2, and -I is now an alias for -T.
8232 (decode_options, main): argv is not const pointer now.
8233 (decode_options): Invoke prepend_default_options to support
8234 TAR_OPTIONS. In diagnostic, mention the string that was the
8235 invalid blocking factor, tape length, group, owner, or record
8236 size. --delete is no longer incompatible with -f -, undoing
8238 (main): Invoke extract_finish at end of extraction.
8240 * src/rmt.c: Include localedir.h.
8241 (main): Update copyright date to 2000.
8243 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
8244 following changes: Use @sc where appropriate. Document the ranges of
8245 supported times more precisely. Add Eggert to getdate authors.
8246 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
8247 zone names, as it wasn't correct and people shouldn't be relying on it
8248 anyway. Relative items also account for non-DST adjustments. Fix
8251 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
8253 * tests/ignfail.sh: opendir -> savedir in diagnostics.
8255 * tests/preset.in: Set LANGUAGE to the empty string, for some
8258 2000-10-20 Paul Eggert <eggert@twinsun.com>
8260 * m4/fnmatch.m4: Mention the GNU C library.
8262 2000-10-19 Paul Eggert <eggert@twinsun.com>
8264 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
8267 2000-10-17 Paul Eggert <eggert@twinsun.com>
8269 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
8272 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
8273 (CHAR_BIT): Define if not defined.
8275 2000-09-09 Paul Eggert <eggert@twinsun.com>
8277 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
8279 2000-08-07 Paul Eggert <eggert@twinsun.com>
8281 * lib/xmalloc.c: Memory exhausted -> memory exhausted
8283 * lib/xalloc.h (xalloc_msg_memory_exhausted):
8284 change to array from char *.
8286 2000-08-06 Paul Eggert <eggert@twinsun.com>
8288 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
8289 compatibility with glibc 2.1.3 strftime.c.
8291 2000-07-31 Paul Eggert <eggert@twinsun.com>
8293 * lib/quotearg.c (quotearg_n_options):
8294 Don't make the initial slot vector a constant,
8295 since it might get modified.
8297 * lib/quotearg.c: Add support for more than one preallocated slot.
8299 2000-07-30 Paul Eggert <eggert@twinsun.com>
8301 * lib/quotearg.c (quotearg_n_options):
8302 Preallocate a slot 0 buffer, so that the caller
8303 can always quote one small component of a "memory exhausted" message
8306 2000-07-23 Paul Eggert <eggert@twinsun.com>
8309 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
8310 mbstate_t is always defined.
8312 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
8313 some GCC installations, and this configuration error is likely to be
8316 2000-07-22 Paul Eggert <eggert@twinsun.com>
8319 When the system forces us to redefine mbstate_t, shadow its mbsinit
8320 function. From Bruno Haible.
8322 2000-07-14 Paul Eggert <eggert@twinsun.com>
8324 * lib/xmalloc.c: Simplify exhausted message.
8326 * lib/quotearg.h: Update copyright date; from Jim Meyering.
8328 2000-07-13 Paul Eggert <eggert@twinsun.com>
8330 * lib/quotearg.h (enum quoting style):
8331 New constant clocale_quoting_style.
8334 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
8335 Add support for clocale_quoting_style, undoing previous change to
8336 locale_quoting_style.
8338 2000-07-10 Paul Eggert <eggert@twinsun.com>
8341 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
8342 since otherwise we don't need it.
8343 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
8344 since we don't do multibytes in that case.
8345 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
8346 invoke multibyte primitives.
8348 * m4/mbstate_t.m4 (AC_MBSTATE_T):
8349 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
8350 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
8351 and mbstate_t, to a single-part test that simply defines mbstate_t.
8353 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
8354 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
8355 to decide whether to define the BeOS workaround macro;
8356 this adjusts to the change to AC_MBSTATE_T.
8358 * m4/strerror_r.m4: New file.
8360 2000-07-05 Paul Eggert <eggert@twinsun.com>
8362 * lib/quotearg.c: Use double-quote to quote.
8364 * lib/quotearg.c (N_): New macro.
8365 (gettext_default): New function.
8366 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
8367 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
8370 * lib/quotearg.c (struct quoting_options):
8371 Simplify quote_these_too dimension.
8372 From Bruno Haible <haible@clisp.cons.org>.
8374 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
8375 Test for mbstate_t only if the test
8376 for an object-type mbstate_t fails.
8378 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
8380 2000-07-03 Paul Eggert <eggert@twinsun.com>
8382 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
8383 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
8385 * lib/quotearg.c (mbrtowc):
8386 Assign to *pwc, and return 1 only if result is nonzero.
8387 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
8389 2000-07-02 Paul Eggert <eggert@twinsun.com>
8391 * lib/quotearg.c (mbstate_t):
8392 Do not define; it should be defined with AC_CHECK_TYPE.
8394 2000-06-26 Paul Eggert <eggert@twinsun.com>
8396 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
8397 a bug in glibc 2.1.3.
8399 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
8401 2000-06-19 Paul Eggert <eggert@twinsun.com>
8403 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
8404 inclusion of wctype.h to work around solaris2.6 namespace pollution.
8405 (ISPRINT): Likewise.
8406 Reported by Tom Tromey.
8408 2000-06-15 Paul Eggert <eggert@twinsun.com>
8410 * lib/human.c (adjust_value): New function.
8411 (human_readable_inexact): Apply rounding style even when printing
8414 * lib/human.c: Avoid shadowing warnings.
8417 2000-06-14 Paul Eggert <eggert@twinsun.com>
8419 * lib/human.c (human_readable_inexact): Allow an input block size
8420 that is not a multiple of the output block size, and vice versa.
8422 * lib/getdate.y (get_date): Apply relative times after time zone
8423 indicator, not before.
8425 2000-05-31 Paul Eggert <eggert@twinsun.com>
8427 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
8428 and thus don't need AC_CANONICAL_HOST.
8430 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
8431 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
8432 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
8433 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
8434 changed. Instead of inspecting the output of getconf, try to
8435 compile the test program without and with the macro definition.
8436 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
8437 getconf. Instead, check for the needed flags by compiling test
8440 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
8442 * config.guess, config.sub: Remove these files, for similar reasons.
8444 2000-05-03 Paul Eggert <eggert@twinsun.com>
8446 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
8447 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
8448 bug. This avoids a clash when files like regex.c that define
8451 2000-05-02 Paul Eggert <eggert@twinsun.com>
8453 * m4/largefile.m4 (AC_SYS_LARGEFILE):
8454 Define _GNU_SOURCE if this is needed to make
8455 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
8456 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
8458 * lib/quotearg.c (mbrtowc, mbstat_t):
8459 Add definitions if !HAVE_MBSTATE_T_OBJECT.
8460 (<wctype.h>): Include if HAVE_WCTYPE_H.
8461 (iswprint): Define to 1 if we lack it
8463 2000-04-18 Paul Eggert <eggert@twinsun.com>
8465 * m4/mbstate_t.m4: New file.
8467 2000-04-17 Bruno Haible <haible@clisp.cons.org>
8469 * tests/ignfail.sh: Test for uid 0 along with user "root".
8471 2000-04-05 Paul Eggert <eggert@twinsun.com>
8473 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
8474 Don't use -n32 on IRIX if the installer said
8477 2000-02-28 Paul Eggert <eggert@twinsun.com>
8479 * lib/quotearg.c (ALERT_CHAR): New macro.
8480 (quotearg_buffer_restyled): Use it.
8482 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8484 * src/list.c (tartime): Fix off-by-one error when copying year if
8487 2000-02-18 Paul Eggert <eggert@twinsun.com>
8489 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
8490 (textint): New typedef.
8491 (parser_control): Changed from struct parser_control to typedef
8492 (for consistency). Member year changed from int to textint. All
8494 (YYSTYPE): Removed; replaced by %union with int and textint
8496 (tID): Removed; not used.
8497 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
8498 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
8499 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
8500 (tSNUMBER, tUNUMBER): Now of type <textintval>.
8501 (date, number, to_year): Use width of number in digits, not its
8502 value, to determine whether it's a 2-digit year, or a 2-digit
8504 (yylex): Store number of digits of numeric tokens. Return '?' for
8505 unknown identifiers, rather than (unused) tID.
8507 2000-01-16 Paul Eggert <eggert@twinsun.com>
8509 * lib/quotearg.c (quotearg_buffer_restyled):
8510 Do not quote alert, backslash, formfeed,
8511 and vertical tab unnecessarily in shell quoting style.
8513 2000-01-15 Paul Eggert <eggert@twinsun.com>
8516 Change quoting to be compatible with future autoconf versions.
8518 2000-01-11 Paul Eggert <eggert@twinsun.com>
8520 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
8522 2000-01-07 Paul Eggert <eggert@twinsun.com>
8524 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
8526 Fix bug with fnmatch.h dependency, as follows:
8527 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
8528 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
8530 * src/common.h (apply_nonancestor_delayed_set_stat):
8531 Renamed from apply_delayed_set_stat.
8532 (apply_delayed_set_stat, decode_mode, chmod_error_details,
8533 chown_error_details, close_warn, closedir_warn, mkdir_error,
8534 read_error_details, read_fatal_details, read_warn_details,
8535 seek_error_details, seek_warn_details, utime_error,
8536 write_error_details, write_fatal_details): New decls.
8538 Make diagnostic messages more regular.
8539 * src/create.c (dump_file): Quote file names with colons if possible.
8540 * src/compare.c (diff_archive): Likewise.
8541 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
8542 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
8543 * src/mangle.c (extract_mangle): Likewise.
8544 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
8546 * src/buffer.c (archive_write_error, flush_archive, close_archive,
8547 new_volume, xclose):
8548 Use error message functions to report errors consistently.
8549 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
8550 * src/create.c (finish_sparse_file, dump_file): Likewise.
8551 * src/extract.c (set_mode, set_stat, extract_sparse_file,
8552 extract_archive): Likewise.
8553 * src/list.c (list_archive): Likewise.
8554 * src/update.c (append_file): Likewise.
8555 * src/compare.c (diff_init, diff_sparse_files):
8556 Use xalloc_die to report memory exhaustion.
8557 * src/incremen.c (gnu_restore): Likewise.
8558 * src/list.c (read_header): Likewise.
8559 * src/mangle.c (extract_mangle): Likewise.
8560 * src/misc.c (maybe_backup_file): Likewise.
8561 * src/tar.c (decode_options): Likewise.
8562 * src/compare.c (read_and_process, fill_in_sparse_array,
8564 Use consistent terminology for unexpected-EOF message.
8565 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
8566 * src/list.c (list_archive, read_header, skip_file,
8567 skip_extended_headers): Likewise.
8568 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
8569 (xdup2): Regularize messages with rest of tar.
8571 * src/buffer.c (flush_read): Don't read past EOF.
8573 * src/extract.c (extr_init):
8574 If we run out of memory, invoke apply_delayed_set_stat.
8575 (prepare_to_extract): Don't complain if we can't remove ".".
8576 (apply_delayed_set_stat): New function.
8577 (apply_nonancestor_delayed_set_stat):
8578 Renamed from apply_delayed_set_stat. All uses changed.
8579 Don't remove head if it doesn't apply.
8581 * src/create.c (find_new_file_size):
8582 Return size instead of storing through pointer.
8583 All callers changed.
8584 (deal_with_sparse): Don't keep reading after read errors.
8585 (finish_sparse_file): Just abort if there is an internal error.
8586 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
8587 Don't restore access times on directories during incremental dumps
8588 until after dealing with the directory.
8589 If ignoring failed reads, count closedir, read, and unknown
8590 file errors as warnings, not errors.
8591 Fix buffer overrun problem when dumping sparse files.
8593 * src/list.c (read_and):
8594 Invoke apply_nonancestor_delayed_set_stat on file names
8595 after handling them.
8596 (decode_mode): Remove; moved to misc.c.
8598 * src/misc.c (safer_rmdir): New function.
8599 (remove_any_file): Use it to avoid problems with rmdir(".").
8600 (maybe_backup_file): Regularize diagnostics.
8601 (undo_backup_file): Likewise.
8602 (decode_mode): Moved here from list.c.
8603 (chmod_error_details, chown_error_details, close_fatal,
8604 close_warn, closedir_warn, mkdir_error, read_error_details,
8605 read_warn_details, read_fatal_details, seek_error_details,
8606 seek_warn_details, utime_error, write_error_details,
8607 write_fatal_details): New functions.
8609 * src/delete.c (save_record): Remove static variable (now local).
8610 (move_archive): Don't position before start of archive.
8611 (write_record): Abort if count is zero at inopportune time.
8614 * src/tar.c (decode_options): --delete and -f - are now
8615 incompatible, since we didn't have time to fix their bugs.
8617 * tests/Makefile.am (TESTS): Remove delete02.sh.
8618 * tests/ignfail.sh: Adjust to new quoting scheme again.
8620 2000-01-06 Paul Eggert <eggert@twinsun.com>
8622 * lib/getdate.y: Sync tm_diff with the GNU C Library.
8623 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
8624 (tm_diff): Renamed from difftm. All uses changed.
8625 Replace body with that taken from GNU C Library 2.1.3pre1.
8626 (get_date): Prefer tm_gmtoff to tm_diff if available.
8628 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
8630 * tests/incremen.sh: Invoke stat on newly created file so that its
8631 ctime is updated on Nextstep.
8633 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
8635 * lib/getdate.y (get_date):
8636 Fix typo when checking for time_t overflow in time zone calculations.
8638 1999-12-13 Paul Eggert <eggert@twinsun.com>
8640 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
8642 * README-alpha: New file.
8643 * README: New sections for gzip and bzip2, Solaris.
8644 Remove mention of BACKLOG.
8646 * configure.in (AC_C_BACKSLASH_A): Add.
8647 (AC_CHECK_HEADERS): Add wchar.h.
8648 (AC_CHECK_FUNCS): Add mbrtowc.
8649 (AC_FUNC_CLOSEDIR_VOID): Add.
8651 * tests/Makefile.am (TESTS): Add delete02.sh.
8652 (POSTPONED_TESTS): Remove.
8653 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
8656 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
8658 * tests/ignfail.sh (err): Adjust to new quoting scheme.
8660 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
8662 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
8664 * src/tar.c ("quotearg.h"): New include.
8665 (usage): Now has __attribute__ ((noreturn)).
8666 (confirm): Report errno if we can't open tty.
8667 (confirm, decode_options):
8668 Quote arbitrary strings in diagnostics.
8669 (OVERWRITE_OPTION): New constant.
8670 (long_options, usage, decode_options): New --overwrite option.
8671 (decode_options): --keep-old-files, --overwrite, and --unlink-first
8672 are now mutually exclusive.
8673 Don't assume that gettext preserves errno.
8674 (main): Set default quoting style to escape_quoting_style.
8676 * src/update.c (<quotearg.h>): New include.
8678 Don't assume that gettext preserves errno.
8679 Quote arbitrary strings in diagnostics.
8680 Check for close error.
8682 * src/names.c (<quotearg.h>): New include.
8683 (name_init, name_next, name_close, names_notfound,
8684 collect_and_sort_names): Don't assume that gettext preserves
8685 errno. Quote arbitrary strings in diagnostics.
8686 (excluded_name): Fix typo that caused empty patterns to be
8689 * src/misc.c (<quotearg.h>): New include.
8690 (quote_copy_string): Quote only newline and backslash; the output is no
8691 longer meant for humans, and is locale-independent.
8692 (contains_dot_dot): New function.
8693 (remove_any_file): Don't use lstat; just rmdir the file and then use
8694 unlink if the rmdir fails because the file isn't a directory.
8695 Check for readdir and closedir errors.
8696 (maybe_backup_file): Report "stat" for stat errors.
8697 (maybe_backup_file, chdir_do):
8698 Quote arbitrary strings in diagnostics.
8699 (maybe_backup_file, undo_last_backup):
8700 Don't assume that gettext preserves errno.
8701 (call_arg_error, call_arg_fatal, call_arg_warn,
8702 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
8703 mknod_error, open_error, open_fatal, open_warn, opendir_error,
8704 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
8705 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
8706 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
8707 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
8709 * src/system.h (__attribute__): New macro.
8710 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
8711 (S_ISDOOR): New macro.
8712 (closedir): New macro, if CLOSEDIR_VOID.
8714 * src/rmt.c, src/rtapelib.c (decode_oflag):
8715 O_APPEND might not be defined.
8717 * src/list.c: (read_and, list_archive):
8718 Quote arbitrary strings in diagnostics.
8719 (from_header): Use locale_quoting_style to quote diagnostics.
8720 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
8722 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
8724 * src/Makefile.am: Use ## for copyright comments.
8726 * src/extract.c (<quotearg.h>): New include.
8727 (enum permstatus): New enum.
8728 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
8729 two mallocs. New members file_name_len, invert_permissions, permstatus.
8730 (extr_init): Remove hack that silently adjusted newdir_umask.
8731 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
8732 Use these args to decide whether and how to set modes.
8733 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
8734 Don't assume that gettext preserves errno.
8735 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
8736 (delay_set_stat, repair_delayed_set_stat): New functions.
8737 (make_directories): Avoid mkdir where last part of path is "..".
8738 Create a struct delayed_set_stat for each directory made.
8739 (prepare_to_extract): Renamed from unlink_destination, and
8740 return 0 immediately if to_stdout_option; all callers changed.
8741 (maybe_recoverable): New parameter interdir_made.
8742 Add support for --overwrite.
8743 (extract_sparse_file, extract_archive):
8744 Quote arbitrary strings in diagnostics.
8745 (extract_archive): By default, warn about ".." in member names, and skip them.
8746 Don't open files with O_NONBLOCK or O_APPEND.
8747 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
8748 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
8749 minus the current umask. Keep track of intermediate directories made,
8750 to avoid looping when making x/../x when x doesn't exist; the
8751 earlier code solved this in a different way that didn't fit well
8752 into the new scheme. Don't extract permissions onto existing
8753 directories unless --overwrite is given. Do not add -wx------
8754 permissions to new directories permanently; just do it temporarily.
8755 Remove no-longer-needed hack with MSDOS and directory time stamps.
8756 (apply_delayed_set_stat): New argument specifies which directories to
8757 fix statuses of. Do not wait until the end of extraction to fix
8758 statuses; instead, fix a directory's status once we exit that directory.
8759 This requires less memory and does the right thing in some cases
8760 where the old method didn't.
8761 (fatal_exit): New function.
8763 * src/incremen.c (<quotearg.h>): New include.
8764 (get_directory_contents, gnu_restore):
8765 Check for readdir and closedir errors.
8766 (get_directory_contents, read_directory_file, gnu_restore):
8767 Quote arbitrary strings in diagnostics.
8768 (get_directory_contents, read_directory_file, write_directory_file):
8769 Don't assume that gettext preserves errno.
8771 * src/create.c (<quotearg.h>): New include.
8772 (start_header): Use `member names' to refer to archive member names, not
8773 `archive names'. Warn about `..' in member names.
8774 (finish_sparse_file, dump_file):
8775 Quote arbitrary strings in diagnostics.
8776 (finish_sparse_file, dump_file):
8777 Don't assume that gettext preserves errno.
8778 (dump_file): Don't use `access' to determine whether a directory is readable;
8779 this isn't reliable if tar is setuid. Use `opendir' instead.
8780 Check for readdir and closedir failures.
8781 Don't dump sockets as if they were fifos; just warn and skip.
8783 * src/delete.c (move_archive):
8784 Don't report fatal error merely because sizes don't fit
8785 into struct mtop values; fall back on lseek instead.
8786 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
8787 Say `reposition' instead of `re-position'.
8788 (delete_archive_members):
8789 Set archive to STDOUT_FILENO before outputting trailing buffer.
8791 * src/compare.c (<quotearg.h>): New include.
8792 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
8793 and `Cannot' others.
8794 (report_difference, diff_archive):
8795 Quote arbitrary strings in diagnostics.
8796 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
8797 Don't assume that gettext preserves errno.
8798 (diff_archive): Don't open regular files with O_NONBLOCK.
8799 Preserve access times of files if --atime.
8801 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
8802 (FATAL_ERROR, USAGE): Don't return 0.
8803 (enum old files): New enum.
8804 (old_files_option): New variable, replacing keep_old_files_option and
8805 unlink_first_option.
8806 (apply_delayed_set_stat): Now takes char const * param.
8807 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
8808 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
8809 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
8810 read_fatal, readdir_error, readdir_warn, readlink_error,
8811 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
8812 truncate_error, truncate_warn, unlink_error, waitpid_error,
8813 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
8816 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
8817 archive_write_error, archive_read_error, flush_archive, close_archive,
8818 init_volume_number, new_volume):
8819 Don't assume that gettext preserves errno.
8821 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
8822 (open_archive): Reject multivolume verify attempts a bit earlier.
8823 Rename local variable `access', in case it's defined by system header.
8825 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
8826 `Could not' sometimes and `Cannot' others.
8828 (open_archive, flush_read, flush_archive, close_archive, new_volume):
8829 Quote arbitrary strings in diagnostics.
8831 (read_error): Set archive to STDOUT_FILENO temporarily when writing
8834 (init_volume_number): Check for input and output errors in volno_file.
8836 (new_volume): Use new fatal_exit function to exit, and new xfork
8839 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
8841 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
8843 * doc/tar.texi: Add --overwrite.
8844 --absolute-names rejects ".." in names.
8846 * lib/quotearg.c: Add support for multibyte characters.
8848 (ISPRINT): New macro.
8849 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
8850 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
8851 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
8852 (quotearg_buffer_restyled): New function, with most of the old
8853 quotearg_buffer's contents.
8854 Major rewrite to support multibyte characters.
8855 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
8857 * m4/c-bs-a.m4: New file.
8859 * lib/Makefile.am: Use ## for copyright notice.
8861 * scripts/Makefile.am: Use ## on copyright notice.
8864 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
8866 1999-12-05 Paul Eggert <eggert@twinsun.com>
8868 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
8869 src/ChangeLog, tests/ChangeLog: Remove these files.
8870 * ChangeLog.1: New file, incorporating the above files, plus old
8872 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
8874 1999-12-05 Dale Worley <worley@ariadne.com>
8876 * src/compare.c (<utime.h>, struct utimbuf): Add.
8877 (diff_archive): Restore access times if --atime.
8878 * doc/tar.texi: Explain that --atime also preserves modification time.
8880 1999-12-04 Gerhard Poul <gpoul@gnu.org>
8882 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
8883 * BACKLOG, TODO: Remove.
8884 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
8885 * README: Bring up to date.
8887 1999-12-03 Paul Eggert <eggert@twinsun.com>
8889 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
8891 * src/compare.c (diff_archive):
8892 Do not set errno to EPIPE; we no longer use perror.
8894 * src/create.c (dump_file):
8895 If a parent directory said that a file should be there but it is
8896 absent, diagnose it as being removed in the meantime.
8897 Do not pass meaningless errno to ERROR when reporting that the
8898 file changed as we read it.
8899 Report that a file changed if its ctime changes; this is more
8900 sensitive than mtime+size, and more accurate.
8902 * src/incremen.c (enum children): New type.
8903 (struct directory): Change old char allnew member to new enum children
8906 (get_directory_contents): When doing an incremental dump that does
8907 not cross filesystem boundaries, dump the mount points, even though
8908 they are in a different filesystem. This is for convenience when
8909 restoring, and for consistency with non-incremental dumps.
8910 This requires a 3-way flag for keeping track of which children we want,
8911 so we use enum children rather than boolean.
8913 * src/open3.c (modes): Remove.
8914 (open3): Remove unportable assumptions about flag encodings.
8915 Use `stat' instead of `access' for testing file existence,
8916 to avoid problems with setuid programs.
8918 * src/names.c (name_next): If file names are given both in the
8919 command line (e.g. via -C) and in a file (via -T), do not
8920 ignore the command-line names.
8922 * m4/uintmax_t.m4: Backport to autoconf 2.13.
8924 * doc/tar.texi: Clarify getdate authorship.
8926 1999-11-23 Paul Eggert <eggert@twinsun.com>
8928 * lib/Makefile.am (DISTCLEANFILES): New macro.
8930 * configure.in (tar_fnmatch_hin):
8931 Remove; it runs afoul of a bug in autoconf 2.13.
8932 Instead, always link fnmatch.h to some file, even if it's a throwaway.
8934 1999-11-19 Paul Eggert <eggert@twinsun.com>
8936 * m4/largefile.m4: Update serial.
8938 1999-11-18 Paul Eggert <eggert@twinsun.com>
8940 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
8941 the QNX shell, which doesn't propagate exit status of failed
8942 commands inside shell assignments.
8944 1999-11-07 Paul Eggert <eggert@twinsun.com>
8946 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
8948 * configure.in (AC_PREREQ): Bump to 2.13.
8949 (ALL_LINGUAS): Add pt_BR, ja.
8950 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
8951 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
8952 for AIX crossbuilds.
8954 * doc/tar.texi: New node create options for --ignore-failed-read.
8955 Remove unused version control symbols.
8956 Modernize texinfo usage.
8958 * src/tar.c (usage): Add examples.
8960 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
8961 Include fnmatch.h when testing fnmatch.
8963 * src/common.h (collect_and_sort_names): New decl.
8965 * src/list.c (from_header):
8966 Handle 32-bit two's complement negative time stamps
8967 even if the leading octal digit is 2 or 3.
8969 * src/extract.c (set_stat): Remove duplicate code.
8971 * src/create.c (to_chars): Remove trailing newline from warning.
8972 (dump_file): Ignore doors.
8973 (finish_header): Report block numbers with origin 0, not origin 1.
8975 * src/rmt.c: Include getopt.h.
8976 (long_opts): New constant.
8977 (usage): New function.
8978 (main): Implement --help and --version.
8979 Output usage message if arguments are bad.
8981 1999-10-10 Paul Eggert <eggert@twinsun.com>
8983 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
8985 * README: Remove --with-dmalloc.
8986 Add --disable-largefile.
8987 Remove old NeXT dirent problems, or AIX valloc problems.
8988 Remove old union wait advice, and old %lld advice.
8989 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
8991 * doc/tar.texi: Clarify documentation for portable file names.
8993 * configure.in (AM_WITH_DMALLOC): Remove.
8994 (ALL_LINGUAS): Add ja.
8996 * src/tar.c (decode_options):
8997 Invalid dates are now treated as (time_t) -1.
8998 Redo version message to conform to GNU standards.
9000 * src/create.c (dump_file):
9001 Fix typo: last two args to dump_file were interchanged.
9002 * src/update.c (update_archive): Likewise.
9004 * src/common.h (tartime): New decl.
9006 * src/list.c (tartime): Now extern.
9007 (read_and): Invalid headers cause errors, not warnings.
9009 1999-10-03 Paul Eggert <eggert@twinsun.com>
9011 * lib/getdate.y (__attribute__):
9012 Don't use if GCC claims to be before 2.8; this is
9013 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
9015 1999-09-25 Paul Eggert <eggert@twinsun.com>
9017 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
9018 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
9020 * tests/incremen.sh: Add yet another sleep.
9022 1999-09-24 Paul Eggert <eggert@twinsun.com>
9024 * NEWS: A read error now causes a nonzero exit status.
9026 * src/create.c (to_chars): Fix base-256 output.
9028 * src/buffer.c (write_error):
9029 Read error is an error, not just a warning.
9031 1999-09-24 Paul Eggert <eggert@twinsun.com>
9033 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
9035 * src/tar.c (<time.h>): Include.
9036 (time): Declare if not defined.
9037 (confirm): Don't read past EOF.
9038 (long_options, usage): Add --no-same-owner, --no-same-permissions.
9039 (main): Use clock_gettime if available.
9041 * tests/Makefile.am (TESTS): Add incremen.sh
9042 (INCLUDES): Add -I../lib, for fnmatch.h.
9044 * src/update.c (update_archive):
9045 Remove call to name_expand; had no effect.
9046 Use chdir_do to change into directory.
9047 Use deref_stat instead of stat.
9048 Use add_avoided_name to mark names to be avoided; the old method of
9049 setting a bit with the name caused all descendants of that name to
9050 be avoided, in some circumstances.
9052 * tests/incremen.sh: Remove unnecessary sleeps.
9054 * src/names.c (name_next): Go back to using plain chdir.
9055 (name_gather): Use chdir_arg to keep track of arguments to chdir.
9056 (addname): Likewise.
9057 (name_match): Use chdir_do to act on chdir args.
9058 (merge_sort): Moved here from incremen.c.
9059 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
9061 (name_expand): Remove.
9062 (name_from_list): Skip fake names.
9063 Use chdir_do to act on chdir args.
9064 (struct avoided_name): New struct.
9065 (avoided_names): New var.
9066 (add_avoided_name, is_avoided_name): New functions.
9068 * src/system.h (stat, lstat): Define in terms of statx on
9069 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
9070 (UCHAR_MAX): New macro.
9071 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
9073 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
9075 * src/incremen.c (<time.h>): Remove include; no longer used.
9076 (time): Remove decl.
9078 (get_directory_contents): Use deref_stat.
9079 Consider a subdirectory to be all new only if
9080 listed_incremental_option or if it its timestamp is newer than the
9082 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
9083 (read_directory_file): Now extern. Do not set time_now.
9084 (write_directory_file): Renamed from write_dir_file.
9085 Use start_time instead of time_now.
9086 (compare_names, collect_and_sort_names): Move to names.c.
9088 * src/mangle.c (<time.h>): Remove; not used.
9089 (time): Do not declare.
9091 * src/misc.c (chdir_from_initial_wd): Remove.
9092 (deref_stat): New function.
9093 (struct wd): New struct.
9094 (wd, wds, wd_alloc): New variables.
9095 (chdir_arg, chdir_do): New function.
9097 * src/compare.c (get_stat_data): Use deref_stat.
9099 * src/common.h (name_expand): Remove.
9101 * src/list.c (time): Declare if not defined.
9102 (base_64_digits): Moved here from create.c.
9103 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
9105 (read_and): Don't get time from header unless we need it now;
9106 as getting time can cause duplicate diagnostics if bogus.
9107 Remove "Hmm, " from diagnostic.
9108 Use "Skipping to next header" uniformly.
9109 (from_header): Renamed from from_chars. All uses changed.
9110 Allow different forms for unportable 2's complement numbers.
9111 Don't check for extended forms when parsing checksums.
9112 Parse base-256 output.
9113 (gid_from_header): Renamed from gid_from_chars. All uses changed.
9114 (major_from_header): Renamed from major_from_chars. All uses changed.
9115 (minor_from_header): Renamed from minor_from_chars. All uses changed.
9116 (mode_from_header): Renamed from mode_from_chars. All uses changed.
9117 (off_from_header): Renamed from off_from_chars. All uses changed.
9118 (size_from_header): Renamed from size_from_chars. All uses changed.
9119 (time_from_header): Renamed from time_from_chars. All uses changed.
9120 Warn about future timestamps.
9121 (uid_from_header): Renamed from uid_from_chars. All uses changed.
9122 (uintmax_from_header): Renamed from uintmax_from_chars.
9124 (tartime): New function, incorporating isotime.
9126 (print_header): Use tartime.
9128 * src/create.c (to_chars): Fix typo in decl.
9129 Don't assign through char const *.
9130 Rename name_expand back to collect_and_sort_names.
9132 * src/extract.c (<time.h>): No need to include.
9133 (time): No need to declare.
9134 (now): Remove variable.
9135 (extr_init): Don't initialize `now'.
9136 Increment same_permissions_option and same_owner_option if we_are_root
9137 is nonzero; this supports the new --no-same-owner option.
9138 (set_stat): Use start_time instead of `now'.
9140 * src/create.c (struct link): Remove unused linkcount member.
9141 (base_64_digits): Move to list.c.
9142 (base_8_digits): Remove.
9143 (to_octal): New function, with some of old contents of to_base.
9145 (to_base256): New function.
9146 (to_chars): Use base 256, not base 64, for huge values.
9147 (mode_to_chars): Don't use two's complement in GNU format or POSIX
9149 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
9150 it means we have an incremental dump where we don't know whether this
9151 is a top-level call.
9152 Use deref_stat instead of statx / stat / lstat.
9153 Cast result of alloca.
9154 Check for dates if 0 < top_level, not if listed_incremental_option.
9155 Move multiple-link check after directory check.
9156 Do not dump avoided names.
9157 Dump hard links to symbolic names as links, not as separate
9159 start_header cannot return a null pointer, so don't test for it.
9160 Likewise for find_next_block.
9162 * src/buffer.c, src/common.h (<human.h>): Include.
9163 (read_error): Read error is an error, not just a warning.
9164 (print_total_written): Also print human-readable byte count, and
9166 (open_archive, flush_write): Use start_time, not current time.
9167 (flush_read): Report about garbage bytes ignored at end of archive,
9168 but act on non-garbage bytes (instead of ignoring them).
9169 (new_volume): Use WARN for warnings.
9172 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
9174 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
9176 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
9178 * lib/Makefile.am (noinst_HEADERS):
9179 Rename fnmatch.h to fnmatch.hin; add human.h.
9180 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
9181 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
9183 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
9185 * lib/fnmatch.c (strchrnul):
9186 Define to __strchrnul if _LIBC, to our own replacement otherwise.
9187 Do not define if !_LIBC and if it already exists.
9188 (internal_fnmatch): Use it.
9190 * configure.in (tar_LDADD): New variable, used only when linking tar.
9191 (rmt_LDADD): Similarly, for rmt.
9192 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
9193 fnmatch.c; otherwise, use the system fnmatch.h.
9195 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
9196 Modernize sample backup script.
9198 * THANKS: Martin Goik's email address has changed.
9200 * m4/fnmatch.m4: New file.
9202 1999-09-03 Paul Eggert <eggert@twinsun.com>
9204 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
9207 1999-08-29 Paul Eggert <eggert@twinsun.com>
9209 * lib/getdate.y (get_date):
9210 Rename outermost local `probe' to `quarter'.
9211 Rename latter local `tm' to probe_tm.
9212 From: Jim Meyering <meyering@ascend.com>
9213 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
9215 1999-08-28 Paul Eggert <eggert@twinsun.com>
9217 * lib/getdate.y (PC): New macro; use it when possible.
9218 (number): Handle `Nov 11 1996' example correctly.
9219 See Risks Digest 20.55 (1999-08-27)
9220 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
9222 1999-08-23 Paul Eggert <eggert@twinsun.com>
9224 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
9226 Remove minor cases of lint from many source files: this includes
9227 unnecessary casts, uses of NULL, etc.
9229 * configure.in (AC_PROG_YACC): Remove.
9230 (YACC): Always use bison.
9231 (AC_STRUCT_TIMEZONE): Add.
9232 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
9234 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
9237 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
9238 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
9240 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
9242 * src/common.h (merge_sort): Remove decl; no longer exported.
9244 * src/system.h (voidstar): Remove.
9245 (memcpy, memcmp): Cast args.
9246 ("xalloc.h"): Add include.
9247 (xmalloc, xrealloc): Remove decl.
9249 * src/mangle.c (time): Do not declare if defined.
9250 (first_mangle, mangled_num): Remove.
9252 * src/list.c (from_chars): Report out-of-range values more precisely.
9253 (off_from_chars): Do not allow negative offsets.
9254 (uid_from_chars): Allow negative uids.
9256 * src/create.c (linklist): Now static.
9257 (to_chars): Fix wording of message to match from_chars.
9259 * src/misc.c (merge_sort): Move to incremen.c.
9260 * src/incremen.c (merge_sort): Move here from misc.c; now static.
9261 It's too painful to make it both generic and portable.
9262 (read_directory_file): "timestamp" -> "time stamp" in messages.
9264 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
9265 (usage): Fix misspelling.
9266 (OPTION_STRING): -y is now -I.
9267 (decode_options): Use -1, not EOF, for getopt_long result.
9268 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
9269 Handle operands after any "--" argument.
9270 (main): Report any output errors.
9272 * src/rmt.c (main): status is ssize_t, not long.
9274 * src/names.c (name_gather): Handle trailing -C option correctly.
9275 (addname): use memcpy, not strncpy, to copy a string of known length.
9276 (name_match): Handle trailing -C option correctly.
9277 Propagate -C option to following files.
9278 (name_match, name_scan): Remove redundant matching code.
9280 * src/buffer.c (open_archive): Use American spelling in diagnostic.
9282 * lib/getdate.y: Major rewrite. Add copyright notice.
9283 (<stdio.h>): Include only if testing.
9285 (ISLOWER): New macro.
9286 (<string.h>): Include if HAVE_STRING_H, not USG.
9288 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
9290 (EPOCH_YEAR): Renamed from EPOCH.
9291 (table): Renamed from TABLE.
9292 (meridian): Now an anonymous enum.
9293 (struct parser_control): New type.
9294 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
9295 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
9296 (%pure_parser): Added, so that the parser is pure.
9297 (%union): Removed; the type is now just plain int.
9298 All %type directives removed.
9299 (tLOCAL_ZONE): New %token.
9300 (month_day_table): Renamed from MonthDayTable.
9301 (gmtime, localtime, mktime, time): Declare only if not defined.
9302 (meridian_table): New table.
9303 (dst_table): New table.
9304 (units_table): renamed from UnitsTable.
9305 (relative_time_table): Renamed from OtherTable.
9306 (time_zone_table): Renamed from TimezoneTable. Modernized.
9307 (military_table): Renamed from MilitaryTable.
9308 (to_hour): Renamed from ToHour.
9309 (to_year): Renamed from ToYear.
9310 (lookup_zone): New function.
9311 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
9313 (yylex): Now reentrant. All callers changed.
9314 (get_date): Add support for local time zone abbreviations.
9317 1999-08-20 Paul Eggert <eggert@twinsun.com>
9319 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
9321 * src/create.c (to_chars): Generate GNU base-64 representation
9322 if we are generating an old or new GNU format tar file for a
9323 number that can't be represented with the POSIX format.
9325 * configure.in (AC_CHECK_FUNCS): Add fchdir.
9326 (AM_FUNC_GETLINE): Add.
9327 (LIBOBJS): Add getline.o to workaround comment.
9328 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
9329 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
9330 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
9331 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
9332 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
9333 lib/save-cwd.h, m4/getline.m4: New files.
9335 * src/misc.c (<save-cwd.h>): Include.
9336 (chdir_from_initial_wd): New function.
9338 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
9339 (name_gather): Handle `-C x -C y' correctly.
9340 Do not rely on addname to handle -C.
9341 (addname): New CHANGE_DIR parameter. All callers changed.
9342 Remove ugly calls to getcwd; no longer needed.
9343 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
9345 * src/incremen.c (listed_incremental_stream): New var.
9346 (read_directory_file): Remove arbitrary limits on file name length.
9347 Do not attempt to get the working directory; we can bypass this
9348 on fchdir hosts. Open the listed_incremental_option file for both
9349 read and write instead of opening it twice. Check for I/O errors
9350 when doing I/O to this file. Check for invalid data in the file,
9351 and report line numbers of invalid data.
9352 (write_dir_file): Likewise.
9353 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
9354 Do not invoke write_dir_file; that's our caller's responsibility.
9356 * src/list.c (max): New macro.
9357 (isotime): Now takes time_t, not time_t *. Report the decimal values
9358 of times that can't be broken down.
9359 (print_header): Don't assume that major and minor device numbers can
9362 * src/common.h (struct name): change_dir is now char const *.
9363 (write_directory_file): Remove unused decl.
9364 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
9365 chars; the old `sizeof (b)' broke when b was a pointer not an array.
9366 (chdir_from_initial_wd): New decl.
9367 (addname): New 2nd arg.
9369 * THANKS: Torsten Lull -> Catrin Urbanneck
9371 1999-08-18 Paul Eggert <eggert@twinsun.com>
9373 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
9374 Don't depend on ac_cv_func variables.
9375 From Albert Chin-A-Young <china@thewrittenword.com>.
9377 1999-08-18 Paul Eggert <eggert@twinsun.com>
9379 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
9381 * m4/signedchar.m4: New file.
9382 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
9383 * src/system.h (signed_char): New macro.
9384 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
9385 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
9387 * src/create.c (write_eot): Write at least two zero blocks.
9389 * src/extract.c (extract_archive): Fix sparse array bug:
9390 we did not find end of array correctly.
9392 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
9393 Don't assume find_next_block yields nonnull.
9394 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
9395 * src/list.c (skip_extended_headers): Likewise.
9397 * src/list.c (read_and, list_archive): Simplify code.
9398 (read_header): Fix computation of signed checksums on machines where
9400 Do not consider a block to be zero unless all its bytes are zero,
9401 even the checksum bytes. Do not attempt to parse the checksum of
9402 a zero block. Fix memory leak with long names and links.
9403 (from_chars): Accommodate a buggy tar that outputs leading NUL
9404 if the previous field overflows.
9406 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
9407 \?, for portability to non-ASCII hosts.
9409 1999-08-16 Paul Eggert <eggert@twinsun.com>
9411 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
9413 * src/extract.c (make_directories): Do not chown intermediate
9414 directories, even if we are root.
9416 * src/list.c (read_header): Fix bugs when interpreting
9417 POSIX-compliant headers that do not contain null bytes in the
9418 header or link names.
9420 1999-08-14 Paul Eggert <eggert@twinsun.com>
9422 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
9424 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
9425 (AC_HEADER_SYS_WAIT): Add.
9426 (AC_REPLACE_FUNCS): Add waitpid.
9427 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
9428 * lib/waitpid.c: New file.
9429 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
9430 * src/system.h (WCOREDUMP): Remove; no longer used.
9431 (WIFSTOPPED): Likewise.
9432 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
9433 * src/buffer.c (child_open_for_compress): Undo previous change.
9434 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
9435 (new_volume): Likewise.
9437 * src/buffer.c, src/extract.c, src/incremen.c (time):
9438 Don't declare if defined.
9439 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
9440 * src/incremen.c (read_directory_file):
9441 Invoke `time' the same way everyone else does.
9442 Check validity of --listed-incremental file contents a bit better.
9443 Do not worry about --after-date-option; tar.c now checks this.
9444 * src/list.c (isotime): Report ??? if localtime returns null.
9445 Don't assume years fit into four digits.
9446 Don't append trailing newline.
9447 (print_header): Report ??? if localtime returns null;
9448 Don't assume years fit into four digits.
9450 * src/compare.c (diff_archive): Do not fall back on absolute name
9451 when --absolute-names is not specified.
9453 * src/create.c (start_header):
9454 Include text of ignored filesystem prefix in warning.
9455 (create_archive): Check for excluded names when doing incremental
9456 pass through directory.
9457 (dump_file): Do not dump old files explicitly given on command line
9458 when using --listed-incremental. Do not strip ./ prefix from names.
9460 * src/tar.c: -g now implies after_date_option = 1.
9461 -g and -N are now incompatible options.
9463 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
9465 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
9467 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
9468 incremental headers as POSIX prefixes.
9470 1999-08-11 Paul Eggert <eggert@twinsun.com>
9472 * NEWS, configure.in: Version 1.13.6.
9474 * configure.in (ALL_LINGUAS): Add pt_BR.
9475 * po/pt_BR.po: New file.
9477 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
9478 Renamed from tar.info and header.texi; adjust actions so that
9479 they work in other directories.
9481 * doc/tar.texi: Add -y and --bzip2.
9482 Patterns containing / now exclude only file names whose prefix match.
9484 * lib/exclude.h (excluded_filename): New option parameter.
9485 (add_exclude_file): New ADD_FUNC parameter.
9486 (excluded_pathname): Remove decl.
9487 * lib/exclude.c (_GNU_SOURCE):
9488 Remove; no longer needed since we don't use FNM_ macros.
9489 (excluded_filename): Renamed from excluded_filename_opts.
9490 (excluded_filename, excluded_pathname): Remove.
9491 (add_exclude_file): New ADD_FUNC parameter.
9493 * po/POTFILES.in: Add lib/quotearg.c.
9495 * src/buffer.c (_GNU_SOURCE): Define.
9496 (<fnmatch.h>): Include unconditionally.
9497 (child_open_for_compress): Dup after closing, to avoid possible file
9498 descriptor exhaustion.
9499 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
9500 (flush_read): Likewise.
9502 * src/common.h (LG_8, LG_64): New macros.
9503 (excluded_with_slash, excluded_without_slash): New vars.
9505 (base_64_digits): New decl.
9506 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
9507 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
9509 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
9510 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
9512 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
9513 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
9514 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
9515 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
9516 respectively. All definitions and uses changed.
9517 (excluded_name): New decl.
9519 * src/compare.c (diff_archive):
9520 Open files with O_NONBLOCK instead of O_NDELAY.
9522 * src/create.c (base_64_digits): New constant.
9523 (base_8_digits): New macro.
9524 (MAX_VAL_WITH_DIGITS): New macro.
9525 (to_base): First half of old to_oct. Support base 64 too.
9526 (to_chars): Other half of old to_oct, for 64-bit support.
9527 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
9528 (gid_substitute, uid_substitute): Look up names dynamically if
9529 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
9530 (mode_to_chars): Renamed from mode_to_oct.
9531 Support negative values in all the _to_chars functions.
9532 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
9533 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
9534 (dump_file): Inspect entire pathname, not just new file name
9535 component, when deciding whether to exclude it.
9537 * src/extract.c (extract_archive):
9538 Open files with O_NONBLOCK instead of O_NDELAY.
9540 * src/incremen.c (get_directory_contents):
9541 Inspect entire pathname, not just new file name
9542 component, when deciding whether to exclude it.
9544 * src/list.c (<fnmatch.h>): Do not include.
9545 (from_chars): Renamed from from_oct. New parameter specifying
9546 the negative of the minimum allowed value. Support negative
9548 (base64_map): New var.
9549 (base64_init): New function.
9550 (print_header): Output numeric uids and gids if numeric_owner_option.
9552 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
9554 * src/names.c (_GNU_SOURCE): Define.
9555 (<fnmatch.h>): Include unconditionally.
9556 (excluded_name): New function, taking over duties of excluded_pathname.
9559 * src/rmt.c (decode_oflag): New function.
9560 (main): Use it to support symbolic open flags.
9562 * src/rtapelib.c (encode_oflag): New function.
9563 (rmt_open__): Do not allow newlines in the path.
9564 Propagate errno correctly.
9565 Decode symbolic open flags, if present.
9567 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
9570 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
9571 New -y or --bzip2 option.
9572 (add_filtered_exclude): New function.
9573 (decode_options): Put excluded patterns with / into
9574 excluded_with_slash, and without / into excluded_without_slash.
9575 Compare newer_mtime_option to its new initial value
9576 TYPE_MINIMUM (time_t) when deciding whether more than one
9577 threshold date was specified.
9579 1999-07-20 Paul Eggert <eggert@twinsun.com>
9581 * NEWS, configure.in: Version 1.13.5.
9583 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
9585 * src/buffer.c (new_volume): Likewise.
9586 * src/incremen.c (read_directory_file): Likewise.
9587 * src/tar.c (decode_options):
9588 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
9591 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
9592 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
9594 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
9595 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
9596 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
9597 Define to 0 if the corresponding S_IF* macro is not defined.
9598 (mkfifo): Do not define if already defined, or if S_IFIFO
9601 * src/compare.c (diff_archive): Use HAVE_READLINK, not
9602 S_ISLNK, to determine whether to invoke readlink.
9603 * src/create.c (dump_file): Likewise.
9605 * src/extract.c (set_mode):
9606 Do not chmod unless we are root or the -p option was given;
9607 this matches historical practice.
9608 (unlink_destination): New function, which checks for unlink failures.
9609 (maybe_recoverable): Stay quiet if -U.
9610 (extract_archive): Use O_EXCL if unlink_first_option.
9611 Report unlink failures.
9612 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
9613 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
9616 * src/incremen.c (get_directory_contents): Depend on
9617 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
9619 * src/list.c: Remove S_IS* ifdefs.
9620 * src/misc.c (maybe_backup_file): Likewise.
9622 * src/misc.c (maybe_backup_file):
9623 "Virtual memory exhausted" -> "Memory exhausted",
9624 to conform to the other places this message is issued.
9626 * src/mangle.c (extract_mangle):
9627 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
9629 * src/rtapelib.c (rmt_open__):
9630 Remove typo that caused us to omit the first char
9633 1999-07-16 Paul Eggert <eggert@twinsun.com>
9635 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
9637 * doc/tar.texi: A path name is excluded if any of its file name
9638 components matches an excluded pattern, even if the path name was
9639 specified on the command line.
9640 * src/create.c (create_archive): Likewise.
9641 * src/list.c (read_and): Likewise.
9642 * src/update.c (update_archive): Likewise.
9643 * lib/exclude.h (excluded_pathname): New decl.
9644 * lib/exclude.c (_GNU_SOURCE): Define.
9645 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
9646 (excluded_filename_opts): New function.
9647 (excluded_pathname): New function.
9649 * lib/Makefile.am (EXTRA_DIST):
9650 xstrtol.c moved here from libtar_a_SOURCES.
9651 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
9652 Remove xstrtoul.c; no longer needed.
9653 * lib/xstrtol.c: Remove.
9655 * src/tar.c (decode_options):
9656 Set newer_time_option to TYPE_MINIMUM, so that
9657 negative timestamps are handled correctly.
9658 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
9659 uniformity (and so that we don't need to have the other fns).
9660 (main): Remove call to init_total_written; no longer needed.
9662 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
9663 checks for unsigned long and long long.
9664 * src/arith.c: Remove.
9665 * src/Makefile.am (tar_SOURCES): Remove arith.c.
9666 * po/POTFILES.in: Remove src/arith.c.
9667 * src/arith.h: Use double, to simplify configuration gotchas.
9668 (tarlong): Now double.
9669 (TARLONG_FORMAT): New macro.
9670 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
9671 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
9672 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
9673 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
9674 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
9675 mult_tarlong, print_tarlong): Remove. All callers replaced with
9678 * src/common.h (init_total_written): Remove decl.
9680 * src/buffer.c (total_written):
9681 Remove; replaced with prev_written + bytes_written.
9682 (prev_written): New var.
9683 (init_total_written): Remove.
9684 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
9686 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
9687 Make sure that we can shift, multiply
9688 and divide unsigned long long values; Ultrix cc can't do it.
9690 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
9691 Check for any unknown bits, not just unknown bits left of the leftmost
9694 * lib/quotearg.c (quotearg_buffer):
9695 Don't quote spaces if C quoting style.
9696 * src/list.c (from_oct):
9697 Use C quoting style for error; omit trailing NULs.
9699 1999-07-14 Paul Eggert <eggert@twinsun.com>
9701 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
9703 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
9704 <inttypes.h> defines strtoumax as a macro (and not as a function).
9705 HP-UX 10.20 does this.
9707 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
9708 * PORTS, README, TODO, doc/tar.texi: Likewise.
9710 1999-07-12 Paul Eggert <eggert@twinsun.com>
9712 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
9713 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
9715 * src/list.c (decode_header):
9716 Do not assume that S_IFBLK and S_IFCHR are defined.
9718 * src/create.c (start_header): Do not assume S_IFMT is defined.
9719 (dump_file): Remove unnecessary check for screwy apollo lossage.
9720 Do not assume S_IFBLK and S_IFCHR are defined.
9722 * src/extract.c (extract_archive):
9723 Test whether S_IFCHR and S_IFBLK are nonzero,
9724 not whether they are defined, for consistency with other tests.
9726 * src/buffer.c (is_regular_file):
9727 Don't succeed on files that we can't access due to
9728 permissions problems.
9729 (open_archive): Fix wording on fatal error message.
9730 Don't bother to stat /dev/null if the archive is not a character
9733 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
9734 Report an error, not a warning, for I/O errors.
9735 (process_rawdata, process_dumpdir, diff_sparse_files):
9736 Change ungrammatical "Data differs" to "Contents differ".
9737 (get_stat_data): Find hidden files on AIX.
9738 Accept file name as argument; all uses changed.
9739 (get_stat_data, diff_archive): Use system error message for
9740 nonexistent files rather than rolling our own.
9741 (diff_archive): Unknown file types are errors, not warnings.
9742 Normalize spelling of message to "File type differs".
9743 Use get_stat_data to get link status, for consistency.
9744 Do not inspect st_rdev for fifos.
9745 Do not assume st_mode values contain only file types and mode bits.
9746 Check for mode changes and device number changes separately.
9748 * src/update.c (append_file):
9749 Open the file before statting it, to avoid a race.
9750 Complain about file shrinkage only when we reach EOF.
9752 1999-07-08 Paul Eggert <eggert@twinsun.com>
9754 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
9756 * configure.in (AC_EXEEXT): Add.
9758 * lib/Makefile.am (noinst_HEADERS):
9759 Add basename.h, exclude.h. Remove full-write.h.
9760 (libtar_a_SOURCES): Add exclude.c.
9762 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
9764 * lib/full-write.c: Include safe-read.h instead of full-write.h.
9765 * lib/safe-read.h (safe_read): New decl.
9766 * src/rmt.c: Include safe-read.h.
9767 * src/rtapelib.c: Include basename.h, save-read.h.
9768 (rmt_open__): Use base_name to compute base name.
9771 Include basename.h, exclude.h; don't include full-write.h.
9772 (exclude_option): Remove decl.
9773 (excluded): New decl.
9774 (add_exclude, add_exclude_file, check_exclude): Remove decls.
9776 * src/list.c (read_and):
9777 Use excluded_filename instead of check_exclude.
9778 Check base name of incoming file name, not entire file name, when
9779 deciding whether to exclude it.
9781 * src/create.c (finish_sparse_file):
9782 Use excluded_filename instead of check_exclude.
9783 Don't bother to stat excluded file names.
9784 * src/incremen.c (get_directory_contents): Likewise.
9786 * src/names.c (exclude_pool, exclude_pool_size,
9787 allocated_exclude_pool_size, simple_exclude_array,
9788 simple_excludes, allocated_simple_excludes,
9789 pattern_exclude_array, pattern_excludes,
9790 allocated_pattern_excludes, add_exclude, add_exclude_file,
9792 Remove; now done in ../lib/exclude.c.
9794 * src/tar.c (decode_options): Initialize `excluded'.
9795 Use new add_exclude_file and add_exclude functions.
9797 1999-07-05 Paul Eggert <eggert@twinsun.com>
9799 * m4/gettext.m4: Use changequote rather than [[ ]].
9801 * lib/safe-read.c: Renamed from lib/full-read.c.
9802 (safe_read): Renamed from full_read. All uses changed.
9803 * lib/safe-read.h, lib/full-write.h: New files.
9804 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
9805 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
9806 * lib/full-write.c: Include full-write.h.
9807 * src/common.h: Include full-write.h, safe-read.h.
9808 * src/system.h: (full_read, full_write): Remove decls.
9810 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
9812 * src/system.h (bindtextdomain, textdomain): undef before
9813 defining, to avoid preprocessor warnings with --disable-nls
9814 on hosts whose locale.h includes libintl.h.
9816 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
9817 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
9818 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
9821 1999-07-02 Paul Eggert <eggert@twinsun.com>
9823 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
9824 * m4/mktime.m4: New file.
9825 * m4/Makefile.am.in, m4/README: Remove these files.
9826 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
9827 remove README, Makefile.am.in.
9828 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
9829 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
9832 * src/tar.c: Include signal.h.
9833 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
9834 (main): Ensure SIGCHLD is not ignored.
9836 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
9837 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
9838 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
9839 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
9840 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
9841 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
9842 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
9843 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
9844 they don't overlap with char codes. Use an enum instead of a lot
9847 * src/system.h (ISASCII): Remove.
9848 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
9849 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
9850 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
9851 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
9852 LONG_MAX): New macros.
9854 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
9855 (read_directory_file): Cast ISSPACE arg to unsigned char.
9856 * src/misc.c (ISPRINT): Remove; now in system.h.
9857 (remove_any_file): Add brackets to pacify gcc -Wall.
9858 * src/list.c: Don't include <ctype.h>; system.h already does this.
9859 (ISODIGIT, ISSPACE): Remove; now in system.h.
9860 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
9862 (from_oct): Cast ISSPACE arg to unsigned char.
9864 * src/create.c (mode_to_oct): Translate modes from internal to
9866 * src/list.c (mode_from_oct): Translate modes from external to
9867 internal form. Do not complain about unrecognized mode bits.
9868 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
9869 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
9871 * src/extract.c: (extr_init, make_directories, extract_archive):
9872 Do not assume mode bits have traditional Unix values.
9873 * src/list.c (decode_mode): Likewise.
9874 * src/create.c (start_header, dump_file): Likewise.
9875 * src/buffer.c (child_open_for_compress,
9876 child_open_for_uncompress, open_archive, (close_archive): Likewise.
9877 * src/compare.c (diff_archive): Likewise.
9879 * src/extract.c (set_mode): Use %04 not %0.4 format.
9880 (extract_sparse_file): Do not use data_block uninitialized.
9881 Check for lseek failures.
9883 * src/rtapelib.c (rmt_lseek__):
9884 Convert lseek whence values to portable integers on the wire.
9885 * src/rmt.c (main): Likewise. Check for whence values out of range.
9887 * src/create.c (finish_sparse_file): Use lseek whence macros
9888 instead of integers.
9889 * src/buffer.c (backspace_output): Likewise.
9890 * src/compare.c (diff_archive, verify_volume): Likewise.
9891 * src/delete.c (move_archive): Likewise.
9892 * src/extract.c (extract_sparse_file): Likewise.
9894 * src/create.c (dump_file): Do not invoke finish_sparse_file
9895 on a negative file descriptor.
9897 * src/buffer.c: Add braces to pacify gcc -Wall.
9899 * src/compare.c (diff_sparse_files): Report lseek errors.
9901 * configure.in (ALL_LINGUAS): Add cs, es, ru.
9903 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
9905 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
9906 message to be internationalized; \a doesn't work with msgfmt.
9908 * src/tar.c (long_options, main, usage, OPTION_STRING):
9909 Remove -E or --ending-file.
9910 * src/list.c (read_and): Likewise.
9911 * src/common.h (ending_file_option): Likewise.
9912 * src/buffer.c (close_archive): Likewise.
9914 * tests/after: Don't run two commands together in a pipeline,
9915 as some old shells mishandle pipeline exit status.
9917 1999-06-28 Paul Eggert <eggert@twinsun.com>
9919 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
9920 * NEWS: Describe changes since 1.12.
9921 * README: Update bug reporting address; move paxutils ref to NEWS.
9923 Handle EINTR correctly.
9924 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
9925 * lib/full-read.c, lib/full-write.c: New files.
9926 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
9927 Prefer full_read to read and full_write to write.
9928 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
9929 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
9931 * src/extract.c (extract_sparse_file): Likewise.
9932 * src/rmt.c (get_string, main, report_error_message,
9933 report_numbered_error): Likewise.
9934 * src/rmt.h (rmtread, rmtwrite): Likewise.
9935 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
9936 rmt_write__, rmt_ioctl__): Likewise.
9937 * src/update.c (append_file): Likewise.
9938 * src/system.h (full_read, full_write): New decls.
9940 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
9941 lib/xmalloc.c, src/arith.c, src/misc.c.
9943 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
9944 New macros. All uses of STDIN and STDOUT changed.
9945 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
9946 instead of 0 and STDOUT_FILENO instead of 1.
9947 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
9948 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
9950 * src/rmt.c (private_strerror): Avoid const. Translate results.
9952 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
9953 in the presence of NFS clock skew.
9955 1999-06-25 Paul Eggert <eggert@twinsun.com>
9957 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
9959 * src/buffer.c (write_archive_buffer): New function.
9960 (child_open_for_compress, flush_write, flush_read): Use it to write
9962 (open_archive): Report error if fstat of archive fails.
9963 Improve efficiency of check for /dev/null.
9964 Also, fix some corner cases with remote archives and /dev/null checking.
9965 (close_archive): Test for input fifo only if not remote.
9966 Truncate output archive only if it's not remote.
9968 * src/misc.c (remove_any_file):
9969 Don't terminate if you see . or ..; just skip them.
9971 1999-06-18 Paul Eggert <eggert@twinsun.com>
9973 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
9975 Output sizes using a format that's more compatible with
9976 traditional tar (and with GNU Emacs).
9977 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
9978 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
9979 Don't subtract 1 from size.
9980 * src/create.c (to_oct): Prepend leading zeros, not spaces.
9981 Output a trailing NUL unless the value won't fit without it.
9982 (finish_header): No need to append NUL to chksum, now that
9985 1999-06-16 Paul Eggert <eggert@twinsun.com>
9987 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
9989 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
9990 @INTLLIBS@ might invoke rpl_realloc.
9992 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
9993 (intconv): Remove; use xstrto* fns instead.
9994 ("xstrtol.h"): Include.
9995 (check_decimal): Remove.
9996 (long_options, usage, OPTION_STRING, decode_options):
9997 Remove -y, --bzip2, --unbzip2.
9998 (decode_options): Use xget_version instead of get_version.
9999 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
10000 Replace invocations of check_decimal with xstrtoumax.
10002 * tests/preset.in (echo_n, echo_c): Remove.
10004 * tests/after: Don't rely on $echo_c and $echo_n.
10006 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
10007 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
10008 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
10009 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
10010 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
10011 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
10012 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
10013 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
10014 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
10015 m4/xstrtoumax.m4: New files.
10017 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
10018 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
10019 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
10020 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
10021 (AC_CHECK_FUNCS): Remove lchown.
10022 (AC_REPLACE_FUNCS): Remove basename, dirname.
10023 Add lchown, strtol, strtoul.
10024 (jm_FUNC_MKTIME): Add.
10025 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
10026 are also built via the ANSI2KNR-filtering rules.
10027 Use a no-op line to work around bug in automake 1.4 with malloc and
10029 (AC_OUTPUT): Add m4/Makefile.
10031 * lib/Makefile.am (EXTRA_DIST):
10032 Add lchown.c, malloc.c, mktime.c, realloc.c,
10033 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
10034 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
10035 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
10036 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
10037 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
10039 * src/system.h (uintmax_t): Don't declare; configure now does this.
10041 * src/common.h (backup_type): New decl.
10042 * src/common.h, src/misc.c, src/tar.c:
10043 Move include of backupfile.h to common.h.
10045 * src/misc.c (maybe_backup_file):
10046 Pass backup_type to find_backup_file_name.
10048 * src/list.c (print_header): Change sizes of uform and gform from 11 to
10049 UINTMAX_STRSIZE_BOUND.
10051 * doc/tar.texi: Remove --bzip2.
10052 Fix @xref typos reported by latest makeinfo.
10054 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
10056 (M4DIR, ACINCLUDE_INPUTS): New macros.
10057 ($(srcdir)/acinclude.m4): New rule.
10059 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
10060 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
10061 now generated automatically by autoconf.
10063 1999-05-15 Paul Eggert <eggert@twinsun.com>
10065 * doc/tar.texi: Remove -y.
10067 1999-04-09 Paul Eggert <eggert@twinsun.com>
10069 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
10070 (we were allocating too much storage).
10071 (uintmax_t): Don't declare; configure now does this.
10073 * ABOUT-NLS: Update to gettext 0.10.35 edition.
10075 1999-03-22 Paul Eggert <eggert@twinsun.com>
10077 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
10079 * acinclude.m4 (AC_LFS_FLAGS):
10080 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
10081 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
10082 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
10084 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
10085 New macros; needed for latest GNU xmalloc.c.
10087 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
10088 (libtar_a_SOURCES): Add quotearg.c.
10089 * list.c: Include <quotearg.h>.
10090 (from_oct): Add forward decl.
10091 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
10092 (from_oct): Report an error only if TYPE is nonzero.
10093 Quote any funny characters in bad header.
10095 1999-03-20 Paul Eggert <eggert@twinsun.com>
10097 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
10099 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
10100 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
10102 (AC_LFS): Simplify AIX revision number test.
10104 1999-03-17 Paul Eggert <eggert@twinsun.com>
10106 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
10108 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
10109 Remove; it doesn't work that well
10110 with AC_CANONICAL_HOST.
10111 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
10113 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
10115 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
10117 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
10119 * tar.texi: Fix bug-report addr.
10121 * README: Remove --with-included-malloc.
10122 Upgrade version numbers of build software.
10124 1999-03-07 Paul Eggert <eggert@twinsun.com>
10126 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
10128 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
10129 where bindtextdomain and gettext require -lintl.
10130 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
10131 `no' means it failed.
10132 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
10133 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
10134 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
10135 to add anything to the command line (it's all in config.h).
10136 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
10138 1999-03-01 Paul Eggert <eggert@twinsun.com>
10140 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
10142 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
10144 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
10145 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
10146 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
10147 like OFF_MAX, which are not reliable
10148 (e.g. OFF_MAX in AIX 4.2 is incorrect).
10149 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
10150 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
10152 * src/incremen.c (get_directory_contents):
10153 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
10154 Have statx depend on STX_HIDDEN, not AIX.
10156 * src/create.c (to_oct):
10157 New parameter substitute, giving a substitute value to use
10158 when the original value is out of range. Do not append a space to the
10159 output; modern tars don't. When a value is out of range, specify the
10160 maximum value, not the number of bits.
10161 (GID_NOBODY, UID_NOBODY): New macros.
10162 (gid_to_oct, uid_to_oct): Use them as substitutes.
10163 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
10164 (dump_file): Check whether the file changed as we read it.
10166 * src/rmt.c (main): Remove suspicious AIX/386 code.
10168 1999-02-19 Paul Eggert <eggert@twinsun.com>
10170 * intl/localealias.c (read_alias_file): Don't assume that memcpy
10171 returns a type compatible with char *; it doesn't on SunOS
10172 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
10174 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
10176 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
10177 * doc/tar.texi: Add --bzip2, --unbzip2 options.
10179 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
10181 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
10182 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
10183 * acinclude.m4 (AM_WITH_NLS):
10184 Update to latest gettext version (serial 5).
10185 (AC_LFS_FLAGS): New macro
10186 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
10187 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
10188 Work properly in cross-compilation scenario, by checking for getconf
10189 with AC_CHECK_TOOL and by ditching uname in favor of
10190 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
10192 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
10193 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
10194 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
10195 since getdate.y now uses ANSI code.
10197 * config.guess, config.sub: New files; taken from automake 1.4.
10199 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
10200 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
10201 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
10202 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
10203 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
10204 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
10205 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
10207 1999-02-01 Paul Eggert <eggert@twinsun.com>
10209 * src/tar.c: Update copyright.
10213 1999-02-01 Paul Eggert <eggert@twinsun.com>
10215 * NEWS, configure.in: Version 1.12.64004
10217 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
10219 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
10221 * src/extract.c (extract_archive): Fix bug when extracting sparse
10222 files: they were trashing the tar file header.
10224 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
10225 Add -y or --bzip2 or --bunzip2 option.
10227 1999-01-30 Paul Eggert <eggert@twinsun.com>
10229 * src/names.c (cached_no_such_uname, cached_no_such_gname,
10230 cached_no_such_uid, cached_no_such_gid): New vars.
10231 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
10232 Cache failures, too.
10234 * src/tar.c (decode_options):
10235 Don't pass names longer than UNAME_FIELD_SIZE to
10236 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
10238 1999-01-27 Paul Eggert <eggert@twinsun.com>
10240 * NEWS, configure.in: Version 1.12.64003
10242 * src/buffer.c (backspace_output, close_archive): Cast
10243 rmtlseek position arg to off_t, for benefit of K&R compilers
10245 * src/compare.c (verify_volume): Likewise.
10247 * NEWS, configure.in: Version 1.12.64002
10249 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
10250 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
10251 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
10252 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
10253 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
10254 uid_from_oct): Likewise.
10256 1999-01-25 Paul Eggert <eggert@twinsun.com>
10258 * incremen.sh: Fix timing bug in regression test.
10260 1999-01-22 Paul Eggert <eggert@twinsun.com>
10262 * NEWS, configure.in: Update version
10264 * Makefile.am (localedir): Change to $(datadir)/locale.
10265 (DEFS): New macro, defining LOCALEDIR.
10266 (tar.o, tar._o, rmt.o, rmt._o): Remove.
10267 (INCLUDES): Add -I..
10269 * Makefile.am (localedir): Change to $(datadir)/locale.
10271 1999-01-21 Paul Eggert <eggert@twinsun.com>
10273 * NEWS, README, configure.in: Unofficial version 1.12.64001.
10275 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
10276 * src/Makefile.am (localedir): Likewise.
10277 (DEFS): New macro, defining LOCALEDIR.
10278 (tar.o, tar._o, rmt.o, rmt._o): Remove.
10279 (INCLUDES): Add `-I..'.
10281 * tests/incremen.sh: Fix timing bug.
10283 1999-01-20 Paul Eggert <eggert@twinsun.com>
10285 * NEWS, README, configure.in: Unofficial version 1.12.64000.
10286 `lfs.7' changed to `64000' in version number
10287 to conform to gnits standards.
10289 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
10290 mkinstalldirs, ansi2knr.c: Update to latest public versions.
10292 Rebuild with automake 1.4 and autoconf 2.13, to work around some
10295 1998-12-07 Paul Eggert <eggert@twinsun.com>
10297 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
10299 * src/list.c (read_header):
10300 Accept file names as specified by POSIX.1-1996 section 10.1.1.
10302 1998-11-30 Paul Eggert <eggert@twinsun.com>
10304 * configure.in: Quote the output of uname.
10306 * src/extract.c (set_stat): chmod after chown even when not root;
10307 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
10309 1998-11-15 Paul Eggert <eggert@twinsun.com>
10311 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
10313 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
10314 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
10316 1998-10-28 Paul Eggert <eggert@twinsun.com>
10318 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
10320 * src/system.h (voidstar): Use void * if __STDC__ is defined,
10321 not merely nonzero.
10323 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
10324 On many installations, rexec is disabled.
10326 1998-08-07 Paul Eggert <eggert@twinsun.com>
10328 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
10330 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
10331 for nameless users and groups.
10333 1998-02-17 Paul Eggert <eggert@twinsun.com>
10335 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
10336 * NEWS, README: Add explanation of why this isn't an official version.
10338 1998-02-02 Paul Eggert <eggert@twinsun.com>
10340 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
10341 This is an unofficial version.
10343 1997-12-17 Paul Eggert <eggert@twinsun.com>
10345 * src/incremen.c (ST_DEV_MSB): New macro.
10346 (NFS_FILE_STAT): Use most significant bit of st_dev,
10347 even if it's unsigned.
10349 1997-12-08 Paul Eggert <eggert@twinsun.com>
10351 * src/system.h (ST_NBLOCKS): Fix typo in definition.
10353 1997-11-19 Paul Eggert <eggert@twinsun.com>
10355 * configure.in (HAVE_INTTYPES_H):
10356 Don't ignore cache variable if it's already set.
10358 1997-11-10 Paul Eggert <eggert@twinsun.com>
10360 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
10361 * src/delete.c (records_read): Now off_t.
10362 (move_archive): Don't assume mt_count is of type daddr_t.
10364 1997-10-30 Paul Eggert <eggert@twinsun.com>
10366 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
10367 Set to appropriate values if large file support
10368 needs explicit enabling.
10369 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
10371 New macros to configure.
10372 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
10374 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
10375 major_t, minor_t, ssize_t): New macros.
10377 * src/arith.h (TARLONG_FORMAT):
10378 Fix typo: %uld -> %lu. Use unsigned when long long
10380 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
10381 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
10383 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
10384 2nd arg is now unsigned long.
10386 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
10387 (prepare_record_buffer): Arg is now size_t.
10388 Remove now-useless casts.
10390 (main): Use `long' for status, so that it can store ssize_t.
10391 Use daddr_t, mode_t, size_t, off_t when appropriate.
10392 Convert daddr_t and off_t values ourselves, since they might be longer
10393 than long. Convert other types using `long' primitives.
10394 When processing MTIOCTOP, do not try to pass resulting
10395 count back, since it won't work (it could be too large) and it's
10396 not expected anyway.
10399 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
10400 now-useless casts. Use unsigned long to print *_t types, except use
10401 STRINGIFY_BIGINT for off_t.
10402 (update_archive): Cast -1 to dev_t when necessary.
10404 * src/tar.c (check_decimal):
10405 Now returns 1 if successful, 0 otherwise, and returns
10406 uintmax_t value into new arg. Check for arithmetic overflow.
10407 (decode_options): Avoid overflow if record_size fits in size_t but not int.
10408 Check for overflow on user or group ids.
10410 * src/compare.c (diff_init, process_rawdata, read_and_process,
10411 diff_sparse_files, diff_archive):
10412 Use off_t, pid_t, size_t, ssize_t when appropriate.
10413 Remove now-useless casts. Use unsigned long to print *_t types,
10414 except use STRINGIFY_BIGINT for off_t.
10416 (process_noop, process_rawdata, process_dumpdir, read_and_process):
10417 Size arg is now size_t.
10419 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
10420 when allocating buffer.
10423 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
10424 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
10425 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
10428 (get_status_string, get_status_off): New function.
10429 (get_status): Now returns long, so that it can store ssize_t.
10430 Invoke get_status_string to do the real work.
10431 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
10432 (rmt_lseek__): Now returns off_t, using new get_status_off function.
10433 (rmt_ioctl__): Convert mt_count by hand,
10434 since it might be longer than long.
10436 * src/mangle.c (extract_mangle):
10437 Check for overflow when converting off_t to size_t.
10438 Use off_t, size_t when appropriate. Remove now-useless casts.
10440 * src/system.h (mode_t): Remove; now done by autoconf.
10441 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
10442 Return number of ST_NBLOCKSIZE-byte blocks,
10443 not number of 512-byte blocks;
10444 this also helps to avoid overflow.
10445 (st_blocks): Declare if needed.
10446 (ST_NBLOCKSIZE): New macro.
10447 (<limits.h>, <inttypes.h>): Include if available.
10448 (CHAR_BIT): New macro.
10449 (uintmax_t): New typedef.
10450 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
10451 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
10452 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
10454 * src/names.c (name_init):
10455 Fix typo in error message: FILE* was passed, but char*
10458 (read_name_from_file, name_gather, addname, name_match, name_scan,
10459 add_exclude): Use size_t when appropriate. Remove now-useless casts.
10461 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
10463 * src/extract.c (newdir_umask, current_umask): Now mode_t.
10464 (extract_sparse_file): Args now use off_t.
10466 (set_mode, set_stat, make_directories, extract_sparse_file,
10467 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
10468 now-useless casts. Use unsigned long to print *_t types, except use
10469 STRINGIFY_BIGINT for off_t.
10471 * src/misc.c (quote_copy_string):
10472 Use size_t when appropriate. Remove now-useless casts.
10474 * src/list.c (read_and, list_archive, read_header, decode_mode,
10475 print_header, print_for_mkdir):
10476 Use mode_t, off_t, size_t when appropriate. Remove
10477 now-useless casts. Use unsigned long to print *_t types, except use
10478 STRINGIFY_BIGINT for off_t.
10480 (read_header): Check for overflow when converting header size.
10482 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
10483 const char *. Size arg is now size_t. Now takes new type and maxval
10484 args. Compute result using uintmax_t, not long. Report error if
10485 field does not contain octal number in range.
10486 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
10487 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
10488 uintmax_from_oct): New functions.
10490 (stringify_uintmax_t_backwards): New function.
10492 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
10493 (skip_file): Offset arg is now off_t.
10495 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
10496 real_s_totsize, real_s_sizeleft, current_block_ordinal):
10498 (write_error): Arg is now ssize_t.
10499 (child_pid): Now pid_t.
10500 (available_space_after): Now size_t.
10502 (child_open_for_compress, child_open_for_uncompress, flush_write,
10503 open_archive, flush_write, write_error, flush_read, close_archive):
10504 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
10505 casts. Use unsigned long to print *_t types, except use
10506 STRINGIFY_BIGINT for off_t.
10508 * src/delete.c (records_read): Now daddr_t.
10509 (move_archive): Arg is now daddr_t. Check for overflow when
10511 (move_archive, delete_archive_members): Use daddr_t, off_t when
10512 appropriate. Remove now-useless casts.
10514 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
10515 (rmt_lseek): Now returns off_t.
10517 * src/create.c (to_oct):
10518 Now static. Value arg is now uintmax_t. Accept new args
10519 giving name of type of octal field, for error messages. Report an
10520 error if the value is too large to fit in the field.
10521 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
10522 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
10524 (write_eot, write_long, finish_header, deal_with_sparse,
10525 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
10526 appropriate. Remove now-useless casts. Use unsigned long to print
10527 *_t types, except use STRINGIFY_BIGINT for off_t.
10529 (find_new_file_size): 1st arg is now off_t*.
10530 (finish_sparse_file): Args now use off_t, not long.
10531 Check for lseek error.
10532 (create_archive, dump_file): Cast -1 to dev_t when necessary.
10533 (dump_file): Device arg is now dev_t.
10534 Avoid overflow when testing whether file has holes
10535 by using the new ST_NBLOCKSIZE macro.
10537 * src/incremen.c (struct accumulator, add_to_accumulator,
10538 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
10539 Use size_t for sizes.
10540 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
10541 Use dev_t, ino_t for devices and inodes.
10542 (gnu_restore): Use off_t for file offsets.
10543 (struct directory): Use char for flags. Add new flag `nfs'.
10544 (nfs): New constant
10545 (NFS_FILE_STAT): New macro.
10546 (note_directory): Accept struct stat * instead of
10547 device and inode number. All callers changed.
10548 (note_directory, get_directory_contents):
10549 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
10550 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
10552 * src/common.h (record_size, struct name, struct sp_array,
10553 available_space_after):
10554 Use size_t for sizes.
10555 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
10556 Use off_t for file offsets.
10557 (struct name): dir_contents is now const char *, not char *.
10558 (dump_file, get_directory_contents): Use dev_t for devices.
10559 (to_oct): Remove decl.
10560 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
10561 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
10562 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
10563 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
10564 UINTMAX_FROM_OCT): New macros.
10565 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
10566 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
10567 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
10568 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
10569 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
10570 (print_for_mkdir): 2nd arg is now mode_t.
10574 See ChangeLog.1 for earlier changes.
10578 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
10579 Free Software Foundation, Inc.
10581 This file is part of GNU tar.
10583 GNU tar is free software; you can redistribute it and/or modify
10584 it under the terms of the GNU General Public License as published by
10585 the Free Software Foundation; either version 3, or (at your option)
10588 GNU tar is distributed in the hope that it will be useful,
10589 but WITHOUT ANY WARRANTY; without even the implied warranty of
10590 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10591 GNU General Public License for more details.
10593 You should have received a copy of the GNU General Public License
10594 along with GNU tar; see the file COPYING. If not, write to
10595 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
10596 Boston, MA 02110-1301, USA.
10600 version-control: never
10601 buffer-read-only: t