Merge from vendor branch LESS:
[dragonfly.git] / contrib / tar / README
1 README for GNU tar
2
3         Copyright 1990, 1991, 1992, 1994, 1997, 1998, 1999, 2000, 2001
4         Free Software Foundation, Inc.
5
6         This file is part of GNU tar.
7
8         GNU tar is free software; you can redistribute it and/or modify
9         it under the terms of the GNU General Public License as published by
10         the Free Software Foundation; either version 2, or (at your option)
11         any later version.
12
13         GNU tar is distributed in the hope that it will be useful,
14         but WITHOUT ANY WARRANTY; without even the implied warranty of
15         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16         GNU General Public License for more details.
17
18         You should have received a copy of the GNU General Public License
19         along with tar; see the file COPYING.  If not, write to
20         the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21         Boston, MA 02111-1307, USA.
22
23
24 Please glance through *all* sections of this
25 `README' file before starting configuration.  Also make sure you read files
26 `ABOUT-NLS' and `INSTALL' if you are not familiar with them already.
27
28 If you got the `tar' distribution in `shar' format, time stamps ought to be
29 properly restored; do not ignore such complaints at `unshar' time.
30
31 GNU `tar' saves many files together into a single tape or disk
32 archive, and can restore individual files from the archive.  It includes
33 multivolume support, the ability to archive sparse files, automatic archive
34 compression/decompression, remote archives and special features that allow
35 `tar' to be used for incremental and full backups.  This distribution
36 also includes `rmt', the remote tape server.  The `mt' tape drive control
37 program is in the GNU `cpio' distribution.
38
39 GNU `tar' is derived from John Gilmore's public domain `tar'.
40
41 See file `ABOUT-NLS' for how to customize this program to your language.
42 See file `COPYING' for copying conditions.
43 See file `INSTALL' for compilation and installation instructions.
44 See file `PORTS' for various ports of GNU tar to non-Unix systems.
45 See file `NEWS' for a list of major changes in the current release.
46 See file `THANKS' for a list of contributors.
47
48 Besides those configure options documented in files `INSTALL' and
49 `ABOUT-NLS', an extra option may be accepted after `./configure':
50
51 * `--disable-largefile' omits support for large files, even if the
52 operating system supports large files.  Typically, large files are
53 those larger on 2 GB on a 32-bit host.
54
55 The default archive device is now `stdin' on read and `stdout' on write.
56 The installer can still override this by presetting `DEFAULT_ARCHIVE'
57 in the environment before configuring (the behavior of `-[0-7]' or
58 `-[0-7]lmh' options in `tar' are then derived automatically).  Similarly,
59 `DEFAULT_BLOCKING' can be preset to something else than 20.
60
61 For comprehensive modifications to GNU tar, you might need tools beyond
62 those used in simple installations.  Fully install GNU m4 1.4 first,
63 and only then, Autoconf 2.13 or later.  Install Perl, then Automake
64 1.4 or later.  You might need Bison 1.28 or later, and GNU tar itself.
65 All are available on GNU archive sites, like in
66 ftp://ftp.gnu.org/pub/gnu/.
67
68 Send bug reports to `bug-tar@gnu.org'.  (Beware, old-timers: it is
69 `@gnu', not `@prep'; and not `bug-gnu-utils' anymore.)  A bug report is
70 an adequate description of the problem: your input, what you expected,
71 what you got, and why this is wrong.  Diffs are welcome, but they only
72 describe a solution, from which the problem might be uneasy to infer.
73 If needed, submit actual data files with your report.  Small data files
74 are preferred.  Big files may sometimes be necessary, but do not send them
75 to the report address; rather take special arrangement with the maintainer.
76
77 Your feedback will help us to make a better and more portable package.
78 Consider documentation errors as bugs, and report them as such.  If you
79 develop anything pertaining to `tar' or have suggestions, let us know
80 and share your findings by writing to <bug-tar@gnu.org>.
81
82
83 Installation hints
84 ------------------
85
86 Here are a few hints which might help installing `tar' on some systems.
87
88 * gzip and bzip2.
89
90 GNU tar uses the gzip and bzip2 programs to read and write compressed
91 archives.  If you don't have these programs already, you need to
92 install them.  Their sources can be found at:
93
94 ftp://ftp.gnu.org/gnu/gzip/
95 http://sourceware.cygnus.com/bzip2/
96
97 If you see the following symptoms:
98
99    $ tar -xzf file.tar.gz
100    gzip: stdin: decompression OK, trailing garbage ignored
101    tar: Child returned status 2
102
103 then you have encountered a gzip incompatibility that should be fixed
104 in gzip test version 1.3, which as of this writing is available at
105 <ftp://alpha.gnu.org/gnu/gzip/>.  You can work around the
106 incompatibility by using a shell command like
107  `gzip -d <file.tar.gz | tar -xzf -'.
108
109 * Solaris issues.
110
111 GNU tar exercises many features that can cause problems with older GCC
112 versions.  In particular, GCC 2.8.1 (sparc, -O1 or -O2) is known to
113 miscompile GNU tar.  No compiler-related problems have been reported
114 when using GCC 2.95.2 or later.
115
116 Recent versions of Solaris tar sport a new -E option to generate
117 extended headers in an undocumented format.  GNU tar does not
118 understand these headers.
119
120 * Static linking.
121
122 Some platform will, by default, prepare a smaller `tar' executable
123 which depends on shared libraries.  Since GNU `tar' may be used for
124 system-level backups and disaster recovery, installers might prefer to
125 force static linking, making a bigger `tar' executable maybe, but able to
126 work standalone, in situations where shared libraries are not available.
127 The way to achieve static linking varies between systems.  Set LDFLAGS
128 to a value from the table below, before configuration (see `INSTALL').
129
130         Platform        Compiler        LDFLAGS
131
132         (any)           Gnu C           -static
133         AIX             (vendor)        -bnso -bI:/lib/syscalls.exp
134         HPUX            (vendor)        -Wl,-a,archive
135         IRIX            (vendor)        -non_shared
136         OSF             (vendor)        -non_shared
137         SCO 3.2v5       (vendor)        -dn
138         Solaris         (vendor)        -Bstatic
139         SunOS           (vendor)        -Bstatic
140
141 * Failed tests `ignfail.sh' or `incremen.sh'.
142
143 In an NFS environment, lack of synchronization between machine clocks
144 might create difficulties to any tool comparing dates and file time stamps,
145 like `tar' in incremental dumps.  This has been a recurrent problem with
146 GNU Make for the last few years.  We would like a general solution.
147
148 * BSD compatibility matters.
149
150 Set LIBS to `-lbsd' before configuration (see `INSTALL') if the linker
151 complains about `bsd_ioctl' (Slackware).  Also set CPPFLAGS to
152 `-I/usr/include/bsd' if <sgtty.h> is not found (Slackware).
153
154 * OPENStep 4.2 swap files
155
156 Tar cannot read the file /private/vm/swapfile.front (even as root).
157 This file is not a real file, but some kind of uncompressed view of
158 the real compressed swap file; there is no reason to back it up, so
159 the simplest workaround is to avoid tarring this file.
160
161
162 Special topics
163 --------------
164
165 Here are a few special matters about GNU `tar', not related to build
166 matters.  See previous section for such.
167
168 * File attributes.
169
170 About *security*, it is probable that future releases of `tar' will have
171 some behavior changed.  There are many pending suggestions to choose from.
172 Today, extracting an archive not being `root', `tar' will restore suid/sgid
173 bits on files but owned by the extracting user.  `root' automatically gets
174 a lot of special privileges, `-p' might later become required to get them.
175
176 GNU `tar' does not properly restore symlink attributes.  Various systems
177 implement flavors of symbolic links showing different behavior and
178 properties.  We did not successfully sorted all these out yet.  Currently,
179 the `lchown' call will be used if available, but that's all.
180
181 * POSIX compliance.
182
183 GNU `tar' implements an early draft of the POSIX 1003.1 `ustar' standard
184 which is different from the final standard.  This will be progressively
185 corrected over the incoming few years.  Don't be mislead by the mere
186 existence of the --posix option.  Later releases will become able to
187 read truly POSIX archives, and also to produce them under option.  (Also,
188 if you look at the internals, don't take the GNU extensions you see for
189 granted, as they are planned to change.)  GNU tar 2.0 will produce POSIX
190 archives by default, but there is a long way before we get there.
191
192 * What's next?
193
194 In the future we will try to release tar-1.14 as soon as possible and
195 start merging with paxutils afterwards.  We'll also try to rewrite
196 some parts of the documentation after paxutils has been merged.