dpkg-deb.1 10 KB

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