deb.5 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .TH deb 5 "2009-02-27" "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. and the POSIX ustar format (long names supported since dpkg 1.15.0).
  27. Unrecognized tar typeflags are considered an error.
  28. .PP
  29. The first member is named
  30. .B debian-binary
  31. and contains a series of lines, separated by newlines. Currently only
  32. one line is present, the format version number,
  33. .BR 2.0
  34. at the time this manual page was written.
  35. Programs which read new-format archives should be prepared for the
  36. minor number to be increased and new lines to be present, and should
  37. ignore these if this is the case.
  38. .PP
  39. If the major number has changed, an incompatible change has been made
  40. and the program should stop. If it has not, then the program should
  41. be able to safely continue, unless it encounters an unexpected member
  42. in the archive (except at the end), as described below.
  43. .PP
  44. The second required member is named
  45. .BR control.tar.gz .
  46. It is a gzipped tar archive containing the package control information,
  47. as a series of plain files, of which the file
  48. .B control
  49. is mandatory and contains the core control information. The control
  50. tarball may optionally contain an entry for
  51. .RB ` . ',
  52. the current directory.
  53. .PP
  54. The third, last required member is named
  55. .BR data.tar .
  56. It contains the filesystem as a tar archive, either
  57. not compressed (supported since dpkg 1.10.24), or compressed with
  58. gzip (with \fB.gz\fP extension),
  59. xz (with \fB.xz\fP extension, supported since dpkg 1.15.6),
  60. bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or
  61. lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25).
  62. .PP
  63. These members must occur in this exact order. Current implementations
  64. should ignore any additional members after
  65. .BR data.tar .
  66. Further members may be defined in the future, and (if possible) will be
  67. placed after these three. Any additional members that may need to be
  68. inserted before
  69. .B data.tar
  70. and which should be safely ignored by older programs, will have names
  71. starting with an underscore,
  72. .RB ` _ '.
  73. .PP
  74. Those new members which won't be able to be safely ignored will be
  75. inserted before
  76. .B data.tar
  77. with names starting with something other than underscores, or will
  78. (more likely) cause the major version number to be increased.
  79. .SH SEE ALSO
  80. .BR deb-old (5),
  81. .BR dpkg-deb (1),
  82. .BR deb-control (5).