man-pages/man1/dpkg-deb.1.html
2021-03-31 01:06:50 +01:00

459 lines
13 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of dpkg-deb</TITLE>
</HEAD><BODY>
<H1>dpkg-deb</H1>
Section: dpkg suite (1)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
dpkg-deb - Debian package archive (.deb) manipulation tool
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>dpkg-deb</B>
[<I>option</I>...] <I>command</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>dpkg-deb</B>
packs, unpacks and provides information about Debian archives.
<P>
Use
<B>dpkg</B>
to install and remove packages from your system.
<P>
You can also invoke
<B>dpkg-deb</B>
by calling
<B>dpkg</B>
with whatever options you want to pass to
<B>dpkg-deb</B>. <B>dpkg</B>
will spot that you wanted
<B>dpkg-deb</B>
and run it for you.
<P>
For most commands taking an input archive argument, the archive can be
read from standard input if the archive name is given as a single minus
character (&laquo;<B>-</B>&raquo;); otherwise lack of support will be documented in
their respective command description.
<A NAME="lbAE">&nbsp;</A>
<H2>COMMANDS</H2>
<DL COMPACT>
<DT id="1"><B>-b</B>, <B>--build</B> <I>binary-directory</I> [<I>archive</I>|<I>directory</I>]
<DD>
Creates a debian archive from the filesystem tree stored in
<I>binary-directory</I>. <I>binary-directory</I>
must have a
<B>DEBIAN</B>
subdirectory, which contains the control information files such
as the control file itself. This directory will
<I>not</I>
appear in the binary package's filesystem archive, but instead
the files in it will be put in the binary package's control
information area.
<P>
Unless you specify
<B>--nocheck</B>, <B>dpkg-deb</B>
will read
<B>DEBIAN/control</B>
and parse it. It will check the file for syntax errors and other problems,
and display the name of the binary package being built.
<B>dpkg-deb</B>
will also check the permissions of the maintainer scripts and other
files found in the
<B>DEBIAN</B>
control information directory.
<P>
If no
<I>archive</I>
is specified then
<B>dpkg-deb</B>
will write the package into the file
<I>binary-directory</I><B>.deb</B>.
<P>
If the archive to be created already exists it will be overwritten.
<P>
If the second argument is a directory then
<B>dpkg-deb</B>
will write to the file
<I>directory</I><B>/</B><I>package</I><B>_</B><I>version</I><B>_</B><I>arch</I><B>.deb.</B>
When a target directory is specified, rather than a file, the
<B>--nocheck</B>
option may not be used (since
<B>dpkg-deb</B>
needs to read and parse the package control file to determine which
filename to use).
<DT id="2"><B>-I</B>, <B>--info</B> <I>archive</I> [<I>control-file-name</I>...]
<DD>
Provides information about a binary package archive.
<P>
If no
<I>control-file-name</I>s
are specified then it will print a summary of the contents of the
package as well as its control file.
<P>
If any
<I>control-file-name</I>s
are specified then
<B>dpkg-deb</B>
will print them in the order they were specified; if any of the
components weren't present it will print an error message to stderr
about each one and exit with status 2.
<DT id="3"><B>-W</B>, <B>--show</B> <I>archive</I>
<DD>
Provides information about a binary package archive in the format
specified by the
<B>--showformat</B>
argument. The default format displays the package's name and version
on one line, separated by a tabulator.
<DT id="4"><B>-f</B>, <B>--field</B> <I>archive</I> [<I>control-field-name</I>...]
<DD>
Extracts control file information from a binary package archive.
<P>
If no
<I>control-field-name</I>s
are specified then it will print the whole control file.
<P>
If any are specified then
<B>dpkg-deb</B>
will print their contents, in the order in which they appear in the
control file. If more than one
<I>control-field-name</I>
is specified then
<B>dpkg-deb</B>
will precede each with its field name (and a colon and space).
<P>
No errors are reported for fields requested but not found.
<DT id="5"><B>-c</B>, <B>--contents</B> <I>archive</I>
<DD>
Lists the contents of the filesystem tree archive portion of the
package archive. It is currently produced in the format generated by
<B>tar</B>'s
verbose listing.
<DT id="6"><B>-x</B>, <B>--extract</B> <I>archive directory</I>
<DD>
Extracts the filesystem tree from a package archive into the specified
directory.
<P>
Note that extracting a package to the root directory will
<I>not</I>
result in a correct installation! Use
<B>dpkg</B>
to install packages.
<P>
<I>directory</I>
(but not its parents) will be created if necessary, and its permissions
modified to match the contents of the package.
<DT id="7"><B>-X</B>, <B>--vextract</B> <I>archive directory</I>
<DD>
Is like
<B>--extract</B> (<B>-x</B>)
with
<B>--verbose</B> (<B>-v</B>)
which prints a listing of the files extracted as it goes.
<DT id="8"><B>-R</B>, <B>--raw-extract</B> <I>archive directory</I>
<DD>
Extracts the filesystem tree from a package archive into a specified
directory, and the control information files into a
<B>DEBIAN</B>
subdirectory of the specified directory (since dpkg 1.16.1).
<P>
The target directory (but not its parents) will be created if necessary.
<P>
The input archive is not (currently) processed sequentially, so reading
it from standard input (&laquo;<B>-</B>&raquo;) is <B>not</B> supported.
<DT id="9"><B>--ctrl-tarfile</B> <I>archive</I>
<DD>
Extracts the control data from a binary package and sends it to standard
output in
<B>tar</B>
format (since dpkg 1.17.14). Together with
<B><A HREF="/cgi-bin/man/man2html?1+tar">tar</A></B>(1)
this can be used to extract a particular control file from a package archive.
The input archive will always be processed sequentially.
<DT id="10"><B>--fsys-tarfile</B> <I>archive</I>
<DD>
Extracts the filesystem tree data from a binary package and sends it
to standard output in
<B>tar</B>
format. Together with
<B><A HREF="/cgi-bin/man/man2html?1+tar">tar</A></B>(1)
this can be used to extract a particular file from a package archive.
The input archive will always be processed sequentially.
<DT id="11"><B>-e</B>, <B>--control</B> <I>archive</I> [<I>directory</I>]
<DD>
Extracts the control information files from a package archive into the
specified directory.
<P>
If no directory is specified then a subdirectory
<B>DEBIAN</B>
in the current directory is used.
<P>
The target directory (but not its parents) will be created if
necessary.
<DT id="12"><B>-?</B>, <B>--help</B>
<DD>
Show the usage message and exit.
<DT id="13"><B>--version</B>
<DD>
Show the version and exit.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="14"><B>--showformat=</B><I>format</I><DD>
This option is used to specify the format of the output <B>--show</B>
will produce. The format is a string that will be output for each package
listed.
<P>
The string may reference any status field using the
"${<I>field-name</I>}" form, a list of the valid fields can be easily
produced using
<B>-I</B>
on the same package. A complete explanation of the formatting options
(including escape sequences and field tabbing) can be found in the
explanation of the <B>--showformat</B> option in
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-query">dpkg-query</A></B>(1).
<P>
The default for this field is "${Package}\t${Version}\n".
<DT id="15"><B>-z</B><I>compress-level</I>
<DD>
Specify which compression level to use on the compressor backend, when
building a package (default is 9 for gzip, 6 for xz and 19 for zstd).
The accepted values are 0-9 with: 0 being mapped to compressor none for gzip.
Before dpkg 1.16.2 level 0 was equivalent to compressor none for all
compressors.
<DT id="16"><B>-S</B><I>compress-strategy</I>
<DD>
Specify which compression strategy to use on the compressor backend, when
building a package (since dpkg 1.16.2). Allowed values are <B>none</B> (since
dpkg 1.16.4), <B>filtered</B>, <B>huffman</B>, <B>rle</B> and <B>fixed</B> for
gzip (since dpkg 1.17.0) and <B>extreme</B> for xz.
<DT id="17"><B>-Z</B><I>compress-type</I>
<DD>
Specify which compression type to use when building a package.
Allowed values are <B>gzip</B>, <B>xz</B> (since dpkg 1.15.6),
and <B>none</B> (default is <B>xz</B>).
<DT id="18"><B>--[no-]uniform-compression</B>
<DD>
Specify that the same compression parameters should be used for all archive
members (i.e. <B>control.tar</B> and <B>data.tar</B>; since dpkg 1.17.6).
Otherwise only the
<B>data.tar</B> member will use those parameters. The only supported
compression types allowed to be uniformly used are <B>none</B>, <B>gzip</B>
and <B>xz</B>.
The <B>--no-uniform-compression</B> option disables uniform compression
(since dpkg 1.19.0).
Uniform compression is the default (since dpkg 1.19.0).
<DT id="19"><B>--root-owner-group</B>
<DD>
Set the owner and group for each entry in the filesystem tree data to
root with id 0 (since dpkg 1.19.0).
<P>
<B>Note</B>: This option can be useful for rootless builds (see
<I>rootless-builds.txt</I>), but should <B>not</B> be used when the
entries have an owner or group that is not root.
Support for these will be added later in the form of a meta manifest.
<DT id="20"><B>--deb-format=</B><I>format</I>
<DD>
Set the archive format version used when building (since dpkg 1.17.0).
Allowed values are <B>2.0</B> for the new format, and <B>0.939000</B>
for the old one (default is <B>2.0</B>).
<P>
The old archive format is less easily parsed by non-Debian tools and is
now obsolete; its only use is when building packages to be parsed by
versions of dpkg older than 0.93.76 (September 1995), which was released
as i386 a.out only.
<DT id="21"><B>--nocheck</B>
<DD>
Inhibits
<B>dpkg-deb --build</B>'s
usual checks on the proposed contents of an archive. You can build
any archive you want, no matter how broken, this way.
<DT id="22"><B>-v</B>, <B>--verbose</B>
<DD>
Enables verbose output (since dpkg 1.16.1).
This currently only affects <B>--extract</B> making it behave like
<B>--vextract</B>.
<DT id="23"><B>-D</B>, <B>--debug</B>
<DD>
Enables debugging output. This is not very interesting.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXIT STATUS</H2>
<DL COMPACT>
<DT id="24"><B>0</B>
<DD>
The requested action was successfully performed.
<DT id="25"><B>2</B>
<DD>
Fatal or unrecoverable error due to invalid command-line usage, or
interactions with the system, such as accesses to the database,
memory allocations, etc.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT id="26"><B>DPKG_COLORS</B>
<DD>
Sets the color mode (since dpkg 1.18.5).
The currently accepted values are: <B>auto</B> (default), <B>always</B> and
<B>never</B>.
<DT id="27"><B>TMPDIR</B>
<DD>
If set, <B>dpkg-deb</B> will use it as the directory in which to create
temporary files and directories.
<DT id="28"><B>SOURCE_DATE_EPOCH</B>
<DD>
If set, it will be used as the timestamp (as seconds since the epoch) in
the <B><A HREF="/cgi-bin/man/man2html?5+deb">deb</A></B>(5)'s <B><A HREF="/cgi-bin/man/man2html?5+ar">ar</A></B>(5) container and used to clamp the mtime in
the <B><A HREF="/cgi-bin/man/man2html?5+tar">tar</A></B>(5) file entries.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>NOTES</H2>
Do not attempt to use just
<B>dpkg-deb</B>
to install software! You must use
<B>dpkg</B>
proper to ensure that all the files are correctly placed and the
package's scripts run and its status and contents recorded.
<A NAME="lbAJ">&nbsp;</A>
<H2>BUGS</H2>
<B>dpkg-deb -I</B>
<I>package1</I><B>.deb</B>
<I>package2</I><B>.deb</B>
does the wrong thing.
<P>
There is no authentication on
<B>.deb</B>
files; in fact, there isn't even a straightforward checksum.
(Higher level tools like APT support authenticating <B>.deb</B> packages
retrieved from a given repository, and most packages nowadays provide an
md5sum control file generated by debian/rules. Though this is not directly
supported by the lower level tools.)
<A NAME="lbAK">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?5+deb">deb</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?1+dpkg">dpkg</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+dselect">dselect</A></B>(1).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="29"><A HREF="#lbAB">NAME</A><DD>
<DT id="30"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="31"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="32"><A HREF="#lbAE">COMMANDS</A><DD>
<DT id="33"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="34"><A HREF="#lbAG">EXIT STATUS</A><DD>
<DT id="35"><A HREF="#lbAH">ENVIRONMENT</A><DD>
<DT id="36"><A HREF="#lbAI">NOTES</A><DD>
<DT id="37"><A HREF="#lbAJ">BUGS</A><DD>
<DT id="38"><A HREF="#lbAK">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:11 GMT, March 31, 2021
</BODY>
</HTML>