dpkg-deb.1 7.1 KB

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