man-pages/man5/deb-src-control.5.html
2021-03-31 01:06:50 +01:00

603 lines
20 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of deb-src-control</TITLE>
</HEAD><BODY>
<H1>deb-src-control</H1>
Section: dpkg suite (5)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
deb-src-control - Debian source packages' master control file format
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
debian/control
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Each Debian source package contains the master &laquo;control&raquo; file,
which contains at least 2 paragraphs, separated by a blank line.
The first paragraph lists
all information about the source package in general, while each following
paragraph describes exactly one binary package. Each paragraph consists of at
least one field. A field starts with a fieldname, such as
<B>Package</B>
or
<B>Section</B>
(case insensitive), followed by a colon, the body of the field and a newline.
Multi-line fields are also allowed, but each supplementary line, without a
fieldname, should start with at least one space. The content of the multi-line
fields is generally joined to a single line by the tools (except in the case of
the
<B>Description</B>
field, see below). To insert empty lines into a multi-line
field, insert a dot after the space.
Lines starting with a '<B>#</B>' are treated as comments.
<A NAME="lbAE">&nbsp;</A>
<H2>SOURCE FIELDS</H2>
<DL COMPACT>
<DT id="1"><B>Source:</B> <I>source-package-name</I> (required)
<DD>
The value of this field is the name of the source package, and should
match the name of the source package in the debian/changelog file. A package
name must consist only of lowercase letters (a-z), digits (0-9), plus (+) and
minus (-) signs, and periods (.). Package names must be at least two characters
long and must start with a lowercase alphanumeric character (a-z0-9).
<P>
<DT id="2"><B>Maintainer:</B> <I>fullname-email</I> (recommended)
<DD>
Should be in the format &laquo;Joe Bloggs &lt;<A HREF="mailto:jbloggs@foo.com">jbloggs@foo.com</A>&gt;&raquo;, and references the
person who currently maintains the package, as opposed to the author of the
software or the original packager.
<P>
<DT id="3"><B>Uploaders:</B><I> fullname-email</I>
<DD>
Lists all the names and email addresses of co-maintainers of the package, in
the same format as the <B>Maintainer</B> field.
Multiple co-maintainers should be separated by a comma.
<P>
<DT id="4"><B>Standards-Version:</B><I> version-string</I>
<DD>
This documents the most recent version of the distribution policy standards
this package complies with.
<P>
<DT id="5"><B>Description</B><I> short-description</I>
<DD>
<B> </B><I>long-description</I>
The format for the source package description is a short brief summary on the
first line (after the <B>Description</B> field).
The following lines should be used as a longer, more detailed description.
Each line of the long description must be preceded by a space, and blank
lines in the long description must contain a single '<B>.</B>' following
the preceding space.
<P>
<DT id="6"><B>Homepage:</B><I> url</I>
<DD>
The upstream project home page URL.
<P>
<DT id="7"><B>Bugs:</B><I> url</I>
<DD>
The <I>url</I> of the bug tracking system for this package. The current
used format is <I>bts-type</I><B>://</B><I>bts-address</I>, like
<B>debbugs://bugs.debian.org</B>. This field is usually not needed.
<P>
<DT id="8"><B>Rules-Requires-Root:</B> <B>no</B>|<B>binary-targets</B>|<I>impl-keywords</I>
<DD>
This field is used to indicate whether the <B>debian/rules</B> file requires
(fake)root privileges to run some of its targets, and if so when.
<DL COMPACT><DT id="9"><DD>
<DL COMPACT>
<DT id="10"><B>no</B>
<DD>
The binary targets will not require (fake)root at all.
<DT id="11"><B>binary-targets</B>
<DD>
The binary targets must always be run under (fake)root.
This value is the default when the field is omitted; adding the field
with an explicit <B>binary-targets</B> while not strictly needed, marks
it as having been analyzed for this requirement.
<DT id="12"><I>impl-keywords</I>
<DD>
This is a space-separated list of keywords which define when (fake)root
is required.
<P>
Keywords consist of <I>namespace</I>/<I>cases</I>.
The <I>namespace</I> part cannot contain &quot;/&quot; or whitespace.
The <I>cases</I> part cannot contain whitespace.
Furthermore, both parts must consist entirely of printable ASCII characters.
<P>
Each tool/package will define a namespace named after itself and provide
a number of cases where (fake)root is required.
(See &quot;Implementation provided keywords&quot; in <I>rootless-builds.txt</I>).
<P>
When the field is set to one of the <I>impl-keywords</I>, the builder will
expose an interface that is used to run a command under (fake)root.
(See &quot;Gain Root API&quot; in <I>rootless-builds.txt</I>.)
</DL>
</DL>
<P>
<DT id="13"><B>Testsuite:</B><I> name-list</I>
<DD>
<B>Testsuite-Triggers:</B><I> package-list</I>
These fields are described in the
<B><A HREF="/cgi-bin/man/man2html?5+dsc">dsc</A></B>(5)
manual page, as they are generated from information inferred from
<B>debian/tests/control</B> or copied literally to the source control file.
<P>
<DT id="14"><B>Vcs-Arch:</B><I> url</I>
<DD>
<B>Vcs-Bzr:</B><I> url</I>
<B>Vcs-Cvs:</B><I> url</I>
<B>Vcs-Darcs:</B><I> url</I>
<B>Vcs-Git:</B><I> url</I>
<B>Vcs-Hg:</B><I> url</I>
<B>Vcs-Mtn:</B><I> url</I>
<B>Vcs-Svn:</B><I> url</I>
The <I>url</I> of the Version Control System repository used to maintain this
package. Currently supported are <B>Arch</B>, <B>Bzr</B> (Bazaar), <B>Cvs</B>,
<B>Darcs</B>, <B>Git</B>, <B>Hg</B> (Mercurial), <B>Mtn</B> (Monotone) and
<B>Svn</B> (Subversion). Usually this field points to the latest version
of the package, such as the main branch or the trunk.
<P>
<DT id="15"><B>Vcs-Browser:</B><I> url</I>
<DD>
The <I>url</I> of a webinterface to browse the Version Control System
repository.
<P>
<DT id="16"><B>Origin:</B><I> name</I>
<DD>
The name of the distribution this package is originating from. This field is
usually not needed.
<P>
<DT id="17"><B>Section:</B><I> section</I>
<DD>
This is a general field that gives the package a category based on the
software that it installs.
Some common sections are <B>utils</B>, <B>net</B>, <B>mail</B>, <B>text</B>,
<B>x11</B>, etc.
<P>
<DT id="18"><B>Priority:</B><I> priority</I>
<DD>
Sets the importance of this package in relation to the system as a whole.
Common priorities are <B>required</B>, <B>standard</B>, <B>optional</B>,
<B>extra</B>, etc.
<P>
The
<B>Section</B>
and
<B>Priority</B>
fields usually have a defined set of accepted values based on the specific
distribution policy.
<P>
<DT id="19"><B>Build-Depends:</B><I> package-list</I>
<DD>
A list of packages that need to be installed and configured to be able
to build from source package.
These dependencies need to be satisfied when building binary architecture
dependent or independent packages and source packages.
Including a dependency in this field does not have the exact same effect as
including it in both <B>Build-Depends-Arch</B> and <B>Build-Depends-Indep</B>,
because the dependency also needs to be satisfied when building the source
package.
<DT id="20"><B>Build-Depends-Arch:</B><I> package-list</I>
<DD>
Same as <B>Build-Depends</B>, but they are only needed when building the
architecture dependent packages. The <B>Build-Depends</B> are also
installed in this case. This field is supported since dpkg 1.16.4; in
order to build with older dpkg versions, <B>Build-Depends</B>
should be used instead.
<P>
<DT id="21"><B>Build-Depends-Indep:</B><I> package-list</I>
<DD>
Same as <B>Build-Depends</B>, but they are only needed when building the
architecture independent packages. The <B>Build-Depends</B> are also
installed in this case.
<P>
<DT id="22"><B>Build-Conflicts:</B><I> package-list</I>
<DD>
A list of packages that should not be installed when the package is
built, for example because they interfere with the build system used.
Including a dependency in this list has the same effect as including
it in both <B>Build-Conflicts-Arch</B> and
<B>Build-Conflicts-Indep</B>, with the additional effect of being
used for source-only builds.
<P>
<DT id="23"><B>Build-Conflicts-Arch:</B><I> package-list</I>
<DD>
Same as <B>Build-Conflicts</B>, but only when building the architecture
dependent packages. This field is supported since dpkg 1.16.4; in
order to build with older dpkg versions, <B>Build-Conflicts</B> should
be used instead.
<P>
<DT id="24"><B>Build-Conflicts-Indep:</B><I> package-list</I>
<DD>
Same as <B>Build-Conflicts</B>, but only when building the architecture
independent packages.
<P>
</DL>
<P>
The syntax of the
<B>Build-Depends</B>,
<B>Build-Depends-Arch</B>
and
<B>Build-Depends-Indep</B>
fields is a list of groups of alternative packages.
Each group is a list of packages separated by vertical bar (or "pipe")
symbols, '<B>|</B>'.
The groups are separated by commas '<B>,</B>', and can end with a
trailing comma that will be eliminated when generating the fields
for <B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5) (since dpkg 1.10.14).
Commas are to be read as "AND", and pipes as "OR", with pipes
binding more tightly.
Each package name is optionally followed by an architecture qualifier
appended after a colon '<B>:</B>',
optionally followed by a version number specification in parentheses
'<B>(</B>' and '<B>)</B>', an
architecture specification in square brackets '<B>[</B>' and '<B>]</B>',
and a restriction formula
consisting of one or more lists of profile names in angle brackets
'<B>&lt;</B>' and '<B>&gt;</B>'.
<P>
The syntax of the
<B>Build-Conflicts</B>,
<B>Build-Conflicts-Arch</B>
and
<B>Build-Conflicts-Indep</B>
fields is a list of comma-separated package names, where the comma is read
as an "AND", and where the list can end with a trailing comma that will
be eliminated when generating the fields for <B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5)
(since dpkg 1.10.14).
Specifying alternative packages using a "pipe" is not supported.
Each package name is optionally followed by a version number specification in
parentheses, an architecture specification in square brackets, and a
restriction formula consisting of one or more lists of profile names in
angle brackets.
<P>
An architecture qualifier name can be a real Debian architecture name
(since dpkg 1.16.5), <B>any</B> (since dpkg 1.16.2) or <B>native</B>
(since dpkg 1.16.5).
If omitted, the default for <B>Build-Depends</B> fields is the current host
architecture, the default for <B>Build-Conflicts</B> fields is <B>any</B>.
A real Debian architecture name will match exactly that architecture for
that package name, <B>any</B> will match any architecture for that package
name if the package is marked with <B>Multi-Arch: allowed</B>, and
<B>native</B> will match the current build architecture if the package
is not marked with <B>Multi-Arch: foreign</B>.
<P>
A version number may start with a '<B>&gt;&gt;</B>', in which case any
later version will match, and may specify or omit the Debian packaging
revision (separated by a hyphen).
Accepted version relationships are '<B>&gt;&gt;</B>' for greater than,
'<B>&lt;&lt;</B>' for less than, '<B>&gt;=</B>' for greater than or
equal to, '<B>&lt;=</B>' for less than or equal to, and '<B>=</B>'
for equal to.
<P>
An architecture specification consists of one or more architecture names,
separated by whitespace. Exclamation marks may be prepended to each of the
names, meaning "NOT".
<P>
A restriction formula consists of one or more restriction lists, separated
by whitespace. Each restriction list is enclosed in angle brackets. Items
in the restriction list are build profile names, separated by whitespace
and can be prefixed with an exclamation mark, meaning "NOT".
A restriction formula represents a disjunctive normal form expression.
<P>
Note that dependencies on packages in the
<B>build-essential</B>
set can be omitted and that declaring build conflicts against them is
impossible. A list of these packages is in the build-essential package.
<P>
<P>
<A NAME="lbAF">&nbsp;</A>
<H2>BINARY FIELDS</H2>
<P>
<P>
Note that the
<B>Priority</B>, <B>Section</B>
and
<B>Homepage</B>
fields can also be in a binary paragraph to override the global value from the
source package.
<P>
<DL COMPACT>
<DT id="25"><B>Package:</B> <I>binary-package-name</I> (required)
<DD>
This field is used to name the binary package name. The same restrictions as
to a source package name apply.
<P>
<DT id="26"><B>Package-Type:</B> <B>deb</B>|<B>udeb</B>|<I>type</I>
<DD>
This field defines the type of the package.
<B>udeb</B> is for size-constrained packages used by the debian installer.
<B>deb</B> is the default value, it is assumed if the field is absent.
More types might be added in the future.
<P>
<DT id="27"><B>Architecture:</B> <I>arch</I>|<B>all</B>|<B>any</B> (required)
<DD>
The architecture specifies on which type of hardware this package runs. For
packages that run on all architectures, use the
<B>any</B>
value. For packages that are architecture independent, such as shell and Perl
scripts or documentation, use the
<B>all</B>
value. To restrict the packages to a certain set of architectures, specify the
architecture names, separated by a space. It's also possible to put
architecture wildcards in that list (see
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-architecture">dpkg-architecture</A></B>(1)
for more information about them).
<P>
<DT id="28"><B>Build-Profiles:</B> <I>restriction-formula</I>
<DD>
This field specifies the conditions for which this binary package does or
does not build.
To express that condition, the same restriction formula syntax from the
<B>Build-Depends</B> field is used.
<P>
If a binary package paragraph does not contain this field, then it implicitly
means that it builds with all build profiles (including none at all).
<P>
In other words, if a binary package paragraph is annotated with a non-empty
<B>Build-Profiles</B> field, then this binary package is generated if and
only if the condition expressed by the conjunctive normal form expression
evaluates to true.
<P>
<DT id="29"><B>Essential:</B> <B>yes</B>|<B>no</B>
<DD>
<B>Build-Essential:</B> <B>yes</B>|<B>no</B>
<B>Multi-Arch:</B> <B>same</B>|<B>foreign</B>|<B>allowed</B>|<B>no</B>
<B>Tag:</B><I> tag-list</I>
<B>Description:</B> <I>short-description</I> (recommended)
These fields are described in the
<B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5)
manual page, as they are copied literally to the control file of the binary
package.
<P>
<DT id="30"><B>Depends:</B><I> package-list</I>
<DD>
<B>Pre-Depends:</B><I> package-list</I>
<B>Recommends:</B><I> package-list</I>
<B>Suggests:</B><I> package-list</I>
<B>Breaks:</B><I> package-list</I>
<B>Enhances:</B><I> package-list</I>
<B>Replaces:</B><I> package-list</I>
<B>Conflicts:</B><I> package-list</I>
<B>Provides:</B><I> package-list</I>
<B>Built-Using:</B><I> package-list</I>
These fields declare relationships between packages. They are discussed in
the
<B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5)
manpage.
When these fields are found in <I>debian/control</I> they can also end with
a trailing comma (since dpkg 1.10.14), have architecture specifications and
restriction formulas which will all get reduced when generating the fields
for <B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5).
<P>
<DT id="31"><B>Subarchitecture:</B><I> value</I>
<DD>
<B>Kernel-Version:</B><I> value</I>
<B>Installer-Menu-Item:</B><I> value</I>
These fields are used by the debian-installer in <B>udeb</B>s and are
usually not needed.
See /usr/share/doc/debian-installer/devel/modules.txt from the
<B>debian-installer</B>
package for more details about them.
<P>
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>USER-DEFINED FIELDS</H2>
It is allowed to add additional user-defined fields to the control file. The
tools will ignore these fields. If you want the fields to be copied over to
the output files, such as the binary packages, you need to use a custom naming
scheme: the fields should start with an <B>X</B>, followed by zero or more of
the letters <B>SBC</B> and a hyphen.
<P>
<DL COMPACT>
<DT id="32"><B>S</B>
<DD>
The field will appear in the source package control file, see <B><A HREF="/cgi-bin/man/man2html?5+dsc">dsc</A></B>(5).
<DT id="33"><B>B</B>
<DD>
The field will appear in the control file in the binary package, see
<B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5).
<DT id="34"><B>C</B>
<DD>
The field will appear in the upload control (.changes) file, see
<B><A HREF="/cgi-bin/man/man2html?5+deb-changes">deb-changes</A></B>(5).
<P>
</DL>
<P>
Note that the <B>X</B>[<B>SBC</B>]<B>-</B> prefixes are stripped when the
fields are copied over to the output files. A field <B>XC-Approved-By</B>
will appear as <B>Approved-By</B> in the changes file and will not appear
in the binary or source package control files.
<P>
Take into account that these user-defined fields will be using the global
namespace, which might at some point in the future collide with officially
recognized fields. To avoid such potential situation you can prefix those
fields with <B>Private-</B>, such as <B>XB-Private-New-Field</B>.
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>EXAMPLE</H2>
<PRE>
# Comment
Source: dpkg
Section: admin
Priority: required
Maintainer: Dpkg Developers &lt;<A HREF="mailto:debian-dpkg@lists.debian.org">debian-dpkg@lists.debian.org</A>&gt;
# this field is copied to the binary and source packages
XBS-Upstream-Release-Status: stable
Homepage: <A HREF="https://wiki.debian.org/Teams/Dpkg">https://wiki.debian.org/Teams/Dpkg</A>
Vcs-Browser: <A HREF="https://git.dpkg.org/cgit/dpkg/dpkg.git">https://git.dpkg.org/cgit/dpkg/dpkg.git</A>
Vcs-Git: <A HREF="https://git.dpkg.org/git/dpkg/dpkg.git">https://git.dpkg.org/git/dpkg/dpkg.git</A>
Standards-Version: 3.7.3
Build-Depends: pkg-config, debhelper (&gt;= 4.1.81),
libselinux1-dev (&gt;= 1.28-4) [!linux-any]
Package: dpkg-dev
Section: utils
Priority: optional
Architecture: all
# this is a custom field in the binary package
XB-Mentoring-Contact: Raphael Hertzog &lt;<A HREF="mailto:hertzog@debian.org">hertzog@debian.org</A>&gt;
Depends: dpkg (&gt;= 1.14.6), perl5, perl-modules, cpio (&gt;= 2.4.2-2),
bzip2, lzma, patch (&gt;= 2.2-1), make, binutils, libtimedate-perl
Recommends: gcc | c-compiler, build-essential
Suggests: gnupg, debian-keyring
Conflicts: dpkg-cross (&lt;&lt; 2.0.0), devscripts (&lt;&lt; 2.10.26)
Replaces: manpages-pl (&lt;= 20051117-1)
Description: Debian package development tools
This package provides the development tools (including dpkg-source)
required to unpack, build and upload Debian source packages.
.
Most Debian source packages will require additional tools to build;
for example, most packages need make and the C compiler gcc.
</PRE>
<P>
<P>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?5+deb-control">deb-control</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?7+deb-version">deb-version</A></B>(7),
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-source">dpkg-source</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="35"><A HREF="#lbAB">NAME</A><DD>
<DT id="36"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="37"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="38"><A HREF="#lbAE">SOURCE FIELDS</A><DD>
<DT id="39"><A HREF="#lbAF">BINARY FIELDS</A><DD>
<DT id="40"><A HREF="#lbAG">USER-DEFINED FIELDS</A><DD>
<DT id="41"><A HREF="#lbAH">EXAMPLE</A><DD>
<DT id="42"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:02 GMT, March 31, 2021
</BODY>
</HTML>