1 # dpkg manual page - deb-src-control(5)
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>
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.
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.
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/>.
24 deb-src-control - Debian source packages' master control file format
32 Each Debian source package contains the master «B<debian/control>» file,
33 and its L<deb822(5)> format is a superset of the B<control> file
34 shipped in Debian binary packages, see B<deb-control>(5).
36 This file contains at least 2 stanzas, separated by a blank line.
37 The first stanza lists all information about the source package in general,
38 while each following stanza describes exactly one binary package.
39 Each stanza consists of at least one field.
40 A field starts with a fieldname, such as B<Package> or B<Section>
41 (case insensitive), followed by a colon, the body of the field
42 (case sensitive unless stated otherwise) and a newline.
43 Multi-line fields are also allowed, but each supplementary line, without a
44 fieldname, should start with at least one space. The content of the multi-line
45 fields is generally joined to a single line by the tools (except in the case of
48 field, see below). To insert empty lines into a multi-line
49 field, insert a dot after the space.
50 Lines starting with a ‘B<#>’ are treated as comments.
56 =item B<Source:> I<source-package-name> (required)
58 The value of this field is the name of the source package, and should
59 match the name of the source package in the debian/changelog file. A package
60 name must consist only of lowercase letters (a-z), digits (0-9), plus (+) and
61 minus (-) signs, and periods (.). Package names must be at least two characters
62 long and must start with a lowercase alphanumeric character (a-z0-9).
64 =item B<Maintainer:> I<fullname-email> (recommended)
66 Should be in the format «Joe Bloggs E<lt>jbloggs@foo.comE<gt>», and references the
67 person who currently maintains the package, as opposed to the author of the
68 software or the original packager.
70 =item B<Uploaders:> I<fullname-email>
72 Lists all the names and email addresses of co-maintainers of the package, in
73 the same format as the B<Maintainer> field.
74 Multiple co-maintainers should be separated by a comma.
76 =item B<Standards-Version:> I<version-string>
78 This documents the most recent version of the distribution policy standards
79 this package complies with.
81 =item B<Description> I<short-description>
83 =item S< >I<long-description>
85 The format for the source package description is a short brief summary on the
86 first line (after the B<Description> field).
87 The following lines should be used as a longer, more detailed description.
88 Each line of the long description must be preceded by a space, and blank
89 lines in the long description must contain a single ‘B<.>’ following
92 =item B<Homepage:> I<url>
94 The upstream project home page URL.
98 The I<url> of the bug tracking system for this package. The current
99 used format is I<bts-type>B<://>I<bts-address>, like
100 B<debbugs://bugs.debian.org>. This field is usually not needed.
102 =item B<Rules-Requires-Root:> B<no>|B<binary-targets>|I<impl-keywords>
104 This field is used to indicate whether the B<debian/rules> file requires
105 (fake)root privileges to run some of its targets, and if so when.
111 The binary targets will not require (fake)root at all.
113 =item B<binary-targets>
115 The binary targets must always be run under (fake)root.
116 This value is the default when the field is omitted; adding the field
117 with an explicit B<binary-targets> while not strictly needed, marks
118 it as having been analyzed for this requirement.
120 =item I<impl-keywords>
122 This is a space-separated list of keywords which define when (fake)root
125 Keywords consist of I<namespace>/I<cases>.
126 The I<namespace> part cannot contain "/" or whitespace.
127 The I<cases> part cannot contain whitespace.
128 Furthermore, both parts must consist entirely of printable ASCII characters.
130 Each tool/package will define a namespace named after itself and provide
131 a number of cases where (fake)root is required.
132 (See "Implementation provided keywords" in I<rootless-builds.txt>).
134 When the field is set to one of the I<impl-keywords>, the builder will
135 expose an interface that is used to run a command under (fake)root.
136 (See "Gain Root API" in I<rootless-builds.txt>.)
140 =item B<Testsuite:> I<name-list>
142 =item B<Testsuite-Triggers:> I<package-list>
144 These fields are described in the
146 manual page, as they are generated from information inferred from
147 B<debian/tests/control> or copied literally to the source control file.
149 =item B<Vcs-Arch:> I<url>
151 =item B<Vcs-Bzr:> I<url>
153 =item B<Vcs-Cvs:> I<url>
155 =item B<Vcs-Darcs:> I<url>
157 =item B<Vcs-Git:> I<url>
159 =item B<Vcs-Hg:> I<url>
161 =item B<Vcs-Mtn:> I<url>
163 =item B<Vcs-Svn:> I<url>
165 The I<url> of the Version Control System repository used to maintain this
166 package. Currently supported are B<Arch>, B<Bzr> (Bazaar), B<Cvs>,
167 B<Darcs>, B<Git>, B<Hg> (Mercurial), B<Mtn> (Monotone) and
168 B<Svn> (Subversion). Usually this field points to the latest version
169 of the package, such as the main branch or the trunk.
171 =item B<Vcs-Browser:> I<url>
173 The I<url> of a webinterface to browse the Version Control System
176 =item B<Origin:> I<name>
178 The name of the distribution this package is originating from. This field is
181 =item B<Section:> I<section>
183 This is a general field that gives the package a category based on the
184 software that it installs.
185 Some common sections are B<utils>, B<net>, B<mail>, B<text>,
188 =item B<Priority:> I<priority>
190 Sets the importance of this package in relation to the system as a whole.
191 Common priorities are B<required>, B<standard>, B<optional>,
198 fields usually have a defined set of accepted values based on the specific
201 =item B<Build-Depends:> I<package-list>
203 A list of packages that need to be installed and configured to be able
204 to build from source package.
205 These dependencies need to be satisfied when building binary architecture
206 dependent or independent packages and source packages.
207 Including a dependency in this field does not have the exact same effect as
208 including it in both B<Build-Depends-Arch> and B<Build-Depends-Indep>,
209 because the dependency also needs to be satisfied when building the source
212 =item B<Build-Depends-Arch:> I<package-list>
214 Same as B<Build-Depends>, but they are only needed when building the
215 architecture dependent packages. The B<Build-Depends> are also
216 installed in this case. This field is supported since dpkg 1.16.4; in
217 order to build with older dpkg versions, B<Build-Depends>
218 should be used instead.
220 =item B<Build-Depends-Indep:> I<package-list>
222 Same as B<Build-Depends>, but they are only needed when building the
223 architecture independent packages. The B<Build-Depends> are also
224 installed in this case.
226 =item B<Build-Conflicts:> I<package-list>
228 A list of packages that should not be installed when the package is
229 built, for example because they interfere with the build system used.
230 Including a dependency in this list has the same effect as including
231 it in both B<Build-Conflicts-Arch> and
232 B<Build-Conflicts-Indep>, with the additional effect of being
233 used for source-only builds.
235 =item B<Build-Conflicts-Arch:> I<package-list>
237 Same as B<Build-Conflicts>, but only when building the architecture
238 dependent packages. This field is supported since dpkg 1.16.4; in
239 order to build with older dpkg versions, B<Build-Conflicts> should
242 =item B<Build-Conflicts-Indep:> I<package-list>
244 Same as B<Build-Conflicts>, but only when building the architecture
245 independent packages.
251 B<Build-Depends-Arch>
253 B<Build-Depends-Indep>
254 fields is a list of groups of alternative packages.
255 Each group is a list of packages separated by vertical bar (or “pipe”)
257 The groups are separated by commas ‘B<,>’, and can end with a
258 trailing comma that will be eliminated when generating the fields
259 for B<deb-control>(5) (since dpkg 1.10.14).
260 Commas are to be read as “AND”, and pipes as “OR”, with pipes
261 binding more tightly.
262 Each package name is optionally followed by an architecture qualifier
263 appended after a colon ‘B<:>’,
264 optionally followed by a version number specification in parentheses
265 ‘B<(>’ and ‘B<)>’, an
266 architecture specification in square brackets ‘B<[>’ and ‘B<]>’,
267 and a restriction formula
268 consisting of one or more lists of profile names in angle brackets
269 ‘B<E<lt>>’ and ‘B<E<gt>>’.
273 B<Build-Conflicts-Arch>
275 B<Build-Conflicts-Indep>
276 fields is a list of comma-separated package names, where the comma is read
277 as an “AND”, and where the list can end with a trailing comma that will
278 be eliminated when generating the fields for B<deb-control>(5)
279 (since dpkg 1.10.14).
280 Specifying alternative packages using a “pipe” is not supported.
281 Each package name is optionally followed by a version number specification in
282 parentheses, an architecture specification in square brackets, and a
283 restriction formula consisting of one or more lists of profile names in
286 An architecture qualifier name can be a real Debian architecture name
287 (since dpkg 1.16.5), B<any> (since dpkg 1.16.2) or B<native>
289 If omitted, the default for B<Build-Depends> fields is the current host
290 architecture, the default for B<Build-Conflicts> fields is B<any>.
291 A real Debian architecture name will match exactly that architecture for
292 that package name, B<any> will match any architecture for that package
293 name if the package is marked with B<Multi-Arch: allowed>, and
294 B<native> will match the current build architecture if the package
295 is not marked with B<Multi-Arch: foreign>.
297 A version number may start with a ‘B<E<gt>E<gt>>’, in which case any
298 later version will match, and may specify or omit the Debian packaging
299 revision (separated by a hyphen).
300 Accepted version relationships are ‘B<E<gt>E<gt>>’ for greater than,
301 ‘B<E<lt>E<lt>>’ for less than, ‘B<E<gt>=>’ for greater than or
302 equal to, ‘B<E<lt>=>’ for less than or equal to, and ‘B<=>’
305 An architecture specification consists of one or more architecture names,
306 separated by whitespace. Exclamation marks may be prepended to each of the
307 names, meaning “NOT”.
309 A restriction formula consists of one or more restriction lists, separated
310 by whitespace. Each restriction list is enclosed in angle brackets. Items
311 in the restriction list are build profile names, separated by whitespace
312 and can be prefixed with an exclamation mark, meaning “NOT”.
313 A restriction formula represents a disjunctive normal form expression.
315 Note that dependencies on packages in the
317 set can be omitted and that declaring build conflicts against them is
318 impossible. A list of these packages is in the build-essential package.
323 B<Priority>, B<Section>
326 fields can also be in a binary stanza to override the global value from the
331 =item B<Package:> I<binary-package-name> (required)
333 This field is used to name the binary package name. The same restrictions as
334 to a source package name apply.
336 =item B<Package-Type:> B<deb>|B<udeb>|I<type>
338 This field defines the type of the package.
339 B<udeb> is for size-constrained packages used by the debian installer.
340 B<deb> is the default value, it is assumed if the field is absent.
341 More types might be added in the future.
343 =item B<Architecture:> I<arch>|B<all>|B<any> (required)
345 The architecture specifies on which type of hardware this package runs. For
346 packages that run on all architectures, use the
348 value. For packages that are architecture independent, such as shell and Perl
349 scripts or documentation, use the
351 value. To restrict the packages to a certain set of architectures, specify the
352 architecture names, separated by a space. It's also possible to put
353 architecture wildcards in that list (see
354 B<dpkg-architecture>(1)
355 for more information about them).
357 =item B<Build-Profiles:> I<restriction-formula>
359 This field specifies the conditions for which this binary package does or
361 To express that condition, the same restriction formula syntax from the
362 B<Build-Depends> field is used (including the angle brackets).
364 If a binary package stanza does not contain this field, then it implicitly
365 means that it builds with all build profiles (including none at all).
367 In other words, if a binary package stanza is annotated with a non-empty
368 B<Build-Profiles> field, then this binary package is generated if and
369 only if the condition expressed by the conjunctive normal form expression
372 =item B<Protected:> B<yes>|B<no>
374 =item B<Essential:> B<yes>|B<no>
376 =item B<Build-Essential:> B<yes>|B<no>
378 =item B<Multi-Arch:> B<same>|B<foreign>|B<allowed>|B<no>
380 =item B<Tag:> I<tag-list>
382 =item B<Description:> I<short-description> (recommended)
384 These fields are described in the
386 manual page, as they are copied literally to the control file of the binary
389 =item B<Depends:> I<package-list>
391 =item B<Pre-Depends:> I<package-list>
393 =item B<Recommends:> I<package-list>
395 =item B<Suggests:> I<package-list>
397 =item B<Breaks:> I<package-list>
399 =item B<Enhances:> I<package-list>
401 =item B<Replaces:> I<package-list>
403 =item B<Conflicts:> I<package-list>
405 =item B<Provides:> I<package-list>
407 =item B<Built-Using:> I<package-list>
409 =item B<Static-Built-Using:> I<package-list>
411 These fields declare relationships between packages. They are discussed in
415 When these fields are found in I<debian/control> they can also end with
416 a trailing comma (since dpkg 1.10.14), have architecture specifications and
417 restriction formulas which will all get reduced when generating the fields
418 for B<deb-control>(5).
420 =item B<Subarchitecture:> I<value>
422 =item B<Kernel-Version:> I<value>
424 =item B<Installer-Menu-Item:> I<value>
426 These fields are used by the debian-installer in B<udeb>s and are
428 For more details about them, see
429 L<https://salsa.debian.org/installer-team/debian-installer/-/raw/master/doc/devel/modules.txt>.
433 =head1 USER-DEFINED FIELDS
435 It is allowed to add additional user-defined fields to the control file. The
436 tools will ignore these fields. If you want the fields to be copied over to
437 the output files, such as the binary packages, you need to use a custom naming
438 scheme: the fields should start with an B<X>, followed by zero or more of
439 the letters B<SBC> and a hyphen.
445 The field will appear in the source package control file, see B<dsc>(5).
449 The field will appear in the control file in the binary package, see
454 The field will appear in the upload control (.changes) file, see
459 Note that the B<X>[B<SBC>]B<-> prefixes are stripped when the
460 fields are copied over to the output files. A field B<XC-Approved-By>
461 will appear as B<Approved-By> in the changes file and will not appear
462 in the binary or source package control files.
464 Take into account that these user-defined fields will be using the global
465 namespace, which might at some point in the future collide with officially
466 recognized fields. To avoid such potential situation you can prefix those
467 fields with B<Private->, such as B<XB-Private-New-Field>.
475 Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
476 # this field is copied to the binary and source packages
477 XBS-Upstream-Release-Status: stable
478 Homepage: https://wiki.debian.org/Teams/Dpkg
479 Vcs-Browser: https://git.dpkg.org/cgit/dpkg/dpkg.git
480 Vcs-Git: https://git.dpkg.org/git/dpkg/dpkg.git
481 Standards-Version: 3.7.3
482 Build-Depends: pkgconf, debhelper (>= 4.1.81),
483 libselinux1-dev (>= 1.28-4) [!linux-any]
489 # this is a custom field in the binary package
490 XB-Mentoring-Contact: Raphael Hertzog <hertzog@debian.org>
491 Depends: dpkg (>= 1.14.6), perl5, perl-modules, cpio (>= 2.4.2-2),
492 bzip2, lzma, patch (>= 2.2-1), make, binutils, libtimedate-perl
493 Recommends: gcc | c-compiler, build-essential
494 Suggests: gnupg, debian-keyring
495 Conflicts: dpkg-cross (<< 2.0.0), devscripts (<< 2.10.26)
496 Replaces: manpages-pl (<= 20051117-1)
497 Description: Debian package development tools
498 This package provides the development tools (including dpkg-source)
499 required to unpack, build and upload Debian source packages.
501 Most Debian source packages will require additional tools to build;
502 for example, most packages need make and the C compiler gcc.
506 I<%PKGDOCDIR%/spec/rootless-builds.txt>,