deb.5 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. .\" dpkg manual page - deb(5)
  2. .\"
  3. .\" Copyright © 1995 Raul Miller
  4. .\" Copyright © 1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
  5. .\" Copyright © 2000 Wichert Akkerman <wakkerma@debian.org>
  6. .\" Copyright © 2006-2014 Guillem Jover <guillem@debian.org>
  7. .\"
  8. .\" This is free software; you can redistribute it and/or modify
  9. .\" it under the terms of the GNU General Public License as published by
  10. .\" the Free Software Foundation; either version 2 of the License, or
  11. .\" (at your option) any later version.
  12. .\"
  13. .\" This is distributed in the hope that it will be useful,
  14. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. .\" GNU General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU General Public License
  19. .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. .
  21. .TH deb 5 "2014-05-24" "Debian Project" "Debian"
  22. .SH NAME
  23. deb \- Debian binary package format
  24. .SH SYNOPSIS
  25. .IB filename .deb
  26. .SH DESCRIPTION
  27. The
  28. .B .deb
  29. format is the Debian binary package file format. It is understood
  30. since dpkg 0.93.76, and is generated by default since dpkg 1.2.0 and
  31. 1.1.1elf (i386/ELF builds).
  32. .PP
  33. The format described here is used since Debian 0.93; details of the
  34. old format are described in
  35. .BR deb\-old (5).
  36. .SH FORMAT
  37. The file is an
  38. .B ar
  39. archive with a magic value of
  40. .BR !<arch> .
  41. Only the common \fBar\fP archive format is supported, with no long file
  42. name extensions, but with file names containing an optional trailing
  43. slash, which limits their length to 15 characters (from the 16 allowed).
  44. File sizes are limited to 10 ASCII decimal digits, allowing for up to
  45. approximately 9536.74 MiB member files.
  46. .PP
  47. The \fBtar\fP archives currently allowed are, the old-style (v7) format,
  48. the pre-POSIX ustar format, a subset of the GNU format (only the new
  49. style long pathnames and long linknames, supported since dpkg 1.4.1.17),
  50. and the POSIX ustar format (long names supported since dpkg 1.15.0).
  51. Unrecognized tar typeflags are considered an error.
  52. Each tar entry size inside a tar archive is limited to 11 ASCII octal
  53. digits, allowing for up to 8 GiB tar entries.
  54. .PP
  55. The first member is named
  56. .B debian\-binary
  57. and contains a series of lines, separated by newlines. Currently only
  58. one line is present, the format version number,
  59. .BR 2.0
  60. at the time this manual page was written.
  61. Programs which read new-format archives should be prepared for the
  62. minor number to be increased and new lines to be present, and should
  63. ignore these if this is the case.
  64. .PP
  65. If the major number has changed, an incompatible change has been made
  66. and the program should stop. If it has not, then the program should
  67. be able to safely continue, unless it encounters an unexpected member
  68. in the archive (except at the end), as described below.
  69. .PP
  70. The second required member is named
  71. .BR control.tar .
  72. It is a tar archive containing the package control information, either
  73. not compressed (supported since dpkg 1.17.6), or compressed with
  74. gzip (with \fB.gz\fP extension) or
  75. xz (with \fB.xz\fP extension, supported since 1.17.6),
  76. as a series of plain files, of which the file
  77. .B control
  78. is mandatory and contains the core control information. The control
  79. tarball may optionally contain an entry for
  80. .RB \(oq . \(cq,
  81. the current directory.
  82. .PP
  83. The third, last required member is named
  84. .BR data.tar .
  85. It contains the filesystem as a tar archive, either
  86. not compressed (supported since dpkg 1.10.24), or compressed with
  87. gzip (with \fB.gz\fP extension),
  88. xz (with \fB.xz\fP extension, supported since dpkg 1.15.6),
  89. bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or
  90. lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25).
  91. .PP
  92. These members must occur in this exact order. Current implementations
  93. should ignore any additional members after
  94. .BR data.tar .
  95. Further members may be defined in the future, and (if possible) will be
  96. placed after these three. Any additional members that may need to be
  97. inserted after
  98. .B debian\-binary
  99. and before
  100. .B control.tar
  101. or
  102. .B data.tar
  103. and which should be safely ignored by older programs, will have names
  104. starting with an underscore,
  105. .RB \(oq _ \(cq.
  106. .PP
  107. Those new members which won't be able to be safely ignored will be
  108. inserted before
  109. .B data.tar
  110. with names starting with something other than underscores, or will
  111. (more likely) cause the major version number to be increased.
  112. .SH MEDIA TYPE
  113. .SS Current
  114. application/vnd.debian.binary-package
  115. .SS Deprecated
  116. application/x-debian-package
  117. .br
  118. application/x-deb
  119. .SH SEE ALSO
  120. .BR deb\-old (5),
  121. .BR dpkg\-deb (1),
  122. .BR deb\-control (5).