deb-control.5 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. .\" Author: Raul Miller
  2. .\" Includes text from the debian Guidelines by Ian Jackson, Ian Murdock
  3. .TH deb\-control 5 "2007-08-31" "Debian Project" "Debian"
  4. .SH NAME
  5. deb\-control \- Debian packages' master control file format
  6. .
  7. .SH SYNOPSIS
  8. control
  9. .
  10. .SH DESCRIPTION
  11. Each Debian package contains the master `control' file, which contains
  12. a number of fields, or comments when the line starts with \fB'#'\fP. Each
  13. field begins with a tag, such as
  14. .B Package
  15. or
  16. .B Version
  17. (case insensitive), followed by a colon, and the body of the field.
  18. Fields are delimited only by field tags. In other words, field text
  19. may be multiple lines in length, but the installation tools will
  20. generally join lines when processing the body of the field (except
  21. in the case of the
  22. .B Description
  23. field, see below).
  24. .
  25. .SH REQUIRED FIELDS
  26. .TP
  27. .BR Package: " <package name>"
  28. The value of this field determines the package name, and is used to
  29. generate file names by most installation tools.
  30. .TP
  31. .BR Version: " <version string>"
  32. Typically, this is the original package's version number in whatever form
  33. the program's author uses. It may also include a Debian revision number
  34. (for non-native packages). If both version and revision are supplied,
  35. they are separated by a hyphen, `-'. For this reason, the original version
  36. may not have a hyphen in its version number.
  37. .TP
  38. .BR Maintainer: " <fullname email>"
  39. Should be in the format `Joe Bloggs <jbloggs@foo.com>', and is typically
  40. the person who created the package, as opposed to the author of the
  41. software that was packaged.
  42. .TP
  43. .BR Description: " <short description>"
  44. .BR " " "<long description>"
  45. .br
  46. The format for the package description is a short brief summary on the
  47. first line (after the "Description" field). The following lines should be
  48. used as a longer, more detailed description. Each line of the long description
  49. must be preceded by a space, and blank lines in the long description must
  50. contain a single '.' following the preceding space.
  51. .
  52. .SH OPTIONAL FIELDS
  53. .TP
  54. .BR Section: " <section>"
  55. This is a general field that gives the package a category based on the
  56. software that it installs. Some common sections are `utils', `net',
  57. `mail', `text', `x11' etc.
  58. .TP
  59. .BR Priority: " <priority>"
  60. Sets the importance of this package in relation to the system as a whole.
  61. Common priorities are `required', `standard', `optional', `extra' etc.
  62. .LP
  63. In Debian, the
  64. .B Section
  65. and
  66. .B Priority
  67. fields have a defined set of accepted values based on the Policy Manual.
  68. They are used to decide how the packages are layed out in the archive.
  69. A list of these values can be obtained from the latest version of the
  70. .B debian-policy
  71. package.
  72. .TP
  73. .BR Essential: " <yes|no>"
  74. This field is usually only needed when the answer is `yes'. It denotes
  75. a package that is required for proper operation of the system. Dpkg
  76. or any other installation tool will not allow an
  77. .B Essential
  78. package to be removed (at least not without using one of the force options).
  79. .TP
  80. .BR Architecture: " <arch|all>"
  81. The architecture specifies which type of hardware this package was compiled
  82. for. Common architectures are `i386', `m68k', `sparc', `alpha', `powerpc'
  83. etc. Note that the
  84. .B all
  85. option is meant for packages that are architecture independent. Some examples
  86. of this are shell and Perl scripts, and documentation.
  87. .TP
  88. .BR Homepage: " <url>"
  89. The upstream project home page URL.
  90. .TP
  91. .BR Tag: " <tag list>"
  92. List of tags describing the qualities of the package. The description and
  93. list of supported tags can be found in the \fBdebtags\fP package.
  94. .TP
  95. .BR Source: " <source name>"
  96. The name of the source package that this binary package came from, if
  97. different than the name of the package itself.
  98. .TP
  99. .BR Depends: " <package list>"
  100. List of packages that are required for this package to provide a
  101. non-trivial amount of functionality. The package maintenance software
  102. will not allow a package to be installed if the packages listed in its
  103. .B Depends
  104. field aren't installed (at least not without using the force options),
  105. and will run the postinst scripts of packages listed in Depends: fields
  106. before those of the packages which depend on them, and run prerm scripts
  107. before.
  108. .TP
  109. .BR Pre-Depends: " <package list>"
  110. List of packages that must be installed
  111. .B and
  112. configured before this one can be installed. This is usually used in the
  113. case where this package requires another package for running its preinst
  114. script.
  115. .TP
  116. .BR Recommends: " <package list>"
  117. Lists packages that would be found together with this one in all but
  118. unusual installations. The package maintenance software will warn the
  119. user if they install a package without those listed in its
  120. .B Recommends
  121. field.
  122. .TP
  123. .BR Suggests: " <package list>"
  124. Lists packages that are related to this one and can perhaps enhance
  125. its usefulness, but without which installing this package is perfectly
  126. reasonable.
  127. .LP
  128. The syntax of
  129. .BR Depends ,
  130. .BR Pre-Depends ,
  131. .B Recommends
  132. and
  133. .B Suggests
  134. fields is a list of groups of alternative packages. Each group is a list
  135. of packages separated by vertical bar (or `pipe') symbols, `|'. The
  136. groups are separated by commas. Commas are to be read as `AND', and pipes
  137. as `OR', with pipes binding more tightly. Each package name is
  138. optionally followed by a version number specification in parentheses.
  139. .LP
  140. A version number may start with a `>>', in which case any later version
  141. will match, and may specify or omit the Debian packaging revision (separated
  142. by a hyphen). Accepted version relationships are ">>" for greater than,
  143. "<<" for less than, ">=" for greater than or equal to, "<=" for less than
  144. or equal to, and "=" for equal to.
  145. .TP
  146. .BR Breaks: " <package list>"
  147. Lists packages that this one breaks, for example by exposing bugs
  148. when the named packages rely on this one. The package maintenance
  149. software will not allow broken packages to be configured; generally
  150. the resolution is to upgrade the packages named in a
  151. .B Breaks
  152. field.
  153. .TP
  154. .BR Conflicts: " <package list>"
  155. Lists packages that conflict with this one, for example by containing
  156. files with the same names. The package maintenance software will not
  157. allow conflicting packages to be installed at the same time. Two
  158. conflicting packages should each include a
  159. .B Conflicts
  160. line mentioning the other.
  161. .TP
  162. .BR Replaces: " <package list>"
  163. List of packages files from which this one replaces. This is used for
  164. allowing this package to overwrite the files of another package and
  165. is usually used with the
  166. .B Conflicts
  167. field to force removal of the other package, if this one also has the
  168. same files as the conflicted package.
  169. .TP
  170. .BR Provides: " <package list>"
  171. This is a list of virtual packages that this one provides. Usually this is
  172. used in the case of several packages all providing the same service.
  173. For example, sendmail and exim can serve as a mail server, so they
  174. provide a common package (`mail-transport-agent') on which other packages
  175. can depend. This will allow sendmail or exim to serve as a valid option
  176. to satisfy the dependency. This prevents the packages that depend on a mail
  177. server from having to know the package names for all of them, and using
  178. `|' to separate the list.
  179. .LP
  180. The syntax of
  181. .BR Conflicts ,
  182. .B Replaces
  183. and
  184. .B Provides
  185. is a list of package names, separated by commas (and optional whitespace).
  186. In the
  187. .B Conflicts
  188. field, the comma should be read as `OR'. An optional version can also be
  189. given with the same syntax as above for the
  190. .B Conflicts
  191. and
  192. .B Replaces
  193. fields.
  194. .
  195. .SH EXAMPLE
  196. .\" .RS
  197. .nf
  198. # Comment
  199. Package: grep
  200. Essential: yes
  201. Priority: required
  202. Section: base
  203. Maintainer: Wichert Akkerman <wakkerma@debian.org>
  204. Architecture: sparc
  205. Version: 2.4-1
  206. Pre-Depends: libc6 (>= 2.0.105)
  207. Provides: rgrep
  208. Conflicts: rgrep
  209. Description: GNU grep, egrep and fgrep.
  210. The GNU family of grep utilities may be the "fastest grep in the west".
  211. GNU grep is based on a fast lazy-state deterministic matcher (about
  212. twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper
  213. search for a fixed string that eliminates impossible text from being
  214. considered by the full regexp matcher without necessarily having to
  215. look at every character. The result is typically many times faster
  216. than Unix grep or egrep. (Regular expressions containing backreferencing
  217. will run more slowly, however).
  218. .fi
  219. .\" .RE
  220. .
  221. .SH SEE ALSO
  222. .BR deb (5),
  223. .BR debtags (1),
  224. .BR dpkg (1),
  225. .BR dpkg-deb (1).