deb-control.5.sgml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  2. <refentry id="deb-control.5">
  3. <refmeta>
  4. <refentrytitle>deb-control</refentrytitle>
  5. <manvolnum>5</manvolnum>
  6. <refmiscinfo class="source">Debian Project</refmiscinfo>
  7. <refmiscinfo class="manual">dpkg utilities</refmiscinfo>
  8. </refmeta>
  9. <refnamediv>
  10. <refname>deb-control</refname>
  11. <refpurpose>Debian packages' master control file format</refpurpose>
  12. </refnamediv>
  13. <refsynopsisdiv>
  14. <synopsis><filename>control</filename></synopsis>
  15. </refsynopsisdiv>
  16. <refsect1>
  17. <title>Description</title>
  18. <para>
  19. Each Debian package contains the master <filename>control</filename>
  20. file, which contains a number of fields. Each field begins with a tag,
  21. such as <emphasis>Package</emphasis> or <emphasis>Version</emphasis>
  22. (case insensitive), followed by a colon, and the body of the field.
  23. Fields are delimited only by field tags. In other words, field text may
  24. be multiple lines in length, but the installation tools will generally
  25. join lines when processing the body of the field (except in the case of
  26. the <emphasis>Description</emphasis> field, see below).
  27. </para>
  28. </refsect1>
  29. <refsect1>
  30. <title>Required Fields</title>
  31. <variablelist>
  32. <varlistentry>
  33. <term>
  34. <cmdsynopsis>
  35. <arg choice="plain">Package: <replaceable>package_name</replaceable></arg>
  36. </cmdsynopsis>
  37. </term>
  38. <listitem>
  39. <para>
  40. The value of this field determines the package name, and is used to
  41. generate file names by most installation tools.
  42. </para>
  43. </listitem>
  44. </varlistentry>
  45. <varlistentry>
  46. <term>
  47. <cmdsynopsis>
  48. <arg choice="plain">Version: <replaceable>version_string</replaceable></arg>
  49. </cmdsynopsis>
  50. </term>
  51. <listitem>
  52. <para>
  53. Typically, this is the original package's version number in
  54. whatever form the program's author uses. It may also include a
  55. Debian revision number (for non-native packages). If both version
  56. and revision are supplied, they are seperated by a hyphen
  57. (<keycap>-</keycap>. For this reason, the original version may not
  58. have a hyphen in its version number.
  59. </para>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry>
  63. <term>
  64. <cmdsynopsis>
  65. <arg choice="plain">Maintainer: <replaceable>fullname</replaceable> <replaceable>email</replaceable></arg>
  66. </cmdsynopsis>
  67. </term>
  68. <listitem>
  69. <para>
  70. Should be in the format `Joe Bloggs &lt;jbloggs@foo.com&gt;', and
  71. is typically the person who created the package, as opposed to the
  72. author of the software that was packaged.
  73. </para>
  74. </listitem>
  75. </varlistentry>
  76. <varlistentry>
  77. <term>
  78. <cmdsynopsis>
  79. <arg choice="plain">Description: <replaceable>short description</replaceable><sbr> <replaceable>long description</replaceable></arg>
  80. </cmdsynopsis>
  81. </term>
  82. <listitem>
  83. <para>
  84. The format for the package description is a short brief summary on
  85. the first line (after the "Description" field). The following lines
  86. can be used as a longer, more detailed description. Each line of
  87. the long description must be preceded by a space, and blank lines
  88. in the long desription must contain a single '.' following the
  89. preceding space.
  90. </para>
  91. </listitem>
  92. </varlistentry>
  93. </variablelist>
  94. </refsect1>
  95. <refsect1>
  96. <title>Optional Fields</title>
  97. <variablelist>
  98. <varlistentry>
  99. <term>
  100. <cmdsynopsis>
  101. <arg choice="plain">Section: <replaceable>section</replaceable></arg>
  102. </cmdsynopsis>
  103. </term>
  104. <listitem>
  105. <para>
  106. This is a general field that gives the package a category based on
  107. the software that it installs. Some common sections are `utils',
  108. `net', `mail', `text', `x11' etc.
  109. </para>
  110. </listitem>
  111. </varlistentry>
  112. <varlistentry>
  113. <term>
  114. <cmdsynopsis>
  115. <arg choice="plain">Priority: <replaceable>priority</replaceable></arg>
  116. </cmdsynopsis>
  117. </term>
  118. <listitem>
  119. <para>
  120. Sets the importance of this package in relation to the system as a
  121. whole. Common priorities are `required', `standard', `optional',
  122. `extra' etc.
  123. </para>
  124. </listitem>
  125. </varlistentry>
  126. </variablelist>
  127. <para>
  128. In Debian, the <emphasis>Section</emphasis> and
  129. <emphasis>Priority</emphasis> fields have a defined set of accepted
  130. values based on the Policy Manual. They are used to decide how the
  131. packages are layed out in the archive. A list of these can be
  132. obtained from the latest version of
  133. <emphasis>debian-policy</emphasis> package.
  134. </para>
  135. <variablelist>
  136. <varlistentry>
  137. <term>
  138. <cmdsynopsis>
  139. <arg choice="plain">Essential:
  140. <group choice="req">
  141. <arg>yes</arg>
  142. <arg>no</arg>
  143. </group>
  144. </arg>
  145. </cmdsynopsis>
  146. </term>
  147. <listitem>
  148. <para>
  149. This field is usually only needed when the answer is `yes'. It
  150. denotes a package that is required for proper operation of the
  151. system. <command>dpkg</command> or any other installation tool will
  152. not allow an <emphasis>Essential</emphasis> package to be removed
  153. (at least not without using one of the force options).
  154. </para>
  155. </listitem>
  156. </varlistentry>
  157. <varlistentry>
  158. <term>
  159. <cmdsynopsis>
  160. <arg choice="plain">Architecture:
  161. <group choice="req">
  162. <arg>&lt;arch&gt;</arg>
  163. <arg>all</arg>
  164. </group>
  165. </arg>
  166. </cmdsynopsis>
  167. </term>
  168. <listitem>
  169. <para>
  170. The architecture specifies which type of hardware this package was
  171. compiled for. Common architectures are `i386', `m68k', `sparc',
  172. `alpha', `powerpc' etc. Note that the <emphasis>all</emphasis>
  173. option is meant for packages that are architecture independent.
  174. Some examples of this are shell or python scripts, or
  175. documentation.
  176. </para>
  177. </listitem>
  178. </varlistentry>
  179. <varlistentry>
  180. <term>
  181. <cmdsynopsis>
  182. <arg choice="plain">Source: <replaceable>source_name</replaceable></arg>
  183. </cmdsynopsis>
  184. </term>
  185. <listitem>
  186. <para>
  187. The name of the source package that this binary package came from,
  188. if different than the name of the package itself.
  189. </para>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry>
  193. <term>
  194. <cmdsynopsis>
  195. <arg choice="plain" rep="repeat">Depends: <replaceable>package</replaceable></arg>
  196. </cmdsynopsis>
  197. </term>
  198. <listitem>
  199. <para>
  200. List of packages that are required for this package to provide a
  201. non-trivial amount of functionality. The package maintenance
  202. software will not allow a package to be installed if the packages
  203. listed in its <emphasis>Depends</emphasis> field are not installed
  204. (at least not without using the force options), and will run the
  205. postinst scripts of packages listed in Depends: fields before those
  206. of the packages which depend on them, and run prerm scripts before.
  207. </para>
  208. </listitem>
  209. </varlistentry>
  210. <varlistentry>
  211. <term>
  212. <cmdsynopsis>
  213. <arg choice="plain" rep="repeat">Pre-Depends: <replaceable>package</replaceable></arg>
  214. </cmdsynopsis>
  215. </term>
  216. <listitem>
  217. <para>
  218. List of packages that must be installed <emphasis>and</emphasis>
  219. configured before this one can be installed. This is usually used
  220. in the case where this package requires another package for running
  221. its preinst script.
  222. </para>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry>
  226. <term>
  227. <cmdsynopsis>
  228. <arg choice="plain" rep="repeat">Recommends: <replaceable>package</replaceable></arg>
  229. </cmdsynopsis>
  230. </term>
  231. <listitem>
  232. <para>
  233. Lists packages that would be found together with this one in all
  234. but unusual installations. The package maintenance software will
  235. warn the user if they install a package without those listed in its
  236. <emphasis>Recommends</emphasis> field.
  237. </para>
  238. </listitem>
  239. </varlistentry>
  240. <varlistentry>
  241. <term>
  242. <cmdsynopsis>
  243. <arg choice="plain" rep="repeat">Suggests: <replaceable>package</replaceable></arg>
  244. </cmdsynopsis>
  245. </term>
  246. <listitem>
  247. <para>
  248. Lists packages that are related to this one and can perhaps enhance
  249. its usefulness, but without which installing this package is
  250. perfectly reasonable.
  251. </para>
  252. </listitem>
  253. </varlistentry>
  254. </variablelist>
  255. <para>
  256. The syntax of <emphasis>Depends</emphasis>,
  257. <emphasis>Pre-Depends</emphasis>, <emphasis>Recommends</emphasis> and
  258. <emphasis>Suggests</emphasis> fields is a list of groups of alternative
  259. packages. Each group is a list of packages separated by vertical bar (or
  260. <keysym>pipe</keysym>) symbols, `<keycode>|</keycode>'. The groups are
  261. separated by commas. Commas are to be read as `AND', and pipes as `OR',
  262. with pipes binding more tightly. Each item is a package name optionally
  263. followed by a version number specification in parentheses.
  264. </para>
  265. <para>
  266. A version number may start with a `&gt;&gt;', in which case any later
  267. version will match, and may specify or omit the Debian packaging revision
  268. (separated by a hyphen). Accepted version relationships are "&gt;&gt;"
  269. for greater than, "&lt;&lt;" for less than, "&gt;=" for greater than or
  270. equal to, "&lt;=" for less than or equal to, and "=" for equal to.
  271. </para>
  272. <variablelist>
  273. <varlistentry>
  274. <term>
  275. <cmdsynopsis>
  276. <arg choice="plain" rep="repeat">Conflicts: <replaceable>package</replaceable></arg>
  277. </cmdsynopsis>
  278. </term>
  279. <listitem>
  280. <para>
  281. Lists packages that conflict with this one, for example by
  282. containing files with the same names. The package maintenance
  283. software will not allow conflicting packages to be installed at the
  284. same time. Two conflicting packages should each include a
  285. <emphasis>Conflicts</emphasis> line mentioning the other.
  286. </para>
  287. </listitem>
  288. </varlistentry>
  289. <varlistentry>
  290. <term>
  291. <cmdsynopsis>
  292. <arg choice="plain" rep="repeat">Replaces: <replaceable>package</replaceable></arg>
  293. </cmdsynopsis>
  294. </term>
  295. <listitem>
  296. <para>
  297. List of packages files from which this one replaces. This is used
  298. for allowing this package to overwrite the files of another package
  299. and is usually used with the <emphasis>Conflicts</emphasis> field
  300. to force removal of the other package, if this one also has the
  301. same files as the conflicted package.
  302. </para>
  303. </listitem>
  304. </varlistentry>
  305. <varlistentry>
  306. <term>
  307. <cmdsynopsis>
  308. <arg choice="plain" rep="repeat">Provides: <replaceable>package</replaceable></arg>
  309. </cmdsynopsis>
  310. </term>
  311. <listitem>
  312. <para>
  313. This is a list of virtual packages that this one provides. Usuaully
  314. this is used in the case of several packages all providing the same
  315. service. For example, sendmail and exim can can serve as a mail
  316. server, so they provide a common package (`mail-transport-agent')
  317. on which other packages can depend. This will allow sendmail or
  318. exim to serve as a valid option to satisy the dependency. This
  319. prevents the packages that depend on a mail server from having to
  320. know the package names for all of them, and using `|' to separate
  321. the list.
  322. </para>
  323. </listitem>
  324. </varlistentry>
  325. </variablelist>
  326. <para>
  327. The syntax of <emphasis>Conflicts</emphasis>,
  328. <emphasis>Replaces</emphasis> and <emphasis>Provides</emphasis> is a list
  329. of package names, separated by commas (and optional whitespace). In the
  330. <emphasis>Conflicts</emphasis> field, the comma should be read as `OR'.
  331. An optional version can also be given with the same syntax as above for
  332. the <emphasis>Conflicts</emphasis> and <emphasis>Replaces</emphasis>
  333. fields.
  334. </para>
  335. </refsect1>
  336. <refsect1><title>Example</title>
  337. <literallayout>
  338. Package: grep
  339. Essential: yes
  340. Priority: required
  341. Section: base
  342. Maintainer: Wichert Akkerman &lt;wakkerma@debian.org&gt;
  343. Architecture: sparc
  344. Version: 2.4-1
  345. Pre-Depends: libc6 (&gt;= 2.0.105)
  346. Provides: rgrep
  347. Conflicts: rgrep
  348. Description: GNU grep, egrep and fgrep.
  349. The GNU family of grep utilities may be the "fastest grep in the west".
  350. GNU grep is based on a fast lazy-state deterministic matcher (about
  351. twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper
  352. search for a fixed string that eliminates impossible text from being
  353. considered by the full regexp matcher without necessarily having to
  354. look at every character. The result is typically many times faster
  355. than Unix grep or egrep. (Regular expressions containing backreferencing
  356. will run more slowly, however.)
  357. </literallayout>
  358. </refsect1>
  359. <refsect1>
  360. <title>See Also</title>
  361. <para>
  362. <citerefentry>
  363. <refentrytitle>deb</refentrytitle>
  364. <manvolnum>5</manvolnum>
  365. </citerefentry>,
  366. <citerefentry>
  367. <refentrytitle>dpkg</refentrytitle>
  368. <manvolnum>8</manvolnum>
  369. </citerefentry>,
  370. <citerefentry>
  371. <refentrytitle>dpkg-deb</refentrytitle>
  372. <manvolnum>1</manvolnum>
  373. </citerefentry>
  374. </para>
  375. </refsect1>
  376. </refentry>