PK Z@6CTODOnuW+ASuggestions for improving GNU tar. * <45BEC0DB.8040903@unix-beratung.de> * Incorporate fixes from major distributions, e.g., Debian GNU/Linux. * Add support for restoring file time stamps to sub-second resolution, if the file system supports this. * Add support for restoring the attributes of symbolic links, for OSes like FreeBSD that have the lutimes and lchmod functions. * --append should bail out if the two archives are of different types. * Add support for a 'pax' command that conforms to POSIX 1003.1-2001. This would unify paxutils with tar. * Interoperate better with Joerg Schilling's star implementation. * Add an option to remove files that compare successfully. From: Roesinger Eric Date: Sat, 28 Jul 2001 18:43:43 -0500 It would be useful to be able to use '--remove-files' with '--diff', to remove all files that compare successfully, when verifying a backup. * Add tests for the new functonality. * Consider this: From: Dennis Pund Subject: TAR suggestion... Date: Wed, 1 May 2002 18:26:36 -0500 (EST) What I would like to do is: foo my.tar.gz | tar -xzOf - | tar -cMf - -L 650000 - | bar where 'foo' is a program that retrieves the archive and streams it to stdout and bar is a program that streams the stdin to CDR. (http://mail.gnu.org/archive/html/bug-gnu-utils/2002-05/msg00022.html) * Copyright notice Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of GNU tar. GNU tar is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GNU tar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with tar; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Local variables: mode: outline paragraph-separate: "[ ]*$" end: PK ZNEWSnuW+AGNU tar NEWS - User visible changes. 2012-11-19 Please send GNU tar bug reports to ** Sparse files with large data When creating a PAX-format archive, tar no longer arbitrarily restricts the size of the representation of a sparse file to be less than 8 GiB. * New command line option --keep-directory-symlink By default, if when trying to extract a directory from the archive, tar discovers that the corresponding file name already exists and is a symbolic link, it first unlinks the entry, and then extracts the directory. This option disables this behavior and instructs tar to follow symlinks to directories when extracting from the archive. It is mainly intended to provide compatibility with the Slackware installation scripts. * Fixed the --delay-directory-restore option In some cases tar would restore the directory permissions too early, causing subsequent link extractions in that directory to fail. version 1.26 - Sergey Poznyakoff, 2011-03-12 * Bug fixes ** Fix the --verify option, which broke in version 1.24. ** Fix storing long sparse file names in PAX archives. ** Fix correctness of --atime-preserve=replace tar --atime-preserve=replace no longer tries to restore atime of zero-sized files. ** Work around POSIX incompatibilities on FreeBSD, NetBSD and Tru64 ** Fix bug with --one-file-system --listed-incremental When invoked with these two options, tar 1.25 would add only the top-level directory to the archive, but not its contents. * Support for POSIX ACLs, extended attributes and SELinux context. Starting with this version tar is able to store, extract and list extended file attributes, POSIX.1e ACLs and SELinux context. This is controlled by the command line options --xattrs, --acls and --selinux, correspondingly. Each of these options has a `--no-' counterpart (e.g. --no-xattrs), which disables the corresponding feature. Additionally, the options --xattrs-include and --xattrs-exclude allow you to selectively control for which files to store (or extract) the extended attributes. version 1.25 - Sergey Poznyakoff, 2010-11-07 * Fix extraction of empty directories with the -C option in effect. * Fix extraction of device nodes. * Make sure name matching occurs before eventual name transformation. Tar 1.24 changed the ordering of name matching and name transformation so that the former saw already transformed file names. This made it impossible to match file names in certain cases. It is fixed now. * Fix the behavior of tar -x --overwrite on hosts lacking O_NOFOLLOW. * Improve the testsuite. * Alternative decompression programs. If extraction from a compressed archive fails because the corresponding compression program is not installed and the following two conditions are met, tar retries extraction using an alternative decompressor: 1. Another compression program supported by tar is able to handle this compression format. 2. The compression program was not explicitly requested in the command line by the use of such options as -z, -j, etc. For example, if `compress' is not available, tar will try `gzip'. version 1.24 - Sergey Poznyakoff, 2010-10-24 * The --full-time option. New command line option `--full-time' instructs tar to output file time stamps to the full resolution. * Bugfixes. ** More reliable directory traversal when creating archives Tar now checks for inconsistencies caused when a file system is modified while tar is creating an archive. In the new approach, tar maintains a cache of file descriptors to directories, so it uses more file descriptors than before, but it adjusts to system limits on the number of file descriptors. Tar also takes more care when a file system is modified while tar is extracting from an archive. The new checks are implemented via the openat and related calls standardized by POSIX.1-2008. On an older system where these calls do not exist or do not return useful results, tar emulates the calls at some cost in efficiency and reliability. ** Symbolic link attributes When extracting symbolic links, tar now restores attributes such as last-modified time and link permissions, if the operating system supports this. For example, recent versions of the Linux kernel support setting times on symlinks, and some BSD kernels also support symlink permissions. ** --dereference consistency The --dereference (-h) option now applies to files that are copied into or out of archives, independently of other options. For example, if F is a symbolic link and archive.tar contains a regular-file member also named F, "tar --overwrite -x -f archive.tar F" now overwrites F itself, rather than the file that F points to. (To overwrite the file that F points to, add the --dereference (-h) option.) Formerly, --dereference was intended to apply only when using the -c option, but the implementation was not consistent. Also, the --dereference option no longer affects accesses to other files, such as archives and time stamp files. Symbolic links to these files are always followed. Previously, the links were usually but not always followed. ** Spurious error diagnostics on broken pipe. When receiving SIGPIPE, tar would exit with error status and "write error" diagnostics. In particular, this occurred if invoked as in the example below: tar tf archive.tar | head -n 1 ** --remove-files `Tar --remove-files' failed to remove a directory which contained symlinks to another files within that directory. ** --test-label behavior In case of a mismatch, `tar --test-label LABEL' exits with code 1, not 2 as it did in previous versions. The `--verbose' option used with `--test-label' provides additional diagnostics. Several volume labels may be specified in a command line, e.g.: tar --test-label -f archive 'My volume' 'New volume' 'Test volume' In this case, tar exits with code 0 if any one of the arguments matches the actual volume label. ** --label used with --update The `--label' option can be used with `--update' to prevent accidental update of an archive: tar -rf archive --label 'My volume' . This did not work in previous versions, in spite of what the docs said. ** --record-size and --tape-length (-L) options Usual size suffixes are allowed for these options. For example, -L10k stands for a 10 kilobyte tape length. ** Fix dead loop on extracting existing symlinks with the -k option. version 1.23 - Sergey Poznyakoff, 2010-03-10 * Record size autodetection When listing or extracting archives, the actual record size is reported only if the archive is read from a device (as opposed to regular files and pipes). * Seekable archives When a read-only operation (e.g. --list or --extract) is requested on a regular file, tar attemtps to speed up accesses by using lseek. * New command line option `--warning' The `--warning' command line option allows to suppress or enable particular warning messages during `tar' run. It takes a single argument (a `keyword'), identifying the class of warning messages to affect. If the argument is prefixed with `no-', such warning messages are suppressed. For example, tar --warning=no-alone-zero-block -x -f archive suppresses the output of `A lone zero block' diagnostics, which is normally issued if `archive' ends with a single block of zeros. See Tar Manual, section 3.9 "Controlling Warning Messages", for a detailed discussion. * New command line option `--level' The `--level=N' option sets the incremental dump level N. It is valid when used in conjunction with the -c and --listed-incremental options. So far the only meaningful value for N is 0. The `--level=0' option forces creating the level 0 dump, by truncating the snapshot file if it exists. * Files removed during incremental dumps If a file or directory is removed while incremental dump is in progress, tar exact actions depend on whether this file was explicitly listed in the command line, or was found during file system scan. If the file was explicitly listed in the command line, tar issues error message and exits with the code 2, meaning fatal error. Otherwise, if the file was found during the file system scan, tar issues a warning, saying "File removed before we read it", and sets exit code to 1, which means "some files differ". If the --warning=no-file-removed option is given, no warning is issued and exit code remains 0. * Modification times of PAX extended headers. Modification times in ustar header blocks of extended headers are set to mtimes of the corresponding archive members. This can be overridden by the --pax-opion='exthdr.mtime=STRING' command line option. The STRING is either number of seconds since the Epoch or a `Time reference' (see below). Modification times in ustar header blocks of global extended headers are set to the time when tar was invoked. This can be overridden by the --pax-opion='globexthdr.mtime=STRING' command line option. The STRING is either number of seconds since the Epoch or a `Time reference' (see below). * Time references in --pax-option argument. Any value from the --pax-option argument that is enclosed in a pair of curly braces represents a time reference. The string between the braces is understood either as a textual time representation, as described in chapter 7, "Date input formats", of the Tar manual, or as a name of an existing file, starting with `/' or `.'. In the latter case, it is replaced with the modification time of that file. * Environment of --to-command script. The environment passed to the --to-command script is extended with the following variables: TAR_VERSION GNU tar version number TAR_ARCHIVE The name of the archive TAR_VOLUME Ordinal number of the volume TAR_FORMAT Format of the archive TAR_BLOCKING_FACTOR Current blocking factor * Bugfixes ** Fix handling of hard link targets by -c --transform. ** Fix hard links recognition with -c --remove-files. ** Fix restoring files from backup (debian bug #508199). ** Correctly restore modes and permissions on existing directories. ** The --remove-files option removes files only if they were succesfully stored in the archive. ** Fix storing and listing of the volume labels in POSIX format. ** Improve algorithm for splitting long file names (ustar format). ** Fix possible memory overflow in the rmt client code (CVE-2010-0624). version 1.22 - Sergey Poznyakoff, 2009-03-05 * Support for xz compression Tar uses xz for compression if one of the following conditions is met: 1. The option --xz or -J (see below) is used. 2. The xz binary is set as compressor using --use-compress-program option. 3. The file name of the archive being created ends in `.xz' and auto-compress option (-a) is used. Xz is used for decompression if one of the following conditions is met: 1. The option --xz or -J is used. 2. The xz binary is set as compressor using --use-compress-program option. 3. The file is recognized as xz compressed stream data. * Short option -J reassigned as a short equivalent of --xz * New option -I The -I option is assigned as a short equivalent for --use-compress-program. * The --no-recursive option works in incremental mode. version 1.21 - Sergey Poznyakoff, 2008-12-27 * New short option -J A shortcut for --lzma. * New option --lzop * New option --no-auto-compress Cancels the effect of previous --auto-compress (-a) option. * New option --no-null Cancels the effect of previous --null option. * Compressed format recognition If tar is unable to determine archive compression format, it falls back to using archive suffix to determine it. * VCS support. Using --exclude-vcs handles also files used internally by Bazaar, Mercurial and Darcs. * Transformation scope flags Name transformation expressions understand additional flags that control type of archive members affected by them. The flags are: - r Apply transformation to regular archive members. - s Apply transformation to symbolic link targets. - h Apply transformation to hard link targets. Corresponding upper-case letters negate the meaning, so that `H' means ``do not apply transformation to hard link targets.'' The scope flags are listed in the third part of an `s' expression, e.g.: tar --transform 's|^|/usr/local/|S' Default is `rsh', which means that transformations are applied to both regular archive members and to the targets of symbolic and hard links. If several transform expressions are used, the default flags can be changed using `flags=' statement before the expressions, e.g.: tar --transform 'flags=S;s|^|/usr/local/|S' * Bugfixes ** The --null option disabled handling of tar options in list files. This is fixed. ** Fixed record size autodetection. If the detected record size differs from the expected value (either default one, or the one set from the command line), tar always prints a warning if verbosity level is set to 1 or greater, i.e. if either -t or -v option is given. version 1.20 - Sergey Poznyakoff, 2008-04-14 * New option --auto-compress (-a) With --create, selects compression algorithm basing on the suffix of the archive file name. * New option --lzma Selects LZMA compression algorithm * New option --hard-dereference During archive creation, dereferences hard links and stores the files they refer to, instead of creating usual hard link members (type '1'). * New option --checkpoint-action This action allows to specify an action to be executed upon hitting a checkpoint. Recognized actions are: dot, echo (the default), echo=string, ttyout=string, exec=cmdline, and sleep=value. Any number of `--checkpoint-action' options can be specified, the actions will be executed in order of their appearance in the command line. See chapter 3.8 "Checkpoints" for a complete description. * New options --no-check-device, --check-device. The `--no-check-device' option disables comparing device numbers during preparatory stage of an incremental dump. This allows to avoid creating full dumps if the device numbers change (e.g. when using an LVM snapshot). The `--check-device' option enables comparing device numbers. This is the default. This option is provided to undo the effect of the previous `--no-check-device' option, e.g. if it was set in TAR_OPTIONS environment variable. * The --transform option. Any number of `--transform' options can be given in the command line. The specified transformations will be applied in turn. The argument to `--transform' option can be a list of replace expressions, separated by a semicolon (as in `sed'). Filename transformations are applied to symbolic link targets during both creation and extraction. Tar 1.19 used them only during extraction. For a detailed description, see chapter 6.7 "Modifying File and Member Names". * Info (end-of-volume) scripts The value of the blocking factor is made available to info and checkpoint scripts via environment variable TAR_BLOCKING_FACTOR. * Incremental archives Improved (sped up) extracting from incremental archives. * Bugfixes. ** Fix bug introduced in version 1.19: tar refused to update non-existing archives. version 1.19 - Sergey Poznyakoff, 2007-10-10 * New option --exclude-vcs Excludes directories and files, created by several widely used version control systems, e.g. "CVS/", ".svn/", etc. * --exclude-tag and --exclude-cache options The following options now work with incremental archives as well: --exclude-caches --exclude-caches-all --exclude-tag --exclude-tag-all --exclude-tag-under * Fix handling of renamed files in listed incremental archives. Previous versions always stored absolute file names in rename records, even if -P was not used. This is fixed: rename records contain file names processed in accordance with the command line settings. * Fix --version output. * Recognition of broken archives. When supplied an archive smaller than 512 bytes in reading mode (-x, -t), the previous version of tar silently ignored it, exiting with code 0. It is fixed. Tar now issues the following diagnostic message: 'This does not look like a tar archive', and exits with code 2. * Fix double-dot recognition in archive member names in case of duplicate '/.'. * Fix file padding in case of truncation of the input file to zero size. version 1.18 - Sergey Poznyakoff, 2007-06-29 * Licensed under the GPLv3 * Fixed several bugs in the testsuite version 1.17 - Sergey Poznyakoff, 2007-06-08 * Fix archivation of sparse files in posix mode. Previous versions padded sparse members with spurious zero blocks. * Fix operation of --verify --listed-incremental. Version 1.16.1 produced a full dump when both options were given. * Fix --occurrence. In previous versions it continued scanning the archive even though all requested members has already been extracted. * Scope of --transform and --strip-components options. In addition to affecting regular archive members, the --transform option affects hard and soft link targets and the --strip-components option affects hard link targets as well. * End-of-volume script can send the new volume name to tar by writing it to the file descriptor stored in the environment variable `TAR_FD'. version 1.16.1 - Sergey Poznyakoff, 2006-12-09 * New option --exclude-tag allows to specify "exclusion tag files", i.e. files whose presence in a directory means that the directory should not be archived. * The --exclude-cache option excludes directories that contain the CACHEDIR.TAG file from being archived. Previous versions excluded directory contents only, while the directories themselves were still added to the archive. * Support for reading ustar type 'N' header logical records has been removed. This GNU extension was generated only by very old versions of GNU 'tar'. Unfortunately its implementation had security holes; see . We don't expect that any tar archives in practical use have type 'N' records, but if you have one and you trust its contents, you can decode it with GNU tar 1.16 or earlier. * Race conditions have been fixed that in some cases briefly allowed files extracted by 'tar -x --same-owner' (or plain 'tar -x', when running as root) to be accessed by users that they shouldn't have been. version 1.16 - Sergey Poznyakoff, 2006-10-21 * After creating an archive, tar exits with code 1 if some files were changed while being read. Previous versions exited with code 2 (fatal error), and only if some files were truncated while being archived. * New option --mtime allows to set modification times for all archive members during creation. * Bug fixes ** Avoid running off file descriptors when using multiple -C options. ** tar --index-file=FILE --file=- sent the archive to FILE, and the listing to stderr. version 1.15.91 - Sergey Poznyakoff, 2006-06-16 * Incompatible changes ** Globbing Previous versions of GNU tar assumed shell-style globbing when extracting from or listing an archive. For example: tar xf foo.tar '*.c' would extract all files whose names end in '.c'. This behavior was not documented and was incompatible with traditional tar implementations. Therefore, starting from this version, GNU tar no longer uses globbing by default. For example, the above invocation is now interpreted as a request to extract from the archive the file named '*.c'. To treat member names as globbing patterns, use --wildcards option. If you wish tar to mimic the behavior of versions up to 1.15.90, add --wildcards to the value of the environment variable TAR_OPTIONS. The exact way in which tar interprets member names is controlled by the following command line options: --wildcards use wildcards --anchored patterns match file name start --ignore-case ignore case --wildcards-match-slash wildcards match `/' Each of these options has a '--no-' counterpart that disables its effect (e.g. --no-wildcards). These options affect both the interpretation of member names from command line and that of the exclusion patterns (given with --exclude and --exclude-from options). The defaults are: 1. For member names: --no-wildcards --anchored 2. For exclusion patterns: --wildcards --no-anchored --wildcards-match-slash The options can appear multiple times in the command line, thereby changing the way command line arguments are interpreted. For example, to use case-insensitive matching in exclude patterns and to revert to case-sensitive matching for the rest of command line, one could write: tar xf foo.tar --ignore-case --exclude-from=FILE --no-ignore-case file.name ** Short option -l is now an alias of --check-links option, which complies with UNIX98. This ends the transition period started with version 1.14. * New features ** New option --transform allows to transform file names before storing them in the archive or member names before extracting. The option takes a sed replace expression as its argument. For example, tar cf foo.tar --transform 's,^,prefix/,' will add 'prefix/' to all file names stored in foo.tar. ** --strip-components option works when deleting and comparing. In previous versions it worked only with --extract. ** New option --show-transformed-names enables display of transformed file or archive. It generalizes --show-stored-names option, introduced in 1.15.90. In particular, when creating an archive in verbose mode, it lists member names as stored in the archive, i.e., with any eventual prefixes removed and file name transformations applied. The option is useful, for example, while comparing `tar cv' and `tar tv' outputs. ** New incremental snapshot file format keeps information about file names as well as that about directories. ** The --checkpoint option takes an optional argument specifying the number of records between the two successive checkpoints. Optional dot starting the argument intructs tar to print dots instead of textual checkpoints. ** The --totals option can be used with any tar operation (previous versions understood it only with --create). If an argument to this option is given, it specifies the signal upon delivery of which the statistics is to be printed. Both forms of this option (with and without argument) can be given to in a single invocation of tar. * Bug fixes ** Detect attempts to update compressed archives. version 1.15.90 - Sergey Poznyakoff, 2006-02-19 * New features ** Any number of -T (--files-from) options may be used in the command line. The file specified with -T may include any valid `tar' options, including another -T option. Compatibility note: older versions of tar would only recognize -C as an option name within the file list file. Now any file whose name starts with - is handled as an option. To insert file names starting with dash, use the --add-file option. ** List files containing null-separated file names are detected and processed automatically. It is no longer necessary to give the --null option. ** New option --no-unquote disables the unquoting of input file names. This is useful for processing output from `find dir -print0'. An orthogonal option --unquote is provided as well. ** New option --test-label tests the archive volume label. If an argument is specified, the label is compared against its value. Tar exits with code 0 if the two strings match, and with code 2 if they do not. If no argument is given, the --verbose option is implied. In this case, tar prints the label name if present and exits with code 0. ** New option --show-stored-names. When creating an archive in verbose mode, it lists member names as stored in the archive, i.e., with any eventual prefixes removed. The option is useful, for example, while comparing `tar cv' and `tar tv' outputs. ** New option --to-command pipes the contents of archive members to the specified command. ** New option --atime-preserve=system, which uses the O_NOATIME feature of recent Linux kernels to avoid some problems when preserving file access times. ** New option --delay-directory-restore delays restoring modification times and permissions of extracted directories until the end of extraction. This is necessary for restoring from archives with unusual member ordering (in particular, those created with --no-recursion option). This option is implied when restoring from incremental archives. ** New option --restrict prohibits use of some potentially harmful tar options. Currently it disables '!' escape in multi-volume name menu. ** New options --quoting-style and --quote-chars control the way tar quotes member names on output. The --quoting-style takes an argument specifying the quoting style to use (literal, shell, shell-always, c, escape, locale, clocale). The argument to --quote-chars is a string specifying characters to quote, even if the selected quoting style would not quote them otherwise. The option --no-quote-chars is provided to disable quoting certain characters. ** The end-of-volume script (introduced with --info-script option) can get current archive name from the environment variable TAR_ARCHIVE and the volume number from the variable TAR_VOLUME. It can alter the archive name by writing new name to the file descriptor 3. ** Better support for full-resolution time stamps. Tar cannot restore time stamps to full nanosecond resolution, though, until the kernel guys get their act together and give us a system call to set file time stamps to nanosecond resolution. ** The -v option now prints time stamps only to 1-minute resolution, not full resolution, to avoid using up too many output columns. Nanosecond resolution is now supported, but that would be too much. * Bug fixes ** Allow non-option arguments to be interspersed with options. ** When extracting or listing archives in old GNU format, tar used to read an extra block of data after a long name header if length of the member name was divisible by block size (512). Consequently, the file pointer was set off and the next member was not processed correctly. ** Previous version created invalid archives when files shrink during reading. ** Compare mode (tar d) hung when trying to compare file contents. ** Previous versions in certain cases failed to restore directory modification times. ** When creating an archive, do not attempt to store files whose meta-data cannot be stored in the header due to format limitations (for ustar and v7 formats). ** The --version option now also outputs information about copyright, license, and credits. This reverts to the behavior of tar 1.14 and earlier, and conforms to the GNU coding standards. The --license (-L) option introduced in tar 1.15 has been removed, since it's no longer needed. version 1.15.1 - Sergey Poznyakoff, 2004-12-21 This version fixes a bug introduced in 1.15 which caused tar to refuse to extract files from standard input. version 1.15 - Sergey Poznyakoff, 2004-12-20 * Compressed archives are recognised automatically, it is no longer necessary to specify -Z, -z, or -j options to read them. Thus, you can now run `tar tf archive.tar.gz'. * When restoring incremental dumps, --one-file-system option prevents directory hierarchies residing on different devices from being purged. With the previous versions of tar it was dangerous to create incremental dumps with --one-file-system option, since they would recursively remove mount points when restoring from the back up. This change fixes the bug. * Renamed --strip-path to --strip-components for consistency with the GNU convention. * Skipping archive members is sped up if the archive media supports seeks. * Restore script starts restoring only if it is given --all (-a) option, or some patterns. This is to prevent accidental restores. * `tar --verify' prints a warning if during archive creation some of the file names had their prefixes stripped off. * New option --exclude-caches instructs tar to exclude cache directories automatically on archive creation. Cache directories are those containing a standardized tag file, as specified at: http://www.brynosaurus.com/cachedir/spec.html * New configure option --with-rmt allows to specify full path name to the `rmt' utility. This supersedes DEFAULT_RMT_COMMAND variable introduced in version 1.14 * New configure variable DEFAULT_RMT_DIR allows to specify the directory where to install `rmt' utility. This is necessary since modifying --libexecdir as was suggested for version 1.14 produced a side effect: it also modified installation prefix for backup scripts (if --enable-backup-scripts was given). * Bug fixes: ** Fixed flow in recognizing files to be included in incremental dumps. ** Correctly recognize sparse archive members when used with -T option. ** GNU multivolume headers cannot store filenames longer than 100 characters. Do not allow multivolume archives to begin with such filenames. ** If a member with link count > 2 was stored in the archive twice, previous versions of tar were not able to extract it, since they were trying to link the file to itself, which always failed and lead to removing the already extracted copy. Preserve the first extracted copy in such cases. ** Restore script was passing improper argument to tar --listed option (which didn't affect the functionality, but was logically incorrect). ** Fixed verification of created archives. ** Fixed unquoting of file names containing backslash escapes (previous versions failed to recognize \a and \v). ** When attempting to delete a non-existing member from the archive, previous versions of tar used to overwrite last archive block with zeroes. version 1.14 - Sergey Poznyakoff, 2004-05-11 * Added support for POSIX.1-2001 and ustar archive formats. * New option --format allows to select the output archive format * The default output format can be selected at configuration time by presetting the environment variable DEFAULT_ARCHIVE_FORMAT. Allowed values are GNU, V7, OLDGNU and POSIX. * New option --strip-path allows to cut off a given number of path elements from the name of the file being extracted. * New options --index-file, --no-overwrite-dir. The --overwrite-dir option is now the default; use --no-overwrite-dir if you prefer the previous default behavior. * The semantics of -o option is changed. When extracting, it does the same as --no-same-owner GNU tar option. This is compatible with UNIX98 tar. Otherwise, its effect is the same as that of --old-archive option. This latter is deprecated and will be removed in future. * New option --check-links prints a message if not all links are dumped for a file being archived. This corresponds to the UNIX98 -l option. The current semantics of the -l option is retained for compatibility with previous releases, however such usage is strongly deprecated as the option will change to its UNIX98 semantics in the future releases. * New option --occurrence[=N] can be used in conjunction with one of the subcommands --delete, --diff, --extract or --list when a list of files is given either on the command line or via -T option. This option instructs tar to process only the Nth occurrence of each named file. N defaults to 1, so `tar -x -f archive --occurrence filename' extracts the first occurrence of `filename' from `archive' and terminates without scanning to the end of the archive. * New option --pax-option allows to control the handling of POSIX keywords in `pax' extended headers. It is equivalent to `pax' -o option. * --incremental and --listed-incremental options work correctly on individual files, as well as on directories. * New scripts: backup (replaces old level-0 and level-1) and restore. The scripts are compiled and installed if --enable-backup-scripts option is given to configure. * By default tar searches "rmt" utility in "$prefix/libexec/rmt", which is consistent with the location where the version of "rmt" included in the package is installed. Previous versions of tar used "/etc/rmt". To install "rmt" to its traditional location, run configure with option --libexecdir=/etc. Otherwise, if you already have rmt installed and wish to use it, instead of the shipped in version, set the variable DEFAULT_RMT_COMMAND to the full path name of the utility, e.g., ./configure DEFAULT_RMT_COMMAND=/etc/rmt. Notice also that the full path name of the "rmt" utility to use can be set at runtime, by giving option --rmt-command to tar. * Removed obsolete command line options: ** --absolute-paths superseded by --absolute-names ** --block-compress is not needed any longer ** --block-size superseded by --blocking-factor ** --modification-time superseded by --touch ** --read-full-blocks superseded by --read-full-records ** --record-number superseded by --block-number ** --version-control superseded by --backup * New message translations fi (Finnish), gl (Galician), hr (Croatian), hu (Hungarian), ms (Malaysian), nb (Norwegian), ro (Romanian), sk (Slovak), zh_CN (Chinese simplified), zh_TW (Chinese traditional). The code 'no' for Norwegian (Bokmål) has been withdrawn; use 'nb' instead. * Bug fixes. version 1.13.25 - Paul Eggert, 2001-09-26 * Bug fixes. version 1.13.24 - Paul Eggert, 2001-09-22 * New option --overwrite-dir. * Fixes for buffer overrun, porting, and copyright notice problems. * The message translations for Korean are available again. version 1.13.23 - Paul Eggert, 2001-09-13 * Bug, porting, and copyright notice fixes. version 1.13.22 - Paul Eggert, 2001-08-29 * Bug fixes. version 1.13.21 - Paul Eggert, 2001-08-28 * Porting and copyright notice fixes. version 1.13.20 - Paul Eggert, 2001-08-27 * Some bugs were fixed: - security problems - hard links to symbolic links * New option --recursion (the default) that is the inverse of --no-recursion. * New options --anchored, --ignore-case, --wildcards, --wildcards-match-slash, and their negations (e.g., --no-anchored). Along with --recursion and --no-recursion, these options control how exclude patterns are interpreted. * The default interpretation of exclude patterns is now --no-anchored --no-ignore-case --recursion --wildcards --wildcards-match-slash. This is a quiet change to the semantics of --exclude. The previous semantics were a failed attempt at backward compatibility but it became clear that the semantics were puzzling and did not satisfy everybody. Rather than continue to try to revive that dead horse we thought it better to substitute cleaner semantics, with options so that you can change the behavior more to your liking. * New message translations for Indonesian and Turkish. The translation for Korean has been withdrawn due to encoding errors. It will be reissued once those are fixed. version 1.13.19 - Paul Eggert, 2001-01-13 * The -I option has been withdrawn, as it was buggy and confusing. Eventually it is planned to be reintroduced, with the same meaning as -T. * With an option like -N DATE, if DATE starts with "/" or ".", it is taken to be a file name; the last-modified time of that file is used as the date. version 1.13.18 - Paul Eggert, 2000-10-29 * Some security problems have been fixed. `tar -x' now modifies only files under the working directory, unless you also specify an unsafe option like --absolute-names or --overwrite. * The short name of the --bzip option has been changed to -j, and -I is now an alias for -T, for compatibility with Solaris tar. * The manual is now distributed under the GNU Free Documentation License. * The new environment variable TAR_OPTIONS holds default command-line options. * The --no-recursion option now affects extraction too. * The wording in some diagnostics has been changed slightly. * Snapshot files now record whether each file was accessed via NFS. The new file format is upward- and downward-compatible with the old. * New language supported: da. * Compilation by traditional (K&R) C compilers is no longer supported. If you still use such a compiler, please use GCC instead. * This version of tar works best with GNU gzip test version 1.3 or later. Please see . * `tar --delete -f -' now works again. version 1.13.17 - Paul Eggert, 2000-01-07. * `tar --delete -f -' is no longer allowed; it was too buggy. * Diagnostic messages have been made more regular and consistent. version 1.13.16 - Paul Eggert, 1999-12-13. * By default, tar now refuses to overwrite an existing file when extracting files from an archive; instead, it removes the file before extracting it. If the existing file is a symbolic link, the link is removed and not the pointed-to file. There is one exception: existing nonempty directories are not removed, nor are their ownerships or permissions extracted. This fixes some longstanding security problems. The new --overwrite option enables the old default behavior. For regular files, tar implements this change by using the O_EXCL option of `open' to ensure that it creates the file; if this fails, it removes the file and tries again. This is similar to the behavior of the --unlink-first option, but it is faster in the common case of extracting a new directory. * By default, tar now ignores file names containing a component of `..' when extracting, and warns about such file names when creating an archive. To enable the old behavior, use the -P or --absolute-names option. * Tar now handles file names with multibyte encodings (e.g., UTF-8, Shift-JIS) correctly. It relies on the mbrtowc function to handle multibyte characters. * The file generated by -g or --listed-incremental now uses a format that is independent of locale, so that users need not worry about locale when restoring a backup. This is needed for proper support of multibyte characters. Old-format files can still be read, and older versions of GNU tar can read new-format files, unless member names have multibyte chars. * Many diagnostics have been changed slightly, so that file names are now output unambiguously. File names in diagnostics now are either `quoted like this' (in the default C locale) or are followed by colon, newline, or space, depending on context. Unprintable characters are escaped with a C-like backslash conventions. Terminating characters (e.g., close-quote, colon, newline) are also escaped as needed. * tar now ignores socket files when creating an archive. Previously tar archived sockets as fifos, which caused problems. version 1.13.15 - Paul Eggert, 1999-12-03. * If a file's ctime changes when being archived, report an error. Previously tar looked at mtime, which missed some errors. version 1.13.14 - Paul Eggert, 1999-11-07. * New translations ja, pt_BR. * New options --help and --version for rmt. * Ignore Solaris door files when creating an archive. version 1.13.13 - Paul Eggert, 1999-10-11. * Invalid headers in tar files now elicit errors, not just warnings. * `tar --version' output conforms to the latest GNU coding standards. * If you specify an invalid date, `tar' now substitutes (time_t) -1. * `configure --with-dmalloc' is no longer available. version 1.13.12 - Paul Eggert, 1999-09-24. * `tar' now supports hard links to symbolic links. * New options --no-same-owner, --no-same-permissions. * --total now also outputs a human-readable size, and a throughput value. * `tar' now uses two's-complement base-256 when outputting header values that are out of the range of the standard unsigned base-8 format. This affects archive members with negative or huge time stamps or uids, and archive members 8 GB or larger. The new tar archives cannot be read by traditional tar, or by older versions of GNU tar. Use the --old-archive option to revert to the old behavior, which uses unportable representations for negative values, and which rejects large files. * On 32-bit hosts, `tar' now assumes that an incoming time stamp T in the range 2**31 <= T < 2**32 represents the negative time (T - 2**32). This behavior is nonstandard and is not portable to 64-bit time_t hosts, so `tar' issues a warning. * `tar' no longer gives up extracting immediately upon discovering that an archive contains garbage at the end. It attempts to extract as many files as possible from the good data before the garbage. * A read error now causes a nonzero exit status, not just a warning. * Some diagnostics have been reworded for consistency. version 1.13.11 - Paul Eggert, 1999-08-23. * The short name of the --bzip option has been changed to -I, for compatibility with paxutils. * -T /dev/null now matches nothing; previously, it matched anything if no explicit operands were given. * The `--' option now works the same as with other GNU utilities; it causes later operands to be interpreted as file names, not options, even if they begin with `-'. * For the --newer and --after-date options, the table of time zone abbreviations like `EST' has been updated to match current practice. Also, local time abbreviations are now recognized, even if they are not in tar's hardwired table. Remember, though, that you should use numeric UTC offsets like `-0500' instead of abbreviations like `EST', as abbreviations are not standardized and are ambiguous. version 1.13.10 - Paul Eggert, 1999-08-20. * `tar' now uses signed base-64 when outputting header values that are out of the range of the standard unsigned base-8 format. [This change was superseded in 1.13.12, described above.] version 1.13.9 - Paul Eggert, 1999-08-18. * `tar' now writes two zero blocks at end-of-archive instead of just one. POSIX.1 requires this, and some other `tar' implementations check for it. * `tar' no longer silently accepts a block containing nonzero checksum bytes as a zero block. * `tar' now reads buggy tar files that have a null byte at the start of a numeric header field. version 1.13.8 - Paul Eggert, 1999-08-16. * For compatibility with traditional `tar', intermediate directories created automatically by root are no longer given the uid and gid of the original file or directory. version 1.13.7 - Paul Eggert, 1999-08-14. * --listed-incremental and --newer are now incompatible options. * When creating an archive, leading `./' is no longer stripped, to match traditional tar's behavior (and simplify the documentation). * --diff without --absolute-names no longer falls back on absolute names. version 1.13.6 - Paul Eggert, 1999-08-11. * An --exclude pattern containing / now excludes a file only if it matches an initial prefix of the file name; a pattern without / continues to exclude a file if it matches any file name component. * The protocol for talking to rmt has been extended slightly. Open flags are now communicated in symbolic format as well as numeric. The symbolic format (e.g., "O_WRONLY|O_CREAT|O_TRUNC") is for portability when rmt is operating on a different operating system from tar. The numeric format is retained, and rmt uses it if symbolic format is absent, for backward compatibility with older versions of tar and rmt. * When writing GNU tar format headers, tar now uses signed base-64 for values that cannot be represented in unsigned octal. This supports larger files (2**66 - 1 bytes instead of 2**33 - 1 bytes), larger uids, negative time stamps, etc. * When extracting files with unknown ownership, tar now looks up the uid and gid "nobody" on hosts whose headers do not define UID_NOBODY and GID_NOBODY, and falls back on uid/gid -2 if there is no "nobody". * tar -t --numeric-owner now prints numeric uids and gids, not symbolic. * New option -y or --bzip2 for bzip2 compression, by popular request. version 1.13.5 - Paul Eggert, 1999-07-20. * Do the delayed updates of file metadata even after a fatal error. version 1.13.4 - Paul Eggert, 1999-07-20. * Do not chmod unless we are root or the -p option was given; this matches historical practice. version 1.13.3 - Paul Eggert, 1999-07-16. * A path name is excluded if any of its file name components matches an excluded pattern, even if the path name was specified on the command line. Also see 1.13.6 for later changes in this area. version 1.13.2 - Paul Eggert, 1999-07-14. * Bug reporting address changed to . version 1.13.1 - Paul Eggert, 1999-07-12. * Bug fixes only. version 1.13 - Paul Eggert, 1999-07-08. * Support for large files, e.g., files larger than 2 GB on many 32-bit hosts. Also, support for larger uids, device ids, etc. * Many bug fixes and porting fixes. * This release is only for fixes. A more ambitious test release, with new features, is available as part of the paxutils. Please see: ftp://alpha.gnu.org/gnu/paxutils/ The fixes in this release are intended to be merged with paxutils at some point, but they haven't been merged yet. * An interim GNU tar alpha had new --bzip2 and --ending-file options, but they have been removed to maintain compatibility with paxutils. Please try --use=bzip2 instead of --bzip2. Version 1.12 - François Pinard, 1997-04. Sensitive matters * Use shell globbing patterns for --label, instead of regular expressions. * Do not quote anymore internally over the quoting done by the shell. Output for humans * Offer internationalization capabilities of most recent GNU gettext. * Messages available in many more languages, thanks to all translators! * Usage of ISO 8601 dates in listings, instead of local American dates. * More normalization and cleanup in error messages. Creation * For helping using tar with find, offer a --no-recursion option. * Implement --numeric-owner for ignoring symbolic names at create time. * New --owner, --group --mode options, still preliminary. * Recognize creating an archive on /dev/null, so Amanda works faster. * Object to the creation of an empty archive (like in `tar cf FILE'). * Barely start implementing --posix and POSIXLY_CORRECT. Extraction * Make a better job at restoring file and directory attributes. * Automatically attempt deleting existing files when in the way. * Option --unlink-first (-U) removes most files prior to extraction. * Option --recursive-unlink removes non-empty directories when in the way. * Option --numeric-owner ignores owner/group names, it uses UID/GID instead. * Use global umask when creating missing intermediate directories. * When symlinks are not available, extract symbolic links as hard links. * Diagnose extraction of contiguous files as regular files. * New --backup, --suffix and --version-control options. Various changes * Better support of huge archives with --tape-length and --totals. * Rename option --read-full-blocks (-B) to --read-full-records (-B). * Rename option --block-size (-b) to --blocking-factor (-b). * Rename option --record-number (-R) to --block-number (-R). * With --block-number (-R), report null blocks and end of file. * Implement --record-size for introducing a size in bytes. * Delete --block-compress option and rather decide it automatically. * Rename option --modification-time to --touch. Many bugs are squashed, while others still run free. Version 1.11.8 - François Pinard, 1995-06. * Messages available in French, German, Portuguese and Swedish. * The distribution provides a rudimentary Texinfo manual. * The device defaults to stdin/stdout, unless overridden by the installer. * Option --sparse (-S) should work on more systems. * Option --rsh-command may select an alternative remote shell program. Most changes are internal, and should yield better portability. Version 1.11.2 - Michael Bushnell, 1993-03. * Changes in backup scripts: cleaned up considerably; notices error conditions better over rsh; DUMP_REMIND_SCRIPT is now an option in backup-specs; new file dump-remind is an example of a DUMP_REMIND_SCRIPT. * Superfluous "Reading dirname" was a bug; fixed. * Incompatibility problems with a bug on Solaris are fixed. * New option --gzip (aliases are --ungzip and -z); calls gzip instead of compress. Also, --use-compress-program lets you specify any compress program. --compress-block is renamed --block-compress and now requires one of the three compression options to be specified. * Several error messages are cleaned up. * Directory owners are now set properly when running as root. * Provide DUMP_REMIND_SCRIPT in backup-specs as a possible option for --info-script. * Behave better with broken rmt servers. * Dump scripts no longer use --atime-preserve; this causes a nasty probem. * Several Makefile cleanups. Version 1.11.1 - Michael Bushnell, 1992-09. * Many bug fixes. Version 1.11 - Michael Bushnell, 1992-09. Version 1.10.16 - 1992-07. Version 1.10.15 - 1992-06. Version 1.10.14 - 1992-05. Version 1.10.13 - 1992-01. * Many bug fixes. * Now uses GNU standard configure, generated by Autoconf. * Long options now use `--'; use of `+' is deprecated and support for it will eventually be removed. * New option --null causes filenames read by -T to be null-terminated, and causes -C to be ignored. * New option --remove-files deletes files (but not directories) after they are added to the archive. * New option --ignore-failed-read prevents read-errors from affecting the exit status. * New option --checkpoint prints occasional messages as the tape is being read or written. * New option --show-omitted-dirs prints the names of directories omitted from the archive. * Some tape drives which use a non-standard method of indicating end-of-tape now work correctly with multi-tape archives. * --volno-file: Read the volume number used in prompting the user (but not in recording volume ID's on the archive) from a file. * When using --multi-volume, you can now give multiple -f arguments; the various tape drives will get used in sequence and then wrap around to the beginning. * Remote archive names no longer have to be in /dev: any file with a `:' is interpreted as remote. If new option --force-local is given, then even archive files with a `:' are considered local. * New option --atime-preserve restores (if possible) atimes to their original values after dumping the file. * No longer does tar confusingly dump "." when you don't tell it what to dump. * When extracting directories, tar now correctly restores their modification and access times. * Longnames support is redone differently--long name info directly precedes the long-named file or link in the archive, so you no longer have to wait for the extract to hit the end of the tape for long names to work. Version 1.10 - Michael Bushnell, 1991-07. * Filename to -G is optional. -C works right. Names +newer and +newer-mtime work right. * -g is now +incremental, -G is now +listed-incremental. * Sparse files now work correctly. * +volume is now called +label. * +exclude now takes a filename argument, and +exclude-from does what +exclude used to do. * Exit status is now correct. * +totals keeps track of total I/O and prints it when tar exits. * When using +label with +extract, the label is now a regexp. * New option +tape-length (-L) does multi-volume handling like BSD dump: you tell tar how big the tape is and it will prompt at that point instead of waiting for a write error. * New backup scripts level-0 and level-1 which might be useful to people. They use a file "backup-specs" for information, and shouldn't need local modification. These are what we use to do all our backups at the FSF. Version 1.09 - Jay Fenlason, 1990-10. Version 1.08 - Jay Fenlason, 1990-01. Versions 1.07 back to 1.00 by Jay Fenlason. * See ChangeLog for more details. Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU tar. GNU tar is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GNU tar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with tar; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Local variables: mode: outline paragraph-separate: "[ ]*$" eval: (add-hook 'write-file-hooks 'time-stamp) time-stamp-start: "changes. " time-stamp-format: "%:y-%02m-%02d" time-stamp-end: "\n" end: PK Z2'' ChangeLog.1nuW+ACurrently there is just one ChangeLog file for tar, but there used to be separate ChangeLog files for each subdirectory. This file records what used to be in those separate files. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU Tar. GNU Tar is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Tar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Tar; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ----- ChangeLog ----- 1997-04-25 François Pinard * Release 1.12. * configure.in: Check for the inline keyword. 1997-04-24 François Pinard * Makefile.am (BABYL): Delete admin/RMAIL, renamed rmail/announce. * PORTS: New file. (EXTRA_DIST): Adjusted. 1997-04-23 François Pinard * BI-PATCHES: Patches for Bison 1.25. * Makefile.am (EXTRA_DIST): Adjusted. * configure.in (AC_PROG_INSTALL): Call deleted. AM_INIT_AUTOMAKE takes care of this already. 1997-04-22 François Pinard * Prerelease 1.11q. * configure.in: Use gethostent instead of gethostbyname while checking for -lnsl. It seems SINIX systems require this. Reported by Bruno Haible. 1997-04-19 François Pinard * acinclude.m4: New fp_WITH_INCLUDED_MALLOC macro. * configure.in: Use it instead of the HP/UX test for GNU malloc. Reported by Bruno Haible. 1997-04-17 François Pinard * Prerelease 1.11p. * acinclude.m4 (cl_FUNC_GMALLOC): New macro, yet still unused, as it requires config.guess. I have to think more about this. Reported by Bruno Haible. 1997-04-16 François Pinard * AC-PATCHES: Patches for Autoconf 2.12. * AM-PATCHES: Patches for Automake 1.1n. * Makefile.am (EXTRA_DIST): Adjusted. 1997-04-15 François Pinard * configure.in: Ensure all cpp directives are left justified. Reported by Kaveh R. Ghazi. 1997-04-12 François Pinard * configure.in: Add fnmatch.o to LIBOBJS if AC_FUNC_FNMATCH says no working copy was found. This is not done automatically. Reported by Bruno Haible, Bryant Fujimoto, John David Anglin, Kaveh R. Ghazi, Laurent Caillat-Vallet, Sakai Kiyotaka and Santiago Vila Doncel. 1997-04-11 François Pinard * configure.in: Much simplify the -lsocket and -lnsl tests. Reported by Larry Schwimmer. 1997-04-11 François Pinard * Prerelease 1.11o. * configure.in: Do not check for gettimeofday anymore. * configure.in: Do not anymore blindly add -lnsl if gethostname is found, nor -lsocket if setsockopt is found. Instead, for resolving setsockopt, try none, -lsocket, and -lsocket -lnsl, in that order. For resoving gethostbyname, try none, than -lnsl. Reported by Ariel Faigon, Heiko Schlichting, Jean-Philippe Martin-Flatin, John J. Szetela, John R. Vanderpool, Kaveh R. Ghazi, Larry Schwimmer, Marcus Daniels, Mark Bynum and Russell Cattelan. 1997-04-10 François Pinard * configure.in: Define _GNU_SOURCE to get FNM_LEADIR_DIR, etc. * acconfig.h: Document _GNU_SOURCE. Reported by Andreas Jaeger, Becki Kain, Brendan Kehoe, David N. Brown, J. Dean Brock, James V. DI Toro III, Jeffrey Mark Siskind, Jürgen Reiss, Paul Eggert, Roland McGrath, Rolf Niepraschk, Roman Gollent, Thomas Bushnell n/BSG and Ulrich Drepper. 1997-03-26 François Pinard * configure.in (ALL_LINGUAS): Add it. 1997-03-20 François Pinard * configure.in: Require Autoconf 2.12. 1997-02-25 François Pinard * configure.in: Use AM_CONFIG_HEADER and AM_GNU_GETTEXT instead of AC_CONFIG_HEADER and ud_GNU_GETTEXT. Use AC_FUNC_FNMATCH instead of AM_FUNC_FNMATCH. Do not take care anymore of stamp-h in AC_OUTPUT, leave it to Automake. * acinclude.m4: Replaced whole, from elsewhere. * Makefile.am (EXTRA_DIST): Leave README-alpha to Automake. 1997-02-12 François Pinard * configure.in: Delete README-alpha code, Automake handles it now. 1996-11-18 François Pinard * Prerelease 1.11.14. * Makefile.am (BABYL): Add admin/RMAIL. * configure.in: Check for sys/buf.h, as BSD/OS. Reported by Dan Reish. 1996-11-09 François Pinard * configure.in: Replace a missing basename. Reported by Bryant Fujimoto, Erick Branderhorst, Greg Black, John David Anglin, John J. Szetela, Kaveh R. Ghazi, Kurt Jaeger, Marcus Daniels, Santiago Vila Doncel and William Bader. 1996-11-08 François Pinard * Prerelease 1.11.13. * configure.in: Replace a missing dirname. 1996-10-07 François Pinard * configure.in: Clean out some macro calls made useless since AM_INIT_AUTOMAKE implies them. 1996-09-20 François Pinard * configure.in: Do not check anymore for regex. 1996-09-19 François Pinard * Prerelease 1.11.12 * configure.in: Check echo for newline suppression. 1996-09-18 François Pinard * configure.in: Do not add open3.o to LIBOBJS anymore. 1996-09-05 François Pinard * configure.in (ALL_LINGUAS): Add pl. 1996-09-04 François Pinard * configure.in (AC_OUTPUT): Prepare tests/Makefile and tests/preset. * Use AM_ version of fp_ macros. * Makefile.am (SUBDIRS): Add tests/. 1996-07-18 François Pinard * Prerelease 1.11.11. * configure.in: Use AC_PREREQ(2.10). 1996-07-16 François Pinard * configure.in (ALL_LINGUAS): Add nl. Reported by Erick Branderhorst. 1996-07-12 François Pinard * Prerelease 1.11.10. * configure.in (ALL_LINGUAS): Add ko and sl. 1996-05-01 François Pinard * configure.in: Check for fsync, and linux/fd.h. Reported by Marty Leisner. 1996-04-17 François Pinard * Makefile.am (EXTRA_DIST): New name for DIST_OTHERS. * configure.in (ALL_LINGUAS): Add no. * Makefile.am (BABYL): Consider rmail/* instead of rmail/*/*. 1996-02-28 François Pinard * configure.in: Avoid PROGRAMS, instead use RMT to substitute rmt. * Makefile.am (SUBDIRS): Use intl and po instead of @INTLSUB@ and @POSUB@. * configure.in: Check for poll.h and stropts.h. Check for nap, napms, poll, select and usleep. 1996-02-12 François Pinard * Makefile.am: Remove CONFIG_HEADER, not required by Automake 0.29. * configure.in: Temporarily remove a \ in AC_OUTPUT for automake. 1996-02-03 François Pinard * configure.in: Check size of unsigned long (assume 32 bits if cross-compiling) and long long (assume not available). 1996-01-14 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Select gnits and dist-shar. (dist-zoo): New goal, experimental for now. 1996-01-07 François Pinard * Makefile.am: Force distribution of BACKLOG. Reported by Jonathan Thornburg. * Makefile.am: Declare BABYL. Force distribution of AUTHORS and rebox.el. Add id, ID and dist-shar targets. Add parts of previous Makefile.in as FIXME comments. 1995-12-30 François Pinard * configure.in: Ensure there is a link for libintl.h. Reported by Daniel S. Barclay, Göran Uddeborg, Jonathan Thornburg, Ken Raeburn and Minh Tran-Le. 1995-12-29 François Pinard * Prerelease 1.11.9. * Makefile.am: New file. * configure.in: Decide if README-alpha should be distributed. From Ulrich Drepper. 1995-12-28 François Pinard * configure.in (AC_OUTPUT): Call sed for po/Makefile.in. * Makefile.in: Distribute ABOUT-NLS rather than NLS, and do not distribute config.guess or config.sub anymore. * configure.in: Test for lchown. 1995-12-19 François Pinard * configure.in: Prefer avoiding union wait, and use it only if using int fails. This turns around the previous test, as directly checking for union wait is seemingly seeking for trouble. Reported by Alan Bawden, Chris Arthur, Coranth Gryphon, Jean-Philippe Martin-Flatin, Robert Bernstein and Tarang Kumar Patel. * configure.in: Check for strerror, so lib/error.c will not try to define sys_errlist in the case strerror is already provided. Reported by Coranth Gryphon, Chris Arthur, David J. MacKenzie, Erich Stefan Boleyn, Greg Black, Jason R. Mastaler, Michael Innis Bushnell, Robert Bernstein, Santiago Vila Doncel, Skip Montanaro and Thomas Krebs. * configure.in: Quote the selected shell. I wonder why this error did not show up before! * configure.in: Check and for BSDi. Reported by Chris Arthur and Skip Montanaro. 1995-12-17 François Pinard * configure.in: Be more systematic at caching test results. Reported by Ulrich Drepper. * configure.in: While checking for remote tape header files, only include if it was found to exist. * configure.in: Prefer #if to #ifdef while checking for open3. 1995-11-30 François Pinard * configure.in: Check for net/errno.h and sys/inet.h, trying to get EOPNOTSUPP defined. * configure.in: Check for sgtty.h. 1995-11-06 François Pinard * acconfig.h: Document HAVE_STPCPY for the time being. I do not understand yet why this is mandatory: it should be automatic from AC_CHECK_FUNCS(stpcpy) in aclocal.m4, through autoheader. * configure.in: Use fp_FUNC_FNMATCH, to get around non-working versions on SCO Unix 3.2v4.2, and Solaris. Reported by Chad Hurwitz, Dennis Pixton, Per Foreby, Richard Westerik, Robert Weiner and Tom Tromey. 1995-10-27 François Pinard * configure.in: Add /usr/bin/rcmd as a possible remote shell, as this is the name used by SCO Unix 3.2.4. Reported by Bela Lubkin and Rodney Brown. 1995-07-23 François Pinard * configure.in: Adapt for GNU gettext 0.8. 1995-07-10 François Pinard * Makefile.in (default): Define to all. 1995-06-18 François Pinard * configure.in: For mknod, also include prior to , as Ultrix needs this. Reported by Bruce Jerrick, Bryant Fujimoto, Conrad Hughes, Erich Stefan Boleyn, Jason R. Mastaler, Joshua R. Poulson, Jurgen Botz, Serge Granik, Simon Wright, Ulrich Drepper and Vince Del Vecchio. * configure.in: Replace execlp as needed (for Minix, mainly). * configure.in: Force compilation of lib/open3.c if required. Clean out old NO_OPEN3 code. 1995-06-17 François Pinard * Release 1.11.8. * Makefile.in (DISTFILES): Distribute config.guess and config.sub. Reported by Ulrich Drepper. * acconfig.h, aclocal.m4, configure.in: Last minutes additions, and glimpses to the future gettext 0.6.1. Reported by Ulrich Drepper. * acconfig.h: Document HAVE_MKNOD. * configure.in: Test for mknod only once included. Reported by Alan Modra, Ray Dassen and Ulrich Drepper. * aclocal.m4: Test for re_rx_search instead of rx_compile, the latter not being exported unless RX_WANT_RX_DEFS is defined. Reported by Alan Modra. 1995-06-15 François Pinard * Makefile.in (dist): Do not hide copying rule. * configure.in: Adjustments to NLS, so .sed scripts may now all reside in intl/. 1995-06-13 François Pinard * Makefile.in (pot): New goal, triggering po/tar.pot. 1995-06-07 François Pinard * configure.in: Substitute POTFILES by contents of po/POTFILES. * configure.in: More adjustments for GNU gettext 0.6. * config.guess, config.sub: New files, all taken from gettext 0.6. 1995-06-04 François Pinard * Makefile.in (check): New goal. 1995-05-30 François Pinard * Makefile.in (DISTFILES): Do not distribute SUPPORT, now integrated in the documentation. Reported by Karl Berry. 1995-05-28 François Pinard * configure.in: Check for isascii, not iascii. Reported by Alan Modra, Bruno Haible and Greg McGary. 1995-05-16 François Pinard * Prerelease 1.11.7. * Makefile.in (DISTFILES): Distribute NLS. * configure.in, acconfig.h: Many adjustments for GNU gettext. 1995-05-09 François Pinard * configure.in: Clean glocale out. * Makefile.in (SUBDIRS): Add po. * Makefile.in (pofile): New goal. 1995-05-08 François Pinard * configure.in: Call ud_WITH_NLS, create intl/Makefile.in. Compute size of unsigned short and unsigned int. * acconfig.h: Document ENABLE_NLS, HAVE_CATGETS and HAVE_GETTEXT. * Makefile.in: Process intl subdirectory. * configure.in (LINGUAS): Add pt. * src/pt.po: New file, for Portuguese. Reported by Antonio Jose Coutinho. 1995-03-19 François Pinard * configure.in: Remove GLOCALE, add LINGUAS, use fp_WITH_CATALOGS. * acconfig.h: Add description for WITH_CATALOGS. 1995-02-22 François Pinard * configure.in, Makefile.in: Replace `date' by `echo timestamp'. 1995-02-19 François Pinard * Makefile.in: Support ID files. Do not distribute TAGS. 1995-02-05 François Pinard * Makefile.in (maintainer-clean): New name for realclean. 1995-01-02 François Pinard * configure.in: Check for . Reported by Joseph E. Sacco. 1995-01-01 François Pinard * Makefile.in (DISTFILES): Distribute SUPPORT, with *pre*-releases. 1994-12-18 François Pinard * configure.in: Check for isascii. Reported by Bruno Haible. 1994-12-11 François Pinard * configure.in: Use fp_WITH_REGEX. * acconfig.h: Document WITH_REGEX. 1994-12-10 François Pinard * src/de.tt: New file, for German. Reported by Ulrich Drepper. 1994-12-03 François Pinard * Prerelease 1.11.6. * configure.in: Localize, adapting from how it is done in sharutils. * src/fr.tt: New file, for French. * configure.in, {,*/}Makefile.in, acconfig.h: Rename PRODUCT to PACKAGE. 1994-11-26 François Pinard * configure.in: Check for and . 1994-11-02 François Pinard * configure.in: Check for const only after having found possible ANSIfying compiler flags, this is of no use to check it before. 1994-11-01 François Pinard * {,*/}Makefile.in: Clean up, following those of GNU m4. I will not detail all the changes here. * configure.in: Likewise. * acconfig.h: Document PRODUCT and VERSION. 1994-10-04 François Pinard * configure.in: Correct shell assignment for ac_cv_path_RSH. Reported by Kaveh R. Ghazi. 1994-09-14 François Pinard * Makefile.in: Cleanup... Use subshells for all cd's. (MDEFINES): Do not use $(INSTALL...), because ./install-sh will not be relocated correctly. (DISTFILES): Distribute install-sh, not install.sh. (tags): Make only in lib and src. (TAGS): Deleted. (distclean, realclean): Remove config.status. (distclean-local): Don't. (*-recursive): Combine, use sed to strip -recursive in subgoals. (Makefile): Have ./config.status create this Makefile only. (stamp-h): Have ./config.status create config.h only. Do not create stamp-h here, it is now done from configure. (stamp-h.in): Use date instead of touch. * configure.in (AC_OUTPUT): Create stamp-h. 1994-09-09 François Pinard * configure.in: Use fp_ macros for accessing aclocal.m4. Revert _OS_ macros to their previous names, to follow Autoconf. 1994-09-08 François Pinard * configure.in: Delete AC_OS_XENIX, now within AC_HEADER_DIRENT. 1994-09-01 François Pinard * configure.in (PROGS): Warn if $DEFAULT_ARCHIVE was specified, while not being found on the current system. Reported by Robert Bernstein. 1994-08-31 François Pinard * Makefile.in: Distribute it. * Makefile.in (distclean-local): Delete config.log. 1994-08-27 François Pinard * acconfig.h: Document HAVE_UNION_WAIT, no more in Autoconf. 1994-08-24 François Pinard * configure.in: Replace AC_SYS_REMOTE_TAPE by its definition, distillating it around. It is going out of Autoconf. Do not backslash quotes anymore while defining unquoted, this is now corrected in Autoconf. 1994-08-23 François Pinard * configure.in: Do not define RTAPELIB nor HAVE_RTAPELIB. 1994-08-22 François Pinard Little cleanup in installation: * configure.in: Do not check for wait3, this function is not used. * Makefile.in: Remove useless RSH substitutions. * configure.in: Use `-g -O' instead of `-g' as CFLAGS default value, when GNU C is being used. Delay testing for presets. Reported by Chris Arthur. 1994-08-21 François Pinard * Prerelease 1.11.5. * Makefile.in (BACKLOG, dist, shar): Correct for when a different build directory. * configure.in: Check for union wait. Adapted from make 3.71. * configure.in: Replace both mkdir and rmdir, not just mkdir, because NS32016 running SysVr2.2 has mkdir and lacks rmdir. Reported by Greg Black. * configure.in: Do not try anymore to discover the archive device by looking around for various device names. If the installer does not override it, nicely use `-' as a convenient default. Reported by Andreas Schwab and Kaveh R. Ghazi. 1994-08-20 François Pinard * configure.in: Correct a checking message. Reported by Bruno Haible. 1994-08-17 François Pinard * configure.in: Replace AC_PROG_RSH with its expansion. Correct the no/true confusion in tests. Do not substitute RSH anymore in src/Makefile, instead define REMOTE_SHELL in config.h. Replace NO_REMOTE by HAVE_RTAPELIB, with inverted meaning. Substitute RTAPELIB by $Urtapelib.o instead of rtapelib.o. * acconfig.h: Document HAVE_RTAPELIB and REMOTE_SHELL. Reported by Andreas Schwab. * configure.in: Checking for remote shell, use the RSH environment variable if set. This is done only when not already in the cache. Reported by Kaveh R. Ghazi. * configure.in: Include when testing . Reported by Andreas Schwab. * configure.in: Also create doc/Makefile. * Makefile.in: Add doc in subdirs, set infodir, update MDEFINES. 1994-08-16 François Pinard * configure.in: Undo the `test -b' patch of 1994-08-05. Ultrix 4.2 test does not know about -b. Grrr... Reported by Kaveh R. Ghazi. * configure.in: Check for , HAVE_SYS_GENTAPE_H is tested in rmt.c. Check for , to avoid playing with M_UNIX anymore in rmt.c. Reported by Daniel R. Guilderson and Kaveh R. Ghazi. * configure.in: Use proper function names in AC_CHECK_LIB's. Reported by Alexander Dupuy and Kurt Jaeger. * configure.in: Use $LIBOBJS, not LIBOJBS, while adding to it. Reported by Demizu Noritoshi and Kaveh R. Ghazi. 1994-08-15 François Pinard * Prerelease 1.11.4. 1994-08-14 François Pinard * configure.in: Decide MTIO_CHECK_FIELD by grepping . * acconfig.h: Document it. Reported by Ben A. Mesander. * Makefile.in: Substitute CC, INSTALL, INSTALL_PROGRAM, INSTALL_DATA, RSH, CFLAGS, LDFLAGS, LIBS, prefix, exec_prefix, binprefix, bindir and libexecdir. (MDEFINES): New, using the previous substitutions. (all, install, uninstall): Use it. Reported by Bruno Haible. 1994-08-13 François Pinard * configure.in: Check for . 1994-08-11 François Pinard * configure.in: For , also ensure struct utimbuf is defined by the header file before defining HAVE_UTIME_H. Some systems will not define the structure without _POSIX_SOURCE. * acconfig.h: Document HAVE_UTIME_H. Reported by James W. McKelvey and Robert E. Brown. * configure.in: Instead of replacing strstr, check for it, so HAVE_STRSTR gets defined, then replace it explicitely if required. 1994-08-09 François Pinard * configure.in: Updated for Autoconf 2.0. 1994-08-08 François Pinard * configure.in: Replace memset, mkdir (and rmdir), rename, strstr, ftruncate, when not found. Reported by Kaveh R. Ghazi (for memset and strstr). Reported by Bruno Haible (for mkdir and rename). 1994-08-05 François Pinard * configure.in: Remove padding test. * acconfig.h: Remove PADDING_IN_TAR_HEADER. Reported by Bruno Haible. * configure.in: While defining DEFAULT_ARCHIVE, check for a block device, instead of mere existence. But is `test -b' portable? Test for /dev/fd0, instead of for /dev/fd. Put rct tests last. Reported by Andreas Schwab. * configure.in: Define uid_t and gid_t if necessary. Reported by Jonathan I. Kamens. * Makefile.in (distclean-local): Delete config.cache. Reported by Thomas Koenig. * configure.in: Change malloc_dbg to dmalloc, mutatis mutandi. * acconfig.h: According changes. * configure.in: Test for broken stat macros, and for mkfifo. * configure.in: Check for ST_BLKSIZE and ST_BLOCKS. 1994-08-02 François Pinard * Prerelease 1.11.3. * Makefile.in (dist, shar): Distribute the scripts directory. 1994-08-01 François Pinard * configure.in: Check for . 1994-07-30 François Pinard * configure.in: When --with-malloc-dbg, define WITH_MALLOC_DBG and add -lmalloc_dbg to LIBS. * acconfig.h: Document WITH_MALLOC_DBG. * configure.in: Try deciding DEVICE_PREFIX and DENSITY_LETTER from the selected DEFAULT_ARCHIVE. * acconfig.h: Document DEVICE_PREFIX and DENSITY_LETTER. Reported by Danny R. Johnston. 1994-07-29 François Pinard * aclocal.m4: Adapt AC_PROTOTYPES to caching. * Using configure as generated by a more recent Autoconf solves a problem of rename being rejected on HP-UX in ANSI mode, because of a conflicting prototype from . In this context, Autoconf now uses ctype.c instead for defining __stub macros. Reported by Alan Modra, Burkhard Plache, Edward Welbourne, Henrik Bakman, Jeffrey Goldberg, Jim Farrell, Kimmy Posey, Michael Maass, Mike Nolan, Richard Lloyd, Robert McGraw, Robert W. Kim, Stefan Skoglund, Tarang Kumar Patel, Tilman Schmidt, Tim Ramsey, Van Snyder and W. Phillip Moore. 1994-07-26 François Pinard * configure.in: Check for . Do not define BSD42, do not look anymore if /vmunix, /sdmach or /../../mach exist. * acconfig.h: Remove BSD42. 1994-07-24 François Pinard * configure.in: Add gmalloc.o to LIBOBJS, instead of AC_SUBST'ing MALLOC. Check for valloc only if gmalloc.o is not being selected. valloc was possibly defined both in "port.h" and GNU malloc. * acconfig.h: Add a description for HAVE_VALLOC. J.T. Conklin, Nelson H.F. Beebe and Tilman Schmidt. 1994-07-22 François Pinard * configure.in: Use provided fnmatch only as a replacement. * configure.in: Check for , needed for defining _IOW and _IOR on the Tektronix XD88. Reported by Kaveh R. Ghazi. 1994-07-20 François Pinard * Makefile.in (BACKLOG): New goal, for summarizing the maintainance backlog. Distribute file BACKLOG. 1994-07-08 François Pinard * regex.c, regex.h: Use newer versions. This solves a few problems reported by users. Reported by Chris Hopps and John David Anglin. 1994-07-06 François Pinard * configure.in: Check for . 1994-07-05 François Pinard * configure.in: Substitute DEFAULT_ARCHIVE and DEFAULT_BLOCKING from the environment. Check for /dev/tape first while trying to decide the default archive, because it is often symlinked right. * acconfig.h: Explain DEFAULT_ARCHIVE and DEFAULT_BLOCKING. * configure.in: Use AC_SET_MAKE. * Makefile.in: Use @SET_MAKE@. Reported by Jim Meyering. * configure.in: Integrate the check, previously in testpad.c, about a needed padding field in the tar header struct. * acconfig.h: Explain PADDING_IN_TAR_HEADER. 1994-07-02 François Pinard * configure.in: Check for -linet, this library is required on a few systems for gettimeofday() or getservbyname(). Also, on ISC 4.0, this avoids a broken version of rename(). Reported by Dean Gaudet, Goeran Uddeborg, Mike Rogers and Peder Chr. Norgaard. * configure.in: Ensure -lsocket is tested after -lnsl. This is required in particular for SINIX-Z, an SVR4.0 system. Reported by Manfred Weichel and Mark Frost. * configure.in: All tests reordered for clarity. 1994-07-01 François Pinard * configure.in: Use AC_TIME_WITH_SYS_TIME, test for . This should solve the problem of multiple inclusions of . Also, also check for , for getdate.y tests this. Reported by Jim Meyering, John Rouillard, Karl Berry and Rick Emerson. 1994-06-30 François Pinard * configure.in: AC_CONST was already added since 1.11.2, but no ChangeLog entry for it, so here is one, with list of reporters. * AIX 3.2 RS/6000 IBM's compiler was unable to compile regex.c, this might be solved already through improved Autoconf tests. Reported by Alexey Vovenko, Ben A. Mesander, Bryant Fujimoto, Christian. T. Dum, Christopher Vickery, Dan Bloch, David K. Drum, David Lemson, Demizu Noritoshi, Dimitris Fousekis, Ezra Peisach, Hugh Secker-Walker, Indra Singhal, J.T. Conklin, Jan Hoeglund, Janice Burton, Jeff Siegel, Jim Blandy, John L. Chmielewski, John Rouillard, Jonathan N. Sherman, Kevin D Quitt, Kurt Jaeger, Mark Frost, Matthew Braun, Michael Kubik, Michael Helm, Moritz D. Klingholz, Neil Jerram, Nelson H.F. Beebe, Nick Barron, Paul Eggert, R. Scott Butler, Rob Parry, Ron Guilmette, Scott Grosch, Sherwood and Stephen Saroff. * Makefile.in: Completely replaced, lurking at the previous one. At the same time, solve a few minor problems reported by users. The most frequently reported ones pertained to a trailing \ in a comment, and rmt installing in /etc. Reported by Dean Gaudet, Gerben Wierda, James W. McKelvey, John L. Chmielewski, Karl Berry, Mike Rogers, Ralf Suckow and Richard Lloyd. * configure.in: Also process lib/Makefile.in and src/Makefile.in. Substitute CFLAGS, LDFLAGS and YFLAGS from the environment. Use AC_CHECKING instead of using echo explicitely. Use AC_HEADER_CHECK(unistd.h) instead of obsolete AC_UNISTD_H. * configure.in: Generate a configuration header file. This not only puts less clutter in make output, but also goes around some compilers' limits about the number of allowed -D options. Reported by Nelson H.F. Beebe. * acconfig.h: New file. * Split distribution into a few subdirectories, for easing maintainance. So far: src, lib, scripts, msdos which are to be distributed; then rmail, texinfo, ARCH and misc to be kept here. * scripts/ChangeLog: Initialized by moving entries related to scripts out of this ChangeLog. * Taking over maintenance duties. ----- doc/ChangeLog ----- 1997-04-23 François Pinard * Release 1.12. * Makefile.am (EXTRA_DIST): Remove tar-mew.texi for the release. (tar.dvi) [!PUBLISH]: Delete @smallbook. Call sed in all cases. 1997-04-11 François Pinard * Prerelease 1.11o. * Makefile.am (tar.info): Comment about needed makeinfo version. Reported by Sherwood Botsford. 1997-04-10 François Pinard * Makefile.am (EXTRA_DIST): Add tar-mew.texi. 1997-03-16 François Pinard * Makefile.am (tar.dvi): Merely use tar.texi and rely on -I to resolve it in $(srcdir). Remove tmp-tar.info* files right away. (CLEANFILES): Define to tmp-*. 1997-03-14 François Pinard * Makefile.am: Rename RENDERING, QUALITY, DRAFT and DEBUG to RENDITION, PUBLISH, DISTRIB and PROOF respectively. Ensure that `@set DISTRIB' gets replaced after macro-expansion and before TeX. 1996-11-06 François Pinard * Prerelease 1.11.13. * getdate.texi: New file, from elsewhere. * tar.texi: Replace a lot of text by an include of getdate.texi. * Makefile.am: Adjusted. 1996-08-24 François Pinard * Prerelease 1.11.12. * Makefile.am (EXTRA_DIST): Remove texinfo.tex, now that Automake handles it automatically. 1996-07-18 François Pinard * Prerelease 1.11.11. * Makefile.am (tar.info): Remove -I$(srcdir), which was useless. 1996-07-17 François Pinard * Makefile.am (EXTRA_DIST): Include texinfo.tex, until Automake does it automatically. 1996-07-16 François Pinard * Prerelease 1.11.10. * Makefile.am (EXTRA_DIST): Distribute convtexi.pl, for now. 1996-04-22 François Pinard * Makefile.am: Implement rendering levels (QUALITY, DRAFT or DEBUG). 1996-04-17 François Pinard * Makefile.am (EXTRA_DIST): New name for DIST_OTHER. 1996-03-03 François Pinard * Makefile.am (tar.dvi): Comment about needed makeinfo version. Reported by Jonathan Thornburg. 1996-02-12 François Pinard * Makefile.am: Replace TEXINFO by info_TEXINFOS for Automake 0.29. 1996-01-14 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Select gnits. 1996-01-08 François Pinard * Makefile.am: New file. * tar.texi: New name for tar.texinfo. 1995-12-30 François Pinard * Makefile.in (check): New goal, doing nothing. Reported by Cesar Romani, Joachim Seelig, Mark Bynum and Ulrich Drepper. 1995-11-29 François Pinard * Makefile.in (clean): Remove tmp-* files. 1995-11-27 François Pinard * Makefile.in: Use -I$(srcdir) with makeinfo, and -otmp-tar.info so tar.info in build directory does not shadow the real one. (tar.dvi): Depend on version.texi. Add $(srcdir) to TEXINPUTS so texinfo.tex is found, as texi2dvi gets no clue from the file name. (DISTFILES): Also distribute tar.info-8. 1995-11-22 François Pinard * Makefile.in (DISTFILES): Distribute ChangeLog. * ChangeLog: New file, extracted from top-level ChangeLog. 1995-06-22 François Pinard * Makefile.in: Get rid of docwarn.texi, now replaced by the @UNREVISED macro, right into tar.texinfo. 1995-06-18 François Pinard * Makefile.in (tar.dvi): First macro-expand tar.texinfo. 1995-06-07 François Pinard * Makefile.in: Use subdir and distdir. 1995-06-03 François Pinard * tar.texinfo: Use header.texi. * Makefile.in: Prepare header.texi from src/tar.h. Distribute it. 1995-05-28 François Pinard * Makefile.in (DISTFILES): Add tar.info-3. Reported by Bruno Haible. 1995-02-22 François Pinard * Makefile.in: Replace `date' by `echo timestamp'. 1995-02-13 François Pinard * Makefile.in: Use top_srcdir. 1995-02-05 François Pinard * Makefile.in (maintainer-clean): New name for realclean. 1994-12-03 François Pinard * Makefile.in (DISTFILES): Include docwarn.texi. 1994-11-07 François Pinard * Makefile.in (stamp-vti): Use new -r option to date. 1994-11-05 François Pinard * Makefile.in (realclean): Also remove stamp-vti. 1994-09-14 François Pinard * Makefile.in: Cleanup... (texclean): Deleted, merged into mostlyclean. (Makefile): Have ./config.status create this Makefile only. 1994-08-30 François Pinard * Makefile.in (tar.info): Make the documentation in the source directory only. 1994-08-21 François Pinard * Makefile.in: Correct for when a different build directory. * docwarn.texi: New file. * Makefile.in: Distribute it. 1994-08-17 François Pinard * Makefile.in: New file. * tar.texinfo: New file. * texinfo.tex: New, from elsewhere. ----- lib/ChangeLog ----- 1997-04-25 François Pinard * Release 1.12. 1997-04-16 François Pinard * Prerelease 1.11p. The distribution did not have getdate.c updated: * Makefile.am (libtar_a_SOURCES): Use getdate.y, not getdate.c. (EXTRA_DIST): Do not include getdate.y anymore. * getdate.c: Specify $(srcdir)/, to silence GNU make. Reported by Bruno Haible. 1997-04-15 François Pinard * Makefile.am (getdate.c): Announce 13 conflicts, not 10. Reported by Bruno Haible, Bryant Fujimoto and Wolfram Wagner. 1997-04-11 François Pinard * Prerelease 1.11o. * getdate.h: New file. * Makefile.am: Adjusted. 1997-04-10 François Pinard * modechange.c, modechange.h: New files. * Makefile.am: Adjusted. 1997-02-25 François Pinard * Makefile.am: Adapt library name to Automake 1.1l. 1996-11-09 François Pinard * Prerelease 1.11.14. * basename.c: New file. 1996-11-09 François Pinard * Prerelease 1.11.13. * Makefile.am: Use tar_DEPENDENCIES. Avoid BUILT_SOURCES, put getdate.c instead of getdate.y in tar_SOURCES and keep getdate.c in EXTRA_DIST. 1996-11-06 François Pinard * argmatch.c, argmatch.h, backupfile.c, backupfile.h, dirname.c, getversion.c: New files. * Makefile.am: Adjusted. Reported by Marty Leisner. 1996-10-31 François Pinard * safe-stat.h: Deleted. * Makefile.am (noinst_HEADERS): Adjusted. Reported by Jim Meyering. 1996-09-20 François Pinard * regex.c, regex.h, rx.c, rx.h: Deleted. * Makefile.am: Adjusted. 1996-09-19 François Pinard * Prerelease 1.11.12. * execlp.c: Include stdio.h, not only stdio! 1996-09-16 François Pinard * open3.h: File deleted after being merged into system.h. * open3.c: File deleted, moved back into src/. * Makefile.am: Adjusted. Reported by Jim Meyering. 1996-08-24 François Pinard * Makefile.am (EXTRA_DIST): $(BUILT_SOURCES) is no longer necessary, as Automake now handles it automatically. 1996-07-16 François Pinard * Prerelease 1.11.11. * Makefile.am (EXTRA_DIST): Move stpcpy.c there, from tar_SOURCES. Reported by Ulrich Drepper. 1996-04-17 François Pinard * Prerelease 1.11.10. * Makefile.am (EXTRA_DIST): New name for DIST_OTHER. 1996-02-28 François Pinard * msleep.c: New file, from elsewhere. * Makefile.am: Adjusted. 1996-02-12 François Pinard * Makefile.am: Remove CONFIG_HEADER, not required by Automake 0.29. 1996-01-14 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Select gnits. 1996-01-07 François Pinard * Makefile.am: Add parts of previous Makefile.in as FIXME comments. 1996-01-01 François Pinard * error.h: New file, from elsewhere. * Makefile.am: Add error.h to HEADERS. Reported by Jim Meyering. 1995-12-30 François Pinard * Makefile.am (INCLUDES): Add -I../intl to get libintl.h. Reported by Daniel S. Barclay, Göran Uddeborg, Jonathan Thornburg and Minh Tran-Le. 1995-12-29 François Pinard * Prerelease 1.11.9. * Makefile.am: New file. 1995-11-22 François Pinard * Makefile.in (DISTFILES): Distribute ChangeLog. * ChangeLog: New, extracted from the top-level ChangeLog. 1995-06-18 François Pinard * execlp.c (execlp): New, extracted from src/port.c. * Makefile.in: Adjusted. * open3.h: New, moved from src/. * open3.c: New, extracted from src/port.c. * Makefile.in: Adjusted. Clean out old NO_OPEN3 code. * insremque.h, insremque.c: Deleted. * Makefile.in: Adjusted. 1995-06-17 François Pinard * Makefile.in (DISTFILES): Remove COPYING.LIB. * COPYING.LIB: Deleted. 1995-06-15 François Pinard * Makefile.in (dist): Do not hide copying rule. 1995-06-07 François Pinard * Makefile.in: Use subdir and distdir. * stpcpy.c, xgetcwd.c: New functions needed by gettext. * Makefile.in: Adjusted to always compile these. 1995-05-16 François Pinard * insremque.h, insremque.c: New files, from GNU gettext. * Makefile.in: Take care of insremque.[hc]. 1995-03-19 François Pinard * Makefile.in: Remove GLOCALE, add LINGUAS, use fp_WITH_CATALOGS. 1995-02-19 François Pinard * Makefile.in: Support ID files. Do not distribute TAGS. 1995-02-05 François Pinard * Makefile.in (maintainer-clean): New name for realclean. 1994-12-18 François Pinard * safe-stat.h: New, from elsewhere. This solves the fact that mkdir.c, rmdir.c and rename.c were needing it. * Makefile.in (Makefile): Distribute it. Reported by Bruno Haible and Sherwood Botsford. 1994-12-11 François Pinard * rx.c, rx.h: New, from elsewhere. * Makefile.in: Adjust accordingly. 1994-12-03 François Pinard * Makefile.in: Localize, adapting from how it is done in sharutils. 1994-09-14 François Pinard * Makefile.in: Cleanup... (DISTFILES): Distribute TAGS. (check): Deleted. (TAGS): Make TAGS in $(srcdir) only. (distclean): Do not remove TAGS. (realclean): Remove TAGS. (Makefile): Have ./config.status create this Makefile only. 1994-08-22 François Pinard Little cleanup in installation: * Makefile.in (install, check): Depend on all. 1994-08-21 François Pinard * Makefile.in: Correct for when a different build directory. * rmdir.c: New, split out of mkdir.c. * Makefile.in: Distribute it. Reported by Greg Black. 1994-08-17 François Pinard * ftruncate.c: Revised, because there is no ftruncate capability whatsoever in Interactive Unix. Reported by Peder Chr. Norgaard. 1994-08-08 François Pinard * memset.c, mkdir.c, rename.c, strstr.c and ftruncate.c: New, from elsewhere. * Makefile.in: Distribute them. 1994-08-05 François Pinard * Makefile.in (getdate.c): Tell the installer to expect 10 shift/reduce conflicts instead of 9. Reported by Andreas Schwab. * fileblocks.c: New, from elsewhere. * Makefile.in: Distribute it. 1994-08-02 François Pinard * xstrdup.c: New, from elsewhere. * Makefile.in: Adjusted. 1994-07-29 François Pinard * error.c: Add error_print_progname virtual routine. 1994-07-24 François Pinard * gmalloc.c: New, from elsewhere. This renames and updates what was previously malloc.c. This also solves __const vs const. * Makefile.in: Distribute gmalloc.c. Reported by Cliff Krumvieda, Francois Pinard, Henrik Bakman, J.T. Conklin, Nelson H.F. Beebe and Tilman Schmidt. 1994-07-22 François Pinard * Makefile.in (LIBOBJS): Get configured list of replacements. * fnmatch.h: Undefine FNM_PATHNAME and FNM_PERIOD, for HP-UX defines them in . * getdate.y: Acknowledging here a few reports which are likely solved by going to an updated version of getdate.y. Reported by Andrey A. Chernov, Bruce Evans, Dean Gaudet, Ian T. Zimmerman, Jeff Prothero, Mike Nolan, Milan Hodoscek, Peder Chr. Norgaard, Sarah Quady, Tarang Kumar Patel and Thomas Koenig. 1994-07-02 François Pinard * xmalloc.c: New file, from elsewhere. * error.c: New, from elsewhere. * Makefile.in: Adjusted. 1994-06-30 François Pinard * Makefile.in: New file. ----- po/ChangeLog ----- 1997-04-25 François Pinard * Release 1.12. 1997-04-18 François Pinard * Prerelease 1.11p. * fr.po: Updated file. 1997-04-11 François Pinard * Prerelease 1.11o. 1997-03-26 François Pinard * it.po: New file. 1997-02-14 François Pinard * pl.po: Updated file. 1996-11-22 François Pinard * POTFILES.in: Add src/common.h. Reported by Christian Kirsch. 1996-11-18 François Pinard * Prerelease 1.11.14. * POTFILES.in: Adjust for changes in src/. 1996-09-05 François Pinard * Prerelease 1.11.12. * pl.po: New file. 1995-06-17 François Pinard * Release 1.11.8. * Makefile.in (.po.gmo): Force moving the created .gmo file to $(srcdir), in case it was not already found and replaced there. (install-data): Find files in $(srcdir) if not in current dir, because .gmo files are taken there, right out the distribution. * intl/Makefile.in (DISTFILES): Ensure an all ready stamp-cat-id and cat-id-tbl.c into the distribution. (stamp-cat-id): Rewrite rule so it replaces files in $(srcdir), remove a useless rm and cat. * intl/cat-compat.c, int/gettext.h, intl/po-to-tbl.sed, Makefile.in: Last minutes additions, and glimpses to the future gettext 0.6.1. Reported by Ulrich Drepper. * Makefile.in (install-data, uninstall): Avoid using basename. 1995-06-15 François Pinard * Makefile.in (dist): Comment out tupdate action for now, it needs more tweeking before being distributed active. * intl/Makefile.in (dist), Makefile.in (dist): Correct missing reference to $(srcdir) on cp call, also avoid outputting clutter while doing the work. * intl/Makefile.in: Use top_srcdir for referring to $(PACKAGE).pot. * Makefile.in (.po.gmo): Get around what seems to be an msgfmt bug, which adds .mo even to FILE in `-o FILE'. * intl/Makefile.in, Makefile.in: Adjustments to NLS, so .sed scripts may now all reside in intl/. 1995-06-07 François Pinard * POTFILES: New file. * Makefile.in: Use POTFILES instead of TRANSCSRCS, also use top_srcdir. * intl/linux-msg.sed, intl/po-to-tbl.sed, intl/xopen-msg.sed: New files, all taken from gettext 0.6. 1995-06-05 François Pinard * intl/*: New from GNU gettext 0.6, replacing the previous version of this directory. This change should solve many problems. Reported by Bruno Haible, Christopher Vickery, Jan Carlson, Jean-Philippe Martin-Flatin, John David Anglin, Joseph E. Sacco, Kaveh R. Ghazi, Kurt Jaeger, Mark W. Eichin, Marty Leisner, Minh Tran-Le, Stephen Saroff, Thomas Koenig, Thomas Krebs and William Bader. 1995-05-16 François Pinard * intl/Makefile.in, Makefile.in: Many adjustments for GNU gettext. 1995-05-09 François Pinard * Makefile.in: New file. * de.po, fr.po, pt.po, sv.po: New files, adapted from the corresponding .tt files in src/. 1995-05-08 François Pinard * intl/*: New, from nlsutils. 1995-01-09 François Pinard * src/de.tt: New file, for Swedish. Reported by Jan Djarv. 1994-12-10 François Pinard * de.tt: New file, for German. Reported by Ulrich Drepper. ----- scripts/ChangeLog ----- 1997-04-24 François Pinard * Release 1.12. * level-1, level-0: Replace --block-size by --blocking. 1996-04-17 François Pinard * Prerelease 1.11.10. * Makefile.am (EXTRA_DIST): New name for DIST_OTHER. 1996-01-14 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Select gnits. 1996-01-08 François Pinard * Makefile.am: New file. 1995-12-31 François Pinard * Makefile.in (check, dvi): New goals, doing nothing. Reported by Cesar Romani and Ulrich Drepper. 1995-06-21 François Pinard * Prerelease 1.11.9. * Makefile.in: Distribute the ChangeLog, now recovered! Reported by Andreas Schwab. 1995-06-17 François Pinard * Release 1.11.8. * WARNING: New file. * Makefile.in (DISTFILES): Distribute it. 1995-06-15 François Pinard * sripts/Makefile.in (dist): Do not hide copying rule. 1995-06-07 François Pinard * Makefile.in: Use subdir and distdir. 1995-02-05 François Pinard * Prerelease 1.11.7. * Makefile.in (maintainer-clean): New name for realclean. 1994-12-03 François Pinard * Prerelease 1.11.6. * ChangeLog: Replaced by a warning for now. It has seemingly been overwritten by the weekly script :-(. * Makefile.in (dist): Correct .../examples to .../scripts. 1994-09-14 François Pinard * Makefile.in: Cleanup... (check): Deleted. (Makefile): Have ./config.status create this Makefile only. 1994-06-30 François Pinard * Prerelease 1.11.5. * ChangeLog: Initialized by moving entries related to scripts out of this ChangeLog. 1993-11-24 Noah Friedman * dump-remind: Send mail notification to the original recipients that the dump has been continued when that is the case. 1993-03-31 Noah Friedman * level-0, level-1 (LOGFILE): Put logfile in `log' subdirectory. 1993-03-28 Noah Friedman * dump-remind (volno): Don't increment by one. 1993-03-25 Noah Friedman * level-0, level-1 (TAR_PART1): Use `--block-size', not just `--block', which is now ambiguous. 1993-03-24 Noah Friedman * backup-specs (TAR): New variable. * level-0, level-1 (TAR_PART1): Get path of GNU tar from `TAR' variable, don't hardcode it. 1993-03-20 Noah Friedman * backup-specs (SLEEP_MESSAGE): put backslashes in front of nested double quotes. * level-0, level-1 (BACKUP_DIRS): Don't put in quotes. (LOGFILE): Use sed to construct name, not awk. * dump-remind (recipients): Replaced inefficient pipeline with a single, simple sed script. (volno): Deal with the possibility that VOLNO_FILE may not be created yet. 1993-03-19 Michael I Bushnell * backup-specs (VOLNO_FILE): Removed abusive comment by Noah. 1993-03-18 Noah Friedman * Makefile.in (AUX): Include `dump-remind' in distribution. * backup-specs (SLEEP_MESSAGE): New variable. level-0, level-1: Use it instead of external `dont_touch' file. * level-0, level-1: Put most of the script in () and pipe everything from the subshell through tee -a $LOGFILE. Since you really want most of the output to go to the logfile anyway, and since all those pipelines were preventing one from getting the exit status of most commands, this seems like the right idea. * level-0, level-1 (LOGFILE): Use YYYY-MM-DD (all numeric) format for log file name, since that makes the file names sortable in a coherent way. Suffix should always be `level-n' where n is the dump level. level-0 script was just using `-full' instead. * level-0, level-1 (DUMP_LEVEL): New variable. Set to `0' or `1' in each script as appropriate. * level-0, level-1 (HOST): Renamed to `localhost' for clarity. (host): renamed to `remotehost' for clarity. * level-0, level-1 (startdate): New variable. Use it in Subject line of mailed report. * level-0, level-1: Fixed all instances where sed is called with a script on the command line to use `-e' option. * level-0, level-1: Don't try to call logfile.sed to filter LOGFILE. It's not distributed with tar and was never really used anyway. * level-0, level-1: Put quotes around most variable names (barring those that are known to intentionally contain text that should be expanded into multiple words, like `TAR_PART1'). * level-0, level-1: Got rid of annoying trailing backslashes in awk scripts. They were gratuitous. Made them a little more readable by adding some whitespace. 1992-10-21 Noah Friedman * level-0, level-1: put curly braces around variables for clarity. * backup-specs (DUMP_REMIND_SCRIPT): define it (but commented out so that distributed dump scripts won't use it by default). level-0, level-1 (TAR_PART1): use --info-script if DUMP_REMIND_SCRIPT is defined. dump-remind: new file (intended as an example). 1992-10-15 Noah Friedman * level-0, level-1: remove $LOGFILE.tmp files before exiting. 1992-09-24 Michael I Bushnell * level-0, level-1 (TAR_PART1): remove --atime-preserve because of a total screw. 1992-09-10 Noah Friedman * level-0, level-1 (TAR_PART1): put --atime-preserve inside quotes. 1992-09-09 Michael I Bushnell * level-0, level-1 (TAR_PART1): Use --atime-preserve. 1992-07-10 Michael I Bushnell * level-0, level-1: Avoid silly Sun awk lossage. 1992-04-30 Noah Friedman * level-1: Added `$' before VOLNO_FILE in definition of TAR_PART1. Added line to remove $VOLNO_FILE from any previous dump before starting. * level-0, level-1: Change long options to use `--' instead of `+' (support for `+' will go away soon) 1991-10-17 Michael I Bushnell * level-0: Repair damage from previous mod: stdin to rsh must be the terminal or tar's questions lose. 1991-08-31 Noah Friedman * level-0: Fixed several syntax errors associated with stdout/stderr redirection. Made sure remote host executes commands from sh where redirection is necessary, since root's shell might be csh in some places and the redirect syntax differs. 1991-07-01 Michael I Bushnell * Fix a misplaced quote in level-0 and change some >& into 2>&1. ----- src/ChangeLog ----- 1997-04-25 François Pinard * Release 1.12. * tar.c (main): Attempt to clarify the delayed error exit message. Reported by Richard Stallman. * list.c (decode_mode): New name for demode. * list.c (read_and): Set current_stat.st_mtime before testing it. Reported by Sven Verdoolaege. 1997-04-24 François Pinard * create.c (dump_file): Before asserting that we cannot access a directory, make sure tar is not installed suid root. Reported by Dietmar Braun. * misc.c (quote_copy_string): Undo 1996-05-02 change, meant for the file mangler, now obsolete. This will do neater listings. Reported by Max Hailperin and Noah Friedman. * buffer.c, incremen.c, misc.c, tar.c: Replace dangling semicolons by continue; or break; depending on context. Reported by Robert E. Brown. 1997-04-23 François Pinard * arith.c (add_to_tarlong_helper): Compare a superdigit against a value, rather than an unsigned sum against zero. Reported by Bruno Haible. * misc.c (quote_copy_string): Replace many if's by a switch. 1997-04-22 François Pinard * Prerelease 1.11q. * extract.c (extract_archive): Check if directory extraction was attempted over an existing directory before attempting recovery, so avoiding extraction loops in cases like DIR/../DIR. Reported by Marc Boucher. * delete.c (delete_archive_members): New name for junk_archive. * common.h, tar.c (main): Adjusted. 1997-04-20 François Pinard * tar.c (usage): Update comment about --mode. 1997-04-19 François Pinard * buffer.c: Include if necessary. Reported by Bruno Haible. * common.h: Declare write_dir_file for incremen.c. Reported by Bruno Haible. * incremen.c (get_directory_contents): Nest an assignment and test within another set of aesthetical parentheses. Reported by Bruno Haible. * tar.c (check_octal): Deleted. Reported by Bruno Haible. * buffer.c (flush_archive): Add one impossible switch case. * delete.c (junk_archive): Add two impossible switch cases. * list.c (read_and): Add one impossible switch case. * update.c (update_archive): Add two impossible switch cases. Reported by Bruno Haible. * names.c (name_gather): Explicitly declare allocated_length as an int, do not imply it. Reported by Bruno Haible. 1997-04-18 François Pinard * Prerelease 1.11p. * Makefile.am (tar._o, rmt._o): Revise rules further. Reported by Bruno Haible and Ken Steube. 1997-04-16 François Pinard * arith.h: Prefer a single long over a long long, if possible. Also reject long long if it is not long enough :-). Reported by Bruno Haible. 1997-04-15 François Pinard * buffer.c, tar.c, update.c, common.h: Replace _COMMAND suffixed constants by _SUBCOMMAND suffixed. Rename enum command by enum subcommand, main_command_option by subcommand_option and set_main_command_option by set_subcommand_option. * create.c (dump_file): Remove badperror label, call WARN explicitly at the two other needed places instead. Remove badfile label, expand the proper code at the three other needed places instead. Delete the critical_error flag, just set exit_status to TAREXIT_FAILURE rather than setting this flag. 1997-04-12 François Pinard * delete.c (move_archive): Declare it void. Reported by Bruno Haible and Kaveh R. Ghazi. 1997-04-11 François Pinard * Prerelease 1.11o. * Makefile.am: Duplicate rules for the ansi2knr case. Reported by Kaveh R. Ghazi and Marcus Daniels. 1997-04-10 François Pinard * common.h: Change mode_option from int to struct mode_change *. * tar.c (decode_option): Use mode_compile. * create.c (start_header): Use mode_adjust. 1997-04-09 François Pinard * All: Replace all flag_ prefixed variables by _option suffixed. * tar.c: Replace OPTION_ prefixed macros by _OPTION suffixed. * buffer.c, tar.c, update.c, common.h: Replace COMMAND_ prefixed macros by _COMMAND suffixed, COMMAND_NONE by UNKNOWN_COMMAND, and delete TOO_MANY_COMMAND. Turn these into an enum and declare main_command_option of this enum type, to replace command_mode, which was an int, everywhere. * tar.c (decode_options): Initialise main_command_option. (set_main_command_option): New function to replace SET_COMMAND_MODE. Diagnostic ambiguous command as soon as seen. However, be forgiving if command has merely been repeated. * buffer.c, tar.c, common.h: Have info_script_option be at the same time a flag and the option value, no need for a separate info_script variable. Rename rsh_command to rsh_command_option, tape_length to tape_length_option, compress_program to use_compress_program_option, volno_file to volno_file_option. * tar.c (set_use_compress_program_option): New function. * buffer.c, names.c, tar.c, common.h: Have files_from_option be at the same time a flag and the option value, no need for a separate namefile_name variable. * buffer.c, create.c, tar.c, commun.h: Rename volume_label to volume_label_option. * incremen.c, tar.c, common.h: Rename gnu_dumpfile to listed_incremental_option. Let it unitialised for just incremental. * create.c (create_archive): No need to check both incremental_option and listed_incremental_option, as the later implies the former already. * create.c, tar.c, common.h: Rename preset_owner to owner_option, preset_group to group_option and preset_mode to mode_option. * create.c, incremen.c, list.c, tar.c, commun.h: Have after_date_option be a Boolean instead of a three-valued flag. Rename threshold_time to newer_mdate_option, which may be looked at without checking after_date_option first, as threshold_time before. Make newer_cdate_option an alias for newer_mdate_option. 1997-04-08 François Pinard * buffer.c: Use int after extern to declare time_to_start_writing. * extract.c: Use int after static to declare we_are_root. Reported by Ariel Faigon. 1997-04-03 François Pinard * list.c (read_and): Use the proper enum constants in switch, instead of oldish and wrong numbers. Reported by Martin Mares. 1997-04-01 François Pinard * arith.c [SUPERDIGIT] (zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong, add_to_tarlong, mult_tarlong, print_tarlong): Rename all functions by adding a _helper suffix. * arith.h [SUPERDIGIT]: Replace function prototypes by macros, each calling the function with _helper appended, and extracting pointers out of the tarlong structures. Reported by Andrew A. Ivanov and Kaveh R. Ghazi. * buffer.c (child_open_for_compress): Copy all records coming out of the compressor, not only the last one. Reported by Alois Steindl, Mark Bynum, Martin Mares, Nelson H. F. Beebe, Scott J. Kramer and Torkel Hasle. 1997-03-29 François Pinard * create.c (dump_file): Ignore unreadable directories when --ignore-failed-read. Reported by Ralph Schleicher. * create.c (deal_with_sparse): Chain the last partial zero block with the preceding data, do not try sparing it. This correction is approximative, as the whole thing should be rethought. Reported by Andreas Degert. 1997-03-24 François Pinard * All: Rename head to current_header, hstat to current_stat, and header_format to current_format. * update.c (update_archive): Rename nstat to stat_data. * create.c: Do not extern hstat, as common.h does it. (deal_with_sparse): Get rid of amidst_data, since numbytes is already usable as a flag for the same thing. 1997-03-21 François Pinard * names.c (name_gather): Do not declare static variables which do not need to be. Have allocated_length represent the full allocated length, instead of only the name part. It's clearer. (addname): Similar cleanups. 1997-03-20 François Pinard * compare.c: Always call report_difference when there is a problem, so the exit status will be set in all cases. Build the message string if necessary, so avoiding stdargs/varargs. (report_difference): If NULL argument, just set the exit status without reporting a message. Move out the word `differs' in all callers, do not insert into an English message. (read_and_process): Return void, as the int result is never used. Assume processors returns nonzero for success and zero for failure, instead of 0 for success and -1 for error. (process_rawdata, process_dumpdir): Adjusted. * compare.c: Remove different as a global variable, it is useless. (diff_sparse_files): Make different a local variable, reinitialise it on each call. Otherwise, after any error elsewhere, all sparse files were always and falsely reported as erroneous. Reported by James E. Carpenter and Tim Towers. 1997-02-25 François Pinard * tar.c: Adjust copyright years in --version output. * create.c (dump_file): Allow saving directories even with -o. Reported by Daniel Trinkle. 1996-11-26 François Pinard * compare.c (verify_volume) [FDFLUSH]: Use fsync even in that case. Reported by Marty Leisner. 1996-11-25 François Pinard * buffer.c (new_volume): Write file name in two words. * names.c (name_next): Idem. * buffer.c (flush_read): Speak of record size instead of blocksize. Reported by Christian Kirsch. 1996-11-22 François Pinard * list.c (read_header): Return failure, instead of success, whenever checksums do not match. Reported by Marc Boucher and Marty Leisner. * incremen.c (get_directory_contents): Use stat_data instead of current_header for checking normal files. Otherwise, new or modified files in old directories were not dumped, that is, if a directory was older than the listed entry, it was skipped completely without checking the contained files. Reported by David Johnson, John David Anglin and Wolfram Wagner. * buffer.c (open_archive): When updating the archive, initialize the access variable with reading mode, not update mode. Reported by Andreas Schwab. * delete.c (junk_archive): Initially jump directly into the loop, so deleting a file after a big one will not destroying the archive. Reported by Akiko Matsushita, Andreas Schwab, Eric Backus, Jeff Siegel, Saul Lubkin, Stuart Kemp and Yasushi Suzudo. 1996-11-19 François Pinard * incremen.c (get_directory_contents): Compute distance using the start of the proper buffer. Reported by David Johnson, Donald H. Locker, John David Anglin, Marc Boucher and Noah Friedman. * tar.c (usage): Revise the mandatory/optional sentence again. Reported by Karl Berry. 1996-11-18 François Pinard * Prerelease 1.11.14. * tar.c (usage): Explain the purpose of the program. * tar.c (usage): Clarify the mandatory/optional sentence. Reported by Alex Schmidt. * system.h [HAVE_SYS_TAPE_H]: Include sys/buf.h if it exists, to avoid many warnings on BSD/OS. Reported by Dan Reish. 1996-11-11 François Pinard * incremen.c (write_directory_file): Renamed from write_dir_file. (get_directory_contents): Renamed from get_dir_contents. * common.h: Adjusted. * all: Cleanup around local variables, renaming them more appropriately, using initializers when natural, and moving them closer to the blocks where they are used. A bit of reorganisation in the sources: * common.h: New file, for holding all GNU tar specific definitions, which were previously held in tar.h. * tar.h: Now limited to the archive format description only. * all: Include common.h instead of tar.h. * delete.c: New file, holding delete code out of update.c. * update.c: Now limited to appending type of commands. * compare.c: New name for diffarch.c. * incremen.c: New name for increm.c. * names.c: Moved over all name processing from tar.c. * tar.c, common.h: Adjusted. * Makefile.am: Adjusted. * system.h (lstat) [!S_ISLNK]: Define as stat. * create.c, diffarch.c, increm.c: Remove similar definitions. * tar.c: Merge --version-control into --backup, make it obsolete. 1996-11-10 François Pinard * all: Add a FIXME comment everywhere errno is modified by tar. * buffer.c (new_volume): Return nonzero/zero for success/failure, instead of zero/negative. Callers adjusted. Use xstrdup on file name given by user with the answer "n", so avoiding the apparently useless allocation of one extra byte. Avoid using p. * buffer.c: Add DEBUG_FORK conditional code. Reported by Thomas König and Ulrich Drepper. * misc.c (maybe_backup_file): In the renaming message, say that the previous file is being renamed, not the newly extracted one. * buffer.c (backspace_output): Change return type to void, since returned values were never used. * update.c (move_arch): Idem. (xdup2): New name for redirect, order of arguments was not natural. 1996-11-09 François Pinard * all: Remove all white lines between open braces and comments. * tar.h: Declare access_mode as an enum and as a variable. Adjust declaration of open_archive. * buffer.c: (open_archive, new_volume): Use access instead of reading. Callers adjusted for using enum access_mode arguments. (flush_archive, close_archive): Use access_mode, and cleanup. * diffarch.c (verify_volume): Use access_mode. * buffer.c (child_open_for_compress, child_open_for_uncompress): Split of previous child_open_for_compress. Clean up. (open_archive): Adjusted for calling the proper function above. 1996-11-09 François Pinard * Prerelease 1.11.13. * tar.c (usage): Do not tie --posix anymore to 1.12. * extract.c (set_stat): Until we know better, for the time being, limit restoring symbolic link attributes to lchown only. * all: Mini clean up. Systematically set logical variables to one instead of auto-incrementing them (PDP-11 time is over by now! :-). Replace some single letter counters or cursors by variables named counter or cursor. Simplify a few C constructs. * buffer.c, tar.h: Delete read_error_flag, set but never used. Rename r_error_count to read_error_count. * create.c (clear_buffer): Use memset instead of explicit loop. (zero_block_p): Renamed from zero_block, callers adjusted. 1996-11-07 François Pinard * rmt.c (private_strerror): Add const's to sys_errlist declaration. Reported by Fabio d'Alessi. 1996-11-06 François Pinard * tar.h: Add OPTION_BACKUP, OPTION_SUFFIX, OPTION_VERSION_CONTROL. Renumber options from 3 instead of from 10. Declare flag_backup. * tar.c: Include backupfile.h. Implement --backup, --suffix and --version-control decoding. Adjust usage documentation. * misc.c (maybe_backup_file, un_backup_file): New functions. * tar.h: Adjusted. * buffer.c (child_open_for_compress, open_archive, new_volume): Use the new functions. * extract.c (extract_archive): Idem. Reported by Jeffrey Mark Siskind, Karl Berry, Karl Heuer, Marty Leisner, Melissa Weisshaus and William Bader. * misc.c (assign_string): Moved over from tar.c. * tar.h: Adjusted. 1996-10-28 François Pinard * tar.h: Declare enum read_header, for return values of read_header. * diffarch.c (verify_volume): Adjusted. * list.c (read_and, read_header): Adjusted. * update.c (junk_archive, update_archive): Adjusted. * update.c: Rename prev_status to previous_status. * update.c (junk_archive): Delete found_stuff, use logical_status. 1996-10-15 François Pinard * buffer.c (new_volume, open_archive): Soften messages. * create.c, extract.c: Add quotes around slashes in some messages. * tar.c (usage): Added a missing equal sign after --directory. Reported by Jan Djarv. 1996-09-22 François Pinard * tar.c: Write --no-recursion instead of --no-recurse. Reported by Noah Friedman. 1996-09-20 François Pinard * tar.h: Delete label_pattern. * tar.c (main): Do not compile anymore volume_label as a regexp. (usage): Document --label as accepting a globbing pattern. * buffer.c, tar.c: Do not include regex.h neither rx.h. * buffer.c (check_label_pattern): New function. (open_archive, flush_read): Use it, instead of re_match. * tar.c (decode_options): Better space --version output. 1996-09-19 François Pinard * Prerelease 1.11.12 * Makefile.am (EXTRA_PROGRAMS): Compile rmt properly, instead of letting make use default .c to executable rule. * tar.c: Include getopt.h. * system.h: Don't. * increm.c (get_dir_contents): Consider all NFS devices as equal before deciding that a directory was renamed, so automount will not fool GNU tar into spurious incremental redumping. Reported by Frank Koenen, Giorgio Signorini, Joachim Holzfuss, Konno Hiroharu, R. Kent Dybvig and Wolfram Wagner. * tar.c (usage): Add bug report address in --help output. (decode_options): Add copyright and authors in --version output. * increm.c: New name for gnu.c. * Makefile.am (tar_SOURCES): Adjusted. * gnu.c (init_buffer, add_buffer, get_buffer, flush_buffer): Moved over from misc.c. Deleted is_dot_or_dot_dot and remove_any_file. * misc.c (is_dot_or_dotdot, remove_any_file): Moved over from gnu.c. Deleted init_buffer, add_buffer, get_buffer and flush_buffer. * tar.h: Adjusted. 1996-09-18 François Pinard * buffer.c (write_error): Obey --totals before aborting. Reported by Greg Chung. * buffer.c (read_error, write_error): Renamed from readerror and writeerror. * tar.c (read_name_from_file): Rename c to character. 1996-09-17 François Pinard * arith.h (tarlong): The typedef tarlong, when an array, is now wrapped inside a struct to avoid bugs in EWS 4.2 C compiler. * arith.c: Adjusted. Reported by Paul Eggert. * buffer.c: Declare archive_stat statically. (open_archive): Do not declare archive_stat locally. (close_archive): Limit archive draining to while reading a pipe. Reported by Andreas Schwab. 1996-09-16 François Pinard * system.h: Define protected defaults for open parameter symbols. [EMUL_OPEN3]: Intercept open calls and redirect them to open3. * open3.c: New file, moved over from lib/. Merely include system.h rather than config.h, errno.h and open3.h. [EMUL_OPEN3]: The compilation of the file depends on this symbol. When it was in lib/, we were using LIBOBJS to control this. * Makefile.am: Adjusted. * extract.c: Don't call open3.h. Reported by Jim Meyering. 1996-09-09 François Pinard * Makefile.am (libexec_PROGRAMS): Rely on @RMT@, not rmt. (bin_PROGRAMS): Do not include @RMT@. * gnu.c (remove_any_file): Protect value of errno in case of failure to remove a directory, in non-recursive mode. This should correct spurious diagnostics while extracting directories over already existing hierarchies. Reported by Martin Mares and Marty Leisner. 1996-09-04 François Pinard * gnu.c (read_dir_file): Diagnose file names over PATH_MAX. (get_dir_contents, add_dir_name): Increase namebuf many times if this is needed to receive a loong file name. Reported by Carsten Heyl. * Makefile.am (tar.o, rmt.o): Special rules for defining LOCALEDIR, instead of having it defined on all compiles. * Makefile.am: Remove check related lines, moved over to tests/. 1996-09-03 François Pinard * Makefile.am: Use genfile in check_PROGRAMS, not noinst_PROGRAMS. (check-local): Do not depend on genfile. 1996-08-24 François Pinard * Makefile.am (EXTRA_DIST): Do not mention ansi2knr.1 nor ansi2knr.c, as Automake now handle them automatically. 1996-07-18 François Pinard * arith.h: Include tar.h, not arith.h, so FATAL_ERROR is defined. [!SUPER_DIGIT]: Declare arguments to ..._tarlong routines as pointers to unsigned long and not arrays, for avoiding pointers to arrays, and nevertheless have arrays passed by reference rather than by value. * arith.c: Adjusted function headers accordingly. * buffer.c, tar.c: Removed address-of operators, using tarlongs. Reported by Christian T. Dum, Jim Meyering and Kaveh R. Ghazi. * arith.h [SUPER_DIGIT]: Avoid indirection in all macros for Accumulators. This, in particular, solves a bug where the pointer value itself was printed, rather than the pointed to value. Reported by Drew Sullivan and Wolfram Wagner. * Makefile.am (EXTRA_DIST): Include ansi2knr.[1c] for now. Reported by Christian T. Dum, Jim Meyering and Kaveh R. Ghazi. 1996-07-17 François Pinard * Prerelease 1.11.11. * Makefile.am (check-local): Ensure relinking if the service libraries where modified (waiting for Automake to do it!). 1996-07-16 François Pinard * rmt.c (strerror): It is a macro on some systems. Reported by Santiago Vila Doncel. 1996-07-15 François Pinard * Prerelease 1.11.10. * checktar.sh: Use a more regular WARNING in message. 1996-07-09 François Pinard * tar.h: Declare that unquote_string as returning int, not char *. * misc.c (unquote_string): New name for un_quote_string. Clean up a bit, return a boolean indicator for success, not a string. * gnu.c (read_dir_file), mangle.c (extract_mangle), tar.c (add_exclude): Callers adjusted, so they never use a NULL return as an actual string. In fact, the result of unquote_string is always used, even if the quoting was improper. Reported by Johan Vromans. 1996-05-03 François Pinard * tar.h: Define TTY_NAME as a macro, instead of an external array. * tar.c: Remove declaration of TTY_NAME. * tar.h: Rename new_time to threshold time. Make it GLOBAL. * tar.c, create.c, gnu.c, list.c: Adjusted. (decode_options): Clarify -N and --newer-mtime decoding, ensure one of them is called at most, otherwise it would misbehave. 1996-05-02 François Pinard * misc.c (quote_copy_string): Ensure spaces are backslash-quoted. Reported by Max Hailperin. * list.c (decode_header): Some clean up. Recognize POSIX archive headers, avoid fetching atime or ctime in this case. [!S_IFBLK || !S_IFCHR]: Ensure st_rdev is cleared appropriately. * tar.h: Rename head_standard to header_format, so turning an int to an enum archive_format. Adjust decode_header prototype. * diffarch.c, extract.c, list.c, update.c: Usages changed. * create.c: Ensure oldgnu_header is only used when OLDGNU_FORMAT. (Correction just starting to be made--will be comprehensive...) Reported by Anders Andersson, Bdale Garbee, Chris G Demetriou and David J. MacKenzie. * buffer.c, gnu.c, rtapelib.c, tar.c: Diagnose errors on fclose. Reported by Jim Meyering. 1996-05-01 François Pinard * buffer.c (close_archive): If reading and the archive is finished, read until end of archive, for avoiding an error message from the upstream process if we are reading from a pipe. Reported by Bennett Todd, Dick Streefland, Don Bennett, Ian Lance Taylor, Jean-loup Gailly and Piercarlo Grandi. * create.c (dump_file): Add note about accuracy of st_blocks. Reported by Dick Streefland. * diffarch.c: Include if it exists. (verify_volume): fsync, than ioctl(, FDFLUSH) first. Reported by Marty Leisner. 1996-04-29 François Pinard * list.c (isotime): New function. (print_header) [!USE_OLD_CTIME]: Use it instead of ctime. Reported by Karl Berry and Markus Kuhn. 1996-04-23 François Pinard * extract.c (set_stat): Accept a new parameter telling if this is a symbolic link. In this case, and if lchown exists, use it instead of chown. Callers adjusted. (extract_archive): Do call set_stat over restored symbolic links. Reported by Andreas Koppenhoefer, Bernard Derval, Ian Jackson, Matt Power, Warren Dodge and Wolfram Gloger. * extract.c (extr_init): If the umask was very restrictive at start of tar, nevertheless ensure we create intermediate directories with such permissions that we can at least add files into them. (extract_archive): Same, but for final directory. Ensure directory attributes are restored in all cases. Reported by Piercarlo Grandi. * tar.c: Implement --owner, --group and --mode options. * tar.h: Declare preset_owner, preset_group and preset_mode. * create.c: Obey these variables. Reported by Ken Raeburn, Richard Stallman and Stephen Gildea. * create.c (dump_file): When wanting the length of the link name, use strlen, rather then doing wrong arithmetic giving the number of removed slashes at the beginning of it. Reported by Brian R. Smith. * create.c (start_header): Try removing leading slashes even for long file names. Reported by Art Isbell, Fritz Elfert and Robert E. Brown. * buffer.c (new_volume): Avoid calling closeout_volume_number if the --volno-file option was not specified, so avoiding crashes. * tar.c (usage): Document the --volno-file option. Reported by Christoph Litauer, Daniel S. Barclay, David Taylor, Erik D. Frederick, Larry Creech, Loïc Prylli, Loren J. Rittle, Marty Leisner, Neil Faulks, Paul Mitchell, Rocky Giannini, Roy Marantz, Sylvain Rougier, Timothy J. Lee and Werner Almesberger. 1996-04-22 François Pinard * system.h (N_): Define marking macro for delayed translations. * rmt.c: Use N_ instead of _ for returned strings. It does not make sense translating messages in a remote process, not knowing the language in use in the local process. 1996-04-18 François Pinard Instead of -UU for removing directories, request a long option. * tar.c: Implement --recursive-unlink. (usage): Document --recursive-unlink. (decode_options): Have --recursive-unlink imply --unlink-first. * tar.h: Declare --recursive-unlink. * extract.c (extract_archive): Use flag_recursive_unlink instead of flag_unlink_first > 1. Reported by Andreas Schwab. 1996-04-17 François Pinard * Makefile.am (EXTRA_DIST): New name for DIST_OTHER. * tar.c (addname, name_gather): Zero out freshly allocated struct name, to prevent garbage to get into the structure. Reported by Jonathan Kamens. 1996-03-28 François Pinard * create.c (dump_file): Cast %ld argument to (long). Reported by Constantin Belous and Jörgen Hägg. 1996-03-21 François Pinard * tar.c (main): Return int, not void. Reported by Timothy J. Lee and Peter Seebach. 1996-02-28 François Pinard * Makefile.am: Use RMT instead of PROGRAMS and noinst_HEADERS instead of HEADERS. 1996-02-12 François Pinard * Makefile.am: Remove CONFIG_HEADER, not required by Automake 0.29. 1996-02-03 François Pinard Ensure --totals work correctly for huge archives: * arith.h, arith.c: New files. * Makefile.am: Use arith.h and arith.c. * tar.h: Do not declare tot_written anymore, include "arith.h". * tar.c (main): Call init_total_written and print_total_written. * buffer.c: Rename tot_written to total_written, make it tarlong. (init_total_written, print_total_written): New routines. Reported by Albert W. Dorrington, Chris F.M. Verberne, David Martin, Eduardo Villasenor de Rivas, Greg Chung, Jim Meyering, John R. Vanderpool, Jon Lewis, Jörg Weule, Jörgen Hägg, Rod Thompson, Russell Cattelan, Ted Rule and Tor Lillqvist. Ensure --tape-length is usable for huge media: * tar.h: Declare tape_length as tarlong instead of int. * tar.c (decode_option): Decode tape_length as tarlong, and use its value pre-multiplied by 1024. * buffer.c (flush_write): Use bytes_written and tape_length as tarlongs. Declare bytes_written outside flush_write. (init_total_written): Zero out bytes_written as well. Reported by Dave Barr. 1996-01-15 François Pinard * rtapelib.c (rmt_open__) [MSDOS]: Do not call setuid/setgid. Reported by Yasushi Suzudo. 1996-01-14 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Select gnits and ansi2knr. 1996-01-08 François Pinard * create.c: Initialize linklist to NULL. Reported by Bradley A. Smith. 1996-01-07 François Pinard * Makefile.am: Add parts of previous Makefile.in as FIXME comments. 1996-01-03 François Pinard * tar.c (usage): Avoid an unescaped new line. Reported by Kaveh R. Ghazi and Mark Bynum. * system.h: Declare valloc if it exists and is not #defined. * create.c (start_header): Add missing DEFAULT_FORMAT case. * gnu.c (read_dir_file): Use NULL instead of (char *) 0. * Makefile.am: Install rmt in $(libexec), not in sbin. * tar.c (decode_options): Add a semicolon so default case is not completely empty, for better ANSI C compliance. Reported by John David Anglin, Kaveh R. Ghazi and Mark Bynum. 1996-01-02 François Pinard * buffer.c (open_archive): Allocate real_s_name at run time instead of statically, because PATH_MAX is not always constant. Reported by Bruno Haible, John David Anglin, Jonathan Thornburg, Kaveh R. Ghazi, Martin Bellenberg, Marty Leisner, Nelson H. F. Beebe, Roland McGrath and Thomas König. * Makefile.am (DIST_OTHER): Distribute BACKLOG. Reported by Marty Leisner. 1996-01-01 François Pinard * system.h: Include "error.h" instead of declaring error (). Reported by Jim Meyering. 1995-12-31 François Pinard * Makefile.am: New file. 1995-12-30 François Pinard * Makefile.in: Define LOCALEDIR in DEFS. * system.h [!ENABLE_NLS]: Add replacement for bindtextdomain. * tar.c (main): Add call to bindtextdomain. * rmt.c (main): Add calls to bindtextdomain and textdomain. Reported by Ulrich Drepper. * buffer.c, create.c, diffarch.c, gnu.c, list.c, rmt.h, system.h, tar.h, update.c: Replace __P by PARAMS, to respect ANSI C. * rtapelib.c, rmt.h: Replace all __rmt* symbols by rmt*__. 1995-12-28 François Pinard * Prerelease 1.11.9. * extract.c (extr_init): Initialize variables in any case, instead of partly relying on static initializations. Remove static initializations for those variables. 1995-12-24 François Pinard * extract.c (extract_archive): On systems not having symbolic links, attempt extracting symbolic links as hard links instead, as POSIX suggests. Emit a diagnostic on first occurrence. * extract.c (extract_archive): On systems not having contiguous files, continue extracting them as regular files as before, but emit a diagnostic on first occurrence. 1995-12-23 François Pinard * tar.h: Declare remove_any_file. * gnu.c (remove_any_file): New name for recursively_delete. Add a parameter to control recursion. Inverse return value, so 0 is failure. Ensure errno is always valid in this case. (gnu_restore): Specify recursion when calling remove_any_file. * extract.c (maybe_recoverable): New routine. (extract_archive): Call maybe_recoverable rather than make_directories, so deleting files is also tried. Some cleanup. * tar.h: Declare flag_unlink_first. * tar.c (decode_options): Decode --unlink-first (-U). (usage): Document it. * extract.c (extract_archive): With -U, call remove_any_file prior to extraction for everything except directories. Reported by Andrew J. Schorr, Andrey A. Chernov, Axel Boldt, Bo Nygaard Bai, Chris F.M. Verberne, Chris G. Demetriou, Christian Callsen, Daniel S. Barclay, Ian Jackson, James Stevens, Seth Robertson, Tito Flagella, Warner Losh and Wolfram Wagner. 1995-12-22 François Pinard * tar.c (name_close): Specify static. (main): Call name_close after create_archive. * create.c (create_archive): Do not call name_close. * tar.c: Clean out names_arg[cv] crumb. (name_next): Simplify routine by merging both loops. (addname): Avoid xstrdup'ing result of new_name, this corrects a memory leak. * extract.c: Normalize error message so the file is identified at the beginning of it. * tar.h (USAGE_ERROR): New macro. * tar.c: Use USAGE_ERROR as far as possible. Cleanup and normalization in string for usage errors. Better detection of conflicting options about archive format or compression program. * tar.c (decode_options): Decouple cases for -C and files. Count number of input files. Cowardly refuse to create an empty archive file, if -c is given without input file or list. Reported by Karl Berry and Robert Bernstein. 1995-12-21 François Pinard * buffer.c: Rename a few err variables to status. * extract.c: Rename a few check variables to status. Corrections to speed-up the sizeing pass in Amanda: * tar.h: Declare dev_null_output. * buffer.c (open_archive): Detect when archive is /dev/null. (flush_write): Avoid writing to /dev/null. * create.c (dump_file): Do not open file if archive is being written to /dev/null, nor read file nor restore times. Reported by Greg Maples and Tor Lillqvist. * gnu.c: Have dir_list properly initialized to NULL. Reported by Paul Nordstrom and Tim Lashua. * extract.c: Rename ourmask to newdir_umask. Rename and complement notumask to current_umask. * list.c (print_for_mkdir): New name for pr_mkdir. * tar.h: Adjust declaration. * extract.c (make_directories): New name for make_dirs. Some cleanup in variable names. * extract.c: Let newdir_umask be a global variable. (make_directories): Use newdir_umask while creating intermediate directories. They used to be 0777 unconditionally. Reported by Bruce Evans, Harald König and James Crawford Ralston. 1995-12-20 François Pinard * create.c (finish_header): Avoid printing the header for long names or links, this avoids spurious `Visible longname error's. Reported by Arne Wichmann, Chris F.M. Verberne, Frank Koenen, Franz-Werner Gergen, Ian Jackson, Jon Lewis, Mark Kollert, Paul Nordstrom, Ted Rule, Thomas Priesner, Tim Rylance and Tom Tromey. 1995-12-19 François Pinard * buffer.c: Have real_s_name able to hold PATH_MAX characters, not only NAME_FIELD_SIZE. It was breaking --multi-volume --listed-incremental when backing up long file names. Many symptoms really: a screwed-up date on the incremental data file, dumping incremental which should not have been, etc. * (flush_read): Avoid altering save_name pointer value, use cursor instead. Also avoid the optimization of cleaning each save_name only once per flush_read if it did not change: it was using `save_name = real_s_name;', and since save_name may be freed at any time, this is/was really running after trouble. Reported by Alexander V. Lukyanov, Axel Habermann, Chance Reschke, Claus Heine, Christian von Roques, Daniel Hagerty, Daniel S. Barclay, Dirk Herr-Hoyman, Donald H. Locker, Ed Childs, Heiko Schinke, Hunyue Yau, Goeran Uddeborg, Grant McDorman, Joachim Seelig, Joe DeBattista, Jonathan Thornburg, Joutsiniemi Tommi Il, Jürgen Lüters, Keith Young, Kelly Stephens, Kevin Dalley, Konno Hiroharu, Larry Creech, Martin Mares, Michael Dietrich, Michael Giddings, Michael Meissner, Michael P Urban, Paul Siddall, Pierce Cantrell, Peter Fox, Robert Frey, Roderich Schupp, Sam Richards, Stephen J Bevan, Torsten Lull, Wolfram Gloger and Yu-Min Liang. * system.h: Include and for BSDi. Reported by Chris Arthur, Dan Reish, Karl Berry and Skip Montanaro. * rmt.c (private_strerror): New, copied from lib/error.c. Remove sys_errlist declaration, and use syserror instead. Reported by Chris Arthur, Coranth Gryphon, Erich Stefan Boleyn, Fabio d'Alessi, Greg Hudson, Jason R. Mastaler, Skip Montanaro, Thomas Krebs and Troy Rudolph. 1995-12-17 François Pinard * extract.c (extract_archive): Unrecognized types were defaulted to sparse files instead of regular files, because of an improper /* Fall through. */. * create.c, diffarch.c, extract.c, gnu.c, list.c, rtapelib.c, tar.c: Drop register specifications, useless in GNU's tar, as tar does not use longjmp, and GNU C has -O automagically set. * extract.c (extract_archive): Inhibit creation of links, special devices, directories, etc., when --to-stdout option is being used. Reported by Donald B Gordon, Gerben Wierda, Greg Chung, Norbert Kiesel and Roman Czyborra. 1995-12-04 François Pinard * tar.h: Implement FATAL_ERROR, telling error is not recoverable. * tar.c (main): Diagnose delayed error, for TAREXIT_FAILURE only. * buffer.c, diffarch.c, gnu.c, list.c, tar.c, update.c: Replace all `ERROR ((TAREXIT_FAILURE,' by `FATAL_ERROR ((0,'. Reported by Marty Leisner. * list.c (read_and): When telling block numbers in verbose output, clearly list block numbers for NUL blocks and end of file. Reported by Jörg Weule. * tar.c (usage): Document --newer-time. Reported by Greg Chung. 1995-11-30 François Pinard * system.h: Conditionally include prior to . * rmt.c: Do not include anymore. Reported by Harald König and Kaveh R. Ghazi. * rtapelib.c: Remove seemingly useless include of setjmp.h. * rtapelib.c: Try to get EOPNOTSUPP defined in all cases. If needed, include net/errno.h or sys/inet.h when they exist. Reported by Goeran Uddeborg, J.J. Bailey, John L. Chmielewski, Peder Chr. Norgaard and Yasushi Suzudo. 1995-11-29 François Pinard * tar.c (decode_options): Diagnose --block-compress properly. Was segment violating because falling into --blocking-factor. * buffer.c, create.c, diffarch.c, genfile.c, gnu.c, tar.c: Uniformly write nonzero instead of non-zero. Reported by Karl Berry. * system.h, buffer.c, create.c, diffarch.c, tar.c, update.c [MSDOS]: Instead of __MSDOS__, all occurrences. * extract.c (extract_archive) [MSDOS]: Avoid delaying restoration of timestamps for directories. * buffer.c (child_open_for_compress): Add a missing semi-colon. * diffarch.c (diff_archive): Avoid comparing uid and gid. Reported by Yasushi Suzudo. * tar.c (usage): Correct absolute-paths to absolute-names. Reported by Jonathan Kamens. * tar.c (usage): Indicate that --exclude uses globbing, and that --label uses regexps. Reported by John R. Vanderpool and Matti Aarnio. * tar.c (names_notfound): Do not report a fake namelist entry, so gzipped empty archives will not produce spurious diagnostics. Reported by Jonathan Kamens. 1995-11-23 François Pinard * tar.c (name_scan, name_match): Avoid labels and gotos. 1995-11-22 François Pinard * Makefile.in (DISTFILES): Distribute ChangeLog. * ChangeLog: New, extracted from top-level ChangeLog. * tar.c (main, decode_options): Delay request_stdin for `-f' until all options processed, so we now for sure that `-' means standard input, not standard output. * tar.c (usage): Document that users should not count on POSIX support yet, saying it is only partially implemented so far. 1995-10-27 François Pinard * rtapelib.c (_rmt_shutdown): Add the errno_value parameter. (__rmt_open): Call shutdown if remote open fails, or else, we lose file descriptors. Reported by Holger Teutsch. 1995-10-20 Tom Tromey * tar.c (request_stdin): New function. (stdin_used_by): New variable. (name_init, add_exclude_file, decode_options): Use request_stdin if required. (confirm): Check stdin_used_by to see if stdin in use. * list.c (read_header): Consistently use sizeof to find size of checksum field. 1995-08-26 François Pinard * names.c (uid_to_uname, gid_to_gname): Ensure that the empty string is returned when not found, instead of the previous one. 1995-08-06 François Pinard * buffer.c (new_volume): Use stderr rather than stdlis for interactions. Clarify `archive == 0' into `archive == STDIN'. Reported by Scott Hunziker. 1995-08-02 François Pinard * diffarch.c (diff_archive): When symlink differs, report the file name, not the link name. Reported by Dale R. Worley and Wolfram Wagner. 1995-07-23 François Pinard * Makefile.in (Makefile): Remove some useless lines. 1995-06-27 François Pinard * tar.h: Sort out declarations a little better. * tar.c (decode_options): Reorder the cases in the big switch. * tar.h: Introduce OLDGNU_COMPATIBILITY, enum archive_format, variable archive_format. Delete flag_old_archive, flag_standard. * tar.c (decode_options): Initialize archive_format so that -o yields V7_FORMAT, nothing yields OLDGNU_FORMAT, --posix yields GNU_FORMAT, and --posix with POSIXLY_CORRECT yields POSIX_FORMAT. * create.c (start_header): Use TMAGIC and TVERSION if required. Replace all flag_old_archive and flag_standard appropriately. * tar.c: Implement a --record-size option, which is an alternate way of saying --blocking-factor, in bytes this time. * tar.h, tar.c, create.c (dump_file): Implement a --no-recurse option, to help using tar with find. Reported by Chris G. Demetriou, Jamie Zawinski, Kimball Collins, Oswald P. Backus IV and Stuart Poulin. * tar.h, tar.c, buffer.c (child_open_for_compress): Delete --block-compress, issue a warning if used. It was never obeyed while outputting on disk files, where it would have been useful. It was only obeyed for pipes, remotes and devices, that is, exactly when it would be an error not to specify it. Reported by Hans Guerth, James H Caldwell Jr, Jean-loup Gailly, Jeffrey W. Parker, John D. Sybalsky, Kai Schlichting, Marcin Matuszewski, Mike Silano, Paul O'Connor, Pete Geenhuizen and Richard Stallman. * buffer.c (open_archive): Cosmetic changes. * buffer.c, diffarch.c, tar.h, update.c: Rename fl_read by flush_read and fl_write by flush_write. 1995-06-26 François Pinard * tar.c (usage): Remind that `USER@' may be specified. Reported by John J. Szetela and Oliver Trepte. * tar.c (usage): Replace `modificators' by `modifiers'. Reported by Alan Modra. * extract.c (set_mode, set_stat): New functions, from previous code, elsewhere. Replace various occurrences of code appropriately with function calls. Ensure mode bits are properly set in all circumstances. This may imply calling set_mode twice. Reported by Piercarlo Grandi and Tim Magill. * extract.c: Save the whole stat information in saved directory information, instead of parts of it, all mistyped. (restore_saved_dir_info): Free information as we consume it. Simplify code by using set_mode and set_times. Rename routine to apply_delayed_set_stat, and do some other cleanup around it. * *.[hc]: Replace flag_confirm by flag_interactive, flag_do_chown by flag_same_owner, flag_exstdout by flag_to_stdout, flag_follow_links by flag_dereference, flag_gnudump by flag_incremental, flag_ignorez by flag_ignore_zeros, flag_keep by flag_keep_old_files, flag_local_filesys by flag_one_file_system, flag_modified by flag_touch, flag_multivol by flag_multi_volume, flag_namefile by flag_files_from, flag_new_files by flag_after_date, flag_oldarch by flag_old_archive, flag_reblock by flag_read_full_records, flag_run_script_at_end by flag_info_script, flag_sayblock by flag_block_number, flag_sorted_names by flag_same_order, flag_sparse_files by flag_sparse, flag_startfile by flag_starting_file, flag_use_protection by flag_same_permissions, OPTION_COMPRESS_PROG by OPTION_USE_COMPRESS_PROGRAM, flag_volhdr by volume_label, flag_compressprog by compress_program, flag_rsh_command by rsh_command, and flag_volno_file by volno_file. * tar.c: Rename --modification-time by --touch, and provide a warning for the old option. 1995-06-24 François Pinard * list.c (decode_header): At extraction time, use the stored uid if uname is unknown in this system, and use the stored gid if gname is unknown in this system, instead. This solves a long lasting bug by which restored files were all owned by root, using an incomplete /etc/passwd or /etc/group file. * names.c: Rename finduname to uid_to_uname and findgname to gid_to_gname, exchanging the order of arguments. Use uid_t and gid_t instead of int's. Use empty strings in cached_[ug]name for marking there is no valid cached translation, instead of using magic values for cached_[ug]id. Rename finduid to uname_to_uid and findgid to gname_to_gid, adding a second argument to store the result if found, and returning a success/failure indication, not anymore assuming the current [ug]id by default. * tar.h, create.c, list.c: Adjust prototypes and callers. Reported by Anders Andersson, Bernard Derval, Brian Perkins, Charles Fu, Daniel Trinkle, Ian Jackson, Johannes Helander, Michael Lin, Richard Sims, Robert E. Brown, Tim P. Starrin and Torkel Hasle. * tar.h, create.c, list.c, names.c, tar.c: Implement --numeric-owner, to replace the NONAMES define. Then, ensure some reasonable values to magic and linkflags if POSIX. Reported by Benedikt Stockebrand, Ian Jackson and Stephen Gildea. * buffer.c: Delete save_block function, as well as saved_block_pointer and saved_block variables. Blocks were carefully saved indeed, but never consulted after the fact. * tar.h: Delete save_block prototype. * *.c: Delete all usages of save_block. * rmt.c: Add static to variable declarations. * list.c (read_header): Rename recsum to recorded_sum. 1995-06-23 François Pinard * *.[hc]: Rename --read-full-blocks to --read-full-records, --block-size to --blocking-factor, and --record-number to --block-number. * tar.c (decode_options): Diagnose usage of old names. * *.[hc]: Rename saverec to save_block, findrec to find_next_block, and userec to set_next_block_after. Replace endofrecs by available_space_after which does the space computation instead of returning the end pointer, adjust and simplify all callers, by using variable data_block systematically. Also, rename union block field charptr to buffer. 1995-06-22 François Pinard * *.[hc]: Exchange "record" and "block" almost everywhere and whenever appropriate, to follow the terminology used in P1003.1-1990, and so removing a lot of confusion in sources. * tar.h: Prefer naming constants and fields per P1003-1.1990 as far as possible. Rename those remaining LF_xxx to GNUTYPE_xxx. * *.c: Adjusted accordingly. * tar.h: Clean up the header structure. Make very clear what is specified by POSIX, and what is GNU format, and what is extended header for sparse files. Use xxx_FIELD_SIZE instead of NAMSIZ, TUNMLEN and TGNMLEN. Dismangle some other names, on the way... * *.c: Adjusted accordingly. * tar.h: Do not declare baserec, declare current_block_ordinal. * buffer.c (current_block_ordinal): New function. Rename baserec to record_start_block, and make it static. * list.c: Use current_block_ordinal, avoid baserec computations. * buffer.c, list.c: Get rid of saved_recno and annofile. * buffer.c, diffarch.c: Move no_op and wantbytes from buffer.c to diffarch.c. Correct prototypes so first arg is long. * tar.h: Do not declare no_op nor wantbytes, anymore. * tar.h, buffer.c: Move ar_block, ar_record and ar_last from tar.h to buffer.c, renaming them to record_start, current_block, record_end respectively. * update.c: Add temporary extern declaration for record_start, current_block and record_end. * tar.h, buffer.c: Move ar_reading from tar.h to buffer.c, renaming it to reading_archive. * diffarch.c: Add temporary extern declaration for reading_archive. * buffer.c, create.c, diffarch.c, extract.c, gnu.c, list.c, names.c, rmt.c, rmt.h, rtapelib.c, tar.c, update.c: Replace many #ifdef's by #if's, and #ifndef's by #if !'s. * buffer.c (redirect): New name for dupto. Callers changed. * create.c (dump_file), extract.c (extract_archive, extract_sparse_file), tar.h: Remove crumb about ending_blanks and end_nulls. * Makefile.in (all): Do not prepare genfile by default, as it is only needed for checking. * tar.c (decode_options): Diagnose lacking arguments to old options. Reported by Aage Robeck, Alan Cox, Benny Holmgren, Bruno Haible, Daniel Quinlan, Michael Schmidt, Richard J. Kettlewell and Robert Leslie. 1995-06-21 François Pinard * rtapelib.c (__rmt_open): Avoid dereferencing remote_user when NULL. Reported by Alois Steindl, Amos Yahil, Anders Liljeborg, Andre Novaes Cunha, Andreas Haumer, Andreas Reuter, Andy Gay, Bdale Garbee, Bradley A. Smith, Brett Gaines, Bruce Jerrick, Calvin Cliff, Cameron Elliott, Charles Lopes, Charles M. Hannum, Chris Metcalf, Christophe Colle, Christopher T. Johnson, Dale Wiles, David Shaw, Dimitri Bougoulias, Daniel Hagerty, Dave Gregorich, David Mansfield, David Nugent, David Shaw, David Steiner, Douglas Scott, Dunstan Vavasour, Edgar Taube, Eduardo Kortright, Elmer Fittery, Eric Benson, Eric M. Boehm, Gerd Knorr, Graham Whitted, Harald Milz, Heiko Schlichting, James V. Di Toro III, Jan Carlson, Janne Snabb, Jeff Sorensen, Jens Henrik Jensen, Jim Clausing, John J. Szetela, John R. Vanderpool, Jurgen Botz, Karl Berry, Karlos Z. Smith, Karsten Thygesen, Koji Kishi, Luke Mewburn, Manuel Munier, Marc Ewing, Matthew J. D'Errico, Martin Goik, Maxime Taksar, maximum entropy, Michael Hayes, Michael Schwingen, Michael Smolsky, Michael Kaufman, Mike Walker, Minh Tran-Le, Mitsuaki Masuhara, Nelson H. F. Beebe, Noel Cragg, Olaf Wucknitz, Oliver Trepte, Olivier Roussel, Patrick Fulconis, Paul Kanz, Paul Nordstrom, Pekka Janhunen, Peter Carah, Peter Kutschera, Phil Hands, Randy Bias, Reuben J. Ravago, Ricardo Marek, Robert Anthony Nader, Rod Buchanan, Roderich Schupp, Russell Cattelan, Scott J. Kramer, Scott L. Burson, Simon Wright, Sisira Jayasinghe, Steffen Stempel, Thomas M. Browder Jr., Thomas Waas, Tim Bradshaw, Tim Lashua, Timothy J. Lee, Tom Popovitch, Toshiaki Nishi, Victor J. Griswold, Wayne Christopher, William J. Eaton, Wlodzimierz Jan Martin, Wolfgang Rupprecht and Wolfram Wagner. * tar.h: Remove external prototypes related to rtapelib.c, as those are already declared in rmt.h. 1995-06-18 François Pinard * buffer.c (xclose): New, from port.c (ck_close). Replace ck_close by xclose in all modules. * port.c: Remove ck_close. * port.c: Remove ck_malloc, because xmalloc can be used instead, now that it protects against malloc(0) returning NULL. * gnu.c (gnu_restore), list.c (read_header): Replace ck_malloc with xmalloc. In gnu_restore, remove skipping code in case of failed allocation, because tar already aborted in xmalloc. * tar.h: Delete ck_malloc declaration. * port.c: Remove mknod, link, chown and geteuid, which normally exist on Unix. To be reinserted later, as needed. Reported by Jyh-Shyang Wang, Nelson H. F. Beebe, Philippe Defert and Serge Granik. * tar.c: Declare TTY_NAME, moved over from port.c. * extract.c (extract_archive), tar.c (decode_options): Clean out old NO_OPEN3 code. * Makefile.in: Adjusted. * buffer.c (child_open): In-line previous ck_pipe code. * tar.h: Delete ck_pipe declaration. * port.c: Delete ck_pipe function. * misc.c: New, reorganizing remaining code from port.c. * port.c: Deleted. * Makefile.in: Adjusted. * misc.c (un_quote_string): If `\' ends a string to unquote, just pass it undisturbed. From Robert Lipe. * system.h: Replace many #ifdef by #if, #ifndef by #if !. 1995-06-17 François Pinard * Release 1.11.8. * Makefile.in (mostlyclean): Remove also _*.c and _*.o. * create.c (dump_file), gnu.c (get_dir_contents): Cast (int) explicitely for test. * Makefile.in ($(OBJECTS)): Depend on ../intl/libgettext.h instead of ../intl/libintl.h, which does not always exist. * genfile.c: Define EXIT_SUCCESS and EXIT_FAILURE if not. * tar.c (main): Use TAREXIT_SUCCESS instead of EXIT_SUCCESS. * tar.h: Use off_t instead of long for the second argument in __rmt_lseek declaration. * system.h: Remove typedef of off_t, because AC_TYPE_OFF_T takes care of it now. Reported by Coranth Gryphon, Jim Blandy and Thomas Krebs. 1995-06-15 François Pinard * checktar.sh: Send a message saying that it is still useless. 1995-06-11 François Pinard * tar.h, tar.c (decode_options), extract.c (extract_archive), diffarch.c (diff_archive), create.c (dump_file, start_header), tar.c (decode_options): Replace flag_absolute_paths by flag_absolute_names. * tar.c (decode_options): Implement OBSOLETE_ABSOLUTE_NAMES for reporting --absolute-paths as obsolete. * system.h: Conditionnaly include and define setlocale to void independently of ENABLE_NLS. Reported by Ulrich Drepper. 1995-06-10 François Pinard * tar.c (long_options): Use no_argument and require_argument, instead of constants. Have long option names translated to short options whenever possible, rather than setting flags directly: easing option management is worth a few extra nanoseconds. * tar.c (long_options): Add --gunzip as meaning -z. Reported by Bruno Haible. 1995-06-07 François Pinard * Makefile.in: Use subdir and distdir. * system.h [NLS]: Simplify by merely including . Also, define setlocale to empty only if the setlocale function is not known, instead of when is missing. * Makefile.in (INCLUDES): Use ../intl in compilations, taking care of the fact libintl.h might have been symlinked there. 1995-06-05 François Pinard * tar.c, tar.h: Rename TAR_EXTERN to GLOBAL. * tar.h: Delete COMMAND_VERSION. * tar.c: Replace OPTION_HELP and OPTION_VERSION commands by show_help and show_version variables, so `--version --create' will not diagnose `Too many commands'. Adjust things so this works. Reported by Marty Leisner. 1995-06-04 François Pinard * Makefile.in (check): New goal. * checktar.sh: New script. * genfile.c: New file. * Makefile.in (all): Prepare genfile. * Makefile.in: Distribute checktar.sh and genfile.c. 1995-06-03 François Pinard * tar.h: Adjust so extracted doc/header.texi is neater. 1995-05-30 François Pinard * tar.c (name_match): Use %s for printing directory, not %d. Reported by Marty Leisner. * tar.c (name_gather, addname): chdir_name receives string pointers which might later be overwritten, but nevertheless saved into structures, so, use xstrdup for the time being. Reported by Michael Holmes. * tar.c (name_next, name_from_list): Abort when chdir fails. Reported by Ian Jackson and Marty Leisner. 1995-05-28 François Pinard * rmt.h: Declare second argument of __rmt_lseek to be off_t instead of long, so it is the same as in rmt.c. Reported by Chris Arthur. * buffer.c (close_archive): Compensate for the addition of 2 to ar_block at open_archive time, for when -M used, just before calling free. Reported by Bruno Haible, Clinton Carr, Hernan Prieto Schmidt, Kevin Dalley, Loren J. Rittle and Marty Leisner. * rmt.c: Replace SSIZE by STRING_SIZE, avoiding a conflict with some header files. Reported by Kaveh R. Ghazi and William Bader. * tar.c: Use DEVICE_PREFIX instead of DEVICE_PREXIX, and WITH_REGEX instead of WITH_REGEC. Reported by Bruno Haible. 1995-05-16 François Pinard * Prerelease 1.11.7. * Makefile.in (tar): Have $(OBJECTS) depend on system.h. * system.h: Many adjustements for GNU gettext. 1995-05-09 François Pinard * Makefile.in: Clean glocale out. 1995-05-08 François Pinard * Makefile.in: Use libintl.a while linking. * system.h: Include unconditionally, instead only if WITH_CATALOG. Let define _() appropriately. * tar.c (main): Call textdomain. 1995-05-02 François Pinard * system.h, gnu.c, list.c, port.c: Avoid superfluous parentheses in macro definitions. * port.c: Capitalize macro arguments. * buffer.c, create.c, diffarch.c, tar.c: Use comma operator when assignment in test. 1995-04-27 François Pinard * port.c (link): Use WARN to report the message. Reported by Sherwood Botsford. 1995-03-19 François Pinard * Makefile.in: Remove GLOCALE, add LINGUAS, use fp_WITH_CATALOGS. * system.h: Use WITH_CATALOGS to define _() differently. 1995-03-14 François Pinard * rtapelib.c (__rmt_open): Close the unused side of each pipe, instead of the useful one, prior to processing. Reported by Charles Lopes and Minh Tran-Le. 1995-02-22 François Pinard * Makefile.in: Replace `date' by `echo timestamp'. 1995-02-19 François Pinard * Makefile.in: Support ID files. Do not distribute TAGS. 1995-02-13 François Pinard * Makefile.in: Use top_srcdir. 1995-02-11 François Pinard * gnu.c (is_dot_or_dotdot): Through NFS, readdir might deliver empty filenames under old Solaris 2.4, causing endless loops in tar. As a workaround, avoid `' as done already for `.' and `..'. Reported by Jan Carlson. 1995-02-05 François Pinard * Makefile.in (maintainer-clean): New name for realclean. 1995-01-04 François Pinard * extract.c (make_dirs) [MSDOS]: Correct for Turbo C, which may return EACCES instead of EEXIST on mkdir. Reported by Jeffrey Goldberg. * tar.c (usage) [MSDOS]: Do not tell about -N and related. (decode_options) [MSDOS]: Be blind to -N and related. Reported by Jeffrey Goldberg. * rmt.h (_remdev): A filename is not remote if the colon is preceeded by a slash, to take care of `/:/' which is a shorthand for `/...//fs' on OSF's Distributing Computing Environment (DCE) and Distributed File System (DFS). Reported by Travis L. Priest. 1995-01-03 François Pinard * tar.c (decode_options): Renamed from options. Convert oldish-style non-dashed options to modern writing before performing option decoding. Diagnose when modern options are met before old style options are fully converted. This allows mixing of option styles on a single call. Avoid getoldopt and use getopt_long instead. * getoldopt.c: Deleted. * tar.h: Prototype deleted. * Makefile.in: Adjusted. Reported by Bruno Haible, Les Mikesell, Patrick Timmons and Saul Lubkin. 1995-01-02 François Pinard * system.h: New file, split out of tar.h. * buffer.c, create.c, diffarch.c, extract.c, getoldopt.c, gnu.c, list.c, mangle.c, names.c, port.c, tar.c, update.c: Include "system.h", and move the inclusion of "tar.h" down after system dependent definitions. * Makefile.in: Distribute system.h. * rmt.c: Include "system.h", and simplify accordingly. * rtapelib.c: Include "system.h", and simplify accordingly. * rmt.h: Simplify according to the inclusion of "system.h". * system.h: Include conditionnaly , , , and . * buffer.c, diffarch.c, rmt.c, rtapelib.c, update.c: Simplify accordingly. * system.h: If it exists, include prior to , to account for problems when GNU libc 1.0x is installed over SunOS 4.1.3: GNU libc does not provide sys/mtio.h, so it is taken from Sun header files which use things like _IOW, which GNU libc despises, sys/ioccom.h then provides definitions. Reported by Joseph E. Sacco. 1994-12-27 François Pinard * rmt.h: Ensure strrchr is defined to rindex in some cases. Reported by Karl Vogel. 1994-12-18 François Pinard * tar.h: Include and declare ISASCII. * gnu.c: Adjust, declare and use ISDIGIT and ISSPACE. * list.c: Adjust, declare and use ISODIGIT and ISSPACE. * port.c: Adjust, declare and use ISPRINT. Reported by Bruno Haible, Konno Hiroharu and Max Hailperin. 1994-12-11 François Pinard * buffer.c, tar.c [WITH_REGEX]: Check it. 1994-12-03 François Pinard * Prerelease 1.11.6. * rmt.c: Adjust for localization, by including and , by defining _(), by defining and calling setlocale, and by defining and initializing program_name. * Makefile.in: Use locale.o and libtar.a with rmt. * Makefile.in: Ensure INSTALL_DATA is defined. * Makefile.in, tar.h, tar.c: Localize, adapting from how it is done in sharutils. * Makefile.in, tar.c: Rename PRODUCT to PACKAGE. 1994-11-29 François Pinard * buffer.c (backspace_output): Change cur from long to off_t. * diffarch.c (diff_archive): Idem for offset. * extract.c (extract_archive): Idem for offset. * rmt.c: Idem for lseek (). (main): For case 'L', use atol instead of atoi, and cast the result to (off_t) rather than (long). * rtapelib.c (__rmt_lseek): Idem of offset argument. * tar.h: Change offset of sp_array from int to off_t. * update.c (move_arch): Change cur from long to off_t. Reported by David J. MacKenzie. 1994-11-26 François Pinard * rmt.h, tar.h, buffer.c, create.c, diffarch.c, extract.c, gnu.c, list.c, rtapelib.c, update.c: Rename _ to __P. * tar.h, rmt.h: Declare _ as a macro returning its argument, or else, include and declare _ as gettext. * tar.c: Possibly include and call setlocale. * rmt.c, buffer.c, create.c, diffarch.c, extract.c, getoldopt.c, gnu.c, list.c, mangle.c, port.c, rtapelib.c, tar.c, update.c: Use _ macro over all localizable strings. * rtapelib.c: Declare prototype for xstrdup. Do not declare strstr, which is not needed. 1994-11-01 François Pinard * Makefile.in: Clean up, following those of GNU m4. I will not detail all the changes here. * tar.c: Use PRODUCT and VERSION instead of version_string. 1994-10-30 François Pinard * tar.h [__STDC__]: Use #if instead of #ifdef. 1994-10-27 François Pinard * rmt.h, tar.h, buffer.c, create.c, diffarch.c, extract.c, gnu.c, list.c, mangle.c, tar.c, update.c: Rename all f_* variables to flag_*. * tar.h, buffer.c, tar.c, update.c: Rename cmd_mode into command_mode. * tar.c (SET_COMMAND_MODE): New macro, use it. * port.c (quote_copy_string): Prevent sign extension of character while copying it to an int. * (un_quote_string): Increment to_there pointer in all cases. Reported by Konno Hiroharu, Mats Lofkvist, Max Hailperin and Ryutaro Susukita. 1994-10-09 François Pinard * rmt.c, rtapelib.c, tar.h: Get rid of CONFIG_BROKETS. 1994-10-04 François Pinard * diffarch.c (fill_in_sparse_array): Add a cast for Pyramid's dumb compiler. Later remove the cast and compare to 0 instead. * extract.c (extract_archive): Idem. Reported by Karl Vogel and Kaveh R. Ghazi. 1994-09-27 François Pinard * diffarch.c: Normalize capitalization in diagnostics. 1994-09-26 François Pinard * tar.c (name_next, name_match): Abort tar if directory cannot be changed, instead of going on. This is not an innocuous error. Reported by Marty Leisner. 1994-09-15 François Pinard * rtapelib.c: Include "rmt.h" only once has been included, because off_t might not be defined otherwise. Reported by James W. McKelvey, John L. Chmielewski, Karl Vogel, Kaveh R. Ghazi an and Jim Meyering and Tilman Schmidt. 1994-09-14 François Pinard * Makefile.in: Cleanup... (DISTFILES): Distribute TAGS. (ansi2knr): Use $(LIBS). (TAGS): Make TAGS in $(srcdir) only. (distclean): Do not remove TAGS. (realclean): Remove TAGS. (Makefile): Have ./config.status create this Makefile only. 1994-09-13 François Pinard * buffer.c: Remove the presetting of stdlis, because stdout is not a constant in GNU libc. Reported by Joseph E. Sacco and Thomas Bushnell n/BSG. * buffer.c (new_volume): Pass an otherwise unused argument to wait, do not use NULL. Reported by Thomas Bushnell n/BSG. 1994-09-05 François Pinard * Makefile.in (TAGS): Remove -t on etags call. It has been the default behavior for a few releases of Emacs and it seems that option -t is now disappearing (from Emacs 19.25, at least). Reported by Goeran Uddeborg. 1994-09-02 François Pinard * gnu.c (get_dir_contents): Do not set dp->allnew if dp is not set itself. Reported by Piercarlo Grandi. * extract.c (extract_archive): Issue diagnostic or verbose messages to msg_file, instead of stdout. Reported by Piercarlo Grandi. 1994-08-23 François Pinard * tar.h: Do not declare alloca if already defined, so HP's +Olibcalls compiler option works. Reported by John David Anglin. * rtapelib.c (__rmt_open): Use REMOTE_SHELL only if defined. Otherwise, if the command argument has been specified and REMOTE_SHELL is not defined, immediately return an error. Reported by Bruno Haible, Kaveh R. Ghazi, Marty Leisner, Torkel Hasle and William Bader. Because --rsh-command may always be given, even if no remote shell was found at configure time, remote capabilities are always compiled. This also solve other problems related to RTAPELIB. * Makefile.in: Always compile $Urtapelib.o. * buffer.c (child_open): Always test _remdev, do not depend anymore on HAVE_RTAPELIB. * rmt.h [!HAVE_RTAPELIB]: Remove some code. Reported by Andreas Schwab and Vic Abell. * rtapelib.c: Remove unused COMPAT (mis)feature. Remove most length limitations for remote host name, remote user name and remote device name. Duplicate path, and free it in all cases. * (_rmt_rexec): The `user' parameter may never by the empty string. Remove code for that case. 1994-08-22 François Pinard Little cleanup in installation: * Makefile.in: Remove rule for ../lib/libtar.a. 1994-08-21 François Pinard * Prerelease 1.11.5. * Makefile.in: Correct for when a different build directory. * tar.h: Replace W* definitions. Adapted from make 3.71. * buffer.c (close_archive): Replace WIFCOREDUMPED by WCOREDUMP. Previous WIFSIGNALED definition was excluding SIGSTOP, new definition do not exclude it anymore. We'll see. Reported by Demizu Noritoshi, Greg Black, Kaveh R. Ghazi, Robert E. Brown and Russ Evans. 1994-08-20 François Pinard This might (?) solve the dirent problems on NeXT's and Apollo's: * tar.h: Change includes and defines from older AC_DIR_HEADER style to newer and clearer AC_HEADER_DIRENT style. * create.c, gnu.c: Replace NLENGTH by NAMLEN. Reported by Drew Trieger, Hugh Secker-Walker, James W. McKelvey, Robert E. Brown and Thomas Krebs. 1994-08-17 François Pinard Remove some shadowings. * update.c (update_archive): Rename head_standard to unused. * buffer.c (open_archive): Rename head to label. (fl_read): Rename head to cursor. * gnu.c (dirent_cmp): Use (char *const *), not (const char **) for not loosing the const specifier while casting. * mangle.c (extract_mangle): Remove unused argument. * tar.h: Adjust prototype. * extract.c (extract_archive): Caller changed. * rtapelib.c (__rmt_open): Remove useless mode parameter. * rmt.h, tar.h: Adjust prototype. * rmt.h: Adjust macros calling __rmt_open. * create.c (deal_with_sparse): Remove unused argument. * create.c (dump_file): Caller changed. Reported by Greg Black. * Makefile.in: Avoid $U in defining RTAPELIB. Remove both rtapelib.o and _urtapelib.o explicit rules, not needed anymore. * rmt.h, buffer.c [HAVE_RTAPELIB]: Instead of !NO_REMOTE. Reported by Andreas Schwab. * Makefile.in: Correct a typo in $Ubuffer.o dependencies. Reported by Andreas Schwab. * rtapelib.c (__rmt_ioctl): Compile the MTIOCGET case only if this symbol is defined. This also solves a missing mt_type field on NS32016 running SysVr2.2. Reported by Greg Black. * rtapelib.c (__rmt_ioctl) : Conditionnalize only the MTIOCTOP case, not the whole routine, with the MTIOCTOP symbol. In case of unrecognized operation, return EOPNOTSUPP instead of EINVAL. * rmt.h: Always provide a prototype for __rmt_ioctl. Delete the RMTIOCTL machinery. 1994-08-16 François Pinard * rmt.c, buffer.c: Use a more uniform way of including or its alternates. Reported by Daniel R. Guilderson and Kaveh R. Ghazi. * Makefile.in: Split rule for $Urtapelib.o into one rule for rtapelib.o and one rule for _rtapelib.o, taking care of the fact that rtapelib.c is in $(srcdir) while _rtapelib.c is in current directory. Reported by Andreas Schwab, Kaveh R. Ghazi, Minh Tran-Le and Per Foreby. * rmt.c (string_error): Correct DEBUG2 into DEBUG1, and strint into string. Reported by Anders Andersson, Bruno Haible, Thomas Krebs and Thomas König. * Makefile.in: Add $U's to rtapelib and rmt specific rules. Reported by Thomas König. 1994-08-15 François Pinard * Prerelease 1.11.4. * rmt.c (numeric_error): Renamed from error. (string_error): New, to replace ERROR ((...)), unavailable in rmt.c. * rmt.c (checkbuf): Do not accept, nor return record. Use the global instead. This will get rid of useless shadowings. * rmt.h: Give prototypes for __rmt_* routines. * rtapelib.c: Include "rmt.h". * update.c (move_arch): Cast last rmtioctl argument to char *. * buffer.c (backspace_output): Idem. * diffarch.c (verify_volume): Idem. * Makefile.in (rmt): Declare dependencies over rmt.h. 1994-08-14 François Pinard * rtapelib.c: Use MTIO_CHECK_FIELD instead of mt_type. Reported by Ben A. Mesander. 1994-08-13 François Pinard * tar.h: Include if it exists, whether POSIX or not. Check if WIFSTOPPED is defined, to decide if defining others WIF*. Reported by Bruno Haible. 1994-08-11 François Pinard * extract.c (extract_archive) [O_CTG]: Declare longname variable. Initialize it as NULL. This dirty kludge will allow the module to compile on Masscomp's, for the time being. Reported by Ben A. Mesander. * tar.h, rtapelib.c: Declare strstr if we replaced it. Reported by Ben A. Mesander, Christian T. Dum and Kaveh R. Ghazi. 1994-08-10 François Pinard * create.c (dump_file): Do not test only for hpux, but also for __hpux. I added __hpux__ too, as done in tar.h. Reported by Richard Lloyd. * tar.h: Do not include anymore for HP-UX from HP-UX 8 and after, for which definitions are in , and reorganize the tests in this area. Reported by Christian T. Dum, Dimitris Fousekis, Kimmy Posey, Michael Maass, Richard Lloyd and Thomas König. 1994-08-09 François Pinard These changes for const-cleaning gnu.c and tar.c: * tar.c (read_name_from_file): Work directly on global variables instead of accepting parameters. Return success or failure as an int instead of the relocated name_buffer. (name_next): Caller changed, internal clean-up of the function. Remove trailing slashes on the command call too, not only when reading from a file through -T option. * gnu.c: Add const to name and dir_text in struct dirname. Reported by Ben A. Mesander, Bruno Haible, Christian T. Dum, Dean Gaudet, James W. McKelvey, Richard Lloyd and Robert E. Brown. 1994-08-08 François Pinard * tar.c (name_next, name_gather, addname): Use strcmp for checking for "-C", instead of decomposed tests, just for clarity. * Makefile.in (RSH): Define from configuration. (rtapelib.o): Define REMOTE_SHELL from $(RSH) while compiling. * rtapelib.c (__rmt_open): If command not given, use REMOTE_SHELL, instead of cascading tries of filenames. Reported by Bruno Haible. * tar.c: Include if FNM_LEADING_DIR is not defined, instead of checking for FNM_PATHNAME, because some define the later without defining the former. Reported by Thomas König. * create.c (dump_file): Cast alloca results, for those compilers not processing void * properly. Reported by Kaveh R. Ghazi. * Makefile.in: Get prefix and exec_prefix from configure. Reported by Andreas Schwab, Christian T. Dum and Dean Gaudet. * src/port.c: Delete mkdir (and rmdir), rename, strstr and ftruncate replacements. Reported by Kaveh R. Ghazi (for memset and strstr). Reported by Bruno Haible (for mkdir and rename). 1994-08-05 François Pinard * tar.h: Replace msg_file by stdlis. * buffer.c, gnu.c, list.c, diffarch.c: Idem. * tar.c (main): Print version on stdout, not stderr. * tar.h: Unconditionnaly insert the pad. Why play the game of forcing the compiler to do it for us? (Hum! I'm not so sure.) Reported by Bruno Haible. * list.c (read_header): Initialize signed_sum to 0. Use this opportunity for slightly reorganizing the code around. Reported by Anders Andersson, Andrey A. Chernov, Bruno Haible and Chris Ransom. * tar.c: Declare name_buffer_length as size_t instead of int. Reported by Andreas Schwab, J.T. Conklin, Kaveh R. Ghazi and Robert E. Brown. * rmt.h: Have the NO_REMOTE case be a particular case of the other, for rmtopen and rmtcreat were not transmitting the proper number of parameters to open and creat (since 26 July 1994). Reported by Andreas Schwab. * extract.c (extract_archive): Delay changing owner to after doing utime, for keeping long enough the permission of utime'ing. (extract_archive, restore_saved_dir_info): Idem for directories. Reported by Jonathan I. Kamens. * tar.h: Change malloc_dbg to dmalloc, mutatis mutandis. * tar.h: Undefine many macros if stat macros found to be broken. Define mkfifo only if configure did not find it. Include if not _POSIX_SOURCE, then if we have it, than "pathmax.h". Move _POSIX_VERSION dependent code further down. Do not declare getcwd if we do not have it. * tar.c: Do not include , now in "tar.h". Reported by Bernard Chen, Jean-Michel Soenen, John L. Chmielewski and Kaveh R. Ghazi. * tar.h: Define DEV_BSIZE, ST_BLKSIZE and ST_NBLOCKS, borrowing this code from both fileutils-3.9's "lib/system.h" and textutils-1.9's "system.h". * create.c (dump_file): Straighten the test for sparseness, which was requiring one block too much, most probably for trying to get around DEV_BSIZE/st_blksize confusion. Use ST_NBLOCKS, instead of computing a variable block_size and doing specific tests for HP-UX or Linux. Also rewrite the test so it works when ST_NBLOCKS is unsigned. Reported by Bruno Haible, Dean Gaudet, Dick Streefland, Harald König, Jim Meyering, Kai Petzke, Kaveh R. Ghazi and Torkel Hasle. 1994-08-04 François Pinard * tar.c: Do not include if we do not have it. Reported by Kaveh R. Ghazi. * Makefile.in (RTAPELIB): Prefix by $U for unprotoization. Reported by Kaveh R. Ghazi and Christian T. Dum. * port.c: Remove many static specifiers. Reported by Demizu Noritoshi, Kaveh R. Ghazi and William Bader. * rtapelib.c (__rmt_open): Replace system by remote, twice. Reported by Ben A. Mesander, Christian T. Dum, Demizu Noritoshi and Kaveh R. Ghazi. * tar.c (addname): Replace a forgotten EX_SYSTEM by TAREXIT_FAILURE. Reported by Demizu Noritoshi, James W. McKelvey, Kaveh R. Ghazi and Robert E. Brown. 1994-08-02 François Pinard * Prerelease 1.11.3. * tar.c (assign_string): New routines. * create.c (dump_file, start_header), extract.c (extract_archive), list.c (list_archive, read_header), buffer.c (open_archive), diffarch.c (diff_archive): Use assign_string for setting these variables to a string value or NULL. * buffer.c (open_archive): Sets current_file_name, current_link_name and save_name to NULL. (close_archive): Free each of them if not NULL. (fl_write): Take a copy of save_name into cursor, and advance the cursor instead, because save_name should stay free-able. Reported by Dave Gentzel, Harald Anlauf, Mark Clements, Robert Weissenfels, Ronald van Loon, Tsutomu Yamada and Vic Abell. * extract.c (extract_archive): Use xstrdup, for clarity. * gnu.c (add_dir): Idem. * list.c (print_header): Correct a little bug by which non-symbolic links were not printed properly quoted. * diffarch.c (diff_archive): Allocate tmpbuf to the proper size. NAMSIZ + 2 is not necessarily enough. 1994-08-01 François Pinard * tar.h: Refresh str*/mem* configured declarations. Among other things, this will solve previously missing #undef's. * rmt.h: Revise strchr configured declaration. * *.c: Replace bzero by memset, bcopy by memcpy, bcmp by memcmp, index by strchr and rindex by strrchr. * port.c: Delete functions bzero and bcmp, said to not exist on Minix. AC_MINIX in configure.in should guarantee POSIX things. Reported by Drew Trieger, Hugh Secker-Walker and Vic Abell. * tar.h, tar.c, buffer.c, update.c: Change CMD_* to COMMAND_*. * buffer.c (open_archive): Use strcmp to compare archive name to `-', instead of doing it explicitely. Just for clarity. * tar.h, tar.c, buffer.c: Replace ar_files by archive_name_array, n_ar_files by archive_names and ar_files_len by allocated_archive_names. Replace the index cur_ar_file by archive_name_cursor, which is a cursor in archive_name_array. * tar.c (main): Move the initialization of archive_name_array at beginning, taken from options routine. Free it at end of main. (options): Use xrealloc instead of ck_realloc for archive_name, for the already saved names to be preserved. Reported by Per Bojsen. * tar.h, tar.c: Replace name_file by namefile_name. * tar.c: Replace n_ind by name_array, n_indused by names, n_indalloc by allocated_names, and n_indscan by name_index. Replace namef by name_file, n_argv by names_argv and n_argc by names_argc. (main): Make an initial allocation for name_array at beginning, moved out from name_add, free it at end of main. * buffer.c (close_archive): Free ar_block at end. 1994-07-30 François Pinard * tar.h [WITH_MALLOC_DBG]: Include "malloc_dbg.h". * create.c (create_archive): Do not attempt creating a directory summary file if -G, since -G sets gnu_dumpfile to 0. Reported by Alexander Dupuy. * create.c (dump_file): Avoid a NULL dereference with -G when trying to dump an empty directory. * gnu.c (add_dir_name): Same thing. Reported by Rainer Orth. Correction for the improper `data differs' diagnostic given when the continuation of a multi-volume was compared. * diffarch.c (diff_archive): If multi-volume, update save_name and save_totsize before calling wantbytes. * buffer.c (wantbytes): If multi-volume, update save_sizeleft. Reported by Andreas Schwab, Denis Fortin, François Pinard, Hiroyuki Bessho, Olaf Schlueter, Simon Wright and Saul Lubkin. 1994-07-30 François Pinard * tar.c (options): Implement DEVICE_PREFIX and DENSITY_LETTER. Reported by Danny R. Johnston. * gnu.c (gnu_restore): Use CURRENT_FILE_NAME abbreviation. * extract.c (extract_archive): Idem. Reported by Timothy Fossum. 1994-07-29 François Pinard * create.c (dump_file): Abort if no memory for a possible link, remove related bogus code, and the variable nolinks. Reported by Andreas Schwab. * create.c (dump_file): Detect file sparseness correctly for Linux ext2 filesystem. Reported by Kai Petzke. * port.c (link) [!MSDOS]: Do not call setmode. Reported by Richard Deal. Reorganization for `tar -d' to provide a different exit status. * tar.h: Replace errors by exit_status. Declare TAREXIT_*. * buffer.c (child_open): Exit with exit_status. * tar.c (main): Initialize exit_status to TAREXIT_SUCCESS, and exit with exit_status. * buffer.c, diffarch.c, gnu.c, list.c, port.c, rmt.c, tar.c, update.c: Replace EXIT_FAILURE by TAREXIT_FAILURE, and EXIT_SUCCESS by TAREXIT_SUCCESS. * tar.h (ERROR), create.c (dump_file): Set exit_status to TAREXIT_FAILURE instead of increasing errors. * diffarch.c (sigh, diff_sparse_files): On differences, set exit_status to TAREXIT_DIFFERS if nothing more serious already. Reported by Tilman Schmidt. * rmt.c: Define EXIT_FAILURE and EXIT_SUCCESS if not already. * rtapelib.c: Define EXIT_ON_EXEC_ERROR to 128 and use it. 1994-07-27 François Pinard * diffarch.c (sigh): Increment errors, so a difference will yield a non-zero exit status at end. Reported by Nick Holloway. * tar.h: Rename TARERROR to WARN, then add ERROR which is similar, but increments the errors counter. * *.c: Replace all TARERROR by WARN or ERROR, deciding for each case. Many errors were not reflected in exit status. Reported by Carl Streeter, Esa Karell, George Chyu, Ian Jackson, Judy Ricker, Massimo Dal Zotto, Roland McGrath, Tilman Schmidt and Torkel Hasle. * buffer.c (child_open): Exit with EXIT_FAILURE if any error. * rtapelib.c: Use error for reporting errors. (do_command): New name for command. (get_status): New name for status. * buffer.c: Remove definition of MAGIC_STAT. (close_archive): Do not check MAGIC_STAT for an exit value, since this value is never returned. * *.c: Use TARERROR or exit with EXIT_FAILURE, instead of various esoteric statuses. Normalize using TARERROR with an exit status, instead of calling TARERROR with 0 first, then _exit. On exit calls, use EXIT_SUCCESS instead of 0. * tar.c: Do not use the exit status anymore for outputting an error counter value. Wrap around was creating spurious success. * tar.h: Remove EX_* definitions for tar exit statuses. Reported by Bob Mende and Torbjorn Granlund. 1994-07-26 François Pinard * tar.h: Add f_rsh_command variable. * tar.c: Add and process --rsh-command option. * buffer.c (open_archive, child_open, new_volume): Pass f_rsh_command to rmtopen and rmtcreat calls. * rmt.h (rmtopen, rmtcreat): Pass a supplementary argument. * rtapelib.c (__rmt_open): Accept and process a command argument, to replace rsh. Reported by Jonathan I. Kamens. * tar.h: Instead of including with BSD42 or for V7, merely include if it exists, otherwise . * buffer.c, diffarch.c, extract.c, list.c, port.c, update.c: Do not include or , because they are indirectly included through "tar.h". * create.c (dump_file): Remove the BSD42 conditional. If not f_sparse_files, initialize upperbound as when not BSD42. Reported by Alan Bawden, Claude Scarpelli, Laurent Sainte-Marthe, Noah Friedman, Reuben Sumner, Tom Quinn and William Bader. 1994-07-24 François Pinard * tar.h: Merely define valloc as being malloc if valloc does not exist. * port.h: Remove valloc, which was only a dummy for malloc. Reported by Cliff Krumvieda, Francois Pinard, Henrik Bakman, J.T. Conklin, Nelson H.F. Beebe and Tilman Schmidt. 1994-07-22 François Pinard * create.c (start_header): Cast NAMSIZ to size_t before comparing it to strlen result. Reported by Mark Frost. * tar.c (main): Zero out label_pattern before compiling in regular expressions, instead of using uninitialized memory. Reported by Holger Teutsch. * tar.c [!FNM_PATHNAME]: Include fnmatch.h only if unistd.h fails to define this symbol. Reported by Alan Modra, Christian T. Dum, Eddy ?, John Oleynick and Richard Lloyd. * buffer.c, diffarch.c, rtapelib.c, update.c: Include before , if it exists. Reported by Kaveh R. Ghazi. * tar.c (options): Use defined OPTION_* constants instead of anonymous numbers for long options not having a short option form. * rmt.h [!MTIOCTOP]: Do not define RMTIOCTL, so __rmt_ioctl will not be called if it has not been compiled in rtapelib.c. * tar.h: Add CMD_TOO_MANY. * tar.c (main): Use CMD_TOO_MANY, and get rid of badopt label. Reported by David J. MacKenzie. * tar.c (usage): New name for describe(). Rewritten with better help formatting and more logical grouping of options. Accepts an exit status argument. Callers adapted. Reported by Richard O'Neill. 1994-07-20 François Pinard * port.c (rename): Constify the arguments. Reported by Elmar Heeb, Jeff Prothero and John Clark. * tar.c (main): Declare version_string locally. * version.c: Deleted. * Makefile.in: Adjusted. 1994-07-19 François Pinard * tar.h: Merge "port.h" towards the beginning of tar.h. Include and , and define errno if needed. * *.c: Do not include "port.h" anymore after "tar.h", do not include , nor . Also move "tar.h" as the first file included in every module. This would solve, among other things, the problem of RE_DUP_MAX being redefined by , when included after "regex.h". * port.h: Deleted. * Makefile.in: Adjusted. Reported by Alan Modra, Christian T. Dum, Dimitris Fousekis, John David Anglin, Matthew Braun, Michael Maass, Richard Lloyd and Stefan Skoglund. * create.c (dump_file): Do not cast alloca result to (char *). The problem reported was that alloca result was seen as int, but with the changes just made, alloca should be properly declared. Reported by Bryant Fujimoto and Michael Kubik. 1994-07-06 François Pinard * create.c, extract.c [HAVE_UTIME_H]: Instead of _POSIX_VERSION, for choosing to include . Reported by Carl Swanson and Thomas Krebs. 1994-07-05 François Pinard * tar.c: Replace DEF_AR_FILE with DEFAULT_ARCHIVE, replace DEFBLOCKING with DEFAULT_BLOCKING. * rtapelib.c: Replace "??'" by "?? '" at two places in a comment, so avoiding Pyramid's DC/OSx compiler to complain about ANSI trigraph sequences. Even comments can trigger bugs, now! Reported by Mark Frost. * tar.h: Declare valloc. * buffer.c, diffarch.c: Remove declaration for valloc. * testpad.c: Deleted. * tar.h: Do not include "testpad.h" anymore. * Makefile.in: Delete testpad matters. * buffer.c (new_volume): Inside case 'n', strcpy into r then assign r to p, instead of strcpy'ing directly into p, for making the module const clean. 1994-07-03 François Pinard Rename a few variables to avoid shadowing variables or functions: * list.c (print_header): Change name to quoted_name. * buffer.c (child_open): Change pipe to local_pipe. * extract.c (extract_archive): Change namelen to namelen_bis. * rtapelib.c (__rmt_open): Change system to remote. * tar.c (options): Add two missing arguments to getoldopt call, NULL is not necessarily implied on all systems. * list.c (print_header): Add a few missing long specification in formats. * diffarch.c (compare_chunk, diff_sparse_files): Idem. * port.c (msg, msg_perror): Idem. * tar.h: Include prototypes for all functions which call from one module to another. Declare voidstar (use it everywhere instead of PTR). Move in the include from , and the include of option.h from tar.c and getoldopt.c, waiting for a better solution for all these things. * port.c: Removed PTR declaration and including . * getoldopt.c, tar.c: Remove including "option.h". 1994-07-02 François Pinard * *: Protoized all function headers. Added static to functions which can take it. Add many const specifiers. Remove unused variables. * port.c (xmalloc): Delete function, do not mask the true one. * port.c (ck_malloc): Use xmalloc, waiting for annihilation. * port.c (ck_realloc): Use xrealloc, waiting for annihilation. * *: Begin switching from ck_malloc (or even pure malloc) to xmalloc. Same for ck_realloc (pure realloc) to xrealloc. Doing this correctly is a delicate matter, which I'll continue without reporting it anymore, while doing other modifications. * *: Replace msg and msg_perror calls by TARERROR macro calls. Capitalize first word of all error messages, remove ending punctuation or newline. Systematically avoid contractions for `Cannot' and `Could not'. Always write `WARNING:' all in capitals. * tar.h: Declare TARERROR as calling error(). Rename variable tar to program_name. * tar.c (main, options), buffer.c (child_open), port.c (msg, msg_perror), gnu.c (gnu_restore): Rename variable tar to program_name. * gnu.c (gnu_restore): Remove a spurious repetition of program_name in error message. 1994-07-01 François Pinard * buffer.c, create.c extract.c, gnu.c, list.c, names.c, rmt.c, tar.c, update.c: Remove all (void) prefixes to function calls. There are limits to lint clutter. 1994-06-30 François Pinard * port.h: Remove definition of const. Let configure do it. * tar.h, rmt.c, rtapelib.c, version.c, testpad.c: Add a block for including or "config.h". If "tar.h" was included everywhere, the block will only be needed there. * *.[ch]: Reindented to GNU standards (they were not far). Got rid of all `* ' left prefixes in comments and refilled them. There is still a lot of cosmetic changes needed everywhere. I will not report them any more, doing them along the way of other things in the future. * Makefile.in: New file. * Split distribution into a few subdirectories, for easing maintainance. * Taking over maintenance duties. 1993-08-31 David J. MacKenzie * rmt.c [M_UNIX]: Include sys/tape.h instead of sys/mtio.h. Reported by Drew Sullivan and William Bader. 1993-07-29 David J. MacKenzie * Makefile.in (config.status): Run config.status --recheck, not configure, to get the right args passed. 1993-07-19 David J. MacKenzie * Makefile.in (libdir): Use standard GNU value -- $(exec_prefix)/lib, not /etc. 1993-07-08 David J. MacKenzie * Makefile.in (installdirs, configure, config.status, Makefile): New targets. 1993-06-14 Noah Friedman * Makefile.in (.c.o): Put -I. before -I$(srcdir), and make $(CFLAGS) last. 1993-05-22 The King * extract.c (extract_archive, restore_saved_dir_info): Print mode in octal, not in decimal. Reported by Scott S. Bertilson. 1993-03-26 Noah Friedman * configure.in: Better way of detecting HP-UX. Reported by Noah Friedman. 1993-03-25 Michael I Bushnell * version.c: Released version 1.11.2. * Makefile.in (dist): Do the link differently; some of the files have changed filesystems which makes it more complex. * Makefile.in (dist, shar): Use gzip instead of compress. * create.c (dump_file): Test for curdev == -1, not curdev < 0. Some losing NFS systems give negative device numbers sometimes. Reported by Thorbjxrn Willoch. 1993-03-19 Michael I Bushnell * buffer.c (new_volume): Write the global volume number to the volno file before running the info script, so that the script can look at it. 1993-03-17 Michael I Bushnell * tar.c (describe, long_options): Changed --compress-block to --block-compress. (options): Fixed f_compress_block sanity check error message to give the correct name of the option. 1993-03-16 Michael I Bushnell * extract.c (extract_archive): case LF_DIR: Do chown when necessary. Don't bother jumping to set_filestat for f_modified; repeat the chmod code here. Replace `break', deleted on 2 September 1992. * tar.c (describe, long_options, options): Added gzip options and use-compress-program option. * tar.h: Added new compression options. * buffer.c (child_open, open_archive): Use new compression options. * create.c (start_header): Only mask off high bits when creating old-style archives. * list.c (decode_header): Mask off potentially misleading high bits from the mode when reading headers. Reported by Paul Eggert. 1993-03-15 Michael I Bushnell * extract.c (extract_archive): Put arguments in the right order for error message. Reported by Bruno Haible. * create.c (deal_with_sparse): If the last byte was null, we didn't write it out. * gnu.c, create.c, extract.c, diffarch.c, list.c: Replace malloc calls with ck_malloc and realloc with ck_realloc. Reported by Jonathan Kamens. * tar.c (describe): Improve doc for -L. * tar.c (name_next): Don't apply exclusion to explicitly named files. * tar.c (long_options, describe): Added new-volume-script as an alias for info-script. * extract.c (extract_archive): LF_DUMPDIR case; misplaced paren. * extract.c (extract_archive): extract_file case, first if, include space for null in namelen computation. * extract.c (extract_sparse_file): Use value returned by write to properly create error message. * create.c (create_archive): Don't assume we have anything to dump. * buffer.c (open_archive): Set current_file_name for the volume header so that verbose listings work properly. * Makefile.in (realclean): Added getdate.c. * create.c (deal_with_sparse): If exactly 26 elements in sparsearray, only 25 were written. Reported by Jim Murray. * create.c (deal_with_sparse): If the file ends with a zero block, the last byte was not written. This is fixed in create rather than extract: if amidst_data is not set at EOF, put out a block with just the last byte of the file. Reported by Jim Murray. 1993-01-14 David J. MacKenzie * tar.c: Include fnmatch.h after port.h to make sure we get our FNM_* (e.g. on HPUX 8). 1992-11-24 David J. MacKenzie * tar.c (addname), gnu.c (read_dir_file) [HAVE_GETCWD]: Instead of USG. * port.h, rmt.h [HAVE_STRING_H]: Instead of USG. * port.h: Add dir header decls. * create.c, gnu.c: Use SYSNDIR, SYSDIR, and NDIR instead of BSD42 and USG. Rename DP_NAMELEN to NLENGTH. Use `struct dirent' instead of `struct direct'. * create.c, gnu.c, tar.c: Remove dir header decls. 1992-11-18 David J. MacKenzie * tar.c: Change FNM_TARPATH to FNM_LEADING_DIR to match change in fnmatch.[ch]. 1992-10-02 David J. MacKenzie * tar.c (describe): Fix some tab alignments. * Makefile.in (SRC3): Add getdate.c, for systems without bison/yacc (like MS-DOS). * diffarch.c (diff_sparse_files): Add missing arg to fprintf calls. * extract.c (extract_archive, restore_saved_dir_info), buffer.c (child_open), list.c (decode_header, print_header): Delete unused vars. * port.c [__MSDOS__]: Have strstr, rename, and mkdir. Don't define ck_pipe. * buffer.c, tar.c (init_volume_number, closeout_volume_number), create.c (write_long): Declare as void, not int, since they don't return a value. 1992-09-22 Michael I Bushnell * buffer.c (close_archive): Removed leftover `break' from when this was a switch. 1992-09-22 Noah Friedman * create.c, port.h: indented #pragma directives with 1 space. 1992-09-18 Michael I Bushnell * All source files: re indented using GNU indent. * rtapelib.c (__rmt_read): Only read the amount left in the buffer; otherwise a broken rmt server (which puts too much data out) could overwrite past our buffer. 1992-09-17 Michael I Bushnell * configure.in: Check for getpwuid and getgrgid. Reported by J.T. Conklin. * create.c: Throughout, use struct utimbuf rather than array of longs. Reported by J.T. Conklin and Michael Ellis. * Makefile.in (SRC3, AUX): Move alloca.c to SRC3. (OBJ3): Add @ALLOCA@. * Makefile.in (getdate.c): Look in srcdir for getdate.y. * buffer.c (close_archive): We can't check WTERMSIG meaningfully unless we already know tha WIFSIGNALED is true. (There is no guarantee it WTERMSIG will return zero when WIFSIGNALED is false.) * port.c (rmdir, mkdir): Check WIFSIGNALED rather than WTERMSIG. * Makefile.in (getdate.c): Use $(YACC) instead of `yacc'. 1992-09-15 Michael I Bushnell * version.c: Released version 1.11.1. * Makefile (AUX): Added NEWS. * Makefile.in (rmt): Added $(LIBS). * mangle.c (extract_mangle): Null terminate link name for losing archives missing it. * configure.in: Added tests for libraries needed on Solaris. * Makefile.in: added target and rule for getdate.c: getdate.y; some makes don't have one built in. 1992-09-14 Michael I Bushnell * tar.c (options, main): Advise use of --help rather than +help. Reported by J.T. Conklin. * create.c (write_long): Using hstat here is a Bad Idea, and totally unnecessary at that. * list.c (read_header): Compute both signed and normal checksums. Reported by Robert E. Brown. * diffarch.c, buffer.c: Declare valloc as void* rather than char*. Reported by Robert E. Brown. * Makefile.in: Don't install info files. * port.h: Undefine index and rindex if necessary; some string.h's define them for us. * tar.c (addname): Missing braces after if. * gnu.c (read_dir_file): Missing braces after if. * names.c: Add include of , * create.c (start_header): Set current_file_name so that print_header, used for verbose create, works properly. (dump_file): Set current_link_name when setting up symlink and hardlink records. Reported by Robert Crowe. * configure.in: Define BSD in the presence of /sdmach or /../../mach. Reported by Robert E. Brown. * configure.in: Check for malloc was scrambled. 1992-09-11 David J. MacKenzie * fnmatch.[ch]: New files. * wildmat.c: File removed. * tar.c: Include fnmatch.h and use fnmatch instead of wildmat. * Makefile.in, makefile.pc: Replace wildmat.o(bj) with fnmatch. 1992-09-10 David J. MacKenzie * buffer.c, tar.c: Remove redundant decls of getenv, rindex. * Makefile.in: Add uninstall target. Define libdir instead of hardcoding /etc for installing rmt. 1992-09-10 Michael I Bushnell * list.c (read_header): On second thought, that doesn't work either, so just store the names in malloced areas. Sigh. * NEWS: New file. * README: Removed things that belong in NEWS; point to it. * list.c (read_header): current_file_name and current_link_name need to be set to the arrays in head rather than header; header is the actual read buffer and will change. * extract.c (extract_archive): * buffer.c (new_volume): `#' directives need to start in column 1. Reported by J.T. Conklin. 1992-09-09 Michael I Bushnell * version.c: Release of version 1.11. * Makefile.in (AUX): Add getpagesize.h. (AUX): Comment out manuals. (all): Comment out dependency on tar.info. * Makefile, configure.in: Arrange to use local malloc on HP-UX. * port.h Use the canonical Autoconf chunk for alloca instead of just looking for gcc. 1992-09-09 Noah Friedman * port.h: If compiling with gcc, use __builtin_alloca. 1992-09-08 Michael I Bushnell * extract.c: Removed long name support from here. * list.c (read_header): Understand and skip longname/longlink headers here. Names for current file are stored in new global variables. All source files except create.c changed to refer to current_file_name and current_link_name instead of fields directly from the current header. 1992-09-03 Michael I Bushnell * create.c (write_long): New function. (dump_file): When writing link records or symlink records, use new write_long function instead of mangling when the link target is too long. (start_header): Use write_long instead of mangling for long names. * extract.c (saverec): Recognize LF_LONGNAME and LF_LONGLINK. (saverec): Throughout, use longname and longlink if they are set. 1992-09-02 Michael I Bushnell * mangle.c: This is now deprecated; retain extract_mangle for backward compatibility. * list.c (print_header): Prevent printing 0 when the gid or uid is null. Reported by Chris Arthur. * list.c (decode_header): Use the gid field when the gid is empty, and similarly for uid. Reported by Chris Arthur. * extract.c: saved_dir_info, saved_dir_info_head: new type and var. (extract_archive): When extracting directories, now save info in saved_dir_info_head. (restore_saved_dir_info): New function. * list.c (read_and): Call restore_saved_dir_info at the end of the run. Reported by Chris Arthur. 1992-08-31 Michael I Bushnell * create.c (create_archive): If there are no names specified, write nothing on the archive instead of dumping ".". * buffer.c (open_archive): Useful error message. * tar.c, tar.h: Recognize f_atime_preserve. * create.c (dump_file): Implement f_atime_preserve. * rmt.h (_remdev): Don't require /dev/ to be in remote archive names; obey new force-local flag. * tar.c, tar.h: Implement new force-local flag. Reported by Roland Schemers III. * tar.c (describe): same-owner and same-order were confused. * create.c (dump_file): Check for toplevel had sense reversed. * buffer.c (new_archive): Don't free old_name...when these come from the command line, they aren't malloced, and it isn't important to save this trivial amount of memory. * tar.h: replace ar_file with ar_files, n_ar_files, cur_ar_files. * buffer.c (open_archive): multi-volume compressed archives never worked; give an appropriate error. Change open of ar_file to open of ar_files[0]. (writeerror, readerror, flush_archive): use ar_files[cur_ar_file] instead of ar_file. (new_archive): Necessary changes to support ar_files. * tar.c (options): handle multiple tape drive arguments. 1992-08-28 Michael I Bushnell * list.c (decode_header), create.c (start_header), tar.h (TMAGIC): Undo djm's changes below; tar does not support the final Posix.1 format; it's bad to make it look like it does. 1992-07-19 David J. MacKenzie * port.h: Try to prevent redefining major. * port.c [minix]: Implies HAVE_BZERO. Fix a typo. * list.c (decode_header): Recognize the final POSIX.1 magic as well as the early draft magic for ustar. * create.c (start_header): Create a final POSIX.1 magic string instead of an early draft string for ustar. * tar.h (TMAGIC): Remove the trailing blanks. * rmt.c, rtapelib.c: Use POSIX and STDC headers if available. * rmt.h: Declare the external functions defined in rtapelib.c. 1992-07-14 David J. MacKenzie * pathmax.h: New file. * port.h: Include it. * create.c (create_archive): Allocate PATH_MAX instead of NAME_MAX for temporary buffer so we don't have to figure out what NAME_MAX is (portably). 1992-07-10 Michael I Bushnell * gnu.c (collect_and_sort_names): write_dir_file has no argument. 1992-07-06 David J. MacKenzie * port.c (rename): If unlinking the source at the end fails, unlink the destination instead to avoid leaving a mess. 1992-07-03 David J. MacKenzie * buffer.c, diffarch.c, update.c, rtapelib.c [HAVE_SYS_MTIO_H]: Instead of NO_MTIO. * port.c, tar.h [HAVE_FOO]: Instead of FOO_MISSING. 1992-06-23 David J. MacKenzie * rmt.c: Add #ifdefs to work on ISC. 1992-05-20 David J. MacKenzie * port.h: Define major, minor, makedev if the system doesn't. 1992-05-13 Michael I Bushnell * gnu.c (add_dir_name): Store legitimate value into dir_contents when get_dir_contents returns NULL. 1992-05-07 Michael I Bushnell * gnu.c (add_dir_name): Check for return of NULL from get_dir_contents; see djm's change of Fri Jul 26 01:12:58 1991. 1992-05-04 David J. MacKenzie * tar.h: Make comments for option names say -- instead of +. 1992-04-29 Michael I Bushnell * tar.c, tar.t: Added +volno-file option. buffer.c (init_volume_number, closeout_volume_number): New functions. tar.c (main): Call new functions in the right place. * buffer.c (fl_write, fl_read): Mod to allow losing tape drives which use short counts to indicate end of tape correctly handle the multi-tape stuff. The read half won't co-exist with f_reblock; there's no way to fix that, of course. * tar.c, tar.h: Added new option +show-omitted-dirs. list.c (read_and): Implemented show-omitted-dirs. Reported by Karl Berry. * tar.c, tar.h: Added new option +checkpoint. buffer.c (fl_read, fl_write): Implemented +checkpoint lazily. * create.c (dump_file): Added toplevel argument; some devices can be negative, so the old method was bogus. All callers changed. Reported by Max Hailperin. * tar.c, tar.h: Added new option +ignore-failed-read. create.c (dump_file): Implemented +ignore-failed-read. Reported by Bob Mende Pie. * create.c (finish_sparse_file): Commented out debugging printf. * tar.c, tar.h: Added new option +remove-files to delete files after they are added to the archive. create.c (dump_file): Implemented +remove-files for everything but directories. I don't think they need it. 1992-04-28 Michael I Bushnell * create.c: (dump_file): save_name needs to be set equal to p, not something inside the header, because the header changes at the first buffer flush. 1992-04-24 Michael I Bushnell * create.c: Djm incorrectly moved the include of port.h to precede the include of sys/file.h; restored. * tar.c (main): Cases CMD_EXTRACT and CMD_LIST: declare error string with const. * gnu.c (collect_and_sort_names): Leave if around write_dir_file in place. 1992-04-22 David J. MacKenzie * rtapelib.c: SIGTYPE -> RETSIGTYPE. 1992-03-09 David J. MacKenzie * rtapelib.c: Reformat and make comments more complete. Rename a few variables for clarity. 1992-03-05 David J. MacKenzie * tar.c (describe): Document long options as starting with --. 1992-01-23 David J. MacKenzie * tar.c (options): Check get_date return value for error indication. 1991-12-24 David J. MacKenzie * tar.c, gnu.c, extract.c, create.c, port.h, rmt.h [HAVE_UNISTD_H, _POSIX_VERSION]: Instead of POSIX ifdefs. 1991-12-20 Michael I Bushnell * testpad.c (main): flush stderr so perror and fprintf cooperate right. 1991-12-18 David J. MacKenzie * port.h [MAJOR_IN_MKDEV, MAJOR_IN_SYSMACROS]: To find where to get major, minor and makedev. * create.c, list.c, update.c: Don't check USG to include sys/sysmacros.h. 1991-12-12 Michael I Bushnell * mangle.c (extract_mangle): Correctly null terminate name of link target. 1991-11-21 Michael I Bushnell * create.c (dump_file, at start of ISREG output loop): use filename from header instead of real name to make sure that we get the mangled version and not one that is too long and overflows buffers. 1991-11-16 David J. MacKenzie * tar.h: Use new criteria for STDC version of msg. 1991-11-02 David J. MacKenzie * create.c, gnu.c, tar.c [USG]: Use DIRENT instead of NDIR to select between dirent.h and ndir.h. * port.c [FOO_MISSING]: Instead of WANT_FOO, to make sharing code and configure script with other utilities easier. [VPRINTF_MISSING, DOPRNT_MISSING]: Instead of FOO_MSG, to select error reporting routines. 1991-08-29 Michael I Bushnell * tar.c (long_options). Fixed info-script long option. Reported by Eric Norum. 1991-08-26 David J. MacKenzie * configure, Makefile.in: Only put $< in Makefiles if VPATH is being used, because older makes don't understand it. 1991-08-19 David J. MacKenzie * create.c: Indent '#pragma alloca' so non-ANSI compilers don't choke on it. 1991-08-14 David J. MacKenzie * list.c (UGSWIDTH): Increase from 11 (sort of like Unix tar) to 18, so that with normal user and group names of <= 8 chars, the columns never shift in a tar -t listing. 1991-08-02 David J. MacKenzie * Makefile.in (dist): Include texinfo.tex and tar.info*. (install): Install tar.info*. * configure: Set INSTALLDATA. * configure: Create config.status. Remove it and Makefile if interrupted while creating them. * configure: Check for +srcdir etc. arg and look for Makefile.in in that directory. Set VPATH if srcdir is not `.'. * Makefile.in: Add `prefix'. (tar.info): New target. 1991-07-30 David J. MacKenzie * configure [FTIME_MISSING]: Instead of NEED_TZSET. 1991-07-29 David J. MacKenzie * port.c [F_CHSIZE]: Additional version. 1991-07-27 David J. MacKenzie * rmt.h: Clean up ifdefs. * makefile.pc: Fix typo. * port.h [__MSDOS__]: Instead of MSDOS. [__MSDOS__]: Define off_t. Include io.h and not sys/param.h. [__TURBOC__]: Use void * and don't define const. 1991-07-26 David J. MacKenzie * buffer.c: Rename `eof' to `hit_eof' to avoid conflict with an MSDOS function. * gnu.c (get_dir_contents): Return NULL, not "\0\0\0\0", on error. * diffarch.c (diff_archive): Open files in binary mode. Don't use or free a non-malloc'd return value from get_dir_contents. * msd_dir.c [__TURBOC__]: Include stdlib.h. * rmt.h: lseek returns off_t, not long. * tar.c (describe): -X is +exclude-from, not +exclude. (names_notfound): Free memory only if amiga, not !unix. * tar.h, tar.c: Add +null option to make -T read null-terminated filenames (such as those produced by GNU find -print0), and disable -C option. This guarantees that odd filenames will get archived. * tar.c (read_name_from_file): New function. (name_next): Call it instead of fgets. From David J. MacKenzie. 1991-07-24 David J. MacKenzie * create.c [_AIX]: Declare alloca. * buffer.c (open_archive): Check for successful open before, not after, fstatting the fd. 1991-07-23 David J. MacKenzie * configure: Only define BSD42 if sys/file.h exists. If alloca is missing and /usr/ucblib exists (SVR4), use it instead of -lPW. * port.h [!__STDC__]: #define const. * gnu.c (dirent_cmp): Fix args to agree with ANSI C prototype. * create.c: Declare ck_realloc. * gnu.c, diffarch.c: Move check for symlinks to after port.h include. 1991-07-20 David J. MacKenzie * msd_dir.[ch]: Use POSIX-style `struct dirent' instead of `struct direct'. * create.c, gnu.c, tar.c: Adjust callers. 1991-07-18 David J. MacKenzie * port.c (ck_malloc, ck_realloc): Return PTR, not char *. * gnu.c, create.c, tar.c: Fix decls. * port.c: Don't use the preprocessor to guess missing functions on Unix; let configure do it. [WANT_GETWD] (getwd): Function removed; not needed because getcwd is used if needed. * gnu.c, tar.c [POSIX]: Use getcwd. * rtapelib.c: Use SIGTYPE instead of testing SIGNAL_VOID. Default to void (more common these days) instead of int. * tar.c, gnu.c, mangle.c: Remove VOIDSTAR defn. Use PTR instead. * port.h: Define PTR. * gnu.c, tar.c [__MSDOS__ || USG]: Remove incorrect getcwd decl. [!POSIX]: Put correct one in port.h. * tar.c (describe): Print on stdout instead of stderr; it's not so much a usage message (since you have to ask for it explicitly) as on-line help, and you really need to be able to page it because it's more than a screen long. * Make #ifdefs for sys/file.h or fcntl.h, directory header, sys/mtio.h consistent between files. Use NO_MTIO instead of tricks with USG and HAVE_MTIO and NO_RMTIOCTL. * Move decls of ANSI C and POSIX functions to port.h and use standard headers to declare them if available [STDC_HEADERS or POSIX]. * Add many missing function declarations and return types. * Some places used __MSDOS__, some MSDOS; standardize on __MSDOS__. * Change S_IF macros to S_IS for POSIX. * port.h: Define appropriate S_IS macros if missing. * port.h [POSIX]: Rename macros for testing exit status to conform to POSIX; use the system's versions if available. * Use POSIX PATH_MAX and NAME_MAX instead of MAXPATHLEN and MAXNAMLEN. * port.h: Define PATH_MAX and NAME_MAX. * create.c, gnu.c, tar.c: Use ck_malloc and free instead of auto arrays of size PATH_MAX or NAME_MAX, since with pathconf they might not be constants. * Move all definitions of O_* to port.h to reduce redundancy. * Make all source files that now need to include port.h do so. * port.c: Remove #undefs of WANT_* so you can use -DWANT_* when compiling, instead of having to edit port.c. [WANT_DUMB_GET_DATE] (get_date): Function removed. Even systems without bison can get bison output and compile it. [WANT_STRING] (index, rindex, bcopy, bzero, bcmp): Functions removed; the translation is now done by macros in port.h. * wildmat.c (wildmat): Use POSIX.2 '!' instead of '^' to negate character classes. 1991-07-15 David J. MacKenzie * testpad.c (main): Return type void. * port.c [WANT_STRING]: Don't include memory.h if NO_MEMORY_H. * create.c (dump_file) [AIX]: Fix typo, `allocate' for `alloca'. * gnu.c (collect_and_sort_names): Move misplaced brace out of #ifdef. Reported by Minh Tran-Le. * configure: Also look in sys/signal.h for signal decl. 1991-07-10 David J. MacKenzie * Rename rtape_server.c to rmt.c and rtape_lib.c to rtapelib.c. * configure, Makefile.in: $(INSTALLPROG) -> $(INSTALL). 1991-07-09 David J. MacKenzie * Most files: Refer to GPL version 2. * COPYING: Use version 2. * port.c [__TURBOC__] (utime): New function. * xmalloc: New function (just calls ck_malloc), for alloca.c and bison.simple (in getdate.y output). * Makefile.in (AUX): Include alloca.c and tcexparg.c, a command line globber for Turbo C. 1991-07-08 David J. MacKenzie * testpad.c: Open and write to testpad.h instead of stdout, because some MS-DOS makes (Borland's at least) can't do redirection in commands. * Makefile.in: Don't redirect testpad output. 1991-07-08 Michael I Bushnell * buffer.c (fl_read): Missing \n in printf. 1991-07-08 David J. MacKenzie * create.c, extract.c, gnu.c, diffarch.c, tar.c: Comment out unused variables. * tar.c (options): Cast get_date arg to VOIDSTAR instead of `struct timeb *', since on some non-BSD systems the latter is undefined. 1991-07-06 David J. MacKenzie * Replace Makefile with configure, Makefile.in, and makefile.pc. Update README with current compilation instructions. * port.c [WANT_RENAME] (rename): New function. 1991-07-03 Michael I Bushnell * testpad.c (main): Avoid warning from some compilers on array address. * rtape_server.c (sys_errlist): Should be declared extern. Reported by Stuart Kemp. 1991-07-01 Michael I Bushnell * Release of version 1.10; appropriate changes to README. * create.c: Removed printf's about sparse files. 1991-06-21 Michael I Bushnell * list.c (skip_extended_headers): Userec was being called in the wrong place. 1991-06-20 David J. MacKenzie * tar.h [STDC_MSG]: Use ANSI prototypes for msg and msg_perror, even if BSD42 is also. * Makefile: Replace DESTDIR with bindir. (install): Don't install tar.texinfo. There's no standard place for texinfo files, and /usr/local/man is inappropriate. Add TAGS, distclean, and realclean targets and SHELL= line. * version.c: Move old change history to bottom of ChangeLog. 1991-06-12 Michael I Bushnell * rtape_lib.c (__rmt_write) [SIGNAL_VOID]: Instead of USG. 1991-06-05 Michael I Bushnell * tar.c (name_match, addname): Ugly hack to handle -C without any files specified. tar.h (struct name): New field for ugly hack. 1991-06-03 Michael I Bushnell * testpad.c: New file to determine if we need special padding in struct header in tar.h. * tar.h (struct header): include padding if necessary, include testpad.h. * Makefile: rules to create testpad.h, etc. 1991-05-22 Michael I Bushnell * tar.c (options): -L takes an argument. * rtape_lib.c (__rmt_open): add /usr/bin/nsh to the list of remote shell programs. * create.c: define MAXPATHLEN if we don't get it from a system header file. * create.c (deal_with_sparse): return a real return value if we can't open the file. * tar.c (long_options): +newer takes an argument. (describe): fix printing in various trivial ways 1991-05-21 Michael I Bushnell * tar.c (long_options): +get and +concatentate don't require arguments 1991-05-20 Michael I Bushnell * create.c (write_eot): Don't try and write an EOF if we are already at one. * port.c (strstr): Looking for null string should return zero. 1991-05-19 Michael I Bushnell * tar.c (options): -l doesn't take an argument * Makefile: Minor fix for SGI 4D defines. Reported by Andrew Torda. * rtape_server.c (main.c): For 386/AIX. I'm suspicious about this one. * create.c (dump_file): For hidden files on AIX. gnu.c (collect_and_sort_name, get_dir_contents): AIX hidden file mod. Reported by Minh Tran-Le. * tar.c: (name_next): Allow -C inside a file list given to -T. Reported by David Taylor. * Makefile: Comment describing presence of USE_REXEC. * extract.c (extract_archive, case LF_SPARSE): zero check for last element on numbytes needs to look at value after converted from octal. * port.c [HAVE_STRSTR]: Check it, instead of always demanding strstr. Makefile: Comment describing presence of HAVE_STRSTR option. 1991-05-19 David J. MacKenzie * port.c (get_date): Renamed from getdate, to avoid SVR4 conflict. * tar.c: Call get_date instead of getdate. 1991-05-10 Noah Friedman * tar.c: added "\n\" to the end of some documentation strings where they were left off. 1991-05-09 Michael I Bushnell * Makefile: added level-0, level-1, and backup-specs to AUX. * version.c: changed to 1.10 beta. * README: updated for 1.10 beta release. 1991-04-02 Michael I Bushnell * create.c (dump_file): HPUX's st_blocks is in 1024 byte units instead of 512 like the rest of the world, so I special cased it. * tar.c: Undo Noah's changes. 1991-04-01 Noah Friedman (This ought to be temporary until things are fixed properly. ) * tar.c: (struct option long_options): flag for "sparse" zero if compiling under hpux. tar.c: (functon options): case 'S' is a no-op if compiling under hpux. 1991-03-30 Michael I Bushnell * tar.h: new variable tape_length. * tar.c (options): add new option +tape-length / -L. * buffer.c (fl_write): Turn #ifdef TEST code for limited tape length on always, for tape-length option. * create.c (dump_file): avoid apollo lossage where S_IFIFO == S_IFSOCK. * buffer.c: include regex.h * buffer.c (fl_read, open_archive): Use regex routines for volume header match. * xmalloc.c: removed file; wasn't necessary. * tar.c: (main) use ck_malloc instead of xmalloc. 1991-03-28 Noah Friedman * regex.c, regex.o: New links. * tar.c: include regex.h. * Makefile (OBJ2): Add regex.o. (regex.o, tar.o): Depend on regex.h (SRC2, AUX): Add the new files. 1991-03-23 Noah Friedman * Makefile: added default flags and options for compiling under hpux. * Added files alloca.c and xmalloc.c. 1991-03-23 Michael I Bushnell * port.c [HPUX]: Define WANT_VALLOC. 1991-03-15 David J. MacKenzie * rtape_lib.c [USG && !HAVE_MTIO]: Define NO_RMTIOCTL automatically. (_rmt_rexec): Temporarily re-open stdin and stdout to /dev/tty, to guarantee that rexec() can prompt and read the login name and password from the user. * Makefile: Mention -DUSE_REXEC. Reported by Pascal Meheut. 1991-03-08 Michael I Bushnell * tar.h, Makefile [HAVE_SIZE_T]: Might be useful for some people. * gnu.c: lstat->stat define where appropriate * buffer.c (fl_write): keep track of amount written for +totals. * tar.c, tar.h: set flag f_totals from +totals option. * tar.h (f_totals, tot_written): new variables. * tar.c (main): print total written with CMD_CREATE. * tar.c (main): return appropriate exit status 1991-01-17 David J. MacKenzie * port.c: Remove a spurious `+' between functions (a remnant of a context diff, apparently). 1991-01-09 Michael I Bushnell * create.c (where_is_data): Rewritten to be better, and then #ifdef-ed out. (deal_with_sparse): Severly pruned. Now we write or don't write only complete blocks, not worrying about partial blocks. This simplifies calculations, removes bugs, and elides the second scan through the block. The first was zero_record, the second was where_is_data. 1991-01-07 Michael I Bushnell * create.c (deal_with_sparse): Second computation (for short reads) of numbytes increment had subtraction backwards. Need to handle calling where_is_data better when we did a short read (it might go past the end of the read), also, set sparsearray[...].offset in this case too. 1991-01-04 Jay Fenlason * buffer.c: Return a special error code if the archive you're trying to read starts with a different label than the one specified on the command line. 1991-01-02 Jay Fenlason * gnu.c: Prepend the current directory to the gnu_dumpfile, so that -C's won't affect where the output goes. (sigh.) 1990-12-18 Jay Fenlason * gnu.c: Don't complain if the gnudumpfile we're reading info from doesn't exist. * create.c: Write out gnudumpfile after finishing writing the archive. * tar.c: Add +exclude FNAME, and make +exclude-from do what +exclude used to. * Make +version an operation, not an option. * Add +confirmation alias for +interactive. 1990-12-04 Jay Fenlason * tar.c (check_exclude): Don't let MUMBLE match MUMBLE.c or fooMUMBLE but only foo/MUMBLE. * mangle.c: New file. * create.c, extract.c: According changes. * extract.c: Don't complain when extracting an already existing link. Don't complain when extracting a directory iff it already exists. Don't ad u+wx to directories when running as root. Reported by Chip Salzenberg. * gnu.c: Make +listed-incremental work. Reported by Chip Salzenberg. * port.c: Add the F_FREESP emulation of the ftruncate syscall. 1990-11-21 Jay Fenlason Remove excess \n from lots of msg() calls. 1990-11-19 Jay Fenlason * tar.c: Rename +volume to +label. 1990-11-16 David J. MacKenzie * tar.c (describe): Include the default values for -b and -f (as set in the Makefile) in the message. 1990-11-15 Jay Fenlason * extract.c (extract_archive): Do the utime() call before the chmod() call, 'cuz some versons of utime() trash the file's mode bits. * list.c (read_and): Call do_something on volume headers and multivol files even if they don't match the names we're looking for, etc. 1990-11-06 Jay Fenlason * port.c (un-quote-string): Don't try to write a null if there's already one there. 1990-11-01 Jay Fenlason * buffer.c (new_volume): fflush(msg_file) before reading for confirmation on new volume. On EOF or error, print error msg and abort. 1990-10-29 Jay Fenlason * getdate.y: Use new version of getdate(). * tar.c (name_add): Use sizeof(char *) instead of sizeof(int) * README: Give the correct return address. 1990-10-25 Jay Fenlason rtape_lib.c [NO_RMTIOCTL]: Instead of RMTIOCTL, so it is on by default. rmt.h [NO_REMOTE]: Add _isrmt() #define. gnu.c: Add forward reference for add_dir_name(). 1990-10-16 Jay Fenlason Version 1.09 --- New -G file implementation of gnu-dump stuff. * tar.c (name_add): Get the calls to ck_realloc and ck_malloc right. 1990-10-11 Jay Fenlason * gnu.c: Fix A couple of typos. 1990-09-19 David J. MacKenzie * getdate.y [USG && !DAYLIGHT_MISSING] (ftime): Use `daylight'. 1990-09-17 Jay Fenlason * gnu.c (gnu_restore): Don't use a passed char* for the file name, use skipcrud+head->header.name, just like everything else does. This means that gnu_restore will still work with small buffers, etc. 1990-09-13 Jay Fenlason * tar.c (add_exclude): Don't bus-error if the exclude file doesn't end with a newline. 1990-09-09 David J. MacKenzie * Makefile (dist): Remove .fname when done. 1990-09-06 Jay Fenlason * gnu.c (gnu_restore): Rember to skip_file() over the directory contents, even if we don't have to do anything with them. * create.c, extract.c, diffarch.c: Free sparsearray after we're done with it. 1990-09-04 Jay Fenlason * Makefile: Include gnu.c in dist * gnu.c: Move add_dir above read_dir_file so that cc doesn't complain about add_dir returning void. 1990-09-02 David J. MacKenzie * getdate.y: Declare some more functions and add storage classes where omitted to shut compiler up. [USG] (ftime): Don't use extern var `daylight'; appears that some systems don't have it. 1990-08-29 David J. MacKenzie * getdate.y (lookup): In the code that allows `Aug.' to be recognized as `Aug', don't chop off the final `.' from words like `a.m.', so they can be recognized. 1990-08-16 Jay Fenlason * buffer.c (open_archive): If -O, write verbosity to stderr instead of stdout. 1990-08-10 Jay Fenlason * getdate.y: Handle an explicit DST in the input string. Reported by Per Foreby. 1990-07-16 Jay Fenlason * tar.c: rename -g -G +incremental, +listed-imcremental, etc. 1990-07-13 Jay Fenlason * tar.c: Make +newer and +newer-mtime work according to their names. * gnu.c: If +newer or +newer-mtime, use the time specified on the command line. * buffer.c, create.c: Add test to see if dimwit is trying to archive the archive. * tar.c (long_options[]): Re-ordered, so that groups of similar options are next to each other... I think. (describe): Modified to more closely reflect reality. 1990-07-06 Jay Fenlason * tar.c: Add compile-time option for SYS V (?) style tape-drive names /dev/rmt/{n}[lmh] * tar.c: Fix getopt-style stuff so that -C always works correctly. * gnu.c, tar.c: Make filename to -G optional. * {all over}: Replace some fprintf(stderr...) calls with calls to msg(). * port.c: Make -Dmumble_MSG option on command line override internal assumptions. * Makefile: Mention -Dmumble_MSG options 1990-07-06 David J. MacKenzie * tar.c (options): Don't change `c' if it is 0, as getopt now handles that internally. 1990-07-02 Jay Fenlason * gnu.c (new file): Moved all the f_gnudump stuff here where we can keep track of it easier. Also made -G take a file name where it stores the inode information about directories so that we can detect moved directores. * create.c (dump_file): Changed slightly to work with the new f_gnudump. * tar.c: Moved the f_gnudump stuff to gnu.c * tar.c, extract.c: Added the +do-chown option, which forces tar to always try to chown the created files to their original owners. * version.c: New version 1.09 1990-06-24 David J. MacKenzie * create.c: Change ifdefs for directory library header selection to be like the ones in tar.c. * Makefile [Xenix]: Link with -ldir to get the dirent.h directory library. 1990-06-07 David J. MacKenzie * Makefile, buffer.c, diffarch.c [HAVE_MTIO]: Instead of MTIO, as SCO Xenix defines 'MTIO' for an incompatible tape driver system in a file included by termio.h. * tar.h: Don't define size_t for Xenix. 1990-06-05 Jay Fenlason * create.c (dump_file): Only print the "... is on a different filesystem..." if f_verbose is on. also add a case for S_IFSOCK and treat it like a FIFO. (Not sure if that's the right thing to do or not, but it's better than all those Unknown File Type msgs.) 1990-05-31 Jay Fenlason * port.c [sparc]: Use instead of SPARC since the lowercase version is defined, and the uppercase one isn't. 1990-05-22 Jay Fenlason * port.c (ck_malloc): if size==0 pretend size=1 (ck_realloc): if(!ptr) call ck_malloc instead. 1990-05-15 Jay Fenlason * diffarch.c (diff_archive): If not f_absolute_paths, and attempt to open a file listed in the archive fails, try /filename also. This will allow diff to open the wrong file if both /filename and filename exist, but there's nothing we can do about that. 1990-05-11 Jay Fenlason * Makefile: Describe new -DMTIO option. * buffer.c, diffarch.c: Change ifdefs slightly, so that -DMTIO will include sys/mtio.h even if USG is defined. This is for HPUX and similar BSD/USG crossovers. 1990-05-08 Jay Fenlason * update.c (update_archive): Call reset_eof() when appropriate. * buffer.c (reset_eof): New function, that turns of EOF flag, and re-sets the ar_record and ar_last pointers. This will allow 'tar rf non-existant-file' to not core-dump. 1990-05-04 David J. MacKenzie * tar.c: Recognize the +sparse option. It was documented, but only the short form (-S) was actually recognized. 1990-04-17 Jay Fenlason * create.c: Don't access location 0 if ->dir_contents is null. 1990-04-11 Jay Fenlason * buffer.c (flush_archive, close_archive, new_volume): Always check the return value of rmtclose(), and only give a warning msg if it is <0. Some device drivers (including Sun floppy disk, and HP streaming tape) return -1 after an IO error (or something like that.) 1990-03-23 Jim Kingdon * tar.c (long_options): Make it so +append +extract +list +update +catenate and +delete don't take arguments. 1990-03-12 Jay Fenlason * buffer.c (open_archive, fl_write): Set the mtime of the volume header to the current time. 1990-03-07 Jay Fenlason * buffer.c Fix +compress-block A two character patch from Juha Sarlin. Replace #ifdef __GNU__ with #ifdef __STDC__. (new_volume): If open of new archive fails, ask again, as it probably is user error. * tar.c: Replace #ifdef __GNU__ with #ifdef __STDC__ * port.c: Clean up #ifdef and #defines a bit. (quote_copy_string): Sometimes the malloc'd buffer would be up to two characters too short. * extract.c (extract_archive): Don't declare ind static. * create.c (dump_file): Don't declare index_offset static. * diffarch.c: Remove diff_name variable, and always use head->header.name, which will always work, unlike diff_name, which becomes trash when the next block is read in. 1990-03-01 Jay Fenlason * Makefile: Mention the -NO_REMOTE option. * port.c [i386]: Fix typo, and define WANT_FTRUNCATE. 1990-02-26 Jim Kingdon * getdate.y: Declare yylex and yyerror as static. #define yyparse to getdate_yyparse. 1990-02-25 David J. MacKenzie * tar.c: Remove +old option, since it is a valid abbreviation of +old-archive, which does the same thing. (describe): A few small cleanups in message. 1990-02-05 Jay Fenlason * port.c [sparc]: Define LOSING_MSG, since doprnt_msg doesn't work. [WANT_GETWD]: Fix typo. 1990-01-26 Jay Fenlason Version 1.08 --- Sparse file support added. Also various other features. * diffarch.c (compare_chunk): Include correct arguments in a call to fprintf() for an error msg. (compare_chunks, compare_dir): First argument is a long, not an int. * tar.c (options): Use tar variable (argv[0]) as the name to print in an error msg, instead of a constant "tar". (confirm): Use external variable char TTY_NAME[] for name of file to open for confirmation input. * buffer.c (new_volume): Ditto. * port.c: Add declaration for TTY_NAME[]. * rmt.h: Add long declarations for lseek() and __rmt_lseek(); 1990-01-23 Jay Fenlason * tar.c, create.c: Create the +newer-mtime option, which is like +newer, but only looks for files whose mtime is newer than the given date. * rtape_lib.c [USG]: Make *both* instances of signal-handler stuff use void (*foo)(). 1990-01-11 Jay Fenlason * getdate.y : Parse European dates of the form YYMMDD. In ftime(): Init timezone by calling localtime(), and remember that timezone is in seconds, but we want timeb->timezone to be in minutes. Reported by Jörgen Haegg. * rtape_lib.c (__rmt_open): Also look for /usr/bsd/rsh. Declare signal handler as returning void instead of int if USG is defined. * port.c: Declare WANT_GETWD for SGI 4-D IRIS. * Makefile: Include defines for SGI 4D version. Reported by Mike Muuss. * buffer.c (fl_read): Work properly on broken Ultrix systems where read() returns -1 with errno==ENOSPC on end of tape. Correctly go on to the next volume if f_multivol. * list.c (list_archive, print_header): Flush msg_file after printing messages. * port.c: Delete unused references to alloca(). Don't crash if malloc() returns zero in quote_copy_string. Flush stderr in msg() and msg_perror(). * tar.c: Flush msg_file after printing confirmation msg. 1990-01-10 David J. MacKenzie * tar.c (main): Change -help option and references to it to +help, and remove suggestion to run info (which is unreleased, so not likely to be of any help). 1990-01-09 Jay Fenlason * create.c (dump_file): Close file descriptor if start_header() fails. (dump_file): Change test for `./'-ness to not think that `.' {any character} is a `./'. Reported by Piercarlo Grandi. * diffarch.c (diff_init): Print correct number of bytes in error message. 1990-01-09 David J. MacKenzie * Makefile: Add comment at top noting that two source files also contain #defines that might need to be changed by hand. * create.c, diffarch.c, extract.c: Change L_SET to 0 in lseek calls, because only BSD defines it. * create.c (dump_file) [BSD42]: Make sparse file checking code conditional because it uses st_blocks, which the other systems lack. 1990-01-02 Jay Fenlason * port.c (quote_copy_string): Fix so it doesn't scramble memory if the last character is non-printable. Reported by Kian-Tat Lim. 1989-12-19 Jim Kingdon * port.c [BSD42]: Define DOPRNT_MSG. tar.h [BSD42]: Do not prototype msg{,_perror}. 1989-12-08 Jay Fenlason * create.c (dump_file): Remove typo in msg. 1989-12-01 David J. MacKenzie * Makefile: Remove comments referring to certain systems lacking getopt, since it is now provided always and needed by all systems. * port.c: Remove copy of getopt.c, as it is now linked in separately to always get the current version. * tar.c: Rename +cat-tars option to +catenate or +concatenate, and +local-filesystem to +one-file-system (preferred by rms and used in GNU cp for the same purpose). (describe): Reflect changes. 1989-11-28 David J. MacKenzie * port.c: Move declaration of alloca into #else /* sparc */ so it will compile on sparcs. 1989-11-27 David J. MacKenzie * tar.c (options): Remove -version option (replaced by +version). (describe): Mention long options. 1989-11-25 David J. MacKenzie * getoldopt.c (getoldopt): Make `opt_index' argument a pointer to an int, not char. * tar.c: Modify long options per rms's suggestions: Make preserve-permissions an alias for same-permissions. Make preserve-order an alias for same-order. Define preserve to mean both of those combined. Make old an alias for old-archive. Make portability an alias for old-archive, also. Rename sym-links to dereference. Rename gnudump to incremental. Rename filename to file. Make compare an alias for diff. Leave diff but prefer compare. Rename blocking-factor to block-size. Rename chdir to directory. Make uncompress an alias for compress. Rename confirm to interactive. Make get an alias for extract. Rename volume-header to volume. Also make +version an alias for -version. (options): Shorten code that interprets long options by using the equivalent short options' code. This also makes it tons easier to change the long options. (describe): Make usage message more internally consistent stylistically. 1989-11-20 hack@ai.mit.edu * list.c (read_and): Call check_exclude() to see if the files should be skipped on extract or list. 1989-11-09 Jim Kingdon * buffer.c (fl_read): Fix typos in error message "tar EOF not on block boundary". 1989-10-23 * tar.c (long_options[]): Add an option for blocked compression. 1989-10-19 * buffer.c (writeerror): Print a more useful error msg. 1989-09-27 * tar.c (main): Mention "tar -help" if the luser types a non-workable set of options. 1989-09-11 * tar.c (options): Have -F correctly set info_script. 1989-08-29 * Makefile Include ChangeLog in tar.tar and tar.tar.Z 1989-08-28 * tar.c (options) Made -F imply -M. Also remind tar that the -f option takes an argument! * Modified -F option to make it do what (I think) it should. e.g, if you say -F, tar won't send a msg to msg_file and wait for a It'll just run the program it was given, and when the prog returns, the new tape had *better* be ready... * buffer.c (open_archive): Give error message and abort if the luser didn't give an archive name. 1989-08-25 Joy Kendall * Added code to make a new option to run a specified script at the end of each tape in a multi-volume backup. Changed: tar.c: made new switch, -F, and new long-named option, "info-script". Code is where you would expect. * tar.h: added flag f_run_script_at_end, and an extern char * called info_script, which optarg gets set to. * buffer.c (new_volume): if f_run_script_at_end is set, we give info_script to system(), otherwise we do what we've always done. 1989-08-24 Joy Kendall (These changes made over the course of 6/89 - 8/89) * diffarch.c: diff_archive: Added switches for LF_SPARSE in the case statements that needed it. Also, skip any extended headers if we need to when we skip over a file. (need to change the bit about, if the size doesn't agree AND the file is NOT sparse, then there's a discrepancy, because I added another field to the header which should be able to deal with the sizes): If the file is sparse, call the added routine "diff_sparse_files" to compare. Also added routine "fill_in_sparse_array". * extract.c: extract_archive: added the switch LF_SPARSE to the case statement as needed, and code to treat the sparse file. At label "again_file", modified opening the file to see if we should have O_APPEND be one of the modes. Added code at label "extract_file" to call the new routine "extract_sparse_file" when we have an LF_SPARSE flag. Note: really should erase the commented-out code in there, because it's confusing. * update.c: made sure that if a file needed to be "skipped" over, it would check to see if the linkflag was sparse, and if so, would then make sure to skip over any "extended headers" that might come after the header itself. Do so by calling "skip_extended_headers". * create.c: create_archive: added code to detect a sparse file when in the long case statement. Added ways to detect extended headers, and label "extend" (ack! should get rid of that, is atrocious). Call the new routine "finish_sparse_file" if the linkflag is LF_SPARSE to write the info to the tape. Also added routines "init_sparsearray", "deal_with_sparse", "clear_buffer", "where_is_data", "zero_record", and "find_new_file_size". * tar.h: Added the #define's SPARSE_EXT_HDR and SPARSE_IN_HDR. Added the struct sparse and the struct sp_array. Added the linkflag LF_SPARSE. Changed the tar header in several ways: - added an array of struct sparse's SPARSE_IN_HDR long - added a char flag isextended - added a char string realsize to store the true size of a sparse file Added another choice to the union record called a struct extended_header, which is an array of 21 struct sparse's and a char isextended flag. Added flag f_sparse_file to list of flags. * tar.c: added long-named options to make tar compatible with getopt_long, changed Makefile. 1989-03-03 David MacKenzie (edf at rocky2.rockefeller.edu) (I'm not completely sure all these have been integrated -- FP.) * buffer.c [USG]: ifdef'd out #include . (close_archive): SysV doesn't have ftruncate, so substituted fmtwrite (just copied the code for MS-DOS). * create.c: Unos lacks so provided a substitute. (start_header): Only strip leading paths if f_relative_paths is true. * extract.c: (extract_archive): Only strip leading paths if f_relative_paths is true. Because the Unos filesystem has only one timestamp, moved the utime call to after the chown and chmod calls. * getdate.y: Don't define ftime if Unos. * list.c: Defined size_t for Unos. [USG]: Don't include . Define stuff manually for Unos. (decode_header): Add braces around switch cases; some compilers require them. (print_header): Changed UGSWIDTH from 11 to 25 because the smaller value made tape listings of files owned by more than one user gradually get wider, making them hard to read. * port.c: Don't include if SysV. Define size_t for Unos. (mkdir): Add code to support Unos makedir sys call. (getopt): Use malloc instead of alloca, because tar doesn't use alloca anywhere else and many systems lack it. A few other changes from the current version of getopt.c incorporated. * rtape_lib.c: Undefine RMTIOCTL. Doesn't seem to be needed, and can't compile on Unos/SysV with it defined. Might need to be ifdef'd. * tar.c: Alias addname to add_name and rmdir to deldir on Unos due to C library weirdness. (options): Recognize new -P option to set f_relative paths. (describe): Clean up error message and add -P description. * tar.h: Add variable, f_relative_paths, to cause tar to strip leading `/' characters in pathnames during create and extract. * tar.texinfo: Fixed a couple of typos, detected by texi2roff. * update.c: Simulate for Unos. Previous releases by Jay Fenlason (hack@ai.mit.edu) * Version 1.07 --- New version to go on beta tape with GCC 1.35. Better USG support. Also support for __builtin_alloca if we're compiling with GCC. * diffarch.c: Include the correct header files so MTIOCTOP is defined. * tar.c: Don't print the verbose list of options unless given -help. The list of options is *way* too long. * Version 1.06 --- [__STDC__]: Use STDC_MSG. ENXIO meand end-of-volume in archive (for the UNIX PC) Added break after volume-header case (line 440) extract.c Added patch to rtape_lib.c (reported by Arnold Robbins). Added f_absolute_paths option. Deleted refereces to UN*X manual sections (dump(8), etc) Fixed to not core-dump on illegal options Modified msg_perror to call perror("") instead of perror(0) patch so -X - works Fixed tar.c so 'tar cf - -C dir' doesn't core-dump tar.c (name_match): Fixed to chdir() to the appropriate directory if the matching name's change_dir is set. This makes tar xv -C foo {files} work. * Version 1.05 --- A fix to make confirm() work when the archive is on stdin; include 'extern FILE *msg_file;' in pr_mkdir(). * tar.h [__STDC__]: Fix to work. Added to port.c: mkdir() ftruncate(): Removed: lstat() Fixed -G to work with -X Another fix to tar.texinfo Changed tar.c to say argv[0]":you must specify exactly ... buffer.c: modified child_open() to keep tar from hanging when it is done reading/writing a compressed archive added fflush(msg_file) before printing error messages create.c: fixed to make link_names non-absolute * Version 1.04 --- Added functions msg() and msg_perror(): Modified all the files to call them. Also checked that all (I hope) calls to msg_perror() have a valid errno value. (modified anno() to leave errno alone), etc. Re-fixed the -X option. This time for sure... re-modified the msg stuff. flushed anno() completely Modified the directory stuff so it should work on sysV boxes added ftime() to getdate.y Fixed un_quote_string() so it won't wedge on \" Also fixed \ddd (like \123, etc) More fixes to tar.texinfo * Version 1.03 --- Fixed buffer.c so 'tar tzf NON_EXISTENT_FILE' returns an error message instead of hanging forever. More fixes to tar.texinfo. * Version 1.02 --- Fixed tar.c so 'tar -h' and 'tar -v' don't cause core dump. Also fixed the 'usage' message to be more up-to-date. * diffarch.c [!MTIOCTOP]: Fixed so verify should compile. * Version 1.01 --- Fixed typoes in tar.texinfo. Fixed a bug in the #define for rmtcreat(). Fixed the -X option to not call realloc() of 0. * Version 1.00 --- version.c added. -version option added. Installed new version of the remote-tape library. Added -help option. ----- tests/ChangeLog ----- 1997-04-25 François Pinard * Release 1.12. * gzip.sh, ignfail.sh: Adjust to new delayed error exit message. * Makefile.am (BUILT_SOURCES): Define as preset, so preset is regenerated if configuration changes. * Makefile.am (TESTS): Nevertheless include delete01.sh. (POSTPONED_TESTS): Adjusted. Reported by Andreas Schwab. * delete02.sh: Mention f - explicitly, do not assume it, in case $TAPE is defined or the default archive has been overridden. Reported by Andreas Schwab. 1997-04-24 François Pinard * after: Unredirect stdout and stderr before removing the files. If redirections are to NFS files, removing them while they are still opened may have strange effects, failing almost all tests. Reported by Kaveh R. Ghazi. 1997-04-22 François Pinard * Prerelease 1.11q. * extrac03.sh: New file. * Makefile.am (TESTS): Adjusted. Reported by Marc Boucher. * preset.in (LC_MESSAGES): Clear value before tests. Reported by Sven Verdoolaege. * Makefile.am (INCLUDES): Adjust so config.h gets found. * genfile.c (usage): Corrected. * delete01.sh: New name for delete.sh. * delete02.sh: New file. * Makefile.am (TESTS): Adjusted. Reported by Vince Del Vecchio. * Makefile.am (POSTPONED_TESTS): To contain the --delete tests. (TESTS): Adjusted. (EXTRA_DIST): Include $(POSTPONED_TESTS). The purpose is getting the tests distributed, but not executed. These flaky tests are to be addressed only after 1.12 is released. 1997-04-19 François Pinard * Makefile.am (AUTOMAKE_OPTIONS): Declare ../src/ansi2knr. * (DEFS): New, for defining LOCALEDIR. * (genfile.o): Deleted, will be implied from DEFS above. Reported by Bruno Haible and Kaveh R. Ghazi. 1997-04-17 François Pinard * Prerelease 1.11p. * genfile.c (usage): Add a program description. (main): Output --version according to recent GNU standards. 1997-04-15 François Pinard * ignfail.sh: Ensure the test does not fail if run as super-user. Reported by John David Anglin. 1997-04-12 François Pinard * genfile.c (pattern): Remove trailing comma for last enum item. Reported by Bruno Haible. 1997-04-11 François Pinard * Prerelease 1.11o. 1997-03-29 François Pinard * ignfail.sh: New file. * Makefile.am (TESTS): Adjusted. Reported by Ralph Schleicher. 1997-03-24 François Pinard * genfile.c: Implement --pattern=default/zeros. 1997-02-25 François Pinard * old.sh: New file. * Makefile.am (TESTS): Adjusted. Reported by Daniel Trinkle. 1997-01-21 François Pinard * extrac01.sh: New name for extract.sh. * extrac02.sh: New file. * Makefile.am (TESTS): Adjusted. Reported by Axel Boldt. 1996-11-25 François Pinard * genfile.c (usage): Typo in message. Reported by Christian Kirsch. 1996-11-22 François Pinard * incremen.sh: New file. Reported by Wolfram Wagner. * append.sh, delete.sh: New files. * Makefile.am (TESTS): Adjusted. Reported by Andreas Schwab. * before: Ensure .. on PATH, so genfile may be found. * Makefile.am ($(TESTS)): Depend on genfile, waiting for Automake to be adjusted to do the proper thing for parallel make. * gzip.sh: New name for childerr.sh. * extract.sh: New name for direxist.sh. * volume.sh: New name for volcheck.sh. * Makefile.am: Adjusted. * All tests: Use set -e whenever appropriate. Use "" instead of '' for out and err, so allowing us to use escaped newlines. In case of multiple output in a single test, ensure separator lines. 1996-11-06 François Pinard * Prerelease 1.11.13. * childerr.sh, direxist.sh, volcheck.sh: Use sh, not bash. Reported by John David Anglin. 1996-09-20 François Pinard * volcheck.sh: New. * Makefile.am (TESTS): Adjusted. 1996-09-19 François Pinard * Prerelease 1.11.12. * Makefile.am ($(TESTS)): Depend on preset. * version.sh (PATH): Adjust for multi-line --version output. * preset.in (LANG, LANGUAGE): Export them, so gzip does not localise its own output. (echo_n, echo_c): Define from the result of echo configuration. * after: Handle echo with newline suppressed. 1996-09-09 François Pinard * childerr.sh, direxist.sh, before, after: New files. * Makefile.am: Adjusted. 1996-09-04 François Pinard * ChangeLog, Makefile.am, pretest.in, version.sh: New files. * checktar.sh, genfile.c: New files, moved from src/. A regression test is an old dream for GNU tar. Reported by Tom Tromey and Robert Bernstein. PK Z|wfKKCOPYINGnuW+A GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . PK ZryMLL ChangeLognuW+A2011-03-12 Sergey Poznyakoff Version 1.26 * NEWS, configure.ac: Update. * po/POTFILES.in: Remove paxexit.c (see bb971a1e). 2011-03-08 Paul Eggert --atime-preserve=replace: fix correctness and performance bugs reported by Eric Blake in . * src/compare.c (diff_file): Do not restore atime of size-zero files. * src/create.c (dump_file0): Likewise. Also, do not restore atime when fd is zero, because that indicates a file we haven't opened. 2011-02-23 Paul Eggert * doc/tar.texi: Adjust example commands and output for accuracy. The original problem was reported by Michael Witten in . 2011-02-16 Paul Eggert tar: if (p) free (p); -> free (p); There is no longer (since SunOS 4) any need to guard against free (NULL), so replace each "if (p) free (p);" with "free (p);". From Jim Meyering in . * src/incremen.c (scan_directory, read_directory_file): As above. (try_purge_directory): Likewise. * src/list.c (read_header): Likewise. * src/misc.c (assign_string): Likewise. 2010-12-14 Sergey Poznyakoff Correctly store long sparse file names in PAX archives. * src/sparse.c (pax_dump_header_1): Make sure the created header name is shorter than NAME_FIELD_SIZE bytes. * tests/sparse04.at: New testcase. * tests/Makefile.am (TESTSUITE_AT): Add sparse04.at. * tests/testsuite.at: Include sparse04.at. * NEWS: Update. 2010-12-07 Paul Eggert tests: make the truncate test smaller and less buggy (tiny change) Reported by Solar Designer in . * tests/truncate.at: Use a smaller test case, and make its race condition less likely. 2010-11-27 Paul Eggert tests: skip SIGPIPE-dependent tests in environments ignoring SIGPIPE Problem reported by Sven Joachim in . * tests/remfiles01.at: Use AT_SIGPIPE_PREREQ. * tests/sigpipe.at: Likewise. * tests/testsuite.at (AT_SIGPIPE_PREREQ): New macro. 2010-11-25 Paul Eggert tar: work around NetBSD and Tru64 symlink incompatibility with POSIX Problem reported by Bruno Haible in . * src/extract.c (maybe_recoverable): Also treat EFTYPE (if defined) and ENOTSUP like ELOOP. 2010-11-24 Paul Eggert tar: adjust to paxutils change: paxexit.c -> paxexit-status.c * lib/Makefile.am (libtar_a_SOURCES): paxexit.c renamed to paxexit-status.c. tar: remove unused function dir_removed_diag * src/common.h (dir_removed_diag): Remove unused decl. * src/misc.c (dir_removed_diag): Remove unused function. 2010-11-23 Paul Eggert tar: work around FreeBSD symlink incompatibility with POSIX * src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for FreeBSD. Problem reported by Christian Weisgerber in . * src/names.c: tar: fix bug with --one-file-system --listed-incremental Problem (and idea for fix) reported by Martin Weigel . * src/common.h (is_individual_file): Remove decl. * src/create.c (dump_file0): Replace "is_individual_file (p)" with "top_level". * src/incremen.c (procdir): Replace "!is_individual_file (name_buffer)" with "st->parent". Fix bug with --one-file-system and --listed-incremental. * src/names.c (individual_file_table, register_individual_file): (is_individual_file): Remove. All uses removed. tests: new test listed04 for --one-file-system --listed-incremental * tests/Makefile.am (TESTSUITE_AT): Add listed04.at. * tests/listed04.at: New file. * tests/testsuite.at: Include it. scripts: fix option parsing Problem reported by Dennis Wydra in . * scripts/backup.in: Accept "-l LEVEL". Be more systematic about backslashes inside ``; it shouldn't matter for modern shells but it might matter for older ones. * scripts/restore.in: Likewise. * scripts/backup.in: Adjust implementation of -t/--time to match the new implementation of -l/--level. 2010-11-15 Sergey Poznyakoff Issue a warning if the archive being compared contais transformed file names. * src/common.h (transform_program_p): New proto. * src/transform.c (transform_program_p): New function. * src/compare.c (verify_volume): Warn if the archive contains transformed file names. Minor change. * doc/tar.texi: Reword the description of decompress-program. 2010-11-15 Paul Eggert tar: fix --verify option, which broke in 1.24 * NEWS: Document this. * src/compare.c (verify_volume): Decode the header before invoking diff_archive, as diff_archive no longer does this as of the 2010-06-28 commit. Also, don't try to invoke diff_archive on a zero block. * tests/Makefile.am (TESTSUITE_AT): Add verify.at. * tests/testsuite.at: Include verify.at. * tests/verify.at: New file. 2010-11-08 Paul Eggert Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/tar 2010-11-08 Jim Meyering tests: avoid spurious failure when VERSION_CONTROL envvar is set * tests/backup01.at: Unset VERSION_CONTROL. Otherwise, when set to e.g., 'always', it would cause this test to fail. 2010-11-07 Sergey Poznyakoff Version 1.25 * configure.ac: Version 1.25 * NEWS: Describe the changes. 2010-11-05 Sergey Poznyakoff Run alternative decompression programs if the principal one is not available. Some compression programs are able to handle various compression formats (e.g. `gzip' can decompress files created by `compress', `xz' is able to handle lzma, etc.) Tar tries to use such programs for decompression if the principal decompressor cannot be started. * src/buffer.c (compress_type): Swap ct_none and ct_tar. (archive_compression_type): New static variable. (zip_magic): Remove program and option fields. (zip_program): New structure and static. (compress_program): Remove macro. (find_zip_program): New static function. (first_decompress_program,next_decompress_program): New functions. (open_compressed_archive): Set archive_compression_type instead of use_compress_program_option. * src/common.h (first_decompress_program) (next_decompress_program): New functions. (WARN_DECOMPRESS_PROGRAM): New flag. (WARN_VERBOSE_WARNINGS): Include WARN_DECOMPRESS_PROGRAM. * src/warning.c (warning_args): Add "decompress-program". (warning_types): Add WARN_DECOMPRESS_PROGRAM. * src/system.c (run_decompress_program): New function. (sys_child_open_for_uncompress): Use run_decompress_program instead of calling execlp directly. 2010-11-02 Paul Eggert tests: fix some issues with signals, timestamps, "test" typo * tests/extrac17.at: Add --warning=no-timestamp, to avoid bogus warning due to NFS clock skew. * tests/remfiles01.at: Discard diagnostics that some shells generate about broken pipes. * tests/sigpipe.at: Likewise. * tests/remfiles01.at: Fix typo: "test $EC" was written where "test $EC -ne 0" was intended. 2010-11-01 Sergey Poznyakoff Fix extraction of device nodes. * src/extract.c (extract_node): Do not mask out node type. The bug was introduced in commit ea964cce. 2010-10-28 Paul Eggert tar: don't cross struct member boundaries with OLDGNU_MAGIC * src/create.c (write_gnu_long_link, start_header): Access header->buffer + offsetof (struct posix_header, magic), instead of header->header.magic, when reading or writing the OLDGNU_MAGIC pattern. The code violates the C standard without this change, and GCC warns about this if fortify checking is enabled. It's not a bug on traditional (i.e., non-debugging) platforms, but it does violate the C standard so it should be fixed. Problem originally reported by John Emil Karlson in . * src/list.c (decode_header): Likewise. tests: port to sh variants that squirrel away file descriptors OpenBSD /bin/sh, and some other sh variants, squirrel away file descriptors before closing them. For example, for "cat 3<&-" they first dup file descriptor 3 to a fd that is 10 or greater, then close 3 (because if "cat" had been a builtin command like ":" then they would have wanted to avoid the fork and restore the fd after ":" finished); and they treat ordinary (forking) commands the same as builtin commands. This approach fails after "ulimit -n 10". Work around this deficiency by closing the file descriptors before invoking ulimit. Problem reported by Christian Weisgerber in ; solution suggested by Jilles Tjoelker in . * tests/extrac11.at (scarce file descriptors): Close file descriptors before invoking ulimit -n. 2010-10-27 Sergey Poznyakoff Transform file names when updating and appendig to archives. This complements 28e91b48. * src/common.h (transform_stat_info): New prototype. * src/list.c (transform_stat_info): Remove static qualifier. * src/update.c (update_archive): Call transform_stat_info. * tests/Makefile.am (TESTSUITE_AT): Add append03.at * tests/testsuite.at: Include append03.at 2010-10-27 Paul Eggert tests: port to Solaris diff * tests/extrac13.at: Don't assume that "diff -c" outputs nothing when there are no differences. This is not true on Solaris, where it outputs "No differences encounted". tar: fix -x --overwrite bug (no --dereference, ! O_NOFOLLOW) This bug was discovered on Solaris 8. On older hosts lacking O_NOFOLLOW, tar -x --overwrite (without --dereference) follows symbolic links, causing the "extract over symlinks" test to fail. * src/extract.c (open_output_file): If O_NOFOLLOW is needed but does not work, check for a symlink separately. tar: don't use "((" in shell scripts * tests/extrac11.at: Replace "((" with "( (" in shell scripts, as "((" is not portable to the Korn shell, and POSIX 1003.1-2008 says that "((" is not portable. 2010-10-26 Sergey Poznyakoff Make sure name matching occurs before name transformation. The commit 9c194c99 altered that order. * src/list.c (transform_stat_info): New function. Split off from decode_header. (read_and): Call transform_stat_info right before do_something, and after deciding if we should proceed with this member name, so that name matching occurs before name transformation. * tests/extrac17.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add extrac17.at * tests/testsuite.at: Include extrac17.at. 2010-10-26 Paul Eggert tar: don't assume stdin is open when testing fd limits * tests/extrac11.at: Redirect stdin from /dev/null, in case the parent 'make' is running with stdin closed. 2010-10-26 Sergey Poznyakoff Further fixes in bootstrap. * bootstrap: Restore the default for gnulib_path (symlink_to_dir): Re-apply 67cad07. 2010-10-26 Paul Eggert tar: fix bug with -C and extracting directories Problem reported by Denis Excoffier in . * src/extract.c (extract_dir): Use mkdirat, not mkdir. * tests/extrac16.at: New file, to test for this bug. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Include it. This file is a placeholder. It will be replaced with the actual ChangeLog by make dist. Run make ChangeLog if you wish to create it earlier. 2010-10-25 Sergey Poznyakoff Version 1.24 * configure.ac, NEWS: Version 1.24 * bootstrap: Restore tar-specific code lost during last sync from gnulib (241b72ffad). * src/misc.c (chdir_do): Remove unused automatic variable. 2010-10-16 Paul Eggert tar: use more-accurate diagnostic when intermediate mkdir fails Without this change, if tar tried to extract a file A/B/C, noticed that A/B didn't exist, attempted to mkdir A/B, and the mkdir failed, it did not diagnose the mkdir failure, but simply reported the failure to open A/B/C. This sometimes led to confusion because it wasn't clear what tar was trying to do, in particular that tar tried to mkdir A/B. With this patch, tar issues two diagnostics in this case: one for A/B and the other for A/B/C. Problem reported by Hauke Laging in . * gnulib.modules: Remove faccessat. * src/extract.c (make_directories): New arg INTERDIR_MADE. Diagnose mkdir failure. Return 0 on success, nonzero on failure, as opposed to nonzero iff some directory was created. All callers changed. Simplify the code when mkdir fails, by checking whether the desired file exists unless errno==EEXIST: this is more robust. * tests/extrac15.at: New test, to check this. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Include it. tests: port to NFS file servers with clock skew Several of the tests assumed that a newly created file cannot have a time stamp dated in the future. This assumption is not true when files are served by a remote host whose clock is slightly in advance of ours. Fix the problems that I observed when running "make check" a couple of times on such a server. * tests/backup01.at: Use --warning=no-timestamp to suppress clock-skew warnings. * tests/chtype.at, tests/comprec.at, tests/exclude06.at: * tests/extrac01.at, tests/extrac03.at, tests/extrac05.at: * tests/extrac06.at, tests/extrac08.at, tests/extrac13.at: * tests/extrac14.at, tests/incr01.at, tests/incr03.at, tests/link01.at: * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at: * tests/pipe.at, tests/rename02.at, tests/rename03.at: * tests/rename05.at, tests/same-order01.at, tests/same-order02.at: * tests/sparse01.at: Likewise. 2010-10-12 Paul Eggert gnulib: sync from latest gnulib, notably bootstrap and parse-datetime * bootstrap: Sync from gnulib. * doc/.gitignore: Rename getdate.texi to parse-datetime.texi. * doc/Makefile.am (tar_TEXINFOS): Likewise. * doc/tar.texi (Top): Adjust to renaming of getdate to parse-datetime. * gnulib.modules: Likewise. Also, remove ftruncate (now obsolete). And add inttostr (we missed this dependency). * src/tar.c: Include parse-datetime.h, not getdate.h. All calls to get_date replaced with parse_datetime. 2010-09-24 Paul Eggert tar: -x -C symlink fix * src/misc.c (chdir_do): Don't use O_NOFOLLOW when opening the argument to -C. This is for consistency with "tar -c -C FOO", and matches the new documentation. * tests/extrac14.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Include it. tar: --dereference consistency This closes another race condition, that occurs when overwriting a symlink with a regular file. * NEWS (--dereference consistency): New section. * doc/tar.texi (Option Summary): Describe new --deference behavior. (dereference): Likewise. Remove discussion that I didn't follow, even before --dereference was changed. * src/common.h (deref_stat, set_file_atime): Adjust signatures. * src/compare.c (diff_file, diff_multivol): Respect open_read_flags instead of rolling our own flags. This implements the new behavior for --dereference. (diff_file, diff_dumpdir): Likewise, for fstatat_flags. * src/create.c: Adjust to set_file_atime signature change. * src/extract.c (mark_after_links, file_newer_p, extract_dir): Likewise. * src/incremen.c (try_purge_directory): Likewise. * src/misc.c (maybe_backup_file): Likewise. * src/extract.c (file_newer_p): New arg STP. All callers changed. (maybe_recoverable): New arg REGULAR. All callers changed. Handle the case of overwriting a symlink with a regular file, when --overwrite is specified but --dereference is not. (open_output_file): Add O_CLOEXEC, O_NOCTTY, O_NONBLOCK for consistency with file creation. Add O_NOFOLLOW if overwriting_old_files && ! dereference_option. * src/incremen.c (update_parent_directory): Use fstat, not fstatat; there's less to go wrong. * src/misc.c (deref_stat): Remove DEREF arg. All callers changed. Instead, use fstatat_flags. (set_file_atime): Remove ATFLAG arg. All callers changed. Instead, use fstatat_flags. * src/names.c, src/update.c: Adjust to deref_stat signature change. * src/tar.c (get_date_or_file): Use stat, not deref_stat, as this is not a file to be archived. * tests/Makefile.am (TESTSUITE_AT): Add extrac13.at. * tests/extrac13.at: New file. * tests/testsuite.at: Include it. 2010-09-20 Paul Eggert tar: do not crash with --listed-incremental Problem reported by Frantisek Hanzlik in via Kamil Dudka in . I don't understand this code either, but Sergey can take a look at this patch, and perhaps install a better one, when he has the time. * src/incremen.c (append_incremental_renames): Don't actually append anything to DIR if DIR is null. 2010-09-19 Paul Eggert tar: prefer openat-style functions This change replaces traditional functions like 'open' with the POSIX.1-2008 functions like 'openat'. Mostly this is an internal refactoring change, in preparation for further changes to close some races. * gnulib.modules: Add faccessat, linkat, mkfifoat, renameat, symlinkat. Remove save-cwd. * src/Makefile.am (tar_LDADD): Add $(LIB_EACCESS). * tests/Makefile.am (LDADD): Likewise. * src/common.h (chdir_fd): New extern var. * src/compare.c (diff_file, diff_multivol): Use openat instead of open. * src/create.c (create_archive, restore_parent_fd): Likewise. * src/extract.c (create_placeholder_file): Likewise. * src/names.c (collect_and_sort_names): Likewise. * src/update.c (append_file): Likewise. * src/compare.c (diff_symlink): Use readlinkat instead of readlink. * src/compare.c (diff_file): Use chdir_fd instead of AT_FDCWD. * src/create.c (subfile_open, dump_file0): Likewise. * src/extract.c (fd_chmod, fd_chown, fd_stat, set_stat): (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat): Likewise. * src/extract.c (mark_after_links, file_newer_p, extract_dir): (extract_link, apply_delayed_links): Use fstatat rather than stat or lstat. * src/misc.c (maybe_backup_file, deref_stat): Likewise. * src/extract.c (make_directories): Use mkdirat rather than mkdir. Use faccessat rather than access. This fixes a minor permissions bug when tar is running setuid (who would want to do that?!). (open_output_file): Use openat rather than open. In the process, this removes support for Masscomp's O_CTG files, which aren't compatible with openat's signature. Masscomp! Wow! That's a blast from the past. As far as I know, that operating system hasn't been supported for more than 20 years. (extract_link, apply_delayed_links): Use linkat rather than link. (extract_symlink, apply_delayed_links): Use symlinkat rather than symlink. (extract_node): Use mknodat rather than mknod. (extract_fifo): Use mkfifoat rather than mkfifo. (apply_delayed_links): Use unlinkat rather than unlink or rmdir. * src/misc.c (safer_rmdir, remove_any_file): Likewise. * src/unlink.c (flush_deferred_unlinks): Likewise. * src/extract.c (rename_directory): Use renameat rather than rename. * src/misc.c (maybe_backup_file, undo_last_backup): Likewise. * src/misc.c: Don't include ; no longer needed now that we're using openat etc. (struct wd): Add member fd. Remove members err and fd. All uses changed. (CHDIR_CACHE_SIZE): New constant. (wdcache, wdcache_count, chdir_fd): New vars. (chdir_do): Use openat rather than save_cwd. Keep the cache up to date. This code won't scale well, but is good enough for now. * src/update.c (update_archive): Use openat + fdopendir + streamsavedir rather than savedir. This file is a placeholder. It will be replaced with the actual ChangeLog by make dist. Run make ChangeLog if you wish to create it earlier. 2010-09-18 Paul Eggert tar: add utimens.h includes * src/extract.c: Include , needed for fdutimens prototype. * src/misc.c: Likewise. tar: switch to gnulib fdutimensat module * gnulib.modules: Add fdutimensat. * src/common.h (fd_utimensat): Remove decl. * src/extract.c (set_stat): Call fdutimensat, not fd_utimensat. * src/misc.c (set_file_atime): Likewise. (fd_utimensat): Remove. 2010-09-17 Paul Eggert tar: extract permissions for . last * src/common.h (must_be_dot_or_slash): New decl. * src/extract.c (mark_after_links): New function, taking code that used to be in create_placeholder_file. (create_placeholder_file): Use it. (delay_set_stat): Always delay setting status for . and /. * src/misc.c (must_be_dot_or_slash): Now extern. * tests/extrac12.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Likewise. tar: don't check for getdtablesize; use AC_CHECK_FUNCS_ONCE * configure.ac: Don't check for getdtablesize; no longer needed. Use AC_CHECK_FUNCS_ONCE rather than AC_CHECK_FUNCS, for efficiency. tar: extract symlink attributes, close some symlink-related races * NEWS: Describe symlink-extraction improvements. * src/extract.c (enum permstatus): Remove. (fchmod, fchown): Define dummy replacement macros if the system does not supply them. (implemented): New function. (struct delayed_set_stat): Remove members invert_permissions, permstatus. They were too confusing, and tried to do too much in too-little space. Instead, add members current_mode, current_mode_mask, interdir, atflag. All users changed. (struct delayed_link): Add members mode, atime, mtime, to support platforms such as BSD where symlinks have these attributes. All users changed. (fd_chmod): Renamed from fdchmod. New argument atflag. Check for operation not supported at run-time, not at configure-time. Put fd argument first. All callers changed. (fd_chown): Likewise, renaming from fdchown. (fd_stat): Likewise, renaming from fdstat. (set_mode): Remove args stat_info, cur_info, invert_permissions, permstatus. Add args mode, mode_mask, current_mode, current_mode_mask, atflag. All callers changed. Close some races. Use an easier-to understand method for computing permissions. Work around POSIX incompatibility in Linux fchmodat. Support extraction of symlink modes, if the OS allows it. (set_stat): Remove args cur_info, invert_permissions, permstatus. Add args current_mode, current_mode_mask, interdir, atflag. All callers changed. Close some races. Support extraction of attributes on symlinks, if the OS allows it. (delay_set_stat): Remove args invert_permissions, permstatus. Add args current_mode, current_mode_mask, mode, atflag. The ST arg can be null now, indicating that it's an intermediate directory. All callers changed. (repair_delayed_set_stat, apply_nonancestor_delayed_set_stat): Close some races. (extract_dir): Also be paranoid if only --same-permissions, due to semantics of setgid and setuid directories on some hosts. This closes a race on those hosts. Simplify calculation of delay_set_stat arguments; the old code was truly strange and probably wrong in some border cases. (extract_dir, extract_file, extract_node, extract_fifo): Don't rely on unspecified behavior in mode arg of open, mknod, etc. Instead, mask out those bits when creating the file, and add them later via fchmod or chmodat. (open_output_file): file_name is now const. Add arg current_mode, current_mode_mask. All callers changed. When overwriting old files, refuse to overwrite something that is not a regular file, since we're extracting a regular file. (extract_file): Remove the FIXME comment. Whatever the protection issues were, they should be fixed now. As a result of all the other API changes, we now use fchmod etc. rather than chmod etc., closing some races. (create_placeholder_file, apply_delayed_links): Record desired mode and times for symlinks, for OSes that support that. 2010-09-16 Paul Eggert tar: tar -x without --incremental no longer sets atime again * src/extract.c (set_stat): Use UTIME_OMIT rather than UTIME_NOW. The UTIME_NOW was there only to emulate the previous behavior of using the current time, and the previous behavior was there only because before we started assuming POSIX.1-2008 there was no portable way to get the effect of UTIME_NOW. tar: another --atime-preserve race fix * src/common.h (set_file_atime): Add parentfd arg. * src/compare.c (diff_file): Use it. * src/create.c (dump_file0): Likewise. This closes yet another race condition with symbolic links. * src/misc.c (set_file_atime): Add parentfd arg. tar: --atime-preserve fixes for races etc. This patch fixes a race condition in the --atime-preserve=replace option, which might cause tar to improperly follow a symbolic link. It also drops the use of the _FIOSATIME ioctl of Solaris 2.x and later, which loses resolution on time stamps. Modern Solaris systems support full-resolution time stamps in the kernel, and it's not worth the hassle of testing this call, useful only in no-longer-supported Solaris variants. Also, it undoes a change I recently introduced to the --compare option, which caused it to not follow symbolic links unless the --dereference option was also used. Quite possibly this change is a good idea, but the old behavior was documented and the change should not have been installed casually. * configure.ac: Don't check for stropts.h and sys/filio.h. * gnulib.modules: Add futimens, utimensat. Remove futimens. * src/common.h (fd_utimensat): New decl. * src/compare.c (diff_file, diff_multivol): Don't use open_read_flags: those are for --create only. * src/create.c (dump_file0): Adjust to set_file_atime changes. Pass fstatat_flags to set_file_atime, so that symbolic links are not followed inadvertantly. * src/extract.c: Don't include utimens.h. (set_stat): Use fd_utimensat ant UTIME_NOW rather than fdutimens. * src/misc.c: Don't include utimens.h, stropts.h, sys/filio.h. (fd_utimensat): New function. (set_file_atime): Use it. New arg atflag, controlling symlink handling. All callers changed. 2010-09-14 Paul Eggert * configure.ac: tar: close some race conditions when extracting * configure.ac: Check for fchmod and fchown. Don't check for utimes. * src/extract.c (fdchmod, fdchown, fdstat): New functions. (set_mode, set_stat): New arg FD. All callers changed. This avoids some race conditions between closing a regular file and setting its metadata, and it's a bit faster. 2010-09-13 Paul Eggert tar: don't worry about fdopendir closing its argument * NEWS: Don't mention dirfd; no longer needed. * gnulib.modules: Remove dirfd. * src/create.c (get_directory_entries): Remove the code dealing with dirfd failures, as the new fdopendir replacement doesn't close its argument so we don't need to call dirfd. See and gnulib commit 970c9038e4cca46e1b037ae0a6d574dfae6a7327. * NEWS: Fix wording typo in previous change. Reported by Jim Meyering. tar: live within system-supplied limits on file descriptors * NEWS: Note the change. Mention dirfd and fdopendir. * gnulib.modules: Add dirfd and fdopendir. The code was already using fdopendir; dirfd is a new need. * src/common.h (open_searchdir_flags, get_directory_entries): (subfile_open, restore_parent_fd, tar_stat_close): New decls. (check_exclusion_tags): Adjust signature to match code change. * src/create.c (IMPOSTOR_ERRNO): New constant. (check_exclusion_tags): First arg is now a struct tar_stat_info const *, not an fd. All callers changed. (dump_regular_file, dump_file0): A zero fd represents an unused slot, so play it safe if the fd member is zero here. A negative fd represents the negation of an errno value, so play it safe and do not assign -1 to fd merely because an open fails. (open_failure_recover, get_directory_entries, restore_parent_fd): (subfile_open): New functions. These help to recover from file descriptor exhaustion. (dump_dir, dump_file0): Use them. (dump_file0): Use tar_stat_close instead of rolling our own close. * src/incremen.c (scan_directory): Use get_directory_entries, subfile_open, etc., to recover from file descriptor exhaustion. * src/names.c (add_hierarchy_to_namelist): Likewise. (collect_and_sort_names): A negative fd represents the negation of an errno value, so play it safe and do not assign -1 to fd. * src/tar.c (decode_options): Set open_searchdir_flags. Add O_CLOEXEC to all the open flags. (tar_stat_close): New function, which knows how to deal with new convention for directory streams and file descriptors. Diagnose 'close' failures. (tar_stat_destroy): Use it. * src/tar.h (struct tar_stat_info): New member dirstream. fd now has the negative of an errno value, not merely -1, if the file could not be opened, so that failures to reopen directories are better-diagnosed later. * tests/Makefile.am (TESTSUITE_AT): Add extrac11.at. * tests/testsuite.at: Likewise. * tests/extrac11.at: New file. 2010-09-08 Paul Eggert tar: improve documentation of reliability and security issues * doc/tar.texi (Reliability and security, Reliability): (Permissions problems, Data corruption and repair, Race conditions): (Security, Privacy, Integrity, Live untrusted data): (Security rules of thumb): New nodes. 2010-09-06 Paul Eggert tar: more reliable directory traversal when creating archives * NEWS: Document this. * gnulib.modules: Add openat, readlinkat. * src/common.h (open_read_flags, fstatat_flags): New global variables. (cachedir_file_p, dump_file, check_exclusion_tags, scan_directory): Adjust to new signatures, described below. (name_fill_directory): Remove. * src/compare.c (diff_file, diff_multivol): Use open_read_flags. * src/create.c (struct exclusion_tag): Exclusion predicates now take a file descriptor, not a file name. (add_exclusion_tag): Likewise. All uses changed. (cachedir_file_p): Likewise. (check_exclusion_tags): The directory is now a file descriptor, not a file name. All uses changed. Use openat for better traversal. (file_dumpable_p): Arg is now a struct stat, not a struct tar_stat_info. All uses changed. Check the arg's file types too. (dump_dir0, dump_dir, dump_file0, dump_file): Omit top_level and parent_device args, since st->parent tells us that now. All uses changed. (dump_dir): Likewise. Also, omit fd arg for similar reasons. Apply fdsavedir to a dup of the file descriptor, since we need a file descriptor for openat etc. as well, and fdsavedir (perhaps unwisely) consumes its file descriptor when successful. Do not consume st->fd when successful; this simplifies the caller. (create_archive): Allocate a file descriptor when retraversing a directory, during incremental dumps. (dump_file0): Use fstatat, openat, and readlinkat for better traversal. When opening a file, use the result of fstat on the file descriptor rather than the fstatat on the directory entry, to avoid some race conditions. No need to reopen the directory since we now no longer close it. Change "did we open the file?" test from 0 <= fd to 0 < fd since fd == 0 now represents uninitialized. (dump_file): Now accepts struct tar_stat_info describing parent, not parent_device. Also, accept basename and fullname of entry. All uses changed. * src/incremen.c (update_parent_directory): Accept struct tar_stat_info for parent, not name. All callers changed. Use fstatat for safer directory traversal. (procdir): Accept struct tar_stat_info, not struct stat and dev_t, for info about directory. All callers changed. (scan_directory): Accept struct tar_stat_info, not name, device, and cmdline, for info about directory. All callers changed. Do not consume the file descriptor, since caller might need it. Use fstatat and openat for safer directory traversal; also, use fstat after opening to double-check. (name_fill_directory): Remove. * src/names.c (add_hierarchy_to_namelist): Accept struct tar_stat_info instead of device and cmdline. All callers changed. When descending into a subdirectory, use openat and fstat for safer directory traversal. (collect_and_sort_names): Use open and fstat for safer directory traversal. Set up struct tar_stat_info for callee's new API. * src/tar.c (decode_options): Initialize open_read_flags and fstatat_flags. (tar_stat_destroy): Close st->fd if it is positive (not zero!). * src/tar.h (struct tar_stat_info): New members parent, fd. * src/update.c (update_archive): Adjust to dump_file's API change. * tests/filerem02.at: Ignore stderr since its contents now depend on the file system implementation. 2010-09-05 Paul Eggert tar: remove lint discovered by Sun C compiler * src/common.h (WARN_ALL): Don't mask with 0xffffffff; on a 32-bit host, 0xffffffff is of type 'unsigned int', which makes WARN_ALL an unsigned int value that is too large to fit into an int, and the C standard says that this has undefined behavior. The mask is not needed, so omit it. 2010-09-04 Paul Eggert tar: restore macros that are used in some cases * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM): Restore these macros, undoing the previous change to this file. The macros are used after all, in some cases. Sorry about that. 2010-09-03 Paul Eggert tar: remove unused macros * src/create.c (UINTMAX_TO_CHARS): Remove; no longer used. * src/tar.c (LOW_DENSITY_NUM, MID_DENSITY_NUM, HIGH_DENSITY_NUM): Likewise. * src/incremen.c (DIR_IS_NEW): Comment out; not used. Mark this with a FIXME, since it looks like it should be used. 2010-08-27 Sergey Poznyakoff Fix --remove-files in update/append mode. * src/update.c (update_archive): Call finish_deferred_unlinks when done. 2010-08-26 Paul Eggert tar: avoid assumptions about root access and chmod -w in test cases * tests/extrac07.at, tests/extrac09.at, tests/listed03.at: Use AT_UNPRIVILEGED_PREREQ, since this test requires non-root privileges. * tests/extrac07.at: Don't use "chmod -w", as POSIX says it's not portable to start a chmod permissions-list with "-" as it may be confused with an option. Use "chmod a-w" instead. tar: fix bug with -C and delayed setting of metadata * src/common.h (chdir_current): New decl. * src/extract.c (struct delayed_set_stat, struct delayed_link): New member change_dir. (delay_set_stat, create_placeholder_file): Set it. (apply_nonancestor_delayed_set_stat, apply_delayed_links): Use it. (extract_link): Check that the links are all relative to the same directory. (extract_archive): Restore the current directory after apply_nonancestor_delayed_set_stat has possibly changed it. * src/misc.c (chdir_current): New external var; this used to be the private static variable 'previous' inside chdir_dir. All uses changed. * tests/Makefile.am (TESTSUITE_AT): New test extrac10.at. * tests/extrac10.at: New file. * tests/testsuite.at: Include it. 2010-08-25 Sergey Poznyakoff Don't apply file transformations to volume names. * src/list.c (decode_header): Don't apply file transformations to volume names. * tests/xform01.at: New testcase. * tests/xform-h.at (xform): Rename macro to xformtest. Use pushdef/popdef. * tests/Makefile.am, tests/testsuite.at: Add xform01.at 2010-08-25 Paul Eggert tar: optimize -c --sparse when file is entirely sparse * src/sparse.c (sparse_scan_file): If the file is entirely sparse, that is, if ST_NBLOCKS is zero, don't bother scanning for nonzero blocks. Idea by Kit Westneat, communicated by Bernd Schubert in . Also, omit unnecessary lseek at start of file. tar: don't assume size of a sparse file chunk fits in size_t * src/tar.h (struct sp_array): Change numbytes from size_t to off_t. All uses changed. * scripts/xsparse.c (struct sp_array): Likewise. Include , for SIZE_MAX. (expand_sparse): Don't try to allocate a buffer bigger than SIZE_MAX bytes. * src/common.h (SIZE_TO_CHARS, size_to_chars, SIZE_FROM_HEADER): (size_from_header): Remove decls. * src/create.c (size_to_chars): Remove. * src/list.c (size_from_header): Remove. * src/sparse.c (sparse_extract_region, check_data_region): (oldgnu_add_sparse, oldgnu_store_sparse_info, pax_decode_header): Don't assume chunk sizes fit in size_t. (oldgnu_add_sparse): Check for off_t overflow. * src/xheader.c (sparse_numbytes_decoder, sparse_map_decoder): Likewise. tar: use ctime, not mtime, when checking placeholders * src/extract.c (struct delayed_link): Rename member mtime to ctime. All uses changed to use ctime rather than mtime. 2010-08-24 Paul Eggert tar: add comment to link04.at test * tests/link04.at: Add explanatory comment at head. tar: fix 1.23 Solaris regression related to PRIV_SYS_LINKDIR The idea was suggested by Petr Sumbera in the thread starting here: http://lists.gnu.org/archive/html/bug-tar/2010-08/msg00000.html * src/extract.c (set_mode): Save the errno of the chmod that failed, for the benefit of chmod_error_details. Do not bother retrying chmod unless the mode suggests setuid is the issue. (extract_archive): Remove redundant call to priv_set_remove_linkdir. * src/system.c: Include priv-set.h. (sys_spawn_shell, sys_child_open_for_compress): (sys_child_open_for_uncompress, sys_exec_command): (sys_exec_info_script, sys_exec_checkpoint_script): Invoke priv_set_restore_linkdir before execv or execlp, so that the subprocess has the same privileges that tar originally did. tar: handle files that occur multiple times but have link count 1 This patch was inspired by the following patch that addressed a similar problem in GNU coreutils du: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;h=efe53cc72b599979ea292754ecfe8abf7c839d22 * src/common.h (name_count): New decl. * src/create.c (trivial_link_count): New static var. (create_archive): Initialize it. (dump_hard_link, file_count_links): Use it, so that files with link count 1 are handled correctly when they are found multiple times. * src/names.c (allocated_entries): Renamed from allocated_names, since the identifier's name was misleading. All uses changed. (entries): Renamed from names. All uses changed. (scanned): Renamed from name_index. All uses changed. (name_count): New var. (name_add_name): Increment it. * tests/link04.at: New file. * tests/testsuite.at: Add it. * tests/Makefile.am (TESTSUITE_AT): Likewise. 2010-08-23 Paul Eggert tar: use nlink_t for link counts * src/create.c (struct link): nlink is now of type nlink_t, not size_t. tar: don't export names that aren't used elsewhere * src/common.h (file_dumpable_p, gid_to_chars, major_to_chars): (minor_to_chars, mode_to_chars, uid_to_chars, uintmax_to_chars): (string_to_chars, dumpdir_creat0, dumpdir_create, dumpdir_free): (dumpdir_locate, dumpdir_next, dumpdir_first, gid_from_header): (major_from_header, minor_from_header, mode_from_header): (time_from_header, uid_from_header, quote_copy_string, request_stdin): (xheader_init, transform_header_name): Remove declarations; these are no longer exported from their modules. (GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS): (UID_TO_CHARS, UINTMAX_TO_CHARS, UNAME_TO_CHARS, GNAME_TO_CHARS): Move to src/create.c, since no other module uses these. (GID_FROM_HEADER, MAJOR_FROM_HEADER, MINOR_FROM_HEADER): (MODE_FROM_HEADER, TIME_FROM_HEADER, UID_FROM_HEADER): Move to src/extract.c, since no other module uses these. (dumpdir_t, dumpdir_iter_t): Remove; no longer used. * src/create.c (gid_to_chars, major_to_chars, minor_to_chars): (mode_to_chars, uid_to_chars, uintmax_to_chars, string_to_chars): (file_dumpable_p): Now static. * src/incremen.c (dumpdir_create0, dumpdir_create, dumpdir_free): (dumpdir_locate, dumpdir_next, dumpdir_first): Now static. (scan_directory, write_directory_file_entry): Use struct dumpdir_iter * rather than dumpdir_iter_t. * src/list.c (gid_from_header, major_from_header, minor_from_header): (mode_from_header, time_from_header, uid_from_header): (transform_member_name): Now static. * src/misc.c (quote_copy_string): #if 0 out, as it's not used anywhere. * src/system.c (wait_for_grandchild): Now static. * src/tar.c (request_stdin): Now static. * src/xheader.c (xheader_init): Now static. tar: fix misspelled identifier "set_comression_program_by_suffix" * src/suffix.c (set_compression_program_by_suffix): Renamed from set_comression_program_by_suffix. * src/buffer.c, src/common.h, src/tar.c: All uses changed. 2010-08-20 Paul Eggert tar: change interdir_made from int to bool * src/extract.c (maybe_recoverable, create_placeholder_file): Change interdir_made from int * to bool *, since the flag has just two values 0 and 1. All uses changed. This does not affect tar's behavior. tar: remove trailing white space from source files * ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README: * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi: * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el: * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi: * doc/value.texi, lib/Makefile.am, scripts/backup-specs: * scripts/dump-remind.in, scripts/tar-snapshot-edit, scripts/tarcat: * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c: * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c: * src/tar.h, src/update.c, src/warning.c, src/xheader.c: * tests/append01.at, tests/append02.at, tests/atlocal.in: * tests/delete03.at, tests/exclude.at, tests/exclude06.at: * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at: * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at: * tests/incr01.at, tests/incr02.at, tests/incr03.at, tests/incr06.at: * tests/label02.at, tests/label03.at, tests/label04.at: * tests/label05.at, tests/link02.at, tests/link03.at: * tests/listed01.at, tests/listed02.at, tests/long01.at: * tests/longv7.at, tests/multiv01.at, tests/multiv02.at: * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at: * tests/multiv07.at, tests/multiv08.at, tests/options.at: * tests/options02.at, tests/remfiles03.at, tests/rename01.at: * tests/rename02.at, tests/rename03.at, tests/rename04.at: * tests/rename05.at, tests/same-order01.at, tests/same-order02.at: * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at: * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at: * tests/star/README, tests/star/gtarfail2.at: * tests/star/multi-fail.at: * tests/star/pax-big-10g.at, tests/star/quicktest.sh: * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at: * tests/update01.at, tests/update02.at, tests/volsize.at: * tests/volume.at: Remove trailing spaces and tabs from lines, and remove trailing empty lines from files. This makes it a bit easier to share code among coreutils and other projects that do this. 2010-08-19 Paul Eggert tar: update licenses to latest versions from www.gnu.org * COPYING: Update to latest version; this is just minor formatting. * doc/fdl.texi: Update from GFDL 1.2 to 1.3. * doc/tar.texi: Adjust to new format of fdl.texi. Omit trailing white space. 2010-07-18 Paul Eggert * src/misc.c (struct wd): Fix comment to match code. 2010-07-18 Paul R. Eggert tar: no need to report getcwd error if never using the result * src/misc.c (struct wd): Rename 'saved' to 'err', with new semantics. (chdir_arg, chdir_do): Adjust to new semantics. Do not report an error merely because save_cwd fails; report an error only if save_cwd's result is needed later. * tests/extrac09.at: New file, to test for bug that was fixed. * tests/testsuite.at: Include it. * tests/Makefile.am (TESTSUITE_AT): Add it. tar: go back to absolutifying filenames in normalize_filename for now * src/misc.c (normalize_filename): For now, go back to making filenames absolute, even though this causes 'tar' to fail when getcwd fails. However, do not attempt to resolve ".." as this does not work with symlinks. Also, do the right thing with leading file system prefixes and on hosts where // != /. 2010-07-17 Sergey Poznyakoff Allow for size suffixes in -L and --record-size options. * src/tar.c (TAR_SIZE_SUFFIXES): New define. (parse_opt): Allow for size suffixes in arguments to -L and --record-size options. * NEWS, doc/tar.texi: Update. 2010-07-15 Paul R. Eggert tar: don't crash if getcwd fails * src/extract.c: Don't include xgetcwd.h. (extract_dir): stat "." rather than statting getcwd's output. * src/misc.c (normalize_filename_x): Rewrite so as not to resolve /../, which can't be done reliably in the presence of symlinks. Don't reject valid names such as ".". (normalize_filename): Don't make it absolute; that way, we don't have to invoke xgetcwd which might fail. Don't bother to realloc at the end, since that uses time and now saves little space. (chdir_do): Don't crash if xgetcwd fails. * tests/Makefile.am (TESTSUITE_AT): Add listed03.at. * tests/listed03.at: New file. * tests/testsuite.at: Include listed03.at. 2010-07-11 Sergey Poznyakoff Keep a detailed map of archive members stored in the record buffer. A separate map (bufmap) provides information for creating multi-volume continuation headers. * src/buffer.c (bufmap): New struct. (bufmap_head, bufmap_tail, inhibit_map): New variables. (mv_begin_write): New function. (mv_begin): Rename to mv_begin_read. Rewrite using mv_begin_write. All callers changed. (mv_total_size): Remove. (bufmap_locate, bufmap_free, bufmap_reset): New functions. (_flush_write): Update bufmap. (close_archive): Free bufmap. (add_chunk_header): Take a bufmap argument. (gnu_add_multi_volume_header): Likewise. (add_multi_volume_header): Likewise. (_gnu_flush_write): Rewrite using bufmap. (real_s_name, real_s_totsize) (real_s_sizeleft) (save_name, save_totsize, save_sizeleft): Removed. All uses updated. (mv_size_left): Update bufmap_head. (mv_end): Rewrite. (multi_volume_sync): Remove. * src/common.h (mv_begin_write): New prototype. (mv_begin): Rename to mv_begin_read. * src/create.c: Use mv_begin_write instead of mv_begin. Remove calls to mv_size_left and mv_end. * src/sparse.c: Likewise. * tests/multiv07.at: Close stdin. * tests/spmvp00.at: Update AT_KEYWORDS. * tests/spmvp10.at: Likewise. * tests/multiv08.at: New testcase. * tests/Makefile.am, tests/testsuite.at: Add multiv08.at. Version 1.23.90 * NEWS, configure.ac: Version 1.23.90 * doc/tar.texi: Document the use of lbzip2. 2010-06-28 Sergey Poznyakoff Fix exclusion of long file names when extracting from pax format archives. * src/list.c (read_and): Call decode_header before attempting name_match. (list_archive): Remove call to decode_header. * src/compare.c (diff_archive): Remove call to decode_header. * src/extract.c (extract_archive): Likewise. * test/exclude06.at: New test case. * tests/testsuite.at: Include exclude06.at. * tests/Makefile.am (TESTSUITE_AT): Add exclude06.at. Minor fix. * src/buffer.c (magic): Split the character constant to help cc recognize character boundaries (7 is a valid hex character). 2010-06-27 Sergey Poznyakoff Minor fix. * src/buffer.c (magic): Fix xz magic. 2010-06-16 Paul Eggert Remove some lint, found by gcc -W etc. * src/common.h (label_notfound): New decl. * src/buffer.c (set_volume_start_time, compress_type): (guess_seekable_archive, open_compressed_archive, init_buffer): (_flush_write, archive_is-dev, increase_volume_number): (change_tape_menu, try_new_volume, add_chunk_header): (multi_volume_sync): Declare as 'static' if it's not exported. Use function prototype (void) rather than old-style (). * src/checkpoint.c (expand_checkpoint_string): Likewise. * src/incremen.c (dirlist_replace_prefix, makedumpdir, read_incr_db_2): Likewise. * src/list.c (print_volume_label): Likewise. * src/misc.c (normalize_filename_x): Likewise. * src/names.c (make_name, free_name, check_name_alloc, name_next_elt): Likewise. * src/tar.c (tar_list_quoting_style, add_exclude_array): (set_stat_signal): Likewise. * src/transform.c (new_transform, _single_transform_name_to_obstack): (_transform_name_to_obstack): Likewise. * src/unlink.c (dunlink_alloc): Likewise. * src/buffer.c (struct zip_magic): Use const when appropriate. * src/incremen.c (obstack_code_rename, write_directory_file_entry): Likewise. * src/sparse.c (COPY_STRING): Likewise. * src/system.c (dec_to_env, time_to_env, oct_to_env, str_to_env): (chr_to_env): Likewise. * src/tar.c (tar_list_quoting_style, set_stat_signal): Likewise. * src/extract.c (extract_node): Don't return garbage. * src/names.c: Remove old-style declarations of getgrnam etc. All modern systems declare these, and it's not worth the hassle of ignoring the warnings on modern systems for old-style decls. 2010-05-17 Sergey Poznyakoff Bugfix. * src/incremen.c (make_directory): Retain the slash if it is the only character in a filename. 2010-04-02 Sergey Poznyakoff Recode NEWS back to UTF-8 2010-04-01 Sergey Poznyakoff Fix the gzip.at test case. * tests/gzip.at: Suppress gzip error output, as it can differ depending on its version etc. Bug reported by Ludovic Courtès. 2010-03-28 Sergey Poznyakoff New option --full-time. * src/common.h (full_time_option): New global. * src/tar.c (FULL_TIME_OPTION): New constant. (options): New option --full-time. (parse_opt): Handle the --full-time option. * src/list.c (simple_print_header): Pass full_time_option as the 2nd argument to tartime. * doc/tar.texi: Update. * NEWS: Update. 2010-03-27 Sergey Poznyakoff Minor fixes in the testsuite. * tests/extrac07.at: Fix a typo (invalid number of arguments before format list). * tests/link02.at: Use `ln' instead of `link'. * tests/link03.at: Likewise. Fix coredump. * src/names.c (collect_and_sort_names): Remove entry from the table before freeing it. Fix dead loop on extracting existing symlinks with the -k option. * src/extract.c (create_placeholder_file) (extract_link, extract_symlink) (extract_node, extract_fifo): Handle all possible return values from maybe_recoverable. This complements 8f390db92fc. Reported by Ico Doornekamp . * NEWS: Update. 2010-03-20 Sergey Poznyakoff Fix undesired error exit on receiving SIGPIPE. * src/tar.c: Do not ignore SIGPIPE. * tests/sigpipe.at: New testcase. * tests/Makefile.am, tests/testsuite.at: Add sigpipe.at * tests/remfiles01.at: Fix error code expectation. * NEWS: Update. 2010-03-17 Sergey Poznyakoff Fix --remove-files. Tar --remove-files relied on canonicalize_file_name, which replaces symlinks in file name components with the directories they point to. Due to this, tar effectively ignored existence of symbolic links and was unable to remove a directory that contained any (Alexander Kozlov , 2010-03-15). * gnulib.modules: Remove canonicalize. * src/misc.c (normalize_filename): Rewrite from scratch. The function operates only on its input string, it makes no attempt to test components for existence or to resolve symbolic links. * tests/Makefile.am (TESTSUITE_AT): Add remfiles03.at. * tests/testsuite.at: Likewise. * tests/remfiles03.at: New test case. * NEWS: Update. 2010-03-12 Sergey Poznyakoff Bugfixes. * src/buffer.c (check_label_pattern): Initialize result. * tests/remfiles01.at: Skip if run with root privileges. 2010-03-11 Sergey Poznyakoff Fix `--test-label' and `--label -r' behavior. * doc/tar.texi (Including a Label in the Archive): Revise the section. * NEWS: Update * src/buffer.c (open_archive): Check volume label on ACCESS_UPDATE as well. * src/list.c (test_archive_label): Rewrite to match the documentation. * src/names.c (regex_usage_warning): Return int. (names_notfound): Rewrite the conditional. (label_notfound): New function. * tests/label03.at: New testcase. * tests/label04.at: New testcase. * tests/label05.at: New testcase. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. Doc fixes. * doc/tar.texi: Consistently use lowercase `see' within sentences. More fixes spotted by Denis Excoffier. * THANKS: Update. Shut up a gcc warning message. * src/tar.c (tar_help_filter): Use a separate const variable to hold returns from gettext. Reported by Peter Breitenlohner. Bugfix. * src/names.c (collect_and_sort_names): Initialize prev_name. Reported by Dmitry V. Levin. 2010-03-10 Sergey Poznyakoff Version 1.23 * configure.ac, NEWS: Update version number. Doc changes. * NEWS: Update. * THANKS: Update. * doc/snapshot.texi, doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi, doc/tar.texi: Spellchecked and proof-read. Thanks to Denis Excoffier. * gnulib.modules: Remove utime. 2010-03-08 Kamil Dudka Fix possible overflow in code_timespec (tiny change) * src/misc.c (code_timespec): ignore invalid values of ns 2010-03-08 Sergey Poznyakoff Minor fix in the testsuite. * tests/extrac05.at: Skip test if creating sparse file fails. Fix eventual memory override and fd exhaustion in create.c Both bugs reported by Kamil Dudka. * src/create.c (check_exclusion_tags): Do not keep pointer to a location within tagname: it may change after xrealloc. Use byte offset instead. (dump_file0): Close fd before returning without dumping the directory. 2010-03-02 Sergey Poznyakoff Minor change. * doc/tar.texi: Improve some wording. 2010-03-02 Antonio Diaz Diaz Add Lzip support * configure.ac: Add TAR_COMPR_PROGRAM(lzip) * doc/tar.texi: Reflect lzip support. * src/buffer.c (compress_type) : New constant. (magic): Add magic for lzip. * src/suffix.c (compression_suffixes): Add lz. * src/tar.c: New option --lzip. 2010-03-02 Sergey Poznyakoff Minor fix. * tests/exclude05.at: Rewrite awk invocation to avoid overflowing awk's file table on Solaris. 2010-03-02 Eric Blake Fix large file support. * scripts/xsparse.c (read_map): Use fseeko. * src/incremen.c (write_directory_file): Likewise. 2010-03-02 Sergey Poznyakoff Bugfix * src/buffer.c (seek_archive): Rewrite size computation to prevent it from reaching negative values. Based on report by Denis Excoffier . 2010-02-25 Sergey Poznyakoff Supply more information to the --to-command script. * src/system.c (stat_to_env): Pass information about the current volume in variables TAR_ARCHIVE, TAR_VOLUME, TAR_BLOCKING_FACTOR, TAR_FORMAT. * doc/tar.texi: Document new environment variables. * NEWS: Likewise. * configure.ac: Version number 1.22.91. 2010-02-17 Sergey Poznyakoff Minor change. * src/names.c (regex_usage_warning): Fix warning message. 2010-02-05 Sergey Poznyakoff Update THANKS 2010-02-05 Ondřej Vašík Bugfix (tiny change) * src/xheader.c (xheader_read): Remove unnecessary call to xheader_init. 2010-01-26 Sergey Poznyakoff Enable silent build mode. * configure.ac: Require automake 1.11, autoconf 2.63. Enable silent rules. * NEWS: Update. * lib/Makefile.am (rmt-command.h): Silent the rule. 2010-01-25 Sergey Poznyakoff Read POSIX multivolume archives split at the header boundary. * src/common.h (read_header_mode): New enum. (read_header): Change type of the 3rd argument. * src/list.c (read_header): Change type of the 3rd argument. All callers updated. * src/buffer.c (try_new_volume): Allow for volumes split at the extended/ustar header boundary. This is against POSIX specs, but we must be able to read such archives anyway. * tests/multiv07.at: New test case. * tests/Makefile.am: Add multiv07.at * tests/testsuite.at: Likewise. * src/compare.c: Update calls to read_header. * src/delete.c: Likewise. * src/update.c: Likewise. 2010-01-24 Sergey Poznyakoff Minor change. * NEWS: Update. * doc/tar.texi: Update. * src/create.c (finish_header): Minor change. 2010-01-24 Rob Vermaas Bugfix (tiny change). * src/tar.c (format_default_settings)[REMOTE_SHELL]: Fix misplaced comma. 2010-01-24 Sergey Poznyakoff Minor fix. * src/incremen.c (read_incr_db_01) (read_directory_file): Initialize bufsize to 0. Suggested by noordsij@cs.helsinki.fi. Improve handling of --test-label. * src/list.c (print_volume_label): New function. (print_header): Call print_volume_label. (test_archive_label): New function. * src/buffer.c (VOLUME_LABEL_APPEND): Remove. (VOLUME_TEXT, VOLUME_TEXT_LEN): New macros (drop_volume_label_suffix): New function. (check_label_pattern): Use drop_volume_label_suffix. * src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND. (test_label_option): Remove. (drop_volume_label_suffix): New proto. (test_archive_label): New proto. * src/names.c (all_names_found): Remove test for test_label_option. * src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND. (set_subcommand_option): Improve diagnostics. (parse_opt): Set subcommand if --test-label is given. (main): Handle TEST_LABEL_SUBCOMMAND. Fix listing of volume labels (in particular in PAX archives). * src/buffer.c (match_volume_label): Call set_volume_label. (check_label_pattern): Get label string as argument. (match_volume_label): Handle volume labels stored in global PAX headers. * src/common.c (print_header,read_header): Change signature. (read_header_primitive): Remove prototype. * src/list.c (recent_global_header): New static. (list_archive): Always print volume labels. (read_header_primitive): Remove. (read_header): Change the signature (all callers updated) Save the recent global header. (volume_label_printed): New static. (simple_print_header): New function (ex-print_header). (print_header): Change the signature (all callers updated). For POSIX formats, print first volume header (if set). * src/xheader.c (xheader_write_global): Write the data accumulated in xhdr->stk even if keyword_global_override_list is empty. (xheader_read): On unexpected EOF, report error instead of coredumping. (XHDR_PROTECTED, XHDR_GLOBAL): New defines. (struct xhdr_tab): Remove `protected' with `flags'. All uses updated. (decg): If XHDR_GLOBAL bit is set, call the keyword's decode method instead of adding it to `kwl'. * src/compare.c: Update calls to read_header. * src/create.c: Likewise. * src/delete.c: Likewise. * src/update.c: Likewise. * src/extract.c: Likewise. (extract_volhdr): Do not print "Reading