Merging upstream version 0.21.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
337c761a4d
commit
0703aa798f
27 changed files with 961 additions and 324 deletions
150
doc/tarlz.info
150
doc/tarlz.info
|
@ -11,7 +11,7 @@ File: tarlz.info, Node: Top, Next: Introduction, Up: (dir)
|
|||
Tarlz Manual
|
||||
************
|
||||
|
||||
This manual is for Tarlz (version 0.19, 8 January 2021).
|
||||
This manual is for Tarlz (version 0.21, 14 June 2021).
|
||||
|
||||
* Menu:
|
||||
|
||||
|
@ -102,7 +102,7 @@ The format for running tarlz is:
|
|||
tarlz [OPTIONS] [FILES]
|
||||
|
||||
All operations except '--concatenate' operate on whole trees if any FILE is
|
||||
a directory.
|
||||
a directory. Tarlz overwrites output files without warning.
|
||||
|
||||
On archive creation or appending tarlz archives the files specified, but
|
||||
removes from member names any leading and trailing slashes and any file name
|
||||
|
@ -119,7 +119,7 @@ member names in the archive or given in the command line, so that
|
|||
|
||||
If several compression levels or '--*solid' options are given, the last
|
||||
setting is used. For example '-9 --solid --uncompressed -1' is equivalent
|
||||
to '-1 --solid'
|
||||
to '-1 --solid'.
|
||||
|
||||
tarlz supports the following options: *Note Argument syntax:
|
||||
(arg_parser)Argument syntax.
|
||||
|
@ -134,16 +134,17 @@ to '-1 --solid'
|
|||
|
||||
'-A'
|
||||
'--concatenate'
|
||||
Append one or more archives to the end of an archive. All the archives
|
||||
involved must be regular (seekable) files, and must be either all
|
||||
compressed or all uncompressed. Compressed and uncompressed archives
|
||||
can't be mixed. Compressed archives must be multimember lzip files
|
||||
with the two end-of-file blocks plus any zero padding contained in the
|
||||
last lzip member of each archive. The intermediate end-of-file blocks
|
||||
are removed as each new archive is concatenated. If the archive is
|
||||
uncompressed, tarlz parses and skips tar headers until it finds the
|
||||
end-of-file blocks. Exit with status 0 without modifying the archive
|
||||
if no FILES have been specified.
|
||||
Append one or more archives to the end of an archive. If no archive is
|
||||
specified with the option '-f', the input archives are concatenated to
|
||||
standard output. All the archives involved must be regular (seekable)
|
||||
files, and must be either all compressed or all uncompressed.
|
||||
Compressed and uncompressed archives can't be mixed. Compressed
|
||||
archives must be multimember lzip files with the two end-of-file
|
||||
blocks plus any zero padding contained in the last lzip member of each
|
||||
archive. The intermediate end-of-file blocks are removed as each new
|
||||
archive is concatenated. If the archive is uncompressed, tarlz parses
|
||||
and skips tar headers until it finds the end-of-file blocks. Exit with
|
||||
status 0 without modifying the archive if no FILES have been specified.
|
||||
|
||||
'-B BYTES'
|
||||
'--data-size=BYTES'
|
||||
|
@ -249,6 +250,12 @@ to '-1 --solid'
|
|||
and during decompression to the number of lzip members in the tar.lz
|
||||
archive, which you can find by running 'lzip -lv archive.tar.lz'.
|
||||
|
||||
'-o FILE'
|
||||
'--output=FILE'
|
||||
Write the compressed output to FILE. '-o -' writes the compressed
|
||||
output to standard output. Currently '--output' only works with
|
||||
'--compress'.
|
||||
|
||||
'-p'
|
||||
'--preserve-permissions'
|
||||
On extraction, set file permissions as they appear in the archive.
|
||||
|
@ -295,11 +302,35 @@ to '-1 --solid'
|
|||
example, extracting a link over a directory will usually fail.
|
||||
(Principle of least surprise).
|
||||
|
||||
'-z'
|
||||
'--compress'
|
||||
Compress existing POSIX tar archives aligning the lzip members to the
|
||||
tar members with choice of granularity (--bsolid by default, --dsolid
|
||||
works like --asolid). The input archives are kept unchanged. Existing
|
||||
compressed archives are not overwritten. A hyphen '-' used as the name
|
||||
of an input archive reads from standard input and writes to standard
|
||||
output (unless the option '--output' is used). Tarlz can be used as
|
||||
compressor for GNU tar using a command like
|
||||
'tar -c -Hustar foo | tarlz -z -o foo.tar.lz'. Note that tarlz only
|
||||
works reliably on archives without global headers, or with global
|
||||
headers whose content can be ignored.
|
||||
|
||||
The compression is reversible, including any garbage present after the
|
||||
EOF blocks. Tarlz stops parsing after the first EOF block is found,
|
||||
and then compresses the rest of the archive. Unless solid compression
|
||||
is requested, the EOF blocks are compressed in a lzip member separated
|
||||
from the preceding members and from any non-zero garbage following the
|
||||
EOF blocks. '--compress' implies plzip argument style, not tar style.
|
||||
Each input archive is compressed to a file with the extension '.lz'
|
||||
added unless the option '--output' is used. When '--output' is used,
|
||||
only one input archive can be specified. '-f' can't be used with
|
||||
'--compress'.
|
||||
|
||||
'-0 .. -9'
|
||||
Set the compression level for '--create' and '--append'. The default
|
||||
compression level is '-6'. Like lzip, tarlz also minimizes the
|
||||
dictionary size of the lzip members it creates, reducing the amount of
|
||||
memory required for decompression.
|
||||
Set the compression level for '--create', '--append', and
|
||||
'--compress'. The default compression level is '-6'. Like lzip, tarlz
|
||||
also minimizes the dictionary size of the lzip members it creates,
|
||||
reducing the amount of memory required for decompression.
|
||||
|
||||
Level Dictionary size Match length limit
|
||||
-0 64 KiB 16 bytes
|
||||
|
@ -408,11 +439,20 @@ to '-1 --solid'
|
|||
the version of lzlib being used and the value of 'LZ_API_VERSION' (if
|
||||
defined). *Note Library version: (lzlib)Library version.
|
||||
|
||||
'--warn-newer'
|
||||
During archive creation, warn if any file being archived has a
|
||||
modification time newer than the archive creation time. This option
|
||||
may slow archive creation somewhat because it makes an extra call to
|
||||
'stat' after archiving each file, but it guarantees that file contents
|
||||
were not modified during the creation of the archive. Note that the
|
||||
file must be at least one second newer than the archive for it to be
|
||||
detected as newer.
|
||||
|
||||
|
||||
Exit status: 0 for a normal exit, 1 for environmental problems (file not
|
||||
found, files differ, invalid flags, I/O errors, etc), 2 to indicate a
|
||||
corrupt or invalid input file, 3 for an internal consistency error (eg, bug)
|
||||
which caused tarlz to panic.
|
||||
corrupt or invalid input file, 3 for an internal consistency error (e.g.
|
||||
bug) which caused tarlz to panic.
|
||||
|
||||
|
||||
File: tarlz.info, Node: Portable character set, Next: File format, Prev: Invoking tarlz, Up: Top
|
||||
|
@ -430,7 +470,9 @@ The set of characters from which portable file names are constructed.
|
|||
characters, respectively.
|
||||
|
||||
File names are identifiers. Therefore, archiving works better when file
|
||||
names use only the portable character set without spaces added.
|
||||
names use only the portable character set without spaces added. Unicode is
|
||||
for human consumption. It should be avoided in computing environments,
|
||||
specially in file names. *Note why not Unicode: (moe)why not Unicode.
|
||||
|
||||
|
||||
File: tarlz.info, Node: File format, Next: Amendments to pax format, Prev: Portable character set, Up: Top
|
||||
|
@ -718,8 +760,9 @@ integrity checking of lzip may not be able to detect the corruption before
|
|||
the metadata has been used, for example, to create a new file in the wrong
|
||||
place.
|
||||
|
||||
Because of the above, tarlz protects the extended records with a CRC in a
|
||||
way compatible with standard tar tools. *Note key_crc32::.
|
||||
Because of the above, tarlz protects the extended records with a Cyclic
|
||||
Redundancy Check (CRC) in a way compatible with standard tar tools. *Note
|
||||
key_crc32::.
|
||||
|
||||
|
||||
5.2 Remove flawed backward compatibility
|
||||
|
@ -740,7 +783,9 @@ to extract a file with a truncated file name.
|
|||
zeroed except size, chksum, typeflag, magic and version. This prevents old
|
||||
tar programs from extracting the extended records as a file in the wrong
|
||||
place. Tarlz also sets to zero those fields of the ustar header overridden
|
||||
by extended records.
|
||||
by extended records. Finally, tarlz skips members without name when decoding
|
||||
except when listing. This is needed to detect certain format violations
|
||||
during parallel extraction.
|
||||
|
||||
If an extended header is required for any reason (for example a file size
|
||||
larger than 8 GiB or a link name longer than 100 bytes), tarlz moves the
|
||||
|
@ -860,11 +905,20 @@ File: tarlz.info, Node: Multi-threaded decoding, Next: Minimum archive sizes,
|
|||
7 Limitations of parallel tar decoding
|
||||
**************************************
|
||||
|
||||
Safely decoding an arbitrary tar archive in parallel is impossible. For
|
||||
example, if a tar archive containing another tar archive is decoded starting
|
||||
from some position other than the beginning, there is no way to know if the
|
||||
first header found there belongs to the outer tar archive or to the inner
|
||||
tar archive. Tar is a format inherently serial; it was designed for tapes.
|
||||
Safely decoding an arbitrary tar archive in parallel is only possible if one
|
||||
decodes the headers sequentially first. For example, if a tar archive
|
||||
containing another tar archive is decoded starting from some position other
|
||||
than the beginning, there is no way to know if the first header found there
|
||||
belongs to the outer tar archive or to the inner tar archive. Tar is a
|
||||
format inherently serial; it was designed for tapes.
|
||||
|
||||
The pax format is even more serial than the ustar format. Two headers
|
||||
need to be decoded sequentially for each file. The extended header may even
|
||||
need parsing to reveal something as basic as file size. If a thread decodes
|
||||
the ustar header skipping the preceding extended header, it may extract a
|
||||
file of incorrect size at the wrong place. Moreover, a pax archive with
|
||||
global headers can't be decoded in parallel because each thread can't know
|
||||
about the global headers decoded by other threads.
|
||||
|
||||
In the case of compressed tar archives, the start of each compressed
|
||||
block determines one point through which the tar archive can be decoded in
|
||||
|
@ -1026,6 +1080,14 @@ Example 8: Copy the contents of directory 'sourcedir' to the directory
|
|||
|
||||
tarlz -C sourcedir -c . | tarlz -C destdir -x
|
||||
|
||||
|
||||
Example 9: Compress the existing POSIX archive 'archive.tar' and write the
|
||||
output to 'archive.tar.lz'. Compress each member individually for maximum
|
||||
availability. (If one member in the compressed archive gets damaged, the
|
||||
other members can still be extracted).
|
||||
|
||||
tarlz -z --no-solid archive.tar
|
||||
|
||||
|
||||
File: tarlz.info, Node: Problems, Next: Concept index, Prev: Examples, Up: Top
|
||||
|
||||
|
@ -1069,22 +1131,22 @@ Concept index
|
|||
|
||||
Tag Table:
|
||||
Node: Top223
|
||||
Node: Introduction1214
|
||||
Node: Invoking tarlz4022
|
||||
Ref: --data-size6233
|
||||
Ref: --bsolid14593
|
||||
Node: Portable character set18852
|
||||
Node: File format19495
|
||||
Ref: key_crc3224420
|
||||
Node: Amendments to pax format30021
|
||||
Ref: crc3230685
|
||||
Ref: flawed-compat31970
|
||||
Node: Program design34615
|
||||
Node: Multi-threaded decoding38540
|
||||
Node: Minimum archive sizes42482
|
||||
Node: Examples44620
|
||||
Node: Problems46335
|
||||
Node: Concept index46863
|
||||
Node: Introduction1212
|
||||
Node: Invoking tarlz4020
|
||||
Ref: --data-size6389
|
||||
Ref: --bsolid16341
|
||||
Node: Portable character set21079
|
||||
Node: File format21874
|
||||
Ref: key_crc3226799
|
||||
Node: Amendments to pax format32400
|
||||
Ref: crc3233064
|
||||
Ref: flawed-compat34375
|
||||
Node: Program design37176
|
||||
Node: Multi-threaded decoding41101
|
||||
Node: Minimum archive sizes45590
|
||||
Node: Examples47728
|
||||
Node: Problems49744
|
||||
Node: Concept index50272
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue