Paul Eggert [Tue, 7 Feb 2006 23:51:37 +0000 (23:51 +0000)]
* gnulib.modules: Add closeout, exitfial.
* lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
closeout.h.
* src/buffer.c: Incluse closeout.h.
(_open_archive): Use freopen rather than fopen, so
that stdlis is always either stdout or stderr. Use
close_stdout_set_file_name to report its name.
* src/tar.c: Include closeout.h and exitfail.h.
(parse_opt, usage): Call close_stdout as appropriate, to check for
write errors.
(decode_options): Exit with status TAREXIT_FAILURE, not 1.
(main): Set exit_failure, to exit with proper status on memory
allocation failure and the like.
Use close_stdout rather than rolling our own test.
Paul Eggert [Tue, 7 Feb 2006 22:18:36 +0000 (22:18 +0000)]
* NEWS: --version now outputs copyright etc., to conform to the
GNU coding standards. Remove --license.
* gnulib.modules: Add version-etc-fsf.
* doc/tar.texi: Document the change.
* lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
* scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
* scripts/backup.in: Remove --license. Change --version to conform
to GCS.
* scripts/restore.in: Likewise.
* scripts/backup.sh.in (license): Output briefer license in the
style of coreutils, for consistency with other changes.
* src/tar.c: Include <version-etc.h>.
(LICENSE_OPTION): Remove.
(options): Remove --license.
(license): Remove.
(parse_opt): Use version_etc instead of rolling it ourselves.
Remove --license.
* tests/version.at (tar --version): Check only the first line of
output.
(list_archive): Use is_dumpdir
Do not wrap skip_member in mv_begin/mv_end, the function itself
takes care of it.
(decode_header): Set stat_info->is_dumpdir
(skip_member): Do nothing if skipped is true
If --one-file-system is given and a
directory is found to be on another device, *and* this directory
is explicitely given in the command line, then do not omit it.
(gid_to_chars, major_to_chars, minor_to_chars)
(mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
(uid_to_chars, uintmax_to_chars): Return bool
(to_chars): Return bool
(start_header): Check return values of convertion routines. Fail
if unable to store data in the header.
Following the discussion with Karl Berry,
discontinue using @value{} substitutions for Texinfo commands.
Properly index all long options. Print a
separate long option index.
Fix restoring of directory timestamps from
incremental archives.
(directories_first): New variable.
(prepare_to_extract): Set directories_first
(extract_archive): Call apply_nonancestor_delayed_set_stat() only
if not extracting from an incremental archive
Paul Eggert [Thu, 1 Dec 2005 00:18:05 +0000 (00:18 +0000)]
* doc/tar.texi (Option Summary): Rewrite the
--atime-preserve=system description in response to Ian Turner's
proposed patch.
* doc/tar.texi (Extracting Specific Files): Remove obsolescent
FIXME.
Paul Eggert [Tue, 29 Nov 2005 19:14:21 +0000 (19:14 +0000)]
* NEWS: New option --atime-preserve=system, which uses O_NOATIME.
* configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
Check for stropts.h and sys/filio.h too, for _FIOSATIME.
* doc/tar.texi: Change "modification time" to "data modification
time", "change time" to "status change time", and "filesystem" to
"file system", so that we use terminology consistent with POSIX.
Use American spacing rather than French for sentence ends.
"non-dependable" -> "undependable".
(Option Summary, Attributes): Explain better the pitfalls of the
--atime-preserve option, and suggest read-only mounts,loopback
mounts, and noatime mounts for older systems.
* doc/value.texi (op-atime-preserve-system): Renamed from
op-atime-preserver-system to fix a misspelling.
* src/common.h (enum atime_preserve): Use lower case for enum values.
* src/compare.c: Don't include utimens.h; no longer needed.
(diff_file): Use set_file_atime rather than utimens; avoid closing
diff_handle until after this, so that we can set the file time stamp
via the file descriptor rather than via its name.
* src/create.c: Don't include utimens.h; no longer needed.
(dump_regular_finish): Remove. All callers now do its work inline.
(dump_dir): New arg FD. All callers changed.
Use fdsavedir rather than savedir.
(unknown_file_error): Arg is a const pointer now.
(dump_file0): 2nd arg is a const pointer now.
Treat directories more like files, with respect to --atime-preserve.
For example, also warn if a directory changes while we are dumping it.
Prefer file descriptors to file names when retrieving/setting file
attributes; this saves path-resolution time and allows us to avoid
changing mtime/ctime on Solaris when restoring atime as root.
Use O_DIRECTORY when opening directories, to avoid some race conditions.
Do not reset atime if mtime has changed. Report an error if
we cannot reset atime.
First cut at adding support for --atime-preserve=system.
* doc/tar.texi (Option Summary): First cut at documenting it.
All other uses of --atime-preserve changed to --atime-preserve=replace.
* doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
New.
(op-atime-preserve): Mention METHOD.
* src/common.h (atime_preserve): New enum.
(atime_preserve_option): Now of the enum type rather than bool.
All uses changed.
* src/compare.c (diff_file): Read with O_NOATIME if asked for.
* src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
if asked for.
* src/tar.c (usage): Mention new usage.
(parse_opt): Parse new usage.
(xheader_format_name): Remove static
qualifier. Change last argument.
Correct buffer size calculation (allocated too much space).
(xheader_write): Increase global_header_count here ...
(xheader_write_global): ... instead of here