dpkg-deb.1 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. .\" dpkg manual page - dpkg-deb(1)
  2. .\"
  3. .\" Copyright © 1995-1996 Ian Jackson <ian@chiark.chu.cam.ac.uk>
  4. .\" Copyright © 1999 Wichert Akkerman <wakkerma@debian.org>
  5. .\" Copyright © 2006 Frank Lichtenheld <djpig@debian.org>
  6. .\" Copyright © 2007-2012 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 "2013-03-27" "Debian Project" "dpkg suite"
  22. .SH NAME
  23. dpkg\-deb \- Debian package archive (.deb) manipulation tool
  24. .
  25. .SH SYNOPSIS
  26. .B dpkg\-deb
  27. .RI [ option "...] " command
  28. .
  29. .SH DESCRIPTION
  30. .B dpkg\-deb
  31. packs, unpacks and provides information about Debian archives.
  32. .PP
  33. Use
  34. .B dpkg
  35. to install and remove packages from your system.
  36. .PP
  37. You can also invoke
  38. .B dpkg\-deb
  39. by calling
  40. .B dpkg
  41. with whatever options you want to pass to
  42. .BR dpkg\-deb ". " dpkg
  43. will spot that you wanted
  44. .B dpkg\-deb
  45. and run it for you.
  46. .
  47. .SH COMMANDS
  48. .TP
  49. .BR \-b ", " \-\-build " \fIdirectory\fP [\fIarchive\fP|\fIdirectory\fP]"
  50. Creates a debian archive from the filesystem tree stored in
  51. .IR directory ". " directory
  52. must have a
  53. .B DEBIAN
  54. subdirectory, which contains the control information files such
  55. as the control file itself. This directory will
  56. .I not
  57. appear in the binary package's filesystem archive, but instead
  58. the files in it will be put in the binary package's control
  59. information area.
  60. Unless you specify
  61. .BR \-\-nocheck ", " dpkg\-deb "
  62. will read
  63. .B DEBIAN/control
  64. and parse it. It will check it for syntax errors and other problems,
  65. and display the name of the binary package being built.
  66. .B dpkg\-deb
  67. will also check the permissions of the maintainer scripts and other
  68. files found in the
  69. .B DEBIAN
  70. control information directory.
  71. If no
  72. .I archive
  73. is specified then
  74. .B dpkg\-deb
  75. will write the package into the file
  76. .IR directory \fB.deb\fR.
  77. If the archive to be created already exists it will be overwritten.
  78. If the second argument is a directory then
  79. .B dpkg\-deb
  80. will write to the file
  81. .IB package _ version _ arch .deb\fR,
  82. or
  83. .IB package _ version .deb
  84. if no
  85. .B Architecture
  86. field is present in the package control file. When a target directory
  87. is specified, rather than a file, the
  88. .B \-\-nocheck
  89. option may not be used (since
  90. .B dpkg\-deb
  91. needs to read and parse the package control file to determine which
  92. filename to use).
  93. .TP
  94. .BR \-I ", " \-\-info " \fIarchive\fP [\fIcontrol-file-name\fP...]"
  95. Provides information about a binary package archive.
  96. If no
  97. .IR control-file-name s
  98. are specified then it will print a summary of the contents of the
  99. package as well as its control file.
  100. If any
  101. .IR control-file-name s
  102. are specified then
  103. .B dpkg\-deb
  104. will print them in the order they were specified; if any of the
  105. components weren't present it will print an error message to stderr
  106. about each one and exit with status 2.
  107. .TP
  108. .BR \-W ", " \-\-show " \fIarchive\fP"
  109. Provides information about a binary package archive in the format
  110. specified by the
  111. .B \-\-showformat
  112. argument. The default format displays the package's name and version
  113. on one line, separated by a tabulator.
  114. .TP
  115. .BR \-f ", " \-\-field " \fIarchive\fP [\fIcontrol-field-name\fP...]"
  116. Extracts control file information from a binary package archive.
  117. If no
  118. .BR control\-file\-field s
  119. are specified then it will print the whole control file.
  120. If any are specified then
  121. .B dpkg\-deb
  122. will print their contents, in the order in which they appear in the
  123. control file. If more than one
  124. .BR control\-file\-field
  125. is specified then
  126. .B dpkg\-deb
  127. will precede each with its field name (and a colon and space).
  128. No errors are reported for fields requested but not found.
  129. .TP
  130. .BR \-c ", " \-\-contents " \fIarchive\fP"
  131. Lists the contents of the filesystem tree archive portion of the
  132. package archive. It is currently produced in the format generated by
  133. .BR tar 's
  134. verbose listing.
  135. .TP
  136. .BR \-x ", " \-\-extract " \fIarchive directory\fP"
  137. Extracts the filesystem tree from a package archive into the specified
  138. directory.
  139. Note that extracting a package to the root directory will
  140. .I not
  141. result in a correct installation! Use
  142. .B dpkg
  143. to install packages.
  144. .I directory
  145. (but not its parents) will be created if necessary, and its permissions
  146. modified to match the contents of the package.
  147. .TP
  148. .BR \-X ", " \-\-vextract " \fIarchive directory\fP"
  149. Is like
  150. .BR \-\-extract " (" \-x ")"
  151. with
  152. .BR \-\-verbose " (" \-v ")"
  153. which prints a listing of the files extracted as it goes.
  154. .TP
  155. .BR \-R ", " \-\-raw\-extract " \fIarchive directory\fP"
  156. Extracts the filesystem tree from a package archive into a specified
  157. directory, and the control information files into a DEBIAN subdirectory
  158. of the specified directory.
  159. The target directory (but not its parents) will be created if necessary.
  160. .TP
  161. .BR \-\-fsys\-tarfile " \fIarchive\fP"
  162. Extracts the filesystem tree data from a binary package and sends it
  163. to standard output in
  164. .B tar
  165. format. Together with
  166. .BR tar (1)
  167. this can be used to extract a particular file from a package archive.
  168. The input archive will always be processed sequentially.
  169. .TP
  170. .BR \-e ", " \-\-control " \fIarchive\fP [\fIdirectory\fP]"
  171. Extracts the control information files from a package archive into the
  172. specified directory.
  173. If no directory is specified then a subdirectory
  174. .B DEBIAN
  175. in the current directory is used.
  176. The target directory (but not its parents) will be created if
  177. necessary.
  178. .TP
  179. .BR \-? ", " \-\-help
  180. Show the usage message and exit.
  181. .TP
  182. .BR \-\-version
  183. Show the version and exit.
  184. .
  185. .SH OPTIONS
  186. .TP
  187. \fB\-\-showformat=\fP\fIformat\fR
  188. This option is used to specify the format of the output \fB\-\-show\fP
  189. will produce. The format is a string that will be output for each package
  190. listed.
  191. The string may reference any status field using the
  192. "${\fIfield-name\fR}" form, a list of the valid fields can be easily
  193. produced using
  194. .B \-I
  195. on the same package. A complete explanation of the formatting options
  196. (including escape sequences and field tabbing) can be found in the
  197. explanation of the \fB\-\-showformat\fP option in
  198. .BR dpkg\-query (1).
  199. The default for this field is "${Package}\\t${Version}\\n".
  200. .TP
  201. .BI \-z compress-level
  202. Specify which compression level to use on the compressor backend, when
  203. building a package (default is 9 for gzip and bzip2, 6 for xz and lzma).
  204. The accepted values are 0-9 with: 0 being mapped to compressor none for
  205. gzip and 0 mapped to 1 for bzip2. Before dpkg 1.16.2 level 0 was
  206. equivalent to compressor none for all compressors.
  207. .TP
  208. .BI \-S compress-strategy
  209. Specify which compression strategy to use on the compressor backend, when
  210. building a package (since dpkg 1.16.2). Allowed values are \fInone\fP (since
  211. dpkg 1.16.4), \fIfiltered\fP, \fIhuffman\fP, \fIrle\fP and \fIfixed\fP for
  212. gzip (since dpkg 1.17.0) and \fIextreme\fP for xz.
  213. .TP
  214. .BI \-Z compress-type
  215. Specify which compression type to use when building a package. Allowed
  216. values are \fIgzip\fP, \fIxz\fP, \fIbzip2\fP (deprecated), \fIlzma\fP
  217. (deprecated), and \fInone\fP (default is \fIxz\fP).
  218. .TP
  219. .B \-\-uniform\-compression
  220. Specify that the same compression parameters should be used for all archive
  221. members (i.e. \fBcontrol.tar\fP and \fBdata.tar\fP). Otherwise only the
  222. \fBdata.tar\fP member will use those parameters. The only supported
  223. compression types allowed to be uniformly used are \fInone\fP, \fIgzip\fP
  224. and \fIxz\fP.
  225. .TP
  226. .BI \-\-deb\-format= format
  227. Set the archive format version used when building (since dpkg 1.17.0).
  228. Allowed values are \fI2.0\fP for the new format, and \fI0.939000\fP
  229. for the old one (default is \fI2.0\fP).
  230. The old archive format is less easily parsed by non-Debian tools and is
  231. now obsolete; its only use is when building packages to be parsed by
  232. versions of dpkg older than 0.93.76 (September 1995), which was released
  233. as i386 a.out only.
  234. .TP
  235. .BR \-\-new
  236. This is a legacy alias for \fB\-\-deb\-format=2.0\fP.
  237. .TP
  238. .BR \-\-old
  239. This is a legacy alias for \fB\-\-deb\-format=0.939000\fP.
  240. .TP
  241. .BR \-\-nocheck
  242. Inhibits
  243. .BR "dpkg\-deb \-\-build" 's
  244. usual checks on the proposed contents of an archive. You can build
  245. any archive you want, no matter how broken, this way.
  246. .TP
  247. .BR \-v ", " \-\-verbose
  248. Enables verbose output. This currently only affects \fB\-\-extract\fP making
  249. it behave like \fB\-\-vextract\fP.
  250. .TP
  251. .BR \-D ", " \-\-debug
  252. Enables debugging output. This is not very interesting.
  253. .
  254. .SH ENVIRONMENT
  255. .TP
  256. .B TMPDIR
  257. If set, \fBdpkg\-deb\fP will use it as the directory in which to create
  258. temporary files and directories.
  259. .
  260. .SH NOTES
  261. Do not attempt to use just
  262. .B dpkg\-deb
  263. to install software! You must use
  264. .B dpkg
  265. proper to ensure that all the files are correctly placed and the
  266. package's scripts run and its status and contents recorded.
  267. .
  268. .SH BUGS
  269. .B dpkg\-deb \-I
  270. .IB package1 .deb
  271. .IB package2 .deb
  272. does the wrong thing.
  273. There is no authentication on
  274. .B .deb
  275. files; in fact, there isn't even a straightforward checksum.
  276. (Higher level tools like APT support authenticating \fB.deb\fP packages
  277. retrieved from a given repository, and most packages nowadays provide an
  278. md5sum control file generated by debian/rules. Though this is not directly
  279. supported by the lower level tools.)
  280. .
  281. .SH SEE ALSO
  282. .BR deb (5),
  283. .BR deb\-control (5),
  284. .BR dpkg (1),
  285. .BR dselect (1).