1 # dpkg manual page - deb(5)
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>
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.
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.
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/>.
25 deb - Debian binary package format
35 format is the Debian binary package file format.
37 since dpkg 0.93.76, and is generated by default since dpkg 1.2.0 and
38 1.1.1elf (i386/ELF builds).
40 The format described here is used since Debian 0.93; details of the
41 old format are described in
48 archive with a magic value of
50 Only the common B<ar> archive format is supported, with no long file
51 name extensions, but with file names containing an optional trailing
52 slash, which limits their length to 15 characters (from the 16 allowed).
53 File sizes are limited to 10 ASCII decimal digits, allowing for up to
54 approximately 9536.74 MiB member files.
56 The B<tar> archives currently allowed are, the old-style (v7) format,
57 the pre-POSIX ustar format, a subset of the GNU format (new style long
58 pathnames and long linknames, supported since dpkg 1.4.1.17; large file
59 metadata since dpkg 1.18.24),
60 and the POSIX ustar format (long names supported since dpkg 1.15.0).
61 Unrecognized tar typeflags are considered an error.
62 Each tar entry size inside a tar archive is limited to 11 ASCII octal
63 digits, allowing for up to 8 GiB tar entries.
64 The GNU large file metadata support permits 95-bit tar entry sizes and
65 negative timestamps, and 63-bit UID, GID and device numbers.
67 The first member is named
69 and contains a series of lines, separated by newlines.
71 one line is present, the format version number,
73 at the time this manual page was written.
74 Programs which read new-format archives should be prepared for the
75 minor number to be increased and new lines to be present, and should
76 ignore these if this is the case.
78 If the major number has changed, an incompatible change has been made
79 and the program should stop.
80 If it has not, then the program should
81 be able to safely continue, unless it encounters an unexpected member
82 in the archive (except at the end), as described below.
84 The second required member is named
86 It is a tar archive containing the package control information, either
87 not compressed (supported since dpkg 1.17.6), or compressed with
88 gzip (with B<.gz> extension) or
89 xz (with B<.xz> extension, supported since 1.17.6),
90 zstd (with B<.zst> extension, supported since dpkg 1.21.18),
91 as a series of plain files, of which the file
93 is mandatory and contains the core control information, the
95 B<conffiles>, B<triggers>, B<shlibs>
98 files contain optional control information, and the
99 B<preinst>, B<postinst>, B<prerm>
102 files are optional maintainer scripts.
103 The control tarball may optionally contain an entry for
105 the current directory.
107 The third, last required member is named
109 It contains the filesystem as a tar archive, either
110 not compressed (supported since dpkg 1.10.24), or compressed with
111 gzip (with B<.gz> extension),
112 xz (with B<.xz> extension, supported since dpkg 1.15.6),
113 zstd (with B<.zst> extension, supported since dpkg 1.21.18),
114 bzip2 (with B<.bz2> extension, supported since dpkg 1.10.24) or
115 lzma (with B<.lzma> extension, supported since dpkg 1.13.25).
117 These members must occur in this exact order.
118 Current implementations
119 should ignore any additional members after
121 Further members may be defined in the future, and (if possible) will be
122 placed after these three.
123 Any additional members that may need to be
130 and which should be safely ignored by older programs, will have names
131 starting with an underscore,
134 Those new members which won't be able to be safely ignored will be
137 with names starting with something other than underscores, or will
138 (more likely) cause the major version number to be increased.
144 application/vnd.debian.binary-package
148 application/x-debian-package