deb-src-control.5 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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 restriction formula
  173. consisting of one or more lists of profile names 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
  183. restriction formula consisting of one or more lists of profile names in
  184. angle brackets.
  185. A version number may start with a ">>", in which case any later version
  186. will match, and may specify or omit the Debian packaging revision (separated
  187. by a hyphen). Accepted version relationships are ">>" for greater than,
  188. "<<" for less than, ">=" for greater than or equal to, "<=" for less than
  189. or equal to, and "=" for equal to.
  190. An architecture specification consists of one or more architecture names,
  191. separated by whitespace. Exclamation marks may be prepended to each of the
  192. names, meaning "NOT".
  193. A restriction formula consists of one or more restriction lists, separated
  194. by whitespace. Each restriction list is enclosed in angle brackets. Items
  195. in the restriction list are build profile names, separated by whitespace
  196. and can be prefixed with an exclamation mark, meaning "NOT". A restriction
  197. formula represents a disjunctive normal form expression.
  198. Note that dependencies on packages in the
  199. .B build\-essential
  200. set can be omitted and that declaring build conflicts against them is
  201. impossible. A list of these packages is in the build\-essential package.
  202. .SH BINARY FIELDS
  203. .LP
  204. Note that the
  205. .BR Priority ", " Section
  206. and
  207. .B Homepage
  208. fields can also be in a binary paragraph to override the global value from the
  209. source package.
  210. .TP
  211. .BR Package: " \fIbinary-package-name\fP (required)"
  212. This field is used to name the binary package name. The same restrictions as
  213. to a source package name apply.
  214. .TP
  215. .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
  216. The architecture specifies on which type of hardware this package runs. For
  217. packages that run on all architectures, use the
  218. .B any
  219. value. For packages that are architecture independent, such as shell and Perl
  220. scripts or documentation, use the
  221. .B all
  222. value. To restrict the packages to a certain set of architectures, specify the
  223. architecture names, separated by a space. It's also possible to put
  224. architecture wildcards in that list (see
  225. .BR dpkg\-architecture (1)
  226. for more information about them).
  227. .TP
  228. .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
  229. This field defines the type of the package. "udeb" is for size-constrained
  230. packages used by the debian installer. "deb" is the default value, it's
  231. assumed if the field is absent. More types might be added in the future.
  232. .TP
  233. .BI Subarchitecture: " value"
  234. .TQ
  235. .BI Kernel\-Version: " value"
  236. .TQ
  237. .BI Installer\-Menu\-Item: " value"
  238. These fields are used by the debian\-installer and are usually not needed.
  239. See /usr/share/doc/debian\-installer/devel/modules.txt from the
  240. .B debian\-installer
  241. package for more details about them.
  242. .TP
  243. .BR Essential: " \fByes\fP|\fBno\fP"
  244. .TQ
  245. .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP|\fBno\fP"
  246. .TQ
  247. .BI Tag: " tag-list"
  248. .TQ
  249. .BR Description: " \fIshort-description\fP (required)"
  250. These fields are described in the
  251. .BR deb\-control (5)
  252. manual page, as they are copied literally to the control file of the binary
  253. package.
  254. .TP
  255. .BI Depends: " package-list"
  256. .TQ
  257. .BI Pre\-Depends: " package-list"
  258. .TQ
  259. .BI Recommends: " package-list"
  260. .TQ
  261. .BI Suggests: " package-list"
  262. .TQ
  263. .BI Breaks: " package-list"
  264. .TQ
  265. .BI Enhances: " package-list"
  266. .TQ
  267. .BI Replaces: " package-list"
  268. .TQ
  269. .BI Conflicts: " package-list"
  270. .TQ
  271. .BI Provides: " package-list"
  272. .TQ
  273. .BI Built\-Using: " package-list"
  274. These fields declare relationships between packages. They are discussed in
  275. the
  276. .BR deb\-control (5)
  277. manpage and in the
  278. .B debian\-policy
  279. package.
  280. .SH USER-DEFINED FIELDS
  281. It is allowed to add additional user-defined fields to the control file. The
  282. tools will ignore these fields. If you want the fields to be copied over to
  283. the output files, such as the binary packages, you need to use a custom naming
  284. scheme: the fields should start with a X, followed by one or more of the
  285. letters BCS and a hypen. If the letter B is used, the field will appear in the
  286. control file in the binary package, see
  287. .BR deb\-control (5),
  288. for the letter S in the source package control file as constructed by
  289. .BR dpkg\-source (1)
  290. and for the letter C in the upload control (.changes) file. Note that the
  291. X[BCS]\- prefixes are stripped when the fields are copied over to the
  292. output files. A field \fBXC\-Approved\-By\fP will appear as
  293. \fBApproved\-By\fP in the changes file and will not appear in the binary or
  294. source package control files.
  295. Take into account that these user-defined fields will be using the global
  296. namespace, which might at some point in the future collide with officially
  297. recognized fields. To avoid such potential situation you can prefix those
  298. fields with \fBPrivate\-\fP, such as \fBXB\-Private\-New\-Field\fP.
  299. .SH EXAMPLE
  300. .\" .RS
  301. .nf
  302. # Comment
  303. Source: dpkg
  304. Section: admin
  305. Priority: required
  306. Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
  307. # this field is copied to the binary and source packages
  308. XBS\-Upstream\-Release\-Status: stable
  309. Homepage: https://wiki.debian.org/Teams/Dpkg
  310. Vcs\-Browser: https://anonscm.debian.org/cgit/dpkg/dpkg.git
  311. Vcs\-Git: git://anonscm.debian.org/dpkg/dpkg.git
  312. Standards\-Version: 3.7.3
  313. Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
  314. libselinux1\-dev (>= 1.28\-4) [!linux\-any]
  315. Package: dpkg\-dev
  316. Section: utils
  317. Priority: optional
  318. Architecture: all
  319. # this is a custom field in the binary package
  320. XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
  321. Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
  322. bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
  323. Recommends: gcc | c\-compiler, build\-essential
  324. Suggests: gnupg, debian\-keyring
  325. Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
  326. Replaces: manpages\-pl (<= 20051117\-1)
  327. Description: Debian package development tools
  328. This package provides the development tools (including dpkg\-source)
  329. required to unpack, build and upload Debian source packages.
  330. .
  331. Most Debian source packages will require additional tools to build;
  332. for example, most packages need make and the C compiler gcc.
  333. .fi
  334. .\" .RE
  335. .SH SEE ALSO
  336. .BR deb\-control (5),
  337. .BR deb\-version (5),
  338. .BR dpkg\-source (1)