deb.5.sgml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  2. <refentry id="deb.5">
  3. <refmeta>
  4. <refentrytitle>deb</refentrytitle>
  5. <manvolnum>5</manvolnum>
  6. <refmiscinfo class="source">Debian Project</refmiscinfo>
  7. <refmiscinfo class="manual">dpkg suite</refmiscinfo>
  8. </refmeta>
  9. <refnamediv>
  10. <refname>deb</refname>
  11. <refpurpose>Debian binary package format</refpurpose>
  12. </refnamediv>
  13. <refsynopsisdiv>
  14. <synopsis><filename>filename.deb</filename></synopsis>
  15. </refsynopsisdiv>
  16. <refsect1>
  17. <title>Description</title>
  18. <para>
  19. The <filename>.deb</filename> format is the Debian binary package file
  20. format. It is understood by <productname>dpkg</productname> 0.93.76 and
  21. later, and is generated by default by all versions of
  22. <productname>dpkg</productname> since 1.2.0 and all i386/ELF versions
  23. since 1.1.1elf.
  24. </para>
  25. <para>
  26. The format described here is used since Debian 0.93; details of the old
  27. format are described in
  28. <citerefentry><refentrytitle>deb-old</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
  29. </para>
  30. </refsect1>
  31. <refsect1>
  32. <title>Format</title>
  33. <para>
  34. The file is an <emphasis>ar</emphasis> archive with a magic number of
  35. <emphasis>!&lt;arch&gt;</emphasis>.
  36. </para>
  37. <para>
  38. The first member is named <filename>debian-binary</filename> and contains
  39. a series of lines, separated by newlines. Currently only one line is
  40. present, the format version number, <emphasis>2.0</emphasis> at the time
  41. this manual page was written. Programs which read new-format archives
  42. should be prepared for the minor number to be increased and new lines to
  43. be present, and should ignore these if this is the case.
  44. </para>
  45. <para>
  46. If the major number has changed, an incompatible change has been made and
  47. the program should stop. If it has not, then the program should be able
  48. to safely continue, unless it encounters an unexpected member in the
  49. archive (except at the end), as described below.
  50. </para>
  51. <para>
  52. The second required member is named <filename>control.tar.gz</filename>.
  53. It is a gzipped tar archive containing the package control information,
  54. as a series of plain files, of which the file
  55. <filename>control</filename> is mandatory and contains the core control
  56. information. Please see the <emphasis remap='I'>Debian Packaging Manual,
  57. section 2.2</emphasis> for details of these files. The control tarball
  58. may optionally contain an entry for `<filename>.</filename>', the current
  59. directory.
  60. </para>
  61. <para>
  62. The third, last required member is named
  63. <filename>data.tar.gz</filename>. It contains the filesystem archive as a
  64. gzipped tar archive.
  65. </para>
  66. <para>
  67. These members must occur in this exact order. Current implementations
  68. should ignore any additional members after
  69. <filename>data.tar.gz</filename>. Further members may be defined in the
  70. future, and (if possible) will be placed after these three. Any
  71. additional members that may need to be inserted before
  72. <filename>data.tar.gz</filename> and which should be safely ignored by
  73. older programs, will have names starting with an underscore.
  74. </para>
  75. <para>
  76. Those new members which won't be able to be safely ignored will be
  77. inserted before <filename>data.tar.gz</filename> with names starting with
  78. something other than underscores, or will (more likely) cause the major
  79. version number to be increased.
  80. </para>
  81. </refsect1>
  82. <refsect1>
  83. <title>See Also</title>
  84. <para>
  85. <citerefentry>
  86. <refentrytitle>deb-old</refentrytitle>
  87. <manvolnum>5</manvolnum>
  88. </citerefentry>,
  89. <citerefentry>
  90. <refentrytitle>dpkg-deb</refentrytitle>
  91. <manvolnum>1</manvolnum>
  92. </citerefentry>,
  93. <citerefentry>
  94. <refentrytitle>deb-control</refentrytitle>
  95. <manvolnum>5</manvolnum>
  96. </citerefentry>,
  97. Debian Packaging Manual
  98. </para>
  99. </refsect1>
  100. </refentry>