deb-src-control.5 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. .\" dpkg manual page - deb-src-control(5)
  2. .\"
  3. .\" Copyright © 2010 Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
  4. .\" Copyright © 2011 Raphaël Hertzog <hertzog@debian.org>
  5. .\" Copyright © 2011-2013 Guillem Jover <guillem@debian.org>
  6. .\"
  7. .\" This is free software; you can redistribute it and/or modify
  8. .\" it under the terms of the GNU General Public License as published by
  9. .\" the Free Software Foundation; either version 2 of the License, or
  10. .\" (at your option) any later version.
  11. .\"
  12. .\" This is distributed in the hope that it will be useful,
  13. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. .\" GNU General Public License for more details.
  16. .\"
  17. .\" You should have received a copy of the GNU General Public License
  18. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. .
  20. .TH deb\-src\-control 5 "2013-12-20" "Debian Project" "Debian"
  21. .SH NAME
  22. deb\-src\-control \- Debian source packages' master control file format
  23. .
  24. .SH SYNOPSIS
  25. control
  26. .
  27. .SH DESCRIPTION
  28. Each Debian source package contains the master "control" file, which contains
  29. at least 2 paragraphs, separated by a blank line. The first paragraph lists
  30. all information about the source package in general, while each following
  31. paragraph describes exactly one binary package. Each paragraph consists of at
  32. least one field. A field starts with a fieldname, such as
  33. .B Package
  34. or
  35. .B Section
  36. (case insensitive), followed by a colon, the body of the field and a newline.
  37. Multi-line fields are also allowed, but each supplementary line, without a
  38. fieldname, should start with at least one space. The content of the multi-line
  39. fields is generally joined to a single line by the tools (except in the case of
  40. the
  41. .B Description
  42. field, see below). To insert empty lines into a multi-line
  43. field, insert a dot after the space. Lines starting with a \fB'#'\fP are
  44. treated as comments.
  45. .
  46. .SH SOURCE FIELDS
  47. .TP
  48. .BR Source: " \fIsource-package-name\fP (required)"
  49. The value of this field is the name of the source package, and should
  50. match the name of the source package in the debian/changelog file. A package
  51. name must consist only of lower case letters (a-z), digits (0-9), plus (+) and
  52. minus (-) signs, and periods (.). Package names must be at least two characters
  53. long and must start with an alphanumeric character.
  54. .TP
  55. .BR Maintainer: " \fIfullname-email\fP (required)"
  56. Should be in the format "Joe Bloggs <jbloggs@foo.com>", and references the
  57. person who currently maintains the package, as opposed to the author of the
  58. software or the original packager.
  59. .TP
  60. .BI Uploaders: " fullname-email"
  61. Lists all the names and email addresses of co-maintainers of the package, in
  62. the same format as the Maintainer field. Multiple co-maintainers should be
  63. separated by a comma.
  64. .TP
  65. .BI Standards\-Version: " version-string"
  66. This documents the most recent version of the standards (which consists of the
  67. Debian Policy Manual and referenced texts from the
  68. .B debian\-policy
  69. package) this package complies to.
  70. .TP
  71. .BI Homepage: " url"
  72. The upstream project home page URL.
  73. .TP
  74. .BI Bugs: " url"
  75. The \fIurl\fP of the bug tracking system for this package. The current
  76. used format is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
  77. \fBdebbugs://bugs.debian.org\fP. This field is usually not needed.
  78. .TP
  79. .BI Vcs\-*: " url"
  80. The \fIurl\fP of the Version Control System repository used to maintain this
  81. package. Currently supported are \fBArch\fP, \fBBzr\fP (Bazaar), \fBCvs\fP,
  82. \fBDarcs\fP, \fBGit\fP, \fBHg\fP (Mercurial), \fBMtn\fP (Monotone) and
  83. \fBSvn\fP (Subversion). Usually this field points to the latest version
  84. of the package, such as the main branch or the trunk.
  85. .TP
  86. .BI Vcs\-Browser: " url"
  87. The \fIurl\fP of a webinterface to browse the Version Control System
  88. repository.
  89. .TP
  90. .BI Origin: " name"
  91. The name of the distribution this package is originating from. This field is
  92. usually not needed.
  93. .TP
  94. .BI Section: " section"
  95. This is a general field that gives the package a category based on the
  96. software that it installs. Some common sections are "utils", "net",
  97. "mail", "text", "x11", etc.
  98. .TP
  99. .BI Priority: " priority"
  100. Sets the importance of this package in relation to the system as a whole.
  101. Common priorities are "required", "standard", "optional", "extra", etc.
  102. In Debian, the
  103. .B Section
  104. and
  105. .B Priority
  106. fields have a defined set of accepted values based on the Policy Manual.
  107. A list of these values can be obtained from the latest version of the
  108. .B debian\-policy
  109. package.
  110. .TP
  111. .BI Build\-Depends: " package-list"
  112. A list of packages that need to be installed and configured to be able
  113. to build the source package. Including a dependency in this list has
  114. the same effect as including it in both \fBBuild\-Depends\-Arch\fP and
  115. \fBBuild\-Depends\-Indep\fP, with the additional effect of being used
  116. for source-only builds.
  117. .TP
  118. .BI Build\-Depends\-Arch: " package list"
  119. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  120. architecture dependent packages. The \fBBuild\-Depends\fP are also
  121. installed in this case. This field is supported since dpkg 1.16.4; in
  122. order to build with older dpkg versions, \fBBuild\-Depends\fP
  123. should be used instead.
  124. .TP
  125. .BI Build\-Depends\-Indep: " package-list"
  126. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  127. architecture independent packages. The \fBBuild\-Depends\fP are also
  128. installed in this case.
  129. .TP
  130. .BI Build\-Conflicts: " package list"
  131. A list of packages that should not be installed when the package is
  132. built, for example because they interfere with the build system used.
  133. Including a dependency in this list has the same effect as including
  134. it in both \fBBuild\-Conflicts\-Arch\fP and
  135. \fBBuild\-Conflicts\-Indep\fP, with the additional effect of being
  136. used for source-only builds.
  137. .TP
  138. .BI Build\-Conflicts\-Arch: " package list"
  139. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  140. dependent packages. This field is supported since dpkg 1.16.4; in
  141. order to build with older dpkg versions, \fBBuild\-Conflicts\fP should
  142. be used instead.
  143. .TP
  144. .BI Build\-Conflicts\-Indep: " package-list"
  145. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  146. independent packages.
  147. .PP
  148. The syntax of the
  149. .BR Build\-Depends ,
  150. .B Build\-Depends\-Arch
  151. and
  152. .B Build\-Depends\-Indep
  153. fields is a list of groups of alternative packages. Each group is a list
  154. of packages separated by vertical bar (or "pipe") symbols, "|". The
  155. groups are separated by commas. Commas are to be read as "AND", and pipes
  156. as "OR", with pipes binding more tightly. Each package name is
  157. optionally followed by a version number specification in parentheses, an
  158. architecture specification in square brackets, and a profile specification
  159. in angle brackets.
  160. The syntax of the
  161. .BR Build\-Conflicts ,
  162. .B Build\-Conflicts\-Arch
  163. and
  164. .B Build\-Conflicts\-Indep
  165. fields is a list of comma-separated package names, where the comma is read
  166. as an "AND". Specifying alternative packages using a "pipe" is not supported.
  167. Each package name is optionally followed by a version number specification in
  168. parentheses, an architecture specification in square brackets, and a profile
  169. specification in angle brackets.
  170. A version number may start with a ">>", in which case any later version
  171. will match, and may specify or omit the Debian packaging revision (separated
  172. by a hyphen). Accepted version relationships are ">>" for greater than,
  173. "<<" for less than, ">=" for greater than or equal to, "<=" for less than
  174. or equal to, and "=" for equal to.
  175. An architecture specification consists of one or more architecture names,
  176. separated by whitespace. Exclamation marks may be prepended to each of the
  177. names, meaning "NOT".
  178. A profile specification consists of one or more profile names, prefixed
  179. with the "\fBprofile.\fP" namespace, separated by whitespace. Exclamation
  180. marks may be prepended to each of the names, meaning "NOT".
  181. Note that dependencies on packages in the
  182. .B build\-essential
  183. set can be omitted and that declaring build conflicts against them is
  184. impossible. A list of these packages is in the build\-essential package.
  185. .SH BINARY FIELDS
  186. .LP
  187. Note that the
  188. .BR Priority ", " Section
  189. and
  190. .B Homepage
  191. fields can also be in a binary paragraph to override the global value from the
  192. source package.
  193. .TP
  194. .BR Package: " \fIbinary-package-name\fP (required)"
  195. This field is used to name the binary package name. The same restrictions as
  196. to a source package name apply.
  197. .TP
  198. .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
  199. The architecture specifies on which type of hardware this package runs. For
  200. packages that run on all architectures, use the
  201. .B any
  202. value. For packages that are architecture independent, such as shell and Perl
  203. scripts or documentation, use the
  204. .B all
  205. value. To restrict the packages to a certain set of architectures, specify the
  206. architecture names, separated by a space. It's also possible to put
  207. architecture wildcards in that list (see
  208. .BR dpkg\-architecture (1)
  209. for more information about them).
  210. .TP
  211. .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
  212. This field defines the type of the package. "udeb" is for size-constrained
  213. packages used by the debian installer. "deb" is the default value, it's
  214. assumed if the field is absent. More types might be added in the future.
  215. .TP
  216. .BI Subarchitecture: " value"
  217. .TQ
  218. .BI Kernel\-Version: " value"
  219. .TQ
  220. .BI Installer\-Menu\-Item: " value"
  221. These fields are used by the debian\-installer and are usually not needed.
  222. See /usr/share/doc/debian\-installer/devel/modules.txt from the
  223. .B debian\-installer
  224. package for more details about them.
  225. .TP
  226. .BR Essential: " \fByes\fP|\fBno\fP"
  227. .TQ
  228. .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP|\fBno\fP"
  229. .TQ
  230. .BI Tag: " tag-list"
  231. .TQ
  232. .BR Description: " \fIshort-description\fP (required)"
  233. These fields are described in the
  234. .BR deb\-control (5)
  235. manual page, as they are copied literally to the control file of the binary
  236. package.
  237. .TP
  238. .BI Depends: " package-list"
  239. .TQ
  240. .BI Pre\-Depends: " package-list"
  241. .TQ
  242. .BI Recommends: " package-list"
  243. .TQ
  244. .BI Suggests: " package-list"
  245. .TQ
  246. .BI Breaks: " package-list"
  247. .TQ
  248. .BI Enhances: " package-list"
  249. .TQ
  250. .BI Replaces: " package-list"
  251. .TQ
  252. .BI Conflicts: " package-list"
  253. .TQ
  254. .BI Provides: " package-list"
  255. .TQ
  256. .BI Built\-Using: " package-list"
  257. These fields declare relationships between packages. They are discussed in
  258. the
  259. .BR deb\-control (5)
  260. manpage and in the
  261. .B debian\-policy
  262. package.
  263. .SH USER-DEFINED FIELDS
  264. It is allowed to add additional user-defined fields to the control file. The
  265. tools will ignore these fields. If you want the fields to be copied over to
  266. the output files, such as the binary packages, you need to use a custom naming
  267. scheme: the fields should start with a X, followed by one or more of the
  268. letters BCS and a hypen. If the letter B is used, the field will appear in the
  269. control file in the binary package, see
  270. .BR deb\-control (5),
  271. for the letter S in the source package control file as constructed by
  272. .BR dpkg\-source (1)
  273. and for the letter C in the upload control (.changes) file. Note that the
  274. X[BCS]\- prefixes are stripped when the fields are copied over to the
  275. output files. A field \fBXC\-Approved\-By\fP will appear as
  276. \fBApproved\-By\fP in the changes file and will not appear in the binary or
  277. source package control files.
  278. Take into account that these user-defined fields will be using the global
  279. namespace, which might at some point in the future collide with officially
  280. recognized fields. To avoid such potential situation you can prefix those
  281. fields with \fBPrivate\-\fP, such as \fBXB\-Private\-New\-Field\fP, which as
  282. a side effect will make \fBdpkg\-deb\fP not warn on them as unknown fields.
  283. .SH EXAMPLE
  284. .\" .RS
  285. .nf
  286. # Comment
  287. Source: dpkg
  288. Section: admin
  289. Priority: required
  290. Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
  291. # this field is copied to the binary and source packages
  292. XBS\-Upstream\-Release\-Status: stable
  293. Homepage: https://wiki.debian.org/Teams/Dpkg
  294. Vcs\-Browser: http://git.debian.org/?p=dpkg/dpkg.git
  295. Vcs\-Git: git://git.debian.org/git/dpkg/dpkg.git
  296. Standards\-Version: 3.7.3
  297. Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
  298. libselinux1\-dev (>= 1.28\-4) [!linux\-any]
  299. Package: dpkg\-dev
  300. Section: utils
  301. Priority: optional
  302. Architecture: all
  303. # this is a custom field in the binary package
  304. XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
  305. Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
  306. bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
  307. Recommends: gcc | c\-compiler, build\-essential
  308. Suggests: gnupg, debian\-keyring
  309. Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
  310. Replaces: manpages\-pl (<= 20051117\-1)
  311. Description: Debian package development tools
  312. This package provides the development tools (including dpkg\-source)
  313. required to unpack, build and upload Debian source packages.
  314. .
  315. Most Debian source packages will require additional tools to build;
  316. for example, most packages need make and the C compiler gcc.
  317. .fi
  318. .\" .RE
  319. .SH SEE ALSO
  320. .BR deb\-control (5),
  321. .BR deb\-version (5),
  322. .BR dpkg\-source (1)