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 package template control file format
32 Each Debian source package contains the «B<debian/control>» template source
34 and its L<deb822(5)> format is a superset of the B<control> file
35 shipped in Debian binary packages, see L<deb-control(5)>.
37 This file contains at least 2 stanzas, separated by a blank line.
38 The first stanza is called the source package stanza and lists all
39 information about the source package in general,
40 while each following stanzas are called the binary package stanzas and
41 describe exactly one binary package per stanza.
42 Each stanza consists of at least one field.
43 A field starts with a field name, such as B<Package> or B<Section>
44 (case insensitive), followed by a colon, the body of the field
45 (case sensitive unless stated otherwise) and a newline.
46 Multi-line fields are also allowed, but each supplementary line, without a
47 field name, should start with at least one space.
48 The content of the multi-line
49 fields is generally joined to a single line by the tools (except in the case of
53 To insert empty lines into a multi-line
54 field, insert a dot after the space.
55 Lines starting with a ‘B<#>’ are treated as comments.
61 =item B<Source:> I<source-package-name> (required)
63 The value of this field is the name of the source package, and should
64 match the name of the source package in the debian/changelog file.
66 name must consist only of lowercase letters (a-z), digits (0-9), plus (+) and
67 minus (-) signs, and periods (.).
68 Package names must be at least two characters
69 long and must start with a lowercase alphanumeric character (a-z0-9).
71 =item B<Maintainer:> I<fullname-email> (recommended)
73 Should be in the format «Joe Bloggs E<lt>jbloggs@foo.comE<gt>», and references the
74 person who currently maintains the package, as opposed to the author of the
75 software or the original packager.
77 =item B<Uploaders:> I<fullname-email>
79 Lists all the names and email addresses of co-maintainers of the package, in
80 the same format as the B<Maintainer> field.
81 Multiple co-maintainers should be separated by a comma.
83 =item B<Standards-Version:> I<version-string>
85 This documents the most recent version of the distribution policy standards
86 this package complies with.
88 =item B<Description> I<short-description>
90 =item S< >I<long-description>
92 The format for the source package description is a short brief summary on the
93 first line (after the B<Description> field).
94 The following lines should be used as a longer, more detailed description.
95 Each line of the long description must be preceded by a space, and blank
96 lines in the long description must contain a single ‘B<.>’ following
99 =item B<Homepage:> I<url>
101 The upstream project home page URL.
103 =item B<Bugs:> I<url>
105 The I<url> of the bug tracking system for this package.
107 used format is I<bts-type>B<://>I<bts-address>, like
108 B<debbugs://bugs.debian.org>.
109 This field is usually not needed.
111 =item B<Rules-Requires-Root:> B<no>|B<binary-targets>|I<impl-keywords>
113 This field is used to indicate whether the B<debian/rules> file requires
114 (fake)root privileges to run some of its targets, and if so when.
120 The binary targets will not require (fake)root at all.
121 This is the default in B<dpkg-build-api> level >= 1.
123 =item B<binary-targets>
125 The binary targets must always be run under (fake)root.
126 This value is the default in B<dpkg-build-api> level 0,
127 when the field is omitted;
128 adding the field with an explicit B<binary-targets>,
129 while not strictly needed,
130 marks it as having been analyzed for this requirement.
132 =item I<impl-keywords>
134 This is a space-separated list of keywords which define when (fake)root
137 Keywords consist of I<namespace>/I<cases>.
138 The I<namespace> part cannot contain "/" or whitespace.
139 The I<cases> part cannot contain whitespace.
140 Furthermore, both parts must consist entirely of printable ASCII characters.
142 Each tool/package will define a namespace named after itself and provide
143 a number of cases where (fake)root is required.
144 (See "Implementation provided keywords" in I<rootless-builds.txt>).
146 When the field is set to one of the I<impl-keywords>, the builder will
147 expose an interface that is used to run a command under (fake)root.
148 (See "Gain Root API" in I<rootless-builds.txt>.)
152 =item B<Testsuite:> I<name-list>
154 =item B<Testsuite-Triggers:> I<package-list>
156 These fields are described in the
158 manual page, as they are generated from information inferred from
159 B<debian/tests/control> or copied literally to the source control file.
161 =item B<Vcs-Arch:> I<url>
163 =item B<Vcs-Bzr:> I<url>
165 =item B<Vcs-Cvs:> I<url>
167 =item B<Vcs-Darcs:> I<url>
169 =item B<Vcs-Git:> I<url>
171 =item B<Vcs-Hg:> I<url>
173 =item B<Vcs-Mtn:> I<url>
175 =item B<Vcs-Svn:> I<url>
177 The I<url> of the Version Control System repository used to maintain this
179 Currently supported are B<Arch>, B<Bzr> (Bazaar), B<Cvs>,
180 B<Darcs>, B<Git>, B<Hg> (Mercurial), B<Mtn> (Monotone) and
182 Usually this field points to the latest version
183 of the package, such as the main branch or the trunk.
185 =item B<Vcs-Browser:> I<url>
187 The I<url> of a web interface to browse the Version Control System
190 =item B<Origin:> I<name>
192 The name of the distribution this package is originating from.
196 =item B<Section:> I<section>
198 This is a general field that gives the package a category based on the
199 software that it installs.
200 Some common sections are B<utils>, B<net>, B<mail>, B<text>,
203 =item B<Priority:> I<priority>
205 Sets the importance of this package in relation to the system as a whole.
206 Common priorities are B<required>, B<standard>, B<optional>,
213 fields usually have a defined set of accepted values based on the specific
216 =item B<Build-Depends:> I<package-list>
218 A list of packages that need to be installed and configured to be able
219 to build from source package.
220 These dependencies need to be satisfied when building binary architecture
221 dependent or independent packages and source packages.
222 Including a dependency in this field does not have the exact same effect as
223 including it in both B<Build-Depends-Arch> and B<Build-Depends-Indep>,
224 because the dependency also needs to be satisfied when building the source
227 =item B<Build-Depends-Arch:> I<package-list>
229 Same as B<Build-Depends>, but they are only needed when building the
230 architecture dependent packages.
231 The B<Build-Depends> are also installed in this case.
232 This field is supported since dpkg 1.16.4; in
233 order to build with older dpkg versions, B<Build-Depends>
234 should be used instead.
236 =item B<Build-Depends-Indep:> I<package-list>
238 Same as B<Build-Depends>, but they are only needed when building the
239 architecture independent packages.
240 The B<Build-Depends> are also
241 installed in this case.
243 =item B<Build-Conflicts:> I<package-list>
245 A list of packages that should not be installed when the package is
246 built, for example because they interfere with the build system used.
247 Including a dependency in this list has the same effect as including
248 it in both B<Build-Conflicts-Arch> and
249 B<Build-Conflicts-Indep>, with the additional effect of being
250 used for source-only builds.
252 =item B<Build-Conflicts-Arch:> I<package-list>
254 Same as B<Build-Conflicts>, but only when building the architecture
256 This field is supported since dpkg 1.16.4; in
257 order to build with older dpkg versions, B<Build-Conflicts> should
260 =item B<Build-Conflicts-Indep:> I<package-list>
262 Same as B<Build-Conflicts>, but only when building the architecture
263 independent packages.
269 B<Build-Depends-Arch>
271 B<Build-Depends-Indep>
272 fields is a list of groups of alternative packages.
273 Each group is a list of packages separated by vertical bar (or “pipe”)
275 The groups are separated by commas ‘B<,>’, and can end with a
276 trailing comma that will be eliminated when generating the fields
277 for L<deb-control(5)> (since dpkg 1.10.14).
278 Commas are to be read as “AND”, and pipes as “OR”, with pipes
279 binding more tightly.
280 Each package name is optionally followed by an architecture qualifier
281 appended after a colon ‘B<:>’,
282 optionally followed by a version number specification in parentheses
283 ‘B<(>’ and ‘B<)>’, an
284 architecture specification in square brackets ‘B<[>’ and ‘B<]>’,
285 and a restriction formula
286 consisting of one or more lists of profile names in angle brackets
287 ‘B<E<lt>>’ and ‘B<E<gt>>’.
291 B<Build-Conflicts-Arch>
293 B<Build-Conflicts-Indep>
294 fields is a list of comma-separated package names, where the comma is read
295 as an “AND”, and where the list can end with a trailing comma that will
296 be eliminated when generating the fields for L<deb-control(5)>
297 (since dpkg 1.10.14).
298 Specifying alternative packages using a “pipe” is not supported.
299 Each package name is optionally followed by a version number specification in
300 parentheses, an architecture specification in square brackets, and a
301 restriction formula consisting of one or more lists of profile names in
304 An architecture qualifier name can be a real Debian architecture name
305 (since dpkg 1.16.5), B<any> (since dpkg 1.16.2) or B<native>
307 If omitted, the default for B<Build-Depends> fields is the current host
308 architecture, the default for B<Build-Conflicts> fields is B<any>.
309 A real Debian architecture name will match exactly that architecture for
310 that package name, B<any> will match any architecture for that package
311 name if the package is marked with B<Multi-Arch: allowed>, and
312 B<native> will match the current build architecture if the package
313 is not marked with B<Multi-Arch: foreign>.
315 A version number may start with a ‘B<E<gt>E<gt>>’, in which case any
316 later version will match, and may specify or omit the Debian packaging
317 revision (separated by a hyphen).
318 Accepted version relationships are ‘B<E<gt>E<gt>>’ for greater than,
319 ‘B<E<lt>E<lt>>’ for less than, ‘B<E<gt>=>’ for greater than or
320 equal to, ‘B<E<lt>=>’ for less than or equal to, and ‘B<=>’
323 An architecture specification consists of one or more architecture names,
324 separated by whitespace.
325 Exclamation marks may be prepended to each of the
326 names, meaning “NOT”.
328 A restriction formula consists of one or more restriction lists, separated
330 Each restriction list is enclosed in angle brackets.
332 in the restriction list are build profile names, separated by whitespace
333 and can be prefixed with an exclamation mark, meaning “NOT”.
334 A restriction formula represents a disjunctive normal form expression.
336 Note that dependencies on packages in the
338 set can be omitted and that declaring build conflicts against them is
340 A list of these packages is in the build-essential package.
345 B<Priority>, B<Section>
348 fields can also be in a binary stanza to override the global value from the
353 =item B<Package:> I<binary-package-name> (required)
355 This field is used to name the binary package name.
356 The same restrictions as
357 to a source package name apply.
359 =item B<Package-Type:> B<deb>|B<udeb>|I<type>
361 This field defines the type of the package.
362 B<udeb> is for size-constrained packages used by the debian installer.
363 B<deb> is the default value, it is assumed if the field is absent.
364 More types might be added in the future.
366 =item B<Architecture:> I<arch>|B<all>|B<any> (required)
368 The architecture specifies on which type of hardware this package runs.
370 packages that run on all architectures, use the
373 For packages that are architecture independent, such as shell and Perl
374 scripts or documentation, use the
377 To restrict the packages to a certain set of architectures, specify the
378 architecture names, separated by a space.
379 It's also possible to put
380 architecture wildcards in that list (see
381 L<dpkg-architecture(1)>
382 for more information about them).
384 =item B<Build-Profiles:> I<restriction-formula>
386 This field specifies the conditions for which this binary package does or
388 To express that condition, the same restriction formula syntax from the
389 B<Build-Depends> field is used (including the angle brackets).
391 If a binary package stanza does not contain this field, then it implicitly
392 means that it builds with all build profiles (including none at all).
394 In other words, if a binary package stanza is annotated with a non-empty
395 B<Build-Profiles> field, then this binary package is generated if and
396 only if the condition expressed by the conjunctive normal form expression
399 =item B<Protected:> B<yes>|B<no>
401 =item B<Essential:> B<yes>|B<no>
403 =item B<Build-Essential:> B<yes>|B<no>
405 =item B<Multi-Arch:> B<same>|B<foreign>|B<allowed>|B<no>
407 =item B<Tag:> I<tag-list>
409 =item B<Description:> I<short-description> (recommended)
411 These fields are described in the
413 manual page, as they are copied literally to the control file of the binary
416 =item B<Depends:> I<package-list>
418 =item B<Pre-Depends:> I<package-list>
420 =item B<Recommends:> I<package-list>
422 =item B<Suggests:> I<package-list>
424 =item B<Breaks:> I<package-list>
426 =item B<Enhances:> I<package-list>
428 =item B<Replaces:> I<package-list>
430 =item B<Conflicts:> I<package-list>
432 =item B<Provides:> I<package-list>
434 =item B<Built-Using:> I<package-list>
436 =item B<Static-Built-Using:> I<package-list>
438 These fields declare relationships between packages.
439 They are discussed in
443 When these fields are found in I<debian/control> they can also end with
444 a trailing comma (since dpkg 1.10.14), have architecture specifications and
445 restriction formulas which will all get reduced when generating the fields
446 for L<deb-control(5)>.
448 =item B<Subarchitecture:> I<value>
450 =item B<Kernel-Version:> I<value>
452 =item B<Installer-Menu-Item:> I<value>
454 These fields are used by the debian-installer in B<udeb>s and are
456 For more details about them, see
457 L<https://salsa.debian.org/installer-team/debian-installer/-/raw/master/doc/devel/modules.txt>.
461 =head1 USER-DEFINED FIELDS
463 It is allowed to add additional user-defined fields to the control file.
464 The tools will ignore these fields.
465 If you want the fields to be copied over to
466 the output files, such as the binary packages, you need to use a custom naming
467 scheme: the fields should start with an B<X>, followed by zero or more of
468 the letters B<SBC> and a hyphen.
474 The field will appear in the source package control file, see L<dsc(5)>.
478 The field will appear in the control file in the binary package, see
483 The field will appear in the upload control (.changes) file, see
488 Note that the B<X>[B<SBC>]B<-> prefixes are stripped when the
489 fields are copied over to the output files.
490 A field B<XC-Approved-By>
491 will appear as B<Approved-By> in the changes file and will not appear
492 in the binary or source package control files.
494 Take into account that these user-defined fields will be using the global
495 namespace, which might at some point in the future collide with officially
497 To avoid such potential situation you can prefix those
498 fields with B<Private->, such as B<XB-Private-New-Field>.
506 Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
507 # this field is copied to the binary and source packages
508 XBS-Upstream-Release-Status: stable
509 Homepage: https://wiki.debian.org/Teams/Dpkg
510 Vcs-Browser: https://git.dpkg.org/cgit/dpkg/dpkg.git
511 Vcs-Git: https://git.dpkg.org/git/dpkg/dpkg.git
512 Standards-Version: 3.7.3
513 Build-Depends: pkgconf, debhelper (>= 4.1.81),
514 libselinux1-dev (>= 1.28-4) [!linux-any]
520 # this is a custom field in the binary package
521 XB-Mentoring-Contact: Raphael Hertzog <hertzog@debian.org>
522 Depends: dpkg (>= 1.14.6), perl5, perl-modules, cpio (>= 2.4.2-2),
523 bzip2, lzma, patch (>= 2.2-1), make, binutils, libtimedate-perl
524 Recommends: gcc | c-compiler, build-essential
525 Suggests: gnupg, debian-keyring
526 Conflicts: dpkg-cross (<< 2.0.0), devscripts (<< 2.10.26)
527 Replaces: manpages-pl (<= 20051117-1)
528 Description: Debian package development tools
529 This package provides the development tools (including dpkg-source)
530 required to unpack, build and upload Debian source packages.
532 Most Debian source packages will require additional tools to build;
533 for example, most packages need make and the C compiler gcc.
537 I<%PKGDOCDIR%/spec/rootless-builds.txt>,