Blame libarchive/libarchive-formats.5

Packit 08bd4c
.\" Copyright (c) 2003-2009 Tim Kientzle
Packit 08bd4c
.\" All rights reserved.
Packit 08bd4c
.\"
Packit 08bd4c
.\" Redistribution and use in source and binary forms, with or without
Packit 08bd4c
.\" modification, are permitted provided that the following conditions
Packit 08bd4c
.\" are met:
Packit 08bd4c
.\" 1. Redistributions of source code must retain the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer.
Packit 08bd4c
.\" 2. Redistributions in binary form must reproduce the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer in the
Packit 08bd4c
.\"    documentation and/or other materials provided with the distribution.
Packit 08bd4c
.\"
Packit 08bd4c
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
Packit 08bd4c
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 08bd4c
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 08bd4c
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
Packit 08bd4c
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 08bd4c
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 08bd4c
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 08bd4c
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 08bd4c
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 08bd4c
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 08bd4c
.\" SUCH DAMAGE.
Packit 08bd4c
.\"
Packit 08bd4c
.\" $FreeBSD$
Packit 08bd4c
.\"
Packit 08bd4c
.Dd December 27, 2016
Packit 08bd4c
.Dt LIBARCHIVE-FORMATS 5
Packit 08bd4c
.Os
Packit 08bd4c
.Sh NAME
Packit 08bd4c
.Nm libarchive-formats
Packit 08bd4c
.Nd archive formats supported by the libarchive library
Packit 08bd4c
.Sh DESCRIPTION
Packit 08bd4c
The
Packit 08bd4c
.Xr libarchive 3
Packit 08bd4c
library reads and writes a variety of streaming archive formats.
Packit 08bd4c
Generally speaking, all of these archive formats consist of a series of
Packit 08bd4c
.Dq entries .
Packit 08bd4c
Each entry stores a single file system object, such as a file, directory,
Packit 08bd4c
or symbolic link.
Packit 08bd4c
.Pp
Packit 08bd4c
The following provides a brief description of each format supported
Packit 08bd4c
by libarchive, with some information about recognized extensions or
Packit 08bd4c
limitations of the current library support.
Packit 08bd4c
Note that just because a format is supported by libarchive does not
Packit 08bd4c
imply that a program that uses libarchive will support that format.
Packit 08bd4c
Applications that use libarchive specify which formats they wish
Packit 08bd4c
to support, though many programs do use libarchive convenience
Packit 08bd4c
functions to enable all supported formats.
Packit 08bd4c
.Ss Tar Formats
Packit 08bd4c
The
Packit 08bd4c
.Xr libarchive 3
Packit 08bd4c
library can read most tar archives.
Packit 08bd4c
It can write POSIX-standard
Packit 08bd4c
.Dq ustar
Packit 08bd4c
and
Packit 08bd4c
.Dq pax interchange
Packit 08bd4c
formats as well as v7 tar format and a subset of the legacy GNU tar format.
Packit 08bd4c
.Pp
Packit 08bd4c
All tar formats store each entry in one or more 512-byte records.
Packit 08bd4c
The first record is used for file metadata, including filename,
Packit 08bd4c
timestamp, and mode information, and the file data is stored in
Packit 08bd4c
subsequent records.
Packit 08bd4c
Later variants have extended this by either appropriating undefined
Packit 08bd4c
areas of the header record, extending the header to multiple records,
Packit 08bd4c
or by storing special entries that modify the interpretation of
Packit 08bd4c
subsequent entries.
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Cm gnutar
Packit 08bd4c
The
Packit 08bd4c
.Xr libarchive 3
Packit 08bd4c
library can read most GNU-format tar archives.
Packit 08bd4c
It currently supports the most popular GNU extensions, including
Packit 08bd4c
modern long filename and linkname support, as well as atime and ctime data.
Packit 08bd4c
The libarchive library does not support multi-volume
Packit 08bd4c
archives, nor the old GNU long filename format.
Packit 08bd4c
It can read GNU sparse file entries, including the new POSIX-based
Packit 08bd4c
formats.
Packit 08bd4c
.Pp
Packit 08bd4c
The
Packit 08bd4c
.Xr libarchive 3
Packit 08bd4c
library can write GNU tar format, including long filename
Packit 08bd4c
and linkname support, as well as atime and ctime data.
Packit 08bd4c
.It Cm pax
Packit 08bd4c
The
Packit 08bd4c
.Xr libarchive 3
Packit 08bd4c
library can read and write POSIX-compliant pax interchange format
Packit 08bd4c
archives.
Packit 08bd4c
Pax interchange format archives are an extension of the older ustar
Packit 08bd4c
format that adds a separate entry with additional attributes stored
Packit 08bd4c
as key/value pairs immediately before each regular entry.
Packit 08bd4c
The presence of these additional entries is the only difference between
Packit 08bd4c
pax interchange format and the older ustar format.
Packit 08bd4c
The extended attributes are of unlimited length and are stored
Packit 08bd4c
as UTF-8 Unicode strings.
Packit 08bd4c
Keywords defined in the standard are in all lowercase; vendors are allowed
Packit 08bd4c
to define custom keys by preceding them with the vendor name in all uppercase.
Packit 08bd4c
When writing pax archives, libarchive uses many of the SCHILY keys
Packit 08bd4c
defined by Joerg Schilling's
Packit 08bd4c
.Dq star
Packit 08bd4c
archiver and a few LIBARCHIVE keys.
Packit 08bd4c
The libarchive library can read most of the SCHILY keys
Packit 08bd4c
and most of the GNU keys introduced by GNU tar.
Packit 08bd4c
It silently ignores any keywords that it does not understand.
Packit 08bd4c
.Pp
Packit 08bd4c
The pax interchange format converts filenames to Unicode
Packit 08bd4c
and stores them using the UTF-8 encoding.
Packit 08bd4c
Prior to libarchive 3.0, libarchive erroneously assumed
Packit 08bd4c
that the system wide-character routines natively supported
Packit 08bd4c
Unicode.
Packit 08bd4c
This caused it to mis-handle non-ASCII filenames on systems
Packit 08bd4c
that did not satisfy this assumption.
Packit 08bd4c
.It Cm restricted pax
Packit 08bd4c
The libarchive library can also write pax archives in which it
Packit 08bd4c
attempts to suppress the extended attributes entry whenever
Packit 08bd4c
possible.
Packit 08bd4c
The result will be identical to a ustar archive unless the
Packit 08bd4c
extended attributes entry is required to store a long file
Packit 08bd4c
name, long linkname, extended ACL, file flags, or if any of the standard
Packit 08bd4c
ustar data (user name, group name, UID, GID, etc) cannot be fully
Packit 08bd4c
represented in the ustar header.
Packit 08bd4c
In all cases, the result can be dearchived by any program that
Packit 08bd4c
can read POSIX-compliant pax interchange format archives.
Packit 08bd4c
Programs that correctly read ustar format (see below) will also be
Packit 08bd4c
able to read this format; any extended attributes will be extracted as
Packit 08bd4c
separate files stored in
Packit 08bd4c
.Pa PaxHeader
Packit 08bd4c
directories.
Packit 08bd4c
.It Cm ustar
Packit 08bd4c
The libarchive library can both read and write this format.
Packit 08bd4c
This format has the following limitations:
Packit 08bd4c
.Bl -bullet -compact
Packit 08bd4c
.It
Packit 08bd4c
Device major and minor numbers are limited to 21 bits.
Packit 08bd4c
Nodes with larger numbers will not be added to the archive.
Packit 08bd4c
.It
Packit 08bd4c
Path names in the archive are limited to 255 bytes.
Packit 08bd4c
(Shorter if there is no / character in exactly the right place.)
Packit 08bd4c
.It
Packit 08bd4c
Symbolic links and hard links are stored in the archive with
Packit 08bd4c
the name of the referenced file.
Packit 08bd4c
This name is limited to 100 bytes.
Packit 08bd4c
.It
Packit 08bd4c
Extended attributes, file flags, and other extended
Packit 08bd4c
security information cannot be stored.
Packit 08bd4c
.It
Packit 08bd4c
Archive entries are limited to 8 gigabytes in size.
Packit 08bd4c
.El
Packit 08bd4c
Note that the pax interchange format has none of these restrictions.
Packit 08bd4c
The ustar format is old and widely supported.
Packit 08bd4c
It is recommended when compatibility is the primary concern.
Packit 08bd4c
.It Cm v7
Packit 08bd4c
The libarchive library can read and write the legacy v7 tar format.
Packit 08bd4c
This format has the following limitations:
Packit 08bd4c
.Bl -bullet -compact
Packit 08bd4c
.It
Packit 08bd4c
Only regular files, directories, and symbolic links can be archived.
Packit 08bd4c
Block and character device nodes, FIFOs, and sockets cannot be archived.
Packit 08bd4c
.It
Packit 08bd4c
Path names in the archive are limited to 100 bytes.
Packit 08bd4c
.It
Packit 08bd4c
Symbolic links and hard links are stored in the archive with
Packit 08bd4c
the name of the referenced file.
Packit 08bd4c
This name is limited to 100 bytes.
Packit 08bd4c
.It
Packit 08bd4c
User and group information are stored as numeric IDs; there
Packit 08bd4c
is no provision for storing user or group names.
Packit 08bd4c
.It
Packit 08bd4c
Extended attributes, file flags, and other extended
Packit 08bd4c
security information cannot be stored.
Packit 08bd4c
.It
Packit 08bd4c
Archive entries are limited to 8 gigabytes in size.
Packit 08bd4c
.El
Packit 08bd4c
Generally, users should prefer the ustar format for portability
Packit 08bd4c
as the v7 tar format is both less useful and less portable.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
The libarchive library also reads a variety of commonly-used extensions to
Packit 08bd4c
the basic tar format.
Packit 08bd4c
These extensions are recognized automatically whenever they appear.
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Numeric extensions.
Packit 08bd4c
The POSIX standards require fixed-length numeric fields to be written with
Packit 08bd4c
some character position reserved for terminators.
Packit 08bd4c
Libarchive allows these fields to be written without terminator characters.
Packit 08bd4c
This extends the allowable range; in particular, ustar archives with this
Packit 08bd4c
extension can support entries up to 64 gigabytes in size.
Packit 08bd4c
Libarchive also recognizes base-256 values in most numeric fields.
Packit 08bd4c
This essentially removes all limitations on file size, modification time,
Packit 08bd4c
and device numbers.
Packit 08bd4c
.It Solaris extensions
Packit 08bd4c
Libarchive recognizes ACL and extended attribute records written
Packit 08bd4c
by Solaris tar.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
The first tar program appeared in Seventh Edition Unix in 1979.
Packit 08bd4c
The first official standard for the tar file format was the
Packit 08bd4c
.Dq ustar
Packit 08bd4c
(Unix Standard Tar) format defined by POSIX in 1988.
Packit 08bd4c
POSIX.1-2001 extended the ustar format to create the
Packit 08bd4c
.Dq pax interchange
Packit 08bd4c
format.
Packit 08bd4c
.Ss Cpio Formats
Packit 08bd4c
The libarchive library can read a number of common cpio variants and can write
Packit 08bd4c
.Dq odc
Packit 08bd4c
and
Packit 08bd4c
.Dq newc
Packit 08bd4c
format archives.
Packit 08bd4c
A cpio archive stores each entry as a fixed-size header followed
Packit 08bd4c
by a variable-length filename and variable-length data.
Packit 08bd4c
Unlike the tar format, the cpio format does only minimal padding
Packit 08bd4c
of the header or file data.
Packit 08bd4c
There are several cpio variants, which differ primarily in
Packit 08bd4c
how they store the initial header: some store the values as
Packit 08bd4c
octal or hexadecimal numbers in ASCII, others as binary values of
Packit 08bd4c
varying byte order and length.
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Cm binary
Packit 08bd4c
The libarchive library transparently reads both big-endian and little-endian
Packit 08bd4c
variants of the original binary cpio format.
Packit 08bd4c
This format used 32-bit binary values for file size and mtime,
Packit 08bd4c
and 16-bit binary values for the other fields.
Packit 08bd4c
.It Cm odc
Packit 08bd4c
The libarchive library can both read and write this
Packit 08bd4c
POSIX-standard format, which is officially known as the
Packit 08bd4c
.Dq cpio interchange format
Packit 08bd4c
or the
Packit 08bd4c
.Dq octet-oriented cpio archive format
Packit 08bd4c
and sometimes unofficially referred to as the
Packit 08bd4c
.Dq old character format .
Packit 08bd4c
This format stores the header contents as octal values in ASCII.
Packit 08bd4c
It is standard, portable, and immune from byte-order confusion.
Packit 08bd4c
File sizes and mtime are limited to 33 bits (8GB file size),
Packit 08bd4c
other fields are limited to 18 bits.
Packit 08bd4c
.It Cm SVR4/newc
Packit 08bd4c
The libarchive library can read both CRC and non-CRC variants of
Packit 08bd4c
this format.
Packit 08bd4c
The SVR4 format uses eight-digit hexadecimal values for
Packit 08bd4c
all header fields.
Packit 08bd4c
This limits file size to 4GB, and also limits the mtime and
Packit 08bd4c
other fields to 32 bits.
Packit 08bd4c
The SVR4 format can optionally include a CRC of the file
Packit 08bd4c
contents, although libarchive does not currently verify this CRC.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
Cpio first appeared in PWB/UNIX 1.0, which was released within
Packit 08bd4c
AT&T in 1977.
Packit 08bd4c
PWB/UNIX 1.0 formed the basis of System III Unix, released outside
Packit 08bd4c
of AT&T in 1981.
Packit 08bd4c
This makes cpio older than tar, although cpio was not included
Packit 08bd4c
in Version 7 AT&T Unix.
Packit 08bd4c
As a result, the tar command became much better known in universities
Packit 08bd4c
and research groups that used Version 7.
Packit 08bd4c
The combination of the
Packit 08bd4c
.Nm find
Packit 08bd4c
and
Packit 08bd4c
.Nm cpio
Packit 08bd4c
utilities provided very precise control over file selection.
Packit 08bd4c
Unfortunately, the format has many limitations that make it unsuitable
Packit 08bd4c
for widespread use.
Packit 08bd4c
Only the POSIX format permits files over 4GB, and its 18-bit
Packit 08bd4c
limit for most other fields makes it unsuitable for modern systems.
Packit 08bd4c
In addition, cpio formats only store numeric UID/GID values (not
Packit 08bd4c
usernames and group names), which can make it very difficult to correctly
Packit 08bd4c
transfer archives across systems with dissimilar user numbering.
Packit 08bd4c
.Ss Shar Formats
Packit 08bd4c
A
Packit 08bd4c
.Dq shell archive
Packit 08bd4c
is a shell script that, when executed on a POSIX-compliant
Packit 08bd4c
system, will recreate a collection of file system objects.
Packit 08bd4c
The libarchive library can write two different kinds of shar archives:
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Cm shar
Packit 08bd4c
The traditional shar format uses a limited set of POSIX
Packit 08bd4c
commands, including
Packit 08bd4c
.Xr echo 1 ,
Packit 08bd4c
.Xr mkdir 1 ,
Packit 08bd4c
and
Packit 08bd4c
.Xr sed 1 .
Packit 08bd4c
It is suitable for portably archiving small collections of plain text files.
Packit 08bd4c
However, it is not generally well-suited for large archives
Packit 08bd4c
(many implementations of
Packit 08bd4c
.Xr sh 1
Packit 08bd4c
have limits on the size of a script) nor should it be used with non-text files.
Packit 08bd4c
.It Cm shardump
Packit 08bd4c
This format is similar to shar but encodes files using
Packit 08bd4c
.Xr uuencode 1
Packit 08bd4c
so that the result will be a plain text file regardless of the file contents.
Packit 08bd4c
It also includes additional shell commands that attempt to reproduce as
Packit 08bd4c
many file attributes as possible, including owner, mode, and flags.
Packit 08bd4c
The additional commands used to restore file attributes make
Packit 08bd4c
shardump archives less portable than plain shar archives.
Packit 08bd4c
.El
Packit 08bd4c
.Ss ISO9660 format
Packit 08bd4c
Libarchive can read and extract from files containing ISO9660-compliant
Packit 08bd4c
CDROM images.
Packit 08bd4c
In many cases, this can remove the need to burn a physical CDROM
Packit 08bd4c
just in order to read the files contained in an ISO9660 image.
Packit 08bd4c
It also avoids security and complexity issues that come with
Packit 08bd4c
virtual mounts and loopback devices.
Packit 08bd4c
Libarchive supports the most common Rockridge extensions and has partial
Packit 08bd4c
support for Joliet extensions.
Packit 08bd4c
If both extensions are present, the Joliet extensions will be
Packit 08bd4c
used and the Rockridge extensions will be ignored.
Packit 08bd4c
In particular, this can create problems with hardlinks and symlinks,
Packit 08bd4c
which are supported by Rockridge but not by Joliet.
Packit 08bd4c
.Pp
Packit 08bd4c
Libarchive reads ISO9660 images using a streaming strategy.
Packit 08bd4c
This allows it to read compressed images directly
Packit 08bd4c
(decompressing on the fly) and allows it to read images
Packit 08bd4c
directly from network sockets, pipes, and other non-seekable
Packit 08bd4c
data sources.
Packit 08bd4c
This strategy works well for optimized ISO9660 images created
Packit 08bd4c
by many popular programs.
Packit 08bd4c
Such programs collect all directory information at the beginning
Packit 08bd4c
of the ISO9660 image so it can be read from a physical disk
Packit 08bd4c
with a minimum of seeking.
Packit 08bd4c
However, not all ISO9660 images can be read in this fashion.
Packit 08bd4c
.Pp
Packit 08bd4c
Libarchive can also write ISO9660 images.
Packit 08bd4c
Such images are fully optimized with the directory information
Packit 08bd4c
preceding all file data.
Packit 08bd4c
This is done by storing all file data to a temporary file
Packit 08bd4c
while collecting directory information in memory.
Packit 08bd4c
When the image is finished, libarchive writes out the
Packit 08bd4c
directory structure followed by the file data.
Packit 08bd4c
The location used for the temporary file can be changed
Packit 08bd4c
by the usual environment variables.
Packit 08bd4c
.Ss Zip format
Packit 08bd4c
Libarchive can read and write zip format archives that have
Packit 08bd4c
uncompressed entries and entries compressed with the
Packit 08bd4c
.Dq deflate
Packit 08bd4c
algorithm.
Packit 08bd4c
Other zip compression algorithms are not supported.
Packit 08bd4c
It can extract jar archives, archives that use Zip64 extensions and
Packit 08bd4c
self-extracting zip archives.
Packit 08bd4c
Libarchive can use either of two different strategies for
Packit 08bd4c
reading Zip archives:
Packit 08bd4c
a streaming strategy which is fast and can handle extremely
Packit 08bd4c
large archives, and a seeking strategy which can correctly
Packit 08bd4c
process self-extracting Zip archives and archives with
Packit 08bd4c
deleted members or other in-place modifications.
Packit 08bd4c
.Pp
Packit 08bd4c
The streaming reader processes Zip archives as they are read.
Packit 08bd4c
It can read archives of arbitrary size from tape or
Packit 08bd4c
network sockets, and can decode Zip archives that have
Packit 08bd4c
been separately compressed or encoded.
Packit 08bd4c
However, self-extracting Zip archives and archives with
Packit 08bd4c
certain types of modifications cannot be correctly
Packit 08bd4c
handled.
Packit 08bd4c
Such archives require that the reader first process the
Packit 08bd4c
Central Directory, which is ordinarily located
Packit 08bd4c
at the end of a Zip archive and is thus inaccessible
Packit 08bd4c
to the streaming reader.
Packit 08bd4c
If the program using libarchive has enabled seek support, then
Packit 08bd4c
libarchive will use this to processes the central directory first.
Packit 08bd4c
.Pp
Packit 08bd4c
In particular, the seeking reader must be used to
Packit 08bd4c
correctly handle self-extracting archives.
Packit 08bd4c
Such archives consist of a program followed by a regular
Packit 08bd4c
Zip archive.
Packit 08bd4c
The streaming reader cannot parse the initial program
Packit 08bd4c
portion, but the seeking reader starts by reading the
Packit 08bd4c
Central Directory from the end of the archive.
Packit 08bd4c
Similarly, Zip archives that have been modified in-place
Packit 08bd4c
can have deleted entries or other garbage data that
Packit 08bd4c
can only be accurately detected by first reading the
Packit 08bd4c
Central Directory.
Packit 08bd4c
.Ss Archive (library) file format
Packit 08bd4c
The Unix archive format (commonly created by the
Packit 08bd4c
.Xr ar 1
Packit 08bd4c
archiver) is a general-purpose format which is
Packit 08bd4c
used almost exclusively for object files to be
Packit 08bd4c
read by the link editor
Packit 08bd4c
.Xr ld 1 .
Packit 08bd4c
The ar format has never been standardised.
Packit 08bd4c
There are two common variants:
Packit 08bd4c
the GNU format derived from SVR4,
Packit 08bd4c
and the BSD format, which first appeared in 4.4BSD.
Packit 08bd4c
The two differ primarily in their handling of filenames
Packit 08bd4c
longer than 15 characters:
Packit 08bd4c
the GNU/SVR4 variant writes a filename table at the beginning of the archive;
Packit 08bd4c
the BSD format stores each long filename in an extension
Packit 08bd4c
area adjacent to the entry.
Packit 08bd4c
Libarchive can read both extensions,
Packit 08bd4c
including archives that may include both types of long filenames.
Packit 08bd4c
Programs using libarchive can write GNU/SVR4 format
Packit 08bd4c
if they provide an entry called
Packit 08bd4c
.Pa //
Packit 08bd4c
containing a filename table to be written into the archive
Packit 08bd4c
before any of the entries.
Packit 08bd4c
Any entries whose names are not in the filename table
Packit 08bd4c
will be written using BSD-style long filenames.
Packit 08bd4c
This can cause problems for programs such as
Packit 08bd4c
GNU ld that do not support the BSD-style long filenames.
Packit 08bd4c
.Ss mtree
Packit 08bd4c
Libarchive can read and write files in
Packit 08bd4c
.Xr mtree 5
Packit 08bd4c
format.
Packit 08bd4c
This format is not a true archive format, but rather a textual description
Packit 08bd4c
of a file hierarchy in which each line specifies the name of a file and
Packit 08bd4c
provides specific metadata about that file.
Packit 08bd4c
Libarchive can read all of the keywords supported by both
Packit 08bd4c
the NetBSD and FreeBSD versions of
Packit 08bd4c
.Xr mtree 8 ,
Packit 08bd4c
although many of the keywords cannot currently be stored in an
Packit 08bd4c
.Tn archive_entry
Packit 08bd4c
object.
Packit 08bd4c
When writing, libarchive supports use of the
Packit 08bd4c
.Xr archive_write_set_options 3
Packit 08bd4c
interface to specify which keywords should be included in the
Packit 08bd4c
output.
Packit 08bd4c
If libarchive was compiled with access to suitable
Packit 08bd4c
cryptographic libraries (such as the OpenSSL libraries),
Packit 08bd4c
it can compute hash entries such as
Packit 08bd4c
.Cm sha512
Packit 08bd4c
or
Packit 08bd4c
.Cm md5
Packit 08bd4c
from file data being written to the mtree writer.
Packit 08bd4c
.Pp
Packit 08bd4c
When reading an mtree file, libarchive will locate the corresponding
Packit 08bd4c
files on disk using the
Packit 08bd4c
.Cm contents
Packit 08bd4c
keyword if present or the regular filename.
Packit 08bd4c
If it can locate and open the file on disk, it will use that
Packit 08bd4c
to fill in any metadata that is missing from the mtree file
Packit 08bd4c
and will read the file contents and return those to the program
Packit 08bd4c
using libarchive.
Packit 08bd4c
If it cannot locate and open the file on disk, libarchive
Packit 08bd4c
will return an error for any attempt to read the entry
Packit 08bd4c
body.
Packit 08bd4c
.Ss 7-Zip
Packit 08bd4c
Libarchive can read and write 7-Zip format archives.
Packit 08bd4c
TODO: Need more information
Packit 08bd4c
.Ss CAB
Packit 08bd4c
Libarchive can read Microsoft Cabinet (
Packit 08bd4c
.Dq CAB )
Packit 08bd4c
format archives.
Packit 08bd4c
TODO: Need more information.
Packit 08bd4c
.Ss LHA
Packit 08bd4c
TODO: Information about libarchive's LHA support
Packit 08bd4c
.Ss RAR
Packit 08bd4c
Libarchive has limited support for reading RAR format archives.
Packit 08bd4c
Currently, libarchive can read RARv3 format archives
Packit 08bd4c
which have been either created uncompressed, or compressed using
Packit 08bd4c
any of the compression methods supported by the RARv3 format.
Packit 08bd4c
Libarchive can also read self-extracting RAR archives.
Packit 08bd4c
.Ss Warc
Packit 08bd4c
Libarchive can read and write
Packit 08bd4c
.Dq web archives .
Packit 08bd4c
TODO: Need more information
Packit 08bd4c
.Ss XAR
Packit 08bd4c
Libarchive can read and write the XAR format used by many Apple tools.
Packit 08bd4c
TODO: Need more information
Packit 08bd4c
.Sh SEE ALSO
Packit 08bd4c
.Xr ar 1 ,
Packit 08bd4c
.Xr cpio 1 ,
Packit 08bd4c
.Xr mkisofs 1 ,
Packit 08bd4c
.Xr shar 1 ,
Packit 08bd4c
.Xr tar 1 ,
Packit 08bd4c
.Xr zip 1 ,
Packit 08bd4c
.Xr zlib 3 ,
Packit 08bd4c
.Xr cpio 5 ,
Packit 08bd4c
.Xr mtree 5 ,
Packit 08bd4c
.Xr tar 5