1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Correct and update the manpage to include

more details about some of the formats and
to briefly describe the mtree writing capability.
This commit is contained in:
Tim Kientzle 2009-04-18 03:47:29 +00:00
parent 74677fb82b
commit 84cdfa5374
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191235

View File

@ -24,8 +24,8 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 27, 2004
.Dt libarchive-formats 3
.Dd April 17, 2009
.Dt libarchive-formats 5
.Os
.Sh NAME
.Nm libarchive-formats
@ -93,8 +93,9 @@ to define custom keys by preceding them with the vendor name in all uppercase.
When writing pax archives, libarchive uses many of the SCHILY keys
defined by Joerg Schilling's
.Dq star
archiver.
The libarchive library can read most of the SCHILY keys.
archiver and a few LIBARCHIVE keys.
The libarchive library can read most of the SCHILY keys
and most of the GNU keys introduced by GNU tar.
It silently ignores any keywords that it does not understand.
.It Cm restricted pax
The libarchive library can also write pax archives in which it
@ -156,7 +157,8 @@ and
format archives.
A cpio archive stores each entry as a fixed-size header followed
by a variable-length filename and variable-length data.
Unlike tar, cpio does only minimal padding of the header or file data.
Unlike the tar format, the cpio format does only minimal padding
of the header or file data.
There are a variety of cpio formats, which differ primarily in
how they store the initial header: some store the values as
octal or hexadecimal numbers in ASCII, others as binary values of
@ -169,7 +171,12 @@ This format used 32-bit binary values for file size and mtime,
and 16-bit binary values for the other fields.
.It Cm odc
The libarchive library can both read and write this
POSIX-standard format.
POSIX-standard format, which is officially known as the
.Dq cpio interchange format
or the
.Dq octet-oriented cpio archive format
and sometimes unofficially referred to as the
.Dq old character format .
This format stores the header contents as octal values in ASCII.
It is standard, portable, and immune from byte-order confusion.
File sizes and mtime are limited to 33 bits (8GB file size),
@ -237,16 +244,24 @@ shardump archives less portable than plain shar archives.
Libarchive can read and extract from files containing ISO9660-compliant
CDROM images.
It also has partial support for Rockridge extensions.
In many cases, this can remove the need to burn a physical CDROM.
In many cases, this can remove the need to burn a physical CDROM
just in order to read the files contained in an ISO9660 image.
It also avoids security and complexity issues that come with
virtual mounts and loopback devices.
.Ss Zip format
Libarchive can extract from most zip format archives.
Libarchive can extract from most zip format archives, including
jar archives, archives that use Zip64 extensions and many
self-extracting zip archives.
It currently only supports uncompressed entries and entries
compressed with the
.Dq deflate
algorithm.
Older zip compression algorithms are not supported.
Libarchive reads Zip archives as they are being streamed,
which allows it to read archives of arbitrary size.
It currently does not use the central directory; this
limits libarchive's ability to support some self-extracting
archives and ones that have been modified in certain ways.
.Ss Archive (library) file format
The Unix archive format (commonly created by the
.Xr ar 1
@ -260,13 +275,32 @@ the GNU format derived from SVR4,
and the BSD format, which first appeared in 4.4BSD.
Libarchive provides read and write support for both variants.
.Ss mtree
Libarchive can read files in
Libarchive can read and write files in
.Xr mtree 5
format. This format is not a true archive format, but rather a description
of a file hierarchy. When requested, libarchive obtains the contents of
the files described by the
format.
This format is not a true archive format, but rather a textual description
of a file hierarchy in which each line specifies the name of a file and
provides specific metadata about that file.
Libarchive can read all of the keywords supported by both
the NetBSD and FreeBSD versions of
.Xr mtree 1 ,
although many of the keywords cannot currently be stored in an
.Tn archive_entry
object.
When reading, libarchive supports an extension that allows it
to obtain the contents of the files described by the
.Xr mtree 5
format from files on disk instead.
description from files on disk.
When writing, libarchive supports use of the
.Xr archive_write_set_options 3
interface to specify which keywords should be included in the
output.
This includes the ability to compute hash entries such
as
.Cm sha512
or
.Cm md5
from file data being written to the mtree writer.
.Sh SEE ALSO
.Xr ar 1 ,
.Xr cpio 1 ,