dpkg-deb.1 7.7 KB

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