dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / deb.man
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-2017 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 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
22 .nh
23 .SH NAME
24 deb \- Debian binary package format
25 .SH SYNOPSIS
26 .IB filename .deb
27 .SH DESCRIPTION
28 The
29 .B .deb
30 format is the Debian binary package file format. It is understood
31 since dpkg 0.93.76, and is generated by default since dpkg 1.2.0 and
32 1.1.1elf (i386/ELF builds).
33 .PP
34 The format described here is used since Debian 0.93; details of the
35 old format are described in
36 .BR deb\-old (5).
37 .SH FORMAT
38 The file is an
39 .B ar
40 archive with a magic value of
41 .BR !<arch> .
42 Only the common \fBar\fP archive format is supported, with no long file
43 name extensions, but with file names containing an optional trailing
44 slash, which limits their length to 15 characters (from the 16 allowed).
45 File sizes are limited to 10 ASCII decimal digits, allowing for up to
46 approximately 9536.74 MiB member files.
47 .PP
48 The \fBtar\fP archives currently allowed are, the old-style (v7) format,
49 the pre-POSIX ustar format, a subset of the GNU format (new style long
50 pathnames and long linknames, supported since dpkg 1.4.1.17; large file
51 metadata since dpkg 1.18.24),
52 and the POSIX ustar format (long names supported since dpkg 1.15.0).
53 Unrecognized tar typeflags are considered an error.
54 Each tar entry size inside a tar archive is limited to 11 ASCII octal
55 digits, allowing for up to 8 GiB tar entries.
56 The GNU large file metadata support permits 95-bit tar entry sizes and
57 negative timestamps, and 63-bit UID, GID and device numbers.
58 .PP
59 The first member is named
60 .B debian\-binary
61 and contains a series of lines, separated by newlines. Currently only
62 one line is present, the format version number,
63 .BR 2.0
64 at the time this manual page was written.
65 Programs which read new-format archives should be prepared for the
66 minor number to be increased and new lines to be present, and should
67 ignore these if this is the case.
68 .PP
69 If the major number has changed, an incompatible change has been made
70 and the program should stop. If it has not, then the program should
71 be able to safely continue, unless it encounters an unexpected member
72 in the archive (except at the end), as described below.
73 .PP
74 The second required member is named
75 .BR control.tar .
76 It is a tar archive containing the package control information, either
77 not compressed (supported since dpkg 1.17.6), or compressed with
78 gzip (with \fB.gz\fP extension) or
79 xz (with \fB.xz\fP extension, supported since 1.17.6),
80 as a series of plain files, of which the file
81 .B control
82 is mandatory and contains the core control information, the
83 .BR conffiles ", " triggers ", " shlibs
84 and
85 .B symbols
86 files contain optional control information, and the
87 .BR preinst ", " postinst ", " prerm
88 and
89 .B postrm
90 files are optional maintainer scripts.
91 The control tarball may optionally contain an entry for
92 .RB ‘ . ’,
93 the current directory.
94 .PP
95 The third, last required member is named
96 .BR data.tar .
97 It contains the filesystem as a tar archive, either
98 not compressed (supported since dpkg 1.10.24), or compressed with
99 gzip (with \fB.gz\fP extension),
100 xz (with \fB.xz\fP extension, supported since dpkg 1.15.6),
101 bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or
102 lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25).
103 .PP
104 These members must occur in this exact order. Current implementations
105 should ignore any additional members after
106 .BR data.tar .
107 Further members may be defined in the future, and (if possible) will be
108 placed after these three. Any additional members that may need to be
109 inserted after
110 .B debian\-binary
111 and before
112 .B control.tar
113 or
114 .B data.tar
115 and which should be safely ignored by older programs, will have names
116 starting with an underscore,
117 .RB ‘ _ ’.
118 .PP
119 Those new members which won't be able to be safely ignored will be
120 inserted before
121 .B data.tar
122 with names starting with something other than underscores, or will
123 (more likely) cause the major version number to be increased.
124 .SH MEDIA TYPE
125 .SS Current
126 application/vnd.debian.binary-package
127 .SS Deprecated
128 application/x-debian-package
129 .br
130 application/x-deb
131 .SH SEE ALSO
132 .BR deb\-old (5),
133 .BR dpkg\-deb (1),
134 .BR deb\-control (5),
135 .BR deb\-conffiles (5)
136 .BR deb\-triggers (5),
137 .BR deb\-shlibs (5),
138 .BR deb\-symbols (5),
139 .BR deb\-preinst (5),
140 .BR deb\-postinst (5),
141 .BR deb\-prerm (5),
142 .BR deb\-postrm (5).