deb-src-control.5 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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 from source package.
  131. These dependencies need to be satisfied when building binary architecture
  132. dependent or independent packages and source packages.
  133. Including a dependency in this field does not have the exact same effect as
  134. including it in both \fBBuild\-Depends\-Arch\fP and \fBBuild\-Depends\-Indep\fP,
  135. because the dependency also needs to be satisfied when building the source
  136. package.
  137. .
  138. .TP
  139. .BI Build\-Depends\-Arch: " package-list"
  140. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  141. architecture dependent packages. The \fBBuild\-Depends\fP are also
  142. installed in this case. This field is supported since dpkg 1.16.4; in
  143. order to build with older dpkg versions, \fBBuild\-Depends\fP
  144. should be used instead.
  145. .TP
  146. .BI Build\-Depends\-Indep: " package-list"
  147. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  148. architecture independent packages. The \fBBuild\-Depends\fP are also
  149. installed in this case.
  150. .TP
  151. .BI Build\-Conflicts: " package-list"
  152. A list of packages that should not be installed when the package is
  153. built, for example because they interfere with the build system used.
  154. Including a dependency in this list has the same effect as including
  155. it in both \fBBuild\-Conflicts\-Arch\fP and
  156. \fBBuild\-Conflicts\-Indep\fP, with the additional effect of being
  157. used for source-only builds.
  158. .TP
  159. .BI Build\-Conflicts\-Arch: " package-list"
  160. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  161. dependent packages. This field is supported since dpkg 1.16.4; in
  162. order to build with older dpkg versions, \fBBuild\-Conflicts\fP should
  163. be used instead.
  164. .TP
  165. .BI Build\-Conflicts\-Indep: " package-list"
  166. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  167. independent packages.
  168. .PP
  169. The syntax of the
  170. .BR Build\-Depends ,
  171. .B Build\-Depends\-Arch
  172. and
  173. .B Build\-Depends\-Indep
  174. fields is a list of groups of alternative packages.
  175. Each group is a list of packages separated by vertical bar (or \(lqpipe\(rq)
  176. symbols, \(oq\fB|\fP\(cq.
  177. The groups are separated by commas.
  178. Commas are to be read as \(lqAND\(rq, and pipes as \(lqOR\(rq, with pipes
  179. binding more tightly.
  180. Each package name is optionally followed by an architecture qualifier
  181. appended after a colon \(oq\fB:\fP\(cq,
  182. optionally followed by a version number specification in parentheses, an
  183. architecture specification in square brackets, and a restriction formula
  184. consisting of one or more lists of profile names in angle brackets.
  185. The syntax of the
  186. .BR Build\-Conflicts ,
  187. .B Build\-Conflicts\-Arch
  188. and
  189. .B Build\-Conflicts\-Indep
  190. fields is a list of comma-separated package names, where the comma is read
  191. as an \(lqAND\(rq.
  192. Specifying alternative packages using a \(lqpipe\(rq is not supported.
  193. Each package name is optionally followed by a version number specification in
  194. parentheses, an architecture specification in square brackets, and a
  195. restriction formula consisting of one or more lists of profile names in
  196. angle brackets.
  197. An architecture qualifier name can be a real Debian architecture name
  198. (since dpkg 1.16.5), \fBany\fP (since dpkg 1.16.2) or \fBnative\fP
  199. (since dpkg 1.16.5).
  200. If omitted, the default for \fBBuild\-Depends\fP fields is the current host
  201. architecture, the default for \fBBuild\-Conflicts\fP fields is \fBany\fP.
  202. A real Debian architecture name will match exactly that architecture for
  203. that package name, \fBany\fP will match any architecture for that package
  204. name if the package is marked with \fBMulti\-Arch: allowed\fP, and
  205. \fBnative\fP will match the current build architecture if the package
  206. is not marked with \fBMulti\-Arch: foreign\fP.
  207. A version number may start with a \(oq\fB>>\fP\(cq, in which case any
  208. later version will match, and may specify or omit the Debian packaging
  209. revision (separated by a hyphen).
  210. Accepted version relationships are \(oq\fB>>\fP\(cq for greater than,
  211. \(oq\fB<<\fP\(cq for less than, \(oq\fB>=\fP\(cq for greater than or
  212. equal to, \(oq\fB<=\fP\(cq for less than or equal to, and \(oq\fB=\fP\(cq
  213. for equal to.
  214. An architecture specification consists of one or more architecture names,
  215. separated by whitespace. Exclamation marks may be prepended to each of the
  216. names, meaning \(lqNOT\(rq.
  217. A restriction formula consists of one or more restriction lists, separated
  218. by whitespace. Each restriction list is enclosed in angle brackets. Items
  219. in the restriction list are build profile names, separated by whitespace
  220. and can be prefixed with an exclamation mark, meaning \(lqNOT\(rq.
  221. A restriction formula represents a disjunctive normal form expression.
  222. Note that dependencies on packages in the
  223. .B build\-essential
  224. set can be omitted and that declaring build conflicts against them is
  225. impossible. A list of these packages is in the build\-essential package.
  226. .SH BINARY FIELDS
  227. .LP
  228. Note that the
  229. .BR Priority ", " Section
  230. and
  231. .B Homepage
  232. fields can also be in a binary paragraph to override the global value from the
  233. source package.
  234. .TP
  235. .BR Package: " \fIbinary-package-name\fP (required)"
  236. This field is used to name the binary package name. The same restrictions as
  237. to a source package name apply.
  238. .TP
  239. .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
  240. The architecture specifies on which type of hardware this package runs. For
  241. packages that run on all architectures, use the
  242. .B any
  243. value. For packages that are architecture independent, such as shell and Perl
  244. scripts or documentation, use the
  245. .B all
  246. value. To restrict the packages to a certain set of architectures, specify the
  247. architecture names, separated by a space. It's also possible to put
  248. architecture wildcards in that list (see
  249. .BR dpkg\-architecture (1)
  250. for more information about them).
  251. .TP
  252. .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
  253. This field defines the type of the package.
  254. \fBudeb\fP is for size-constrained packages used by the debian installer.
  255. \fBdeb\fP is the default value, it is assumed if the field is absent.
  256. More types might be added in the future.
  257. .TP
  258. .BI Subarchitecture: " value"
  259. .TQ
  260. .BI Kernel\-Version: " value"
  261. .TQ
  262. .BI Installer\-Menu\-Item: " value"
  263. These fields are used by the debian\-installer and are usually not needed.
  264. See /usr/share/doc/debian\-installer/devel/modules.txt from the
  265. .B debian\-installer
  266. package for more details about them.
  267. .TP
  268. .BR Essential: " \fByes\fP|\fBno\fP"
  269. .TQ
  270. .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP|\fBno\fP"
  271. .TQ
  272. .BI Tag: " tag-list"
  273. .TQ
  274. .BR Description: " \fIshort-description\fP (required)"
  275. These fields are described in the
  276. .BR deb\-control (5)
  277. manual page, as they are copied literally to the control file of the binary
  278. package.
  279. .TP
  280. .BI Depends: " package-list"
  281. .TQ
  282. .BI Pre\-Depends: " package-list"
  283. .TQ
  284. .BI Recommends: " package-list"
  285. .TQ
  286. .BI Suggests: " package-list"
  287. .TQ
  288. .BI Breaks: " package-list"
  289. .TQ
  290. .BI Enhances: " package-list"
  291. .TQ
  292. .BI Replaces: " package-list"
  293. .TQ
  294. .BI Conflicts: " package-list"
  295. .TQ
  296. .BI Provides: " package-list"
  297. .TQ
  298. .BI Built\-Using: " package-list"
  299. These fields declare relationships between packages. They are discussed in
  300. the
  301. .BR deb\-control (5)
  302. manpage and in the
  303. .B debian\-policy
  304. package.
  305. .SH USER-DEFINED FIELDS
  306. It is allowed to add additional user-defined fields to the control file. The
  307. tools will ignore these fields. If you want the fields to be copied over to
  308. the output files, such as the binary packages, you need to use a custom naming
  309. scheme: the fields should start with a X, followed by one or more of the
  310. letters BCS and a hypen. If the letter B is used, the field will appear in the
  311. control file in the binary package, see
  312. .BR deb\-control (5),
  313. for the letter S in the source package control file as constructed by
  314. .BR dpkg\-source (1)
  315. and for the letter C in the upload control (.changes) file. Note that the
  316. X[BCS]\- prefixes are stripped when the fields are copied over to the
  317. output files. A field \fBXC\-Approved\-By\fP will appear as
  318. \fBApproved\-By\fP in the changes file and will not appear in the binary or
  319. source package control files.
  320. Take into account that these user-defined fields will be using the global
  321. namespace, which might at some point in the future collide with officially
  322. recognized fields. To avoid such potential situation you can prefix those
  323. fields with \fBPrivate\-\fP, such as \fBXB\-Private\-New\-Field\fP.
  324. .SH EXAMPLE
  325. .\" .RS
  326. .nf
  327. # Comment
  328. Source: dpkg
  329. Section: admin
  330. Priority: required
  331. Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
  332. # this field is copied to the binary and source packages
  333. XBS\-Upstream\-Release\-Status: stable
  334. Homepage: https://wiki.debian.org/Teams/Dpkg
  335. Vcs\-Browser: https://anonscm.debian.org/cgit/dpkg/dpkg.git
  336. Vcs\-Git: git://anonscm.debian.org/dpkg/dpkg.git
  337. Standards\-Version: 3.7.3
  338. Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
  339. libselinux1\-dev (>= 1.28\-4) [!linux\-any]
  340. Package: dpkg\-dev
  341. Section: utils
  342. Priority: optional
  343. Architecture: all
  344. # this is a custom field in the binary package
  345. XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
  346. Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
  347. bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
  348. Recommends: gcc | c\-compiler, build\-essential
  349. Suggests: gnupg, debian\-keyring
  350. Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
  351. Replaces: manpages\-pl (<= 20051117\-1)
  352. Description: Debian package development tools
  353. This package provides the development tools (including dpkg\-source)
  354. required to unpack, build and upload Debian source packages.
  355. .
  356. Most Debian source packages will require additional tools to build;
  357. for example, most packages need make and the C compiler gcc.
  358. .fi
  359. .\" .RE
  360. .SH SEE ALSO
  361. .BR deb\-control (5),
  362. .BR deb\-version (5),
  363. .BR dpkg\-source (1)