Debian package

from Wikipedia, the free encyclopedia

Debian packages (file extension:) .debare used for software installation on Debian -based operating systems . They contain the programs to be installed in compressed form. The package format was developed by Ian Murdock , the abbreviation Deb is derived from the first part of the name of the Debian distribution , which in turn is derived from the names "Debra" (the first name of Murdock's wife at the time) and "Ian".

A Debian package file consists of an ar archive, which in turn contains tar archives compressed with gzip , bzip2 or LZMA . These contain the actual program files as well as meta information such as version information of the contained program and dependencies on other packages that this program needs to run or improve the function.

In order to be able to use and manage this information, Murdock also designed the Debian Package Manager ( dpkg for short ). APT (command line program) builds on this, or its front ends (e.g. aptitude or Synaptic ), which also automatically installs other packages required for the program package.

In addition to these binary packages, the Debian repositories also contain source code packages.

Binary packages

Gdebi

Binary packages can be installed directly from the Debian package management tools.

The unpacking of the Debian package and the execution of various scripts and helper programs are done with the rights of the system administrator, just like with the package management of other operating systems.

Some packages are also available as udeb packages. These are mostly used to load a minimal Debian system for installation . They offer only a fraction of the functionality of a normal deb package and are only used by the Debian installer , not in an installed Debian system.

Structure in detail

Each binary package consists of three files that can be extracted using the UNIX command ar or the Debian-specific command dpkg-deb (e.g. ar x file.deb ):

  • debian-binary: a text file with the version number of the package format used, the current version is 2.0.
  • control.tar.gz: an archive packed with tar and gzip , contains files that are used for installation or list dependencies. The ones listed here are just a few examples. Further descriptions can be found e.g. E.g. in the Official Debian FAQ on .deb packages .
    • control contains a brief description of the package and further information such as its dependencies.
    • md5sums contains MD5 checksums of all files contained in the package in order to be able to detect corruptions and to enable the automatic updating of configuration files (so-called conffiles).
    • conffiles lists the files in the package that are to be treated as configuration files. Configuration files are not overwritten during an update and are only removed when the package is completely removed (purge).
    • preinst , postinst , prerm , postrm are optional scripts that are run before or after the package is installed, updated, or removed. They are executed with the rights of the user root.
    • config is an optional script that supports the configuration mechanism called debconf. The templates file contains the necessary meta information for the debconf database.
    • shlibs lists the possibly provided program libraries .
  • data. * Is an archive compressed with gzip, bzip, lzma or xz and contains the actual program data with relative paths starting at the root directory .

Source packages

Source code packages contain uncompiled program data, the source code of the programs. They consist of an archive with the original source code (extension .orig.tar.gz), a (compressed) diff file with Debian-specific modifications ( .diff.gz) and a description file ( .dsc).

Source packages cannot be installed directly. The source code must first be compiled and then possibly an installable binary package created from it.

Full filename

The file name of a binary Debian package follows a fixed scheme: the name of the software (possibly with prefixes such as lib for program libraries or postfixes such as -doc for documentation or -dev for development- specific packages), an underscore, the version number of the software, possibly a hyphen and a Debian-internal revision number, then another underscore, an abbreviation for the processor architecture ( allfor platform-independent) and the file name extension .deb(e.g. beispiel_10.2-5_powerpc.deb).

Others

Debian packages are not compatible with RPM packages, but can be converted using the alien program within an architecture (e.g. PowerPC or x86 -based systems). Some file managers, such as B. Konqueror , Midnight Commander or 7-Zip , allow the display of the package contents and the control information without installing the package.

Package creation

Source packages can be translated into binary packages using debhelper .

distribution

Due to the easy portability of APT and dpkg, the Debian package format has found its way into many other operating systems.

Web links

Individual evidence

  1. Ubuntuusers Wiki: Basics of Packaging