dpkg-deb.man 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. .\" dpkg manual page - dpkg-deb(1)
  2. .\"
  3. .\" Copyright © 1995-1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
  4. .\" Copyright © 1999 Wichert Akkerman <wakkerma@debian.org>
  5. .\" Copyright © 2006 Frank Lichtenheld <djpig@debian.org>
  6. .\" Copyright © 2007-2015 Guillem Jover <guillem@debian.org>
  7. .\"
  8. .\" This is free software; you can redistribute it and/or modify
  9. .\" it under the terms of the GNU General Public License as published by
  10. .\" the Free Software Foundation; either version 2 of the License, or
  11. .\" (at your option) any later version.
  12. .\"
  13. .\" This is distributed in the hope that it will be useful,
  14. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. .\" GNU General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU General Public License
  19. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. .
  21. .TH dpkg\-deb 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
  22. .nh
  23. .SH NAME
  24. dpkg\-deb \- Debian package archive (.deb) manipulation tool
  25. .
  26. .SH SYNOPSIS
  27. .B dpkg\-deb
  28. .RI [ option "...] " command
  29. .
  30. .SH DESCRIPTION
  31. .B dpkg\-deb
  32. packs, unpacks and provides information about Debian archives.
  33. .PP
  34. Use
  35. .B dpkg
  36. to install and remove packages from your system.
  37. .PP
  38. You can also invoke
  39. .B dpkg\-deb
  40. by calling
  41. .B dpkg
  42. with whatever options you want to pass to
  43. .BR dpkg\-deb ". " dpkg
  44. will spot that you wanted
  45. .B dpkg\-deb
  46. and run it for you.
  47. .PP
  48. For most commands taking an input archive argument, the archive can be
  49. read from standard input if the archive name is given as a single minus
  50. character («\fB\-\fP»); otherwise lack of support will be documented in
  51. their respective command description.
  52. .
  53. .SH COMMANDS
  54. .TP
  55. .BR \-b ", " \-\-build " \fIbinary-directory\fP [\fIarchive\fP|\fIdirectory\fP]"
  56. Creates a debian archive from the filesystem tree stored in
  57. .IR binary-directory ". " binary-directory
  58. must have a
  59. .B DEBIAN
  60. subdirectory, which contains the control information files such
  61. as the control file itself. This directory will
  62. .I not
  63. appear in the binary package's filesystem archive, but instead
  64. the files in it will be put in the binary package's control
  65. information area.
  66. Unless you specify
  67. .BR \-\-nocheck ", " dpkg\-deb "
  68. will read
  69. .B DEBIAN/control
  70. and parse it. It will check the file for syntax errors and other problems,
  71. and display the name of the binary package being built.
  72. .B dpkg\-deb
  73. will also check the permissions of the maintainer scripts and other
  74. files found in the
  75. .B DEBIAN
  76. control information directory.
  77. If no
  78. .I archive
  79. is specified then
  80. .B dpkg\-deb
  81. will write the package into the file
  82. .IR binary-directory \fB.deb\fR.
  83. If the archive to be created already exists it will be overwritten.
  84. If the second argument is a directory then
  85. .B dpkg\-deb
  86. will write to the file
  87. .IB directory / package _ version _ arch .deb.
  88. When a target directory is specified, rather than a file, the
  89. .B \-\-nocheck
  90. option may not be used (since
  91. .B dpkg\-deb
  92. needs to read and parse the package control file to determine which
  93. filename to use).
  94. .TP
  95. .BR \-I ", " \-\-info " \fIarchive\fP [\fIcontrol-file-name\fP...]"
  96. Provides information about a binary package archive.
  97. If no
  98. .IR control-file-name s
  99. are specified then it will print a summary of the contents of the
  100. package as well as its control file.
  101. If any
  102. .IR control-file-name s
  103. are specified then
  104. .B dpkg\-deb
  105. will print them in the order they were specified; if any of the
  106. components weren't present it will print an error message to stderr
  107. about each one and exit with status 2.
  108. .TP
  109. .BR \-W ", " \-\-show " \fIarchive\fP"
  110. Provides information about a binary package archive in the format
  111. specified by the
  112. .B \-\-showformat
  113. argument. The default format displays the package's name and version
  114. on one line, separated by a tabulator.
  115. .TP
  116. .BR \-f ", " \-\-field " \fIarchive\fP [\fIcontrol-field-name\fP...]"
  117. Extracts control file information from a binary package archive.
  118. If no
  119. .IR control-field-name s
  120. are specified then it will print the whole control file.
  121. If any are specified then
  122. .B dpkg\-deb
  123. will print their contents, in the order in which they appear in the
  124. control file. If more than one
  125. .IR control-field-name
  126. is specified then
  127. .B dpkg\-deb
  128. will precede each with its field name (and a colon and space).
  129. No errors are reported for fields requested but not found.
  130. .TP
  131. .BR \-c ", " \-\-contents " \fIarchive\fP"
  132. Lists the contents of the filesystem tree archive portion of the
  133. package archive. It is currently produced in the format generated by
  134. .BR tar 's
  135. verbose listing.
  136. .TP
  137. .BR \-x ", " \-\-extract " \fIarchive directory\fP"
  138. Extracts the filesystem tree from a package archive into the specified
  139. directory.
  140. Note that extracting a package to the root directory will
  141. .I not
  142. result in a correct installation! Use
  143. .B dpkg
  144. to install packages.
  145. .I directory
  146. (but not its parents) will be created if necessary, and its permissions
  147. modified to match the contents of the package.
  148. .TP
  149. .BR \-X ", " \-\-vextract " \fIarchive directory\fP"
  150. Is like
  151. .BR \-\-extract " (" \-x ")"
  152. with
  153. .BR \-\-verbose " (" \-v ")"
  154. which prints a listing of the files extracted as it goes.
  155. .TP
  156. .BR \-R ", " \-\-raw\-extract " \fIarchive directory\fP"
  157. Extracts the filesystem tree from a package archive into a specified
  158. directory, and the control information files into a
  159. .B DEBIAN
  160. subdirectory of the specified directory (since dpkg 1.16.1).
  161. The target directory (but not its parents) will be created if necessary.
  162. The input archive is not (currently) processed sequentially, so reading
  163. it from standard input («\fB-\fP») is \fBnot\fP supported.
  164. .TP
  165. .BR \-\-ctrl\-tarfile " \fIarchive\fP"
  166. Extracts the control data from a binary package and sends it to standard
  167. output in
  168. .B tar
  169. format (since dpkg 1.17.14). Together with
  170. .BR tar (1)
  171. this can be used to extract a particular control file from a package archive.
  172. The input archive will always be processed sequentially.
  173. .TP
  174. .BR \-\-fsys\-tarfile " \fIarchive\fP"
  175. Extracts the filesystem tree data from a binary package and sends it
  176. to standard output in
  177. .B tar
  178. format. Together with
  179. .BR tar (1)
  180. this can be used to extract a particular file from a package archive.
  181. The input archive will always be processed sequentially.
  182. .TP
  183. .BR \-e ", " \-\-control " \fIarchive\fP [\fIdirectory\fP]"
  184. Extracts the control information files from a package archive into the
  185. specified directory.
  186. If no directory is specified then a subdirectory
  187. .B DEBIAN
  188. in the current directory is used.
  189. The target directory (but not its parents) will be created if
  190. necessary.
  191. .TP
  192. .BR \-? ", " \-\-help
  193. Show the usage message and exit.
  194. .TP
  195. .BR \-\-version
  196. Show the version and exit.
  197. .
  198. .SH OPTIONS
  199. .TP
  200. \fB\-\-showformat=\fP\fIformat\fR
  201. This option is used to specify the format of the output \fB\-\-show\fP
  202. will produce. The format is a string that will be output for each package
  203. listed.
  204. The string may reference any status field using the
  205. “${\fIfield-name\fR}” form, a list of the valid fields can be easily
  206. produced using
  207. .B \-I
  208. on the same package. A complete explanation of the formatting options
  209. (including escape sequences and field tabbing) can be found in the
  210. explanation of the \fB\-\-showformat\fP option in
  211. .BR dpkg\-query (1).
  212. The default for this field is “${Package}\\t${Version}\\n”.
  213. .TP
  214. .BI \-z compress-level
  215. Specify which compression level to use on the compressor backend, when
  216. building a package (default is 9 for gzip, 6 for xz).
  217. The accepted values are 0-9 with: 0 being mapped to compressor none for gzip.
  218. Before dpkg 1.16.2 level 0 was equivalent to compressor none for all
  219. compressors.
  220. .TP
  221. .BI \-S compress-strategy
  222. Specify which compression strategy to use on the compressor backend, when
  223. building a package (since dpkg 1.16.2). Allowed values are \fBnone\fP (since
  224. dpkg 1.16.4), \fBfiltered\fP, \fBhuffman\fP, \fBrle\fP and \fBfixed\fP for
  225. gzip (since dpkg 1.17.0) and \fBextreme\fP for xz.
  226. .TP
  227. .BI \-Z compress-type
  228. Specify which compression type to use when building a package.
  229. Allowed values are \fBgzip\fP, \fBxz\fP (since dpkg 1.15.6),
  230. and \fBnone\fP (default is \fBxz\fP).
  231. .TP
  232. .B \-\-uniform\-compression
  233. Specify that the same compression parameters should be used for all archive
  234. members (i.e. \fBcontrol.tar\fP and \fBdata.tar\fP; since dpkg 1.17.6).
  235. Otherwise only the
  236. \fBdata.tar\fP member will use those parameters. The only supported
  237. compression types allowed to be uniformly used are \fBnone\fP, \fBgzip\fP
  238. and \fBxz\fP.
  239. .TP
  240. .BI \-\-deb\-format= format
  241. Set the archive format version used when building (since dpkg 1.17.0).
  242. Allowed values are \fB2.0\fP for the new format, and \fB0.939000\fP
  243. for the old one (default is \fB2.0\fP).
  244. The old archive format is less easily parsed by non-Debian tools and is
  245. now obsolete; its only use is when building packages to be parsed by
  246. versions of dpkg older than 0.93.76 (September 1995), which was released
  247. as i386 a.out only.
  248. .TP
  249. .BR \-\-nocheck
  250. Inhibits
  251. .BR "dpkg\-deb \-\-build" 's
  252. usual checks on the proposed contents of an archive. You can build
  253. any archive you want, no matter how broken, this way.
  254. .TP
  255. .BR \-v ", " \-\-verbose
  256. Enables verbose output (since dpkg 1.16.1).
  257. This currently only affects \fB\-\-extract\fP making it behave like
  258. \fB\-\-vextract\fP.
  259. .TP
  260. .BR \-D ", " \-\-debug
  261. Enables debugging output. This is not very interesting.
  262. .
  263. .SH EXIT STATUS
  264. .TP
  265. .B 0
  266. The requested action was successfully performed.
  267. .TP
  268. .B 2
  269. Fatal or unrecoverable error due to invalid command-line usage, or
  270. interactions with the system, such as accesses to the database,
  271. memory allocations, etc.
  272. .
  273. .SH ENVIRONMENT
  274. .TP
  275. .B TMPDIR
  276. If set, \fBdpkg\-deb\fP will use it as the directory in which to create
  277. temporary files and directories.
  278. .TP
  279. .B SOURCE_DATE_EPOCH
  280. If set, it will be used as the timestamp (as seconds since the epoch) in
  281. the \fBdeb\fP(5)'s \fBar\fP(5) container and used to clamp the mtime in
  282. the \fBtar\fP(5) file entries.
  283. .
  284. .SH NOTES
  285. Do not attempt to use just
  286. .B dpkg\-deb
  287. to install software! You must use
  288. .B dpkg
  289. proper to ensure that all the files are correctly placed and the
  290. package's scripts run and its status and contents recorded.
  291. .
  292. .SH BUGS
  293. .B dpkg\-deb \-I
  294. .IB package1 .deb
  295. .IB package2 .deb
  296. does the wrong thing.
  297. There is no authentication on
  298. .B .deb
  299. files; in fact, there isn't even a straightforward checksum.
  300. (Higher level tools like APT support authenticating \fB.deb\fP packages
  301. retrieved from a given repository, and most packages nowadays provide an
  302. md5sum control file generated by debian/rules. Though this is not directly
  303. supported by the lower level tools.)
  304. .
  305. .SH SEE ALSO
  306. .BR deb (5),
  307. .BR deb\-control (5),
  308. .BR dpkg (1),
  309. .BR dselect (1).