deb.5 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .TH deb 5 "2009-02-06" "Debian Project" "Debian"
  2. .SH NAME
  3. deb \- Debian binary package format
  4. .SH SYNOPSIS
  5. .IB filename .deb
  6. .SH DESCRIPTION
  7. The
  8. .B .deb
  9. format is the Debian binary package file format. It is understood by
  10. dpkg 0.93.76 and later, and is generated by default by all versions
  11. of dpkg since 1.2.0 and all i386/ELF versions since 1.1.1elf.
  12. .PP
  13. The format described here is used since Debian 0.93; details of the
  14. old format are described in
  15. .BR deb-old (5).
  16. .SH FORMAT
  17. The file is an
  18. .B ar
  19. archive with a magic value of
  20. .BR !<arch> .
  21. The file names might contain a trailing slash.
  22. .PP
  23. The \fBtar\fP archives currently allowed are, the old-style (v7) format,
  24. the pre-POSIX ustar format, a subset of the GNU format (only the new
  25. style long pathnames and long linknames, supported since dpkg 1.4.1.17).
  26. Unrecognized tar typeflags are considered an error.
  27. .PP
  28. The first member is named
  29. .B debian-binary
  30. and contains a series of lines, separated by newlines. Currently only
  31. one line is present, the format version number,
  32. .BR 2.0
  33. at the time this manual page was written.
  34. Programs which read new-format archives should be prepared for the
  35. minor number to be increased and new lines to be present, and should
  36. ignore these if this is the case.
  37. .PP
  38. If the major number has changed, an incompatible change has been made
  39. and the program should stop. If it has not, then the program should
  40. be able to safely continue, unless it encounters an unexpected member
  41. in the archive (except at the end), as described below.
  42. .PP
  43. The second required member is named
  44. .BR control.tar.gz .
  45. It is a gzipped tar archive containing the package control information,
  46. as a series of plain files, of which the file
  47. .B control
  48. is mandatory and contains the core control information. The control
  49. tarball may optionally contain an entry for
  50. .RB ` . ',
  51. the current directory.
  52. .PP
  53. The third, last required member is named
  54. .BR data.tar .
  55. It contains the filesystem as a tar archive, either
  56. not compressed (supported since dpkg 1.10.24), or compressed with
  57. gzip (with \fB.gz\fP extension),
  58. bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or
  59. lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25).
  60. .PP
  61. These members must occur in this exact order. Current implementations
  62. should ignore any additional members after
  63. .BR data.tar .
  64. Further members may be defined in the future, and (if possible) will be
  65. placed after these three. Any additional members that may need to be
  66. inserted before
  67. .B data.tar
  68. and which should be safely ignored by older programs, will have names
  69. starting with an underscore,
  70. .RB ` _ '.
  71. .PP
  72. Those new members which won't be able to be safely ignored will be
  73. inserted before
  74. .B data.tar
  75. with names starting with something other than underscores, or will
  76. (more likely) cause the major version number to be increased.
  77. .SH SEE ALSO
  78. .BR deb-old (5),
  79. .BR dpkg-deb (1),
  80. .BR deb-control (5).