Jump to content

Dpkg: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m External links: previous link down or no longer valid
Ootachi (talk | contribs)
Creating debs: should mention CheckInstall nowadays
Line 34: Line 34:


Once a Debian package is built, it can be checked for common problems using the [[lintian]] tool.
Once a Debian package is built, it can be checked for common problems using the [[lintian]] tool.

As an alternative to following these steps, the newer utility [[CheckInstall]] can be used to very quickly generate a simple Debian package for the running system only. CheckInstall is convenient for system administrators and ordinary users, but it is too simple to create official packages.


== dpkg build tools ==
== dpkg build tools ==

Revision as of 05:39, 8 January 2008

dpkg
Developer(s)the dpkg team
Repository
TypePackage management system
Websitewiki.debian.org/Teams/Dpkg Edit this on Wikidata

dpkg (short for Debian package) is the base of the Debian package management system. It was created by Ian Jackson in 1993. dpkg is similar to RPM, as it is used to install, remove, and provide information about .deb packages.

dpkg itself is a low level tool; higher level tools, such as APT, are used to fetch packages from remote locations or deal with complex package relations. End users are encouraged to use tools like aptitude or synaptic, having a more sophisticated way of dealing with package relationships and a friendlier interface.

The Debian package "dpkg" provides the dpkg program, as well as several others necessary for run-time functioning of the packaging system, including dpkg-statoverride, dpkg-divert and update-alternatives. It also includes the programs such as start-stop-daemon and install-info, and the latter is kept mostly due to backwards compatibility (it is developed and distributed separately nowadays). The Debian package "dpkg-dev" includes the numerous build tools described below.

ipkg is a dpkg-inspired package management system for storage-constrained Linux installations.

Creating debs

debs are usually built by calling dpkg-buildpackage. dpkg-buildpackage reads several files to figure out how to build the package. These files are located in the debian subdirectory of a source tree.

There are four required files. The copyright file contains license terms. The control file contains the package name, description, and dependencies. The rules file is a Makefile that has rules for building a debian package. Programs from the debhelper program suite are often called in the rules file. In addition, some packages include Makefile snippets from CDBS, greatly simplifying the rules file. Finally there is the changelog file, which, predictably, contains the changelog. Most packages also include other files for doing various things.

Once a Debian package is built, it can be checked for common problems using the lintian tool.

As an alternative to following these steps, the newer utility CheckInstall can be used to very quickly generate a simple Debian package for the running system only. CheckInstall is convenient for system administrators and ordinary users, but it is too simple to create official packages.

dpkg build tools

Debian has a series of tools that have to be called to construct a package. They are the following:

  • dpkg-source packs and unpacks the source files of a Debian package.
  • dpkg-deb packs and unpacks binary packages
  • dpkg-gencontrol reads the information from an unpacked Debian tree source and generates a binary package control package, creating an entry for this in Debian/files.
  • dpkg-shlibdeps calculates the dependencies of runs with respect to libraries.
  • dpkg-genchanges reads the information from an unpacked Debian tree source that once constructed creates a control file (.changes).
  • dpkg-buildpackage is a control script that can be used to construct the package automatically.
  • dpkg-distaddfile adds a file input to debian/files.
  • dpkg-parsechangelog reads the changes file (changelog) of an unpacked Debian tree source and creates a conveniently prepared output with the information for those changes.
  • dpkg -i 'deb fileName' to install the deb package.

See also