deb822.man 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. .\" dpkg manual page - deb822(5)
  2. .\"
  3. .\" Copyright © 1995-1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
  4. .\" Copyright © 2015 Guillem Jover <guillem@debian.org>
  5. .\"
  6. .\" This is free software; you can redistribute it and/or modify
  7. .\" it under the terms of the GNU General Public License as published by
  8. .\" the Free Software Foundation; either version 2 of the License, or
  9. .\" (at your option) any later version.
  10. .\"
  11. .\" This is distributed in the hope that it will be useful,
  12. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. .\" GNU General Public License for more details.
  15. .\"
  16. .\" You should have received a copy of the GNU General Public License
  17. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. .
  19. .TH deb822 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
  20. .nh
  21. .SH NAME
  22. deb822 \- Debian RFC822 control data format
  23. .
  24. .SH DESCRIPTION
  25. The package management system manipulates data represented in a common
  26. format, known as \fIcontrol data\fP, stored in \fIcontrol files\fP.
  27. Control files are used for source packages, binary packages and the
  28. \fB.changes\fP files which control the installation of uploaded
  29. files (\fBdpkg\fP's internal databases are in a similar format).
  30. .
  31. .SH SYNTAX
  32. A control file consists of one or more paragraphs of fields (the paragraphs
  33. are also sometimes referred to as stanzas).
  34. The paragraphs are separated by empty lines.
  35. Parsers may accept lines consisting solely of U+0020 \fBSPACE\fP and
  36. U+0009 \fBTAB\fP as paragraph separators, but control files should use
  37. empty lines.
  38. Some control files allow only one paragraph; others allow several, in which
  39. case each paragraph usually refers to a different package.
  40. (For example, in source packages, the first paragraph refers to the source
  41. package, and later paragraphs refer to binary packages generated from the
  42. source.)
  43. The ordering of the paragraphs in control files is significant.
  44. Each paragraph consists of a series of data fields.
  45. Each field consists of the field name followed by a colon
  46. (U+003A ‘\fB:\fP’), and then the data/value associated with that field.
  47. The field name is composed of US-ASCII characters excluding control
  48. characters, space, and colon (i.e., characters in the ranges
  49. U+0021 ‘\fB!\fP’ through U+0039 ‘\fB9\fP’, and
  50. U+003B ‘\fB;\fP’ through U+007E ‘\fB~\fP’, inclusive).
  51. Field names must not begin with the comment character
  52. (U+0023 ‘\fB#\fP’), nor with the hyphen character
  53. (U+002D ‘\fB\-\fP’).
  54. The field ends at the end of the line or at the end of the last continuation
  55. line (see below).
  56. Horizontal whitespace (U+0020 \fBSPACE\fP and U+0009 \fBTAB\fP) may occur
  57. immediately before or after the value and is ignored there; it is conventional
  58. to put a single space after the colon.
  59. For example, a field might be:
  60. .RS
  61. .nf
  62. Package: dpkg
  63. .fi
  64. .RE
  65. the field name is \fBPackage\fP and the field value \fBdpkg\fP.
  66. Empty field values are only permitted in source package control files
  67. (\fIdebian/control\fP).
  68. Such fields are ignored.
  69. A paragraph must not contain more than one instance of a particular field name.
  70. There are three types of fields:
  71. .RS 0
  72. .TP
  73. .B simple
  74. The field, including its value, must be a single line.
  75. Folding of the field is not permitted.
  76. This is the default field type if the definition of the field does not
  77. specify a different type.
  78. .TP
  79. .B folded
  80. The value of a folded field is a logical line that may span several lines.
  81. The lines after the first are called continuation lines and must start with
  82. a U+0020 \fBSPACE\fP or a U+0009 \fBTAB\fP.
  83. Whitespace, including any newlines, is not significant in the field values
  84. of folded fields.
  85. This folding method is similar to RFC5322, allowing control files that
  86. contain only one paragraph and no multiline fields to be read by parsers
  87. written for RFC5322.
  88. .TP
  89. .B multiline
  90. The value of a multiline field may comprise multiple continuation lines.
  91. The first line of the value, the part on the same line as the field name,
  92. often has special significance or may have to be empty.
  93. Other lines are added following the same syntax as the continuation lines
  94. of the folded fields.
  95. Whitespace, including newlines, is significant in the values of multiline
  96. fields.
  97. .RE
  98. Whitespace must not appear inside names (of packages, architectures, files
  99. or anything else) or version numbers, or between the characters of
  100. multi-character version relationships.
  101. The presence and purpose of a field, and the syntax of its value may differ
  102. between types of control files.
  103. Field names are not case-sensitive, but it is usual to capitalize the field
  104. names using mixed case as shown below.
  105. Field values are case-sensitive unless the description of the field says
  106. otherwise.
  107. Paragraph separators (empty lines) and lines consisting only of
  108. U+0020 \fBSPACE\fP and U+0009 \fBTAB\fP, are not allowed within field
  109. values or between fields.
  110. Empty lines in field values are usually escaped by representing them by a
  111. U+0020 \fBSPACE\fP followed by a dot (U+002E ‘\fB.\fP’).
  112. Lines starting with U+0023 ‘\fB#\fP’, without any preceding whitespace
  113. are comments lines that are only permitted in source package control files
  114. (\fIdebian/control\fP) and in \fBdeb\-origin\fP(5) files.
  115. These comment lines are ignored, even between two continuation lines.
  116. They do not end logical lines.
  117. All control files must be encoded in UTF-8.
  118. .
  119. .\" .SH EXAMPLE
  120. .\" .RS
  121. .\" .nf
  122. .\" .fi
  123. .\" .RE
  124. .
  125. .SH SEE ALSO
  126. .BR RFC822 ,
  127. .BR RFC5322 .