1deb822(5) dpkg suite deb822(5)
2
3
4
6 deb822 - Debian RFC822 control data format
7
9 The package management system manipulates data represented in a common
10 format, known as control data, stored in control files. Control files
11 are used for source packages, binary packages and the .changes files
12 which control the installation of uploaded files (dpkg's internal
13 databases are in a similar format).
14
16 A control file consists of one or more paragraphs of fields (the
17 paragraphs are also sometimes referred to as stanzas). The paragraphs
18 are separated by empty lines. Parsers may accept lines consisting
19 solely of U+0020 SPACE and U+0009 TAB as paragraph separators, but
20 control files should use empty lines. Some control files allow only
21 one paragraph; others allow several, in which case each paragraph
22 usually refers to a different package. (For example, in source
23 packages, the first paragraph refers to the source package, and later
24 paragraphs refer to binary packages generated from the source.) The
25 ordering of the paragraphs in control files is significant.
26
27 Each paragraph consists of a series of data fields. Each field
28 consists of the field name followed by a colon (U+003A ‘:’), and then
29 the data/value associated with that field. The field name is composed
30 of US-ASCII characters excluding control characters, space, and colon
31 (i.e., characters in the ranges U+0021 ‘!’ through U+0039 ‘9’, and
32 U+003B ‘;’ through U+007E ‘~’, inclusive). Field names must not begin
33 with the comment character (U+0023 ‘#’), nor with the hyphen character
34 (U+002D ‘-’).
35
36 The field ends at the end of the line or at the end of the last
37 continuation line (see below). Horizontal whitespace (U+0020 SPACE and
38 U+0009 TAB) may occur immediately before or after the value and is
39 ignored there; it is conventional to put a single space after the
40 colon. For example, a field might be:
41
42 Package: dpkg
43
44 the field name is Package and the field value dpkg.
45
46 Empty field values are only permitted in source package control files
47 (debian/control). Such fields are ignored.
48
49 A paragraph must not contain more than one instance of a particular
50 field name.
51
52 There are three types of fields:
53
54 simple
55 The field, including its value, must be a single line. Folding
56 of the field is not permitted. This is the default field type
57 if the definition of the field does not specify a different
58 type.
59
60 folded
61 The value of a folded field is a logical line that may span
62 several lines. The lines after the first are called
63 continuation lines and must start with a U+0020 SPACE or a
64 U+0009 TAB. Whitespace, including any newlines, is not
65 significant in the field values of folded fields.
66
67 This folding method is similar to RFC5322, allowing control
68 files that contain only one paragraph and no multiline fields
69 to be read by parsers written for RFC5322.
70
71 multiline
72 The value of a multiline field may comprise multiple
73 continuation lines. The first line of the value, the part on
74 the same line as the field name, often has special significance
75 or may have to be empty. Other lines are added following the
76 same syntax as the continuation lines of the folded fields.
77 Whitespace, including newlines, is significant in the values of
78 multiline fields.
79
80 Whitespace must not appear inside names (of packages,
81 architectures, files or anything else) or version numbers, or
82 between the characters of multi-character version relationships.
83
84 The presence and purpose of a field, and the syntax of its value
85 may differ between types of control files.
86
87 Field names are not case-sensitive, but it is usual to capitalize
88 the field names using mixed case as shown below. Field values are
89 case-sensitive unless the description of the field says otherwise.
90
91 Paragraph separators (empty lines) and lines consisting only of
92 U+0020 SPACE and U+0009 TAB, are not allowed within field values or
93 between fields. Empty lines in field values are usually escaped by
94 representing them by a U+0020 SPACE followed by a dot (U+002E ‘.’).
95
96 Lines starting with U+0023 ‘#’, without any preceding whitespace
97 are comments lines that are only permitted in source package
98 control files (debian/control) and in deb-origin(5) files. These
99 comment lines are ignored, even between two continuation lines.
100 They do not end logical lines.
101
102 All control files must be encoded in UTF-8.
103
105 RFC822, RFC5322.
106
107
108
1091.21.9 2022-07-01 deb822(5)