Deb (file Format)
   HOME

TheInfoList



OR:

deb is the format, as well as
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
of the software package format for the
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
Linux distribution A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
and its derivatives.


Design

Debian packages are standard
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
ar archives that include two
tar Tar is a dark brown or black viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. "a dark brown or black b ...
archives. One archive holds the control information and another contains the installable data.
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
provides the basic functionality for installing and manipulating Debian packages. Generally end users don't manage packages directly with
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
but instead use the APT package management software or other APT front-ends such as
aptitude An aptitude is a component of a competence to do a certain kind of work at a certain level. Outstanding aptitude can be considered "talent", or "skill". Aptitude is inborn potential to perform certain kinds of activities, whether physical or ...
( nCurses) and synaptic (
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
). Debian packages can be converted into other package formats and vice versa using alien, and created from source code using checkinstall or the Debian Package Maker. Some core Debian packages are available as udebs ("micro debs"), and are typically used only for bootstrapping a Debian installation. Although these files use the ''udeb'' filename extension, they adhere to the same structure specification as ordinary ''deb'' files. However, unlike their ''deb'' counterparts, ''udeb'' packages contain only essential functional files. In particular, documentation files are normally omitted. ''udeb'' packages are not installable on a standard Debian system, but are used in
Debian-Installer Debian-Installer is a system installer for Debian and its derivatives. It originally appeared in Skolelinux (Debian-Edu) 1.0, released in June 2004, but is now used as the official installation system since Debian 3.1 (Sarge), which was relea ...
.


Implementation

Prior to Debian 0.93, a package consisted of a file header and two concatenated
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
archives. Since Debian 0.93, a deb package is implemented as an ar archive. This archive contains three files in a specific order: # debian-binary - A text file named debian-binary containing a single line giving the package format version number. (2.0 for current versions of Debian). # control archive - A tar archive named control.tar contains the maintainer scripts and the package meta-information (package name, version, dependencies and maintainer). Compressing the archive with
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
or xz and
zstd Zstandard is a lossless data compression algorithm developed by Yann Collet at Facebook. Zstd is the corresponding reference implementation in C, released as open-source software on 31 August 2016. The algorithm was published in 2018 as , wh ...
is supported. The file extension changes to indicate the compression method. # data archive - A tar archive named data.tar contains the actual installable files. Compressing the archive with
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
,
bzip2 bzip2 is a free and open-source file compression program that uses the Burrows–Wheeler algorithm. It only compresses single files and is not a file archiver. It relies on separate external utilities such as tar for tasks such as handli ...
,
lzma The Lempel–Ziv–Markov chain algorithm (LZMA) is an algorithm used to perform lossless data compression. It has been used in the 7z format of the 7-Zip archiver since 2001. This algorithm uses a dictionary compression scheme somewhat similar ...
or xz and
zstd Zstandard is a lossless data compression algorithm developed by Yann Collet at Facebook. Zstd is the corresponding reference implementation in C, released as open-source software on 31 August 2016. The algorithm was published in 2018 as , wh ...
is supported. The file extension changes to indicate the compression method.


Control archive

The control archive contents can include the following files: * control contains a brief description of the package as well as other information such as its dependencies. * md5sums contains
MD5 The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value. MD5 was designed by Ronald Rivest in 1991 to replace an earlier hash function MD4, and was specified in 1992 as Request for Comments, RFC 1321. MD5 ...
checksum A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify dat ...
s of all files in the package in order to detect corrupt or incomplete files. * conffiles lists the files of the package that should be treated as configuration files. Configuration files are not overwritten during an update unless specified. * preinst, postinst, prerm and postrm are optional scripts that are executed before or after installing or removing the package. * config is an optional script that supports the
debconf is a software utility for performing system-wide configuration tasks on Unix-like operating systems. It is developed for the Debian Linux distribution, and is closely integrated with Debian's package management system, dpkg. When packages are ...
configuration mechanism. * shlibs list of shared library dependencies.


Signed packages

Debian-based distributions support
OpenPGP Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partit ...
signature verification of signed Debian packages, but most (if not all) have this feature disabled by default. Instead packages are verified by signing the repository metadata (i.e. Release files). The metadata files in turn include checksums for the repository files as a means to verify authenticity of the files. Currently there are two different implementations for signing individual packages. The first is done via the debsigs / debsig-verify toolset, which is supported by
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
. The second is done through the dpkg-sig program which is not supported by
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
, so the packages have to be manually checked with the dpkg-sig program. Both formats add new sections to the ar archive to store the signature information, but the formats are not compatible with one another. Neither of the modifications to the package format are listed in the official Debian handbook or
man page A man page (short for manual page) is a form of software documentation found on Unix and Unix-like operating systems. Topics covered include programs, system libraries, system calls, and sometimes local system details. The local host administr ...
about the binary package format.


Adoption

* Debian packages are used in distributions based on Debian, such as,
Linux Mint Linux Mint is a community-developed Linux distribution. It is based on Ubuntu and designed for x86-64 based computers; another variant is based on Debian which is named Linux Mint Debian Edition (LMDE) and has both 64-bit and IA-32 support. T ...
(LMDE), KDE neon,
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
and
many others Many (/ˈmɛni/) may refer to: * grammatically plural in number *an English quantifier used with count nouns indicating a large but indefinite number of; at any rate, more than a few ;Place names * Many, Moselle, a commune of the Moselle depart ...
. * Fink, a port of
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
and APT to
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, uses deb packages. *
Nexenta OS Nexenta OS, officially known as the Nexenta Core Platform, is a discontinued computer operating system based on the OpenSolaris kernel and Ubuntu user space that runs on IA-32- and x86-64-based systems. It emerged in fall 2005, after Sun Microsy ...
, a discontinued OS based on
OpenSolaris OpenSolaris () is a discontinued open-source computer operating system for SPARC and x86 based systems, created by Sun Microsystems and based on Solaris. Its development began in the mid 2000s and ended in 2010. OpenSolaris was developed as ...
, included Debian package management software and the use of deb packages. *
Debian GNU/kFreeBSD Debian () is a free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kernel, and is the basis of many o ...
, an OS that uses a GNU based userland and the FreeBSD kernel. *
Debian GNU/Hurd Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
. * Some
jailbroken iOS jailbreaking is the use of a privilege escalation exploit to remove software restrictions imposed by Apple on devices running iOS and iOS-based operating systems. It is typically done through a series of kernel patches. A jailbroken device ...
iOS devices (iPhones, iPads and iPods). * Ipkg and Opkg, which both use .ipk packages that resemble
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
's
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
*
Termux Termux is a free and open-source terminal emulator for Android which allows for running a Linux environment on an Android device. Termux installs a minimal base system automatically; additional packages are available using its package manager, ...
, which is a
GNU GNU ( ) is an extensive collection of free software (394 packages ), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operating systems popu ...
environment for
Android Android most commonly refers to: *Android (robot), a humanoid robot or synthetic organism designed to imitate a human * Android (operating system), a mobile operating system primarily developed by Google * Android TV, a operating system developed ...
.


See also

*
List of archive formats This is a list of file formats used by file archiver, archivers and data compression, compressors used to create Archive file, archive files. Archive formats by purpose Archive formats are used for backups, mobility, and archiving. Many archive ...
*
dpkg dpkg is the software at the base of the package management system in the free software, free operating system Debian and its numerous Debian family, derivatives. dpkg is used to install, remove, and provide information about deb (file format), . ...
*
wpkg Wpkg may refer to: * wpkg (Windows Packager), a software that is a Debian dpkg look-alike, developed up to 2015 * WPKG (software), an unrelated packager for Windows, developed up to 2014 * WPKG, American radio station from Wisconsin {{disam ...
* CheckInstall *
List of software package management systems This is a list of notable software package management systems, categorized first by package format (binary, source code, hybrid) and then by operating system family. Binary packages The following package management systems distribute apps in binar ...


References


External links


Debian FAQ: Basics of the Debian package management system

Debreate - A powerful Debian Package Builder

.deb feature support



Anatomy of a Debian package video
{{Package management systems Archive formats Debian Dpkg Filename extensions Ubuntu