dpkg-deb.1 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. .TH dpkg\-deb 1 "2010-03-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. .
  157. .SH OPTIONS
  158. .TP
  159. \fB\-\-showformat=\fP\fIformat\fR
  160. This option is used to specify the format of the output \fB\-\-show\fP
  161. will produce. The format is a string that will be output for each package
  162. listed.
  163. The string may reference any status field using the
  164. "${\fIfield-name\fR}" form, a list of the valid fields can be easily
  165. produced using
  166. .B \-I
  167. on the same package. A complete explanation of the formatting options
  168. (including escape sequences and field tabbing) can be found in the
  169. explanation of the \fB\-\-showformat\fP option in
  170. .BR dpkg-query (1).
  171. The default for this field is "${Package}\\t${Version}\\n".
  172. .TP
  173. .BI \-z compress_level
  174. Specify which compression level to pass to the compressor backend program,
  175. when building a package.
  176. .TP
  177. .BI \-Z compress_type
  178. Specify which compression type to use when building a package. Allowed
  179. values are \fIgzip\fP, \fIxz\fP, \fIbzip2\fP, \fIlzma\fP, and \fInone\fP
  180. (default is \fIgzip\fP).
  181. .TP
  182. .BR \-\-new
  183. Ensures that
  184. .B dpkg\-deb
  185. builds a `new' format archive. This is the default.
  186. .TP
  187. .BR \-\-old
  188. Forces
  189. .B dpkg\-deb
  190. to build an `old' format archive. This old archive format is less
  191. easily parsed by non-Debian tools and is now obsolete; its only use is
  192. when building packages to be parsed by versions of dpkg older than
  193. 0.93.76 (September 1995), which was released as i386 a.out only.
  194. .TP
  195. .BR \-\-nocheck
  196. Inhibits
  197. .BR "dpkg\-deb \-\-build" 's
  198. usual checks on the proposed contents of an archive. You can build
  199. any archive you want, no matter how broken, this way.
  200. .TP
  201. .BR \-D ", " \-\-debug
  202. Enables debugging output. This is not very interesting.
  203. .
  204. .SH ENVIRONMENT
  205. .TP
  206. .B TMPDIR
  207. If set, \fBdpkg\-deb\fP will use it as the directory in which to create
  208. temporary files and directories.
  209. .
  210. .SH BUGS
  211. .B dpkg\-deb \-I
  212. .IB package1 .deb
  213. .IB package2 .deb
  214. does the wrong thing.
  215. There is no authentication on
  216. .B .deb
  217. files; in fact, there isn't even a straightforward checksum.
  218. (Higher level tools like APT support authenticating \fB.deb\fP packages
  219. retrieved from a given repository, and most packages nowadays provide an
  220. md5sum control file generated by debian/rules. Though this is not directly
  221. supported by the lower level tools.)
  222. Do not attempt to use just
  223. .B dpkg\-deb
  224. to install software! You must use
  225. .B dpkg
  226. proper to ensure that all the files are correctly placed and the
  227. package's scripts run and its status and contents recorded.
  228. .
  229. .SH SEE ALSO
  230. .BR deb (5),
  231. .BR deb\-control (5),
  232. .BR dpkg (1),
  233. .BR dselect (1).
  234. .
  235. .SH AUTHOR
  236. Copyright \(co 1995-1996 Ian Jackson
  237. .sp
  238. This is free software; see the GNU General Public Licence version 2 or
  239. later for copying conditions. There is NO WARRANTY.