deb-src-control.man 15 KB

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