.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "dpkg-deb 1" .TH dpkg-deb 1 2024-01-19 1.22.3 "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dpkg\-deb \- Debian package archive (.deb) manipulation tool .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBdpkg-deb\fR [\fIoption\fR...] \fIcommand\fR .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBdpkg-deb\fR packs, unpacks and provides information about Debian archives. .PP Use \&\fBdpkg\fR to install and remove packages from your system. .PP You can also invoke \&\fBdpkg-deb\fR by calling \&\fBdpkg\fR with whatever options you want to pass to \&\fBdpkg-deb\fR. \&\fBdpkg\fR will spot that you wanted \&\fBdpkg-deb\fR and run it for you. .PP 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 (\(Fo\fB\-\fR\(Fc); otherwise lack of support will be documented in their respective command description. .SH COMMANDS .IX Header "COMMANDS" .IP "\fB\-b\fR, \fB\-\-build\fR \fIbinary-directory\fR [\fIarchive\fR|\fIdirectory\fR]" 4 .IX Item "-b, --build binary-directory [archive|directory]" Creates a debian archive from the filesystem tree stored in \&\fIbinary-directory\fR. \&\fIbinary-directory\fR must have a \&\fBDEBIAN\fR subdirectory, which contains the control information files such as the control file itself. This directory will \&\fInot\fR 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. .Sp Unless you specify \&\fB\-\-nocheck\fR, \fBdpkg-deb\fR will read \&\fBDEBIAN/control\fR and parse it. It will check the file for syntax errors and other problems, and display the name of the binary package being built. \&\fBdpkg-deb\fR will also check the permissions of the maintainer scripts and other files found in the \&\fBDEBIAN\fR control information directory. .Sp If no \&\fIarchive\fR is specified then \&\fBdpkg-deb\fR will write the package into the file \&\fIbinary-directory\fR\fB.deb\fR. .Sp If the archive to be created already exists it will be overwritten. .Sp If the second argument is a directory then \&\fBdpkg-deb\fR will write to the file \&\fIdirectory\fR\fB/\fR\fIpackage\fR\fB_\fR\fIversion\fR\fB_\fR\fIarch\fR\fB.deb.\fR When a target directory is specified, rather than a file, the \&\fB\-\-nocheck\fR option may not be used (since \&\fBdpkg-deb\fR needs to read and parse the package control file to determine which filename to use). .IP "\fB\-I\fR, \fB\-\-info\fR \fIarchive\fR [\fIcontrol-file-name\fR...]" 4 .IX Item "-I, --info archive [control-file-name...]" Provides information about a binary package archive. .Sp If no \&\fIcontrol-file-name\fRs are specified then it will print a summary of the contents of the package as well as its control file. .Sp If any \&\fIcontrol-file-name\fRs are specified then \&\fBdpkg-deb\fR 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. .IP "\fB\-W\fR, \fB\-\-show\fR \fIarchive\fR" 4 .IX Item "-W, --show archive" Provides information about a binary package archive in the format specified by the \&\fB\-\-showformat\fR argument. The default format displays the package's name and version on one line, separated by a tabulator. .IP "\fB\-f\fR, \fB\-\-field\fR \fIarchive\fR [\fIcontrol-field-name\fR...]" 4 .IX Item "-f, --field archive [control-field-name...]" Extracts control file information from a binary package archive. .Sp If no \&\fIcontrol-field-name\fRs are specified then it will print the whole control file. .Sp If any are specified then \&\fBdpkg-deb\fR will print their contents, in the order in which they appear in the control file. If more than one \&\fIcontrol-field-name\fR is specified then \&\fBdpkg-deb\fR will precede each with its field name (and a colon and space). .Sp No errors are reported for fields requested but not found. .IP "\fB\-c\fR, \fB\-\-contents\fR \fIarchive\fR" 4 .IX Item "-c, --contents archive" Lists the contents of the filesystem tree archive portion of the package archive. It is currently produced in the format generated by \&\fBtar\fR's verbose listing. .IP "\fB\-x\fR, \fB\-\-extract\fR \fIarchive\fR \fIdirectory\fR" 4 .IX Item "-x, --extract archive directory" Extracts the filesystem tree from a package archive into the specified directory. .Sp Note that extracting a package to the root directory will \&\fInot\fR result in a correct installation! Use \&\fBdpkg\fR to install packages. .Sp \&\fIdirectory\fR (but not its parents) will be created if necessary, and its permissions modified to match the contents of the package. .IP "\fB\-X\fR, \fB\-\-vextract\fR \fIarchive\fR \fIdirectory\fR" 4 .IX Item "-X, --vextract archive directory" Is like \&\fB\-\-extract\fR (\fB\-x\fR) with \&\fB\-\-verbose\fR (\fB\-v\fR) which prints a listing of the files extracted as it goes. .IP "\fB\-R\fR, \fB\-\-raw\-extract\fR \fIarchive\fR \fIdirectory\fR" 4 .IX Item "-R, --raw-extract archive directory" Extracts the filesystem tree from a package archive into a specified directory, and the control information files into a \&\fBDEBIAN\fR subdirectory of the specified directory (since dpkg 1.16.1). .Sp The target directory (but not its parents) will be created if necessary. .Sp The input archive is not (currently) processed sequentially, so reading it from standard input (\(Fo\fB\-\fR\(Fc) is \fBnot\fR supported. .IP "\fB\-\-ctrl\-tarfile\fR \fIarchive\fR" 4 .IX Item "--ctrl-tarfile archive" Extracts the control data from a binary package and sends it to standard output in \&\fBtar\fR format (since dpkg 1.17.14). Together with \&\fBtar\fR\|(1) this can be used to extract a particular control file from a package archive. The input archive will always be processed sequentially. .IP "\fB\-\-fsys\-tarfile\fR \fIarchive\fR" 4 .IX Item "--fsys-tarfile archive" Extracts the filesystem tree data from a binary package and sends it to standard output in \&\fBtar\fR format. Together with \&\fBtar\fR\|(1) this can be used to extract a particular file from a package archive. The input archive will always be processed sequentially. .IP "\fB\-e\fR, \fB\-\-control\fR \fIarchive\fR [\fIdirectory\fR]" 4 .IX Item "-e, --control archive [directory]" Extracts the control information files from a package archive into the specified directory. .Sp If no directory is specified then a subdirectory \&\fBDEBIAN\fR in the current directory is used. .Sp The target directory (but not its parents) will be created if necessary. .IP "\fB\-?\fR, \fB\-\-help\fR" 4 .IX Item "-?, --help" Show the usage message and exit. .IP \fB\-\-version\fR 4 .IX Item "--version" Show the version and exit. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-showformat=\fR\fIformat\fR 4 .IX Item "--showformat=format" This option is used to specify the format of the output \fB\-\-show\fR will produce. The format is a string that will be output for each package listed. .Sp The string may reference any status field using the \(lq${\fIfield-name\fR}\(rq form, a list of the valid fields can be easily produced using \&\fB\-I\fR 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 \fB\-\-showformat\fR option in \&\fBdpkg\-query\fR\|(1). .Sp The default for this field is \(lq${Package}\et${Version}\en\(rq. .IP \fB\-z\fR\fIcompress-level\fR 4 .IX Item "-zcompress-level" Specify which compression level to use on the compressor backend, when building a package (default is 9 for gzip, 6 for xz, 3 for zstd). The accepted values are compressor specific. For gzip, from 0\-9 with 0 being mapped to compressor none. For xz from 0\-9. For zstd from 0\-22, with levels from 20 to 22 enabling its ultra mode. Before dpkg 1.16.2 level 0 was equivalent to compressor none for all compressors. .IP \fB\-S\fR\fIcompress-strategy\fR 4 .IX Item "-Scompress-strategy" Specify which compression strategy to use on the compressor backend, when building a package (since dpkg 1.16.2). Allowed values are \fBnone\fR (since dpkg 1.16.4), \fBfiltered\fR, \fBhuffman\fR, \fBrle\fR and \fBfixed\fR for gzip (since dpkg 1.17.0) and \fBextreme\fR for xz. .IP \fB\-Z\fR\fIcompress-type\fR 4 .IX Item "-Zcompress-type" Specify which compression type to use when building a package. Allowed values are \fBgzip\fR, \fBxz\fR (since dpkg 1.15.6), \&\fBzstd\fR (since dpkg 1.21.18) and \fBnone\fR (default is \fBxz\fR). .IP \fB\-\-[no\-]uniform\-compression\fR 4 .IX Item "--[no-]uniform-compression" Specify that the same compression parameters should be used for all archive members (i.e. \fBcontrol.tar\fR and \fBdata.tar\fR; since dpkg 1.17.6). Otherwise only the \&\fBdata.tar\fR member will use those parameters. The only supported compression types allowed to be uniformly used are \fBnone\fR, \fBgzip\fR, \&\fBxz\fR and \fBzstd\fR. The \fB\-\-no\-uniform\-compression\fR option disables uniform compression (since dpkg 1.19.0). Uniform compression is the default (since dpkg 1.19.0). .IP \fB\-\-threads\-max=\fR\fIthreads\fR 4 .IX Item "--threads-max=threads" Sets the maximum number of threads allowed for compressors that support multi-threaded operations (since dpkg 1.21.9). .IP \fB\-\-root\-owner\-group\fR 4 .IX Item "--root-owner-group" Set the owner and group for each entry in the filesystem tree data to root with id 0 (since dpkg 1.19.0). .Sp \&\fBNote\fR: This option can be useful for rootless builds (see \&\fIrootless\-builds.txt\fR), but should \fBnot\fR 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. .IP \fB\-\-deb\-format=\fR\fIformat\fR 4 .IX Item "--deb-format=format" Set the archive format version used when building (since dpkg 1.17.0). Allowed values are \fB2.0\fR for the new format, and \fB0.939000\fR for the old one (default is \fB2.0\fR). .Sp 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. .IP \fB\-\-nocheck\fR 4 .IX Item "--nocheck" Inhibits \&\fBdpkg-deb \-\-build\fR's usual checks on the proposed contents of an archive. You can build any archive you want, no matter how broken, this way. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 .IX Item "-v, --verbose" Enables verbose output (since dpkg 1.16.1). This currently only affects \fB\-\-extract\fR making it behave like \&\fB\-\-vextract\fR. .IP "\fB\-D\fR, \fB\-\-debug\fR" 4 .IX Item "-D, --debug" Enables debugging output. This is not very interesting. .SH "EXIT STATUS" .IX Header "EXIT STATUS" .IP \fB0\fR 4 .IX Item "0" The requested action was successfully performed. .IP \fB2\fR 4 .IX Item "2" Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to the database, memory allocations, etc. .SH ENVIRONMENT .IX Header "ENVIRONMENT" .IP \fBDPKG_DEB_THREADS_MAX\fR 4 .IX Item "DPKG_DEB_THREADS_MAX" Sets the maximum number of threads allowed for compressors that support multi-threaded operations (since dpkg 1.21.9). .Sp The \fB\-\-threads\-max\fR option overrides this value. .IP \fBDPKG_DEB_COMPRESSOR_TYPE\fR 4 .IX Item "DPKG_DEB_COMPRESSOR_TYPE" Sets the compressor type to use (since dpkg 1.21.10). .Sp The \fB\-Z\fR option overrides this value. .IP \fBDPKG_DEB_COMPRESSOR_LEVEL\fR 4 .IX Item "DPKG_DEB_COMPRESSOR_LEVEL" Sets the compressor level to use (since dpkg 1.21.10). .Sp The \fB\-z\fR option overrides this value. .IP \fBDPKG_COLORS\fR 4 .IX Item "DPKG_COLORS" Sets the color mode (since dpkg 1.18.5). The currently accepted values are: \fBauto\fR (default), \fBalways\fR and \&\fBnever\fR. .IP \fBTMPDIR\fR 4 .IX Item "TMPDIR" If set, \fBdpkg-deb\fR will use it as the directory in which to create temporary files and directories. .IP \fBSOURCE_DATE_EPOCH\fR 4 .IX Item "SOURCE_DATE_EPOCH" If set, it will be used as the timestamp (as seconds since the epoch) in the \fBdeb\fR\|(5)'s \fBar\fR\|(5) container and used to clamp the mtime in the \fBtar\fR\|(5) file entries. .SH NOTES .IX Header "NOTES" Do not attempt to use just \&\fBdpkg-deb\fR to install software! You must use \&\fBdpkg\fR proper to ensure that all the files are correctly placed and the package's scripts run and its status and contents recorded. .SH SECURITY .IX Header "SECURITY" Examining untrusted package archives or extracting them into staging directories should be considered a security boundary, and any breakage of that boundary stemming from these operations should be considered a security vulnerability. But handling untrusted package archives should not be done lightly, as the surface area includes any compression library supported, in addition to the archive formats and control files themselves. Performing these operations over untrusted data as root is strongly discouraged. .PP Building package archives should only be performed over trusted data. .SH BUGS .IX Header "BUGS" \&\fBdpkg-deb \-I\fR \&\fIpackage1\fR\fB.deb\fR \&\fIpackage2\fR\fB.deb\fR does the wrong thing. .PP There is no authentication on \&\fB.deb\fR files; in fact, there isn't even a straightforward checksum. (Higher level tools like APT support authenticating \fB.deb\fR 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.) .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fI/usr/share/doc/dpkg/spec/rootless\-builds.txt\fR, \&\fBdeb\fR\|(5), \&\fBdeb\-control\fR\|(5), \&\fBdpkg\fR\|(1), \&\fBdselect\fR\|(1).