deb-src-control.5 13 KB

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