# dpkg manual page - deb(5) # # Copyright © 1995 Raul Miller # Copyright © 1996 Ian Jackson # Copyright © 2000 Wichert Akkerman # Copyright © 2006-2017 Guillem Jover # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . =encoding utf8 =head1 NAME deb - Debian binary package format =head1 SYNOPSIS IB<.deb> =head1 DESCRIPTION The B<.deb> format is the Debian binary package file format. It is understood since dpkg 0.93.76, and is generated by default since dpkg 1.2.0 and 1.1.1elf (i386/ELF builds). The format described here is used since Debian 0.93; details of the old format are described in B(5). =head1 FORMAT The file is an B archive with a magic value of BarchE>. Only the common B archive format is supported, with no long file name extensions, but with file names containing an optional trailing slash, which limits their length to 15 characters (from the 16 allowed). File sizes are limited to 10 ASCII decimal digits, allowing for up to approximately 9536.74 MiB member files. The B archives currently allowed are, the old-style (v7) format, the pre-POSIX ustar format, a subset of the GNU format (new style long pathnames and long linknames, supported since dpkg 1.4.1.17; large file metadata since dpkg 1.18.24), and the POSIX ustar format (long names supported since dpkg 1.15.0). Unrecognized tar typeflags are considered an error. Each tar entry size inside a tar archive is limited to 11 ASCII octal digits, allowing for up to 8 GiB tar entries. The GNU large file metadata support permits 95-bit tar entry sizes and negative timestamps, and 63-bit UID, GID and device numbers. The first member is named B and contains a series of lines, separated by newlines. Currently only one line is present, the format version number, B<2.0> at the time this manual page was written. Programs which read new-format archives should be prepared for the minor number to be increased and new lines to be present, and should ignore these if this is the case. If the major number has changed, an incompatible change has been made and the program should stop. If it has not, then the program should be able to safely continue, unless it encounters an unexpected member in the archive (except at the end), as described below. The second required member is named B. It is a tar archive containing the package control information, either not compressed (supported since dpkg 1.17.6), or compressed with gzip (with B<.gz> extension) or xz (with B<.xz> extension, supported since 1.17.6), zstd (with B<.zst> extension, supported since dpkg 1.21.18), as a series of plain files, of which the file B is mandatory and contains the core control information, the B, B, B, B and B files contain optional control information, and the B, B, B and B files are optional maintainer scripts. The control tarball may optionally contain an entry for ‘B<.>’, the current directory. The third, last required member is named B. It contains the filesystem as a tar archive, either not compressed (supported since dpkg 1.10.24), or compressed with gzip (with B<.gz> extension), xz (with B<.xz> extension, supported since dpkg 1.15.6), zstd (with B<.zst> extension, supported since dpkg 1.21.18), bzip2 (with B<.bz2> extension, supported since dpkg 1.10.24) or lzma (with B<.lzma> extension, supported since dpkg 1.13.25). These members must occur in this exact order. Current implementations should ignore any additional members after B. Further members may be defined in the future, and (if possible) will be placed after these three. Any additional members that may need to be inserted after B and before B or B and which should be safely ignored by older programs, will have names starting with an underscore, ‘B<_>’. Those new members which won't be able to be safely ignored will be inserted before B with names starting with something other than underscores, or will (more likely) cause the major version number to be increased. =head1 MEDIA TYPE =head2 Current application/vnd.debian.binary-package =head2 Deprecated application/x-debian-package application/x-deb =head1 SEE ALSO B(5), B(1), B(5), B(5), B(5), B(5), B(5), B(5), B(5), B(5), B(5), B(5).