dpkg-deb.1 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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 <http://www.gnu.org/licenses/>.
  20. .
  21. .TH dpkg\-deb 1 "2012-05-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) and \fIextreme\fP for xz.
  212. .TP
  213. .BI \-Z compress-type
  214. Specify which compression type to use when building a package. Allowed
  215. values are \fIgzip\fP, \fIxz\fP, \fIbzip2\fP, \fIlzma\fP, and \fInone\fP
  216. (default is \fIgzip\fP).
  217. .TP
  218. .BR \-\-new
  219. Ensures that
  220. .B dpkg\-deb
  221. builds a `new' format archive. This is the default.
  222. .TP
  223. .BR \-\-old
  224. Forces
  225. .B dpkg\-deb
  226. to build an `old' format archive. This old archive format is less
  227. easily parsed by non-Debian tools and is now obsolete; its only use is
  228. when building packages to be parsed by versions of dpkg older than
  229. 0.93.76 (September 1995), which was released as i386 a.out only.
  230. .TP
  231. .BR \-\-nocheck
  232. Inhibits
  233. .BR "dpkg\-deb \-\-build" 's
  234. usual checks on the proposed contents of an archive. You can build
  235. any archive you want, no matter how broken, this way.
  236. .TP
  237. .BR \-v ", " \-\-verbose
  238. Enables verbose output. This currently only affects \fB\-\-extract\fP making
  239. it behave like \fB\-\-vextract\fP.
  240. .TP
  241. .BR \-D ", " \-\-debug
  242. Enables debugging output. This is not very interesting.
  243. .
  244. .SH ENVIRONMENT
  245. .TP
  246. .B TMPDIR
  247. If set, \fBdpkg\-deb\fP will use it as the directory in which to create
  248. temporary files and directories.
  249. .
  250. .SH BUGS
  251. .B dpkg\-deb \-I
  252. .IB package1 .deb
  253. .IB package2 .deb
  254. does the wrong thing.
  255. There is no authentication on
  256. .B .deb
  257. files; in fact, there isn't even a straightforward checksum.
  258. (Higher level tools like APT support authenticating \fB.deb\fP packages
  259. retrieved from a given repository, and most packages nowadays provide an
  260. md5sum control file generated by debian/rules. Though this is not directly
  261. supported by the lower level tools.)
  262. Do not attempt to use just
  263. .B dpkg\-deb
  264. to install software! You must use
  265. .B dpkg
  266. proper to ensure that all the files are correctly placed and the
  267. package's scripts run and its status and contents recorded.
  268. .
  269. .SH SEE ALSO
  270. .BR deb (5),
  271. .BR deb\-control (5),
  272. .BR dpkg (1),
  273. .BR dselect (1).