deb-src-control.5 14 KB

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