[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]


dpkg technical manual
Chapter 2 - dpkg-deb and .deb file internals


This chapter describes the internals to the "dpkg-deb" tool, which is used by "dpkg" as a back-end. dpkg-deb has its own tar extraction functions, which is the source of many problems, as it does not support long filenames, using extension blocks.


2.1 The .deb archive format

The main principal of the new-format Debian archive (I won't describe the old format - for that have a look at deb-old.5), is that the archive really is an archive - as used by "ar" and friends. However, dpkg-deb uses this format internally, rather than calling "ar". Inside this archive, there are usually the folowing members:-

The debian-binary member consists simply of the string "2.0", indicating the format version. control.tar.gz contains the control files (and scripts), and the data.tar.gz contains the actual files to populate the filesystem with. Both tarfiles extract straight into the current directory. Information on the tar formats can be found in the GNU tar info page. Since dpkg-deb calls "tar -cf" to build packages, the Debian packages use the GNU extensions.


2.2 The dpkg-deb command-line

dpkg-deb documents itself thoroughly with its '--help' command-line option. However, I am including a reference to these for completeness. dpkg-deb supports the following options:-


2.2.1 Internal checks used by dpkg-deb when building packages

Here is a list of the internal checks used by dpkg-deb when building packages. It is in the order they are done.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]


dpkg technical manual

$Id: dpkg-tech.sgml,v 1.3 2003/02/12 15:05:45 doogie Exp $

Tom Lees tom@lpsg.demon.co.uk