deb822.5 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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 "2015-06-01" "Debian Project" "Debian"
  20. .SH NAME
  21. deb822 \- Debian RFC822 control data format
  22. .
  23. .SH DESCRIPTION
  24. The package management system manipulates data represented in a common
  25. format, known as \fIcontrol data\fP, stored in \fIcontrol files\fP.
  26. Control files are used for source packages, binary packages and the
  27. \fB.changes\fP files which control the installation of uploaded
  28. files (\fBdpkg\fP's internal databases are in a similar format).
  29. .
  30. .SH SYNTAX
  31. A control file consists of one or more paragraphs of fields (the paragraphs
  32. are also sometimes referred to as stanzas).
  33. The paragraphs are separated by empty lines.
  34. Parsers may accept lines consisting solely of spaces and tabs as paragraph
  35. separators, but control files should use empty lines.
  36. Some control files allow only one paragraph; others allow several, in which
  37. case each paragraph usually refers to a different package.
  38. (For example, in source packages, the first paragraph refers to the source
  39. package, and later paragraphs refer to binary packages generated from the
  40. source.)
  41. The ordering of the paragraphs in control files is significant.
  42. Each paragraph consists of a series of data fields.
  43. Each field consists of the field name followed by a colon and then the
  44. data/value associated with that field.
  45. The field name is composed of US-ASCII characters excluding control
  46. characters, space, and colon (i.e., characters in the ranges 33-57 and
  47. 59-126, inclusive).
  48. Field names must not begin with the comment character (\(oq\fB#\fP\(cq),
  49. nor with the hyphen character (\(oq\fB\-\fP\(cq).
  50. The field ends at the end of the line or at the end of the last continuation
  51. line (see below).
  52. Horizontal whitespace (spaces and tabs) may occur immediately before or after
  53. the value and is ignored there; it is conventional to put a single space after
  54. the colon.
  55. For example, a field might be:
  56. .RS
  57. .nf
  58. Package: dpkg
  59. .fi
  60. .RE
  61. the field name is \fBPackage\fP and the field value \fBdpkg\fP.
  62. Empty field values are only permitted in source package control files
  63. (\fIdebian/control\fP).
  64. Such fields are ignored.
  65. A paragraph must not contain more than one instance of a particular field name.
  66. There are three types of fields:
  67. .RS 0
  68. .TP
  69. .B simple
  70. The field, including its value, must be a single line.
  71. Folding of the field is not permitted.
  72. This is the default field type if the definition of the field does not
  73. specify a different type.
  74. .TP
  75. .B folded
  76. The value of a folded field is a logical line that may span several lines.
  77. The lines after the first are called continuation lines and must start with
  78. a space or a tab.
  79. Whitespace, including any newlines, is not significant in the field values
  80. of folded fields.
  81. This folding method is similar to RFC5322, allowing control files that
  82. contain only one paragraph and no multiline fields to be read by parsers
  83. written for RFC5322.
  84. .TP
  85. .B multiline
  86. The value of a multiline field may comprise multiple continuation lines.
  87. The first line of the value, the part on the same line as the field name,
  88. often has special significance or may have to be empty.
  89. Other lines are added following the same syntax as the continuation lines
  90. of the folded fields.
  91. Whitespace, including newlines, is significant in the values of multiline
  92. fields.
  93. .RE
  94. Whitespace must not appear inside names (of packages, architectures, files
  95. or anything else) or version numbers, or between the characters of
  96. multi-character version relationships.
  97. The presence and purpose of a field, and the syntax of its value may differ
  98. between types of control files.
  99. Field names are not case-sensitive, but it is usual to capitalize the field
  100. names using mixed case as shown below.
  101. Field values are case-sensitive unless the description of the field says
  102. otherwise.
  103. Paragraph separators (empty lines) and lines consisting only of spaces and
  104. tabs are not allowed within field values or between fields.
  105. Empty lines in field values are usually escaped by representing them by a
  106. space followed by a dot.
  107. Lines starting with \(oq\fB#\fP\(cq without any preceding whitespace are
  108. comments lines that are only permitted in source package control files
  109. \fIdebian/control\fP).
  110. These comment lines are ignored, even between two continuation lines.
  111. They do not end logical lines.
  112. All control files must be encoded in UTF-8.
  113. .
  114. .\" .SH EXAMPLE
  115. .\" .RS
  116. .\" .nf
  117. .\" .fi
  118. .\" .RE
  119. .
  120. .SH SEE ALSO
  121. .BR RFC822 ,
  122. .BR RFC5322 .