1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum





The control file contains the information that the package manager (such as apt-get, synaptic, and aptitude) uses, build-time dependencies, maintainer information, and much more.

For the Ubuntu hello package, the control file looks something like:

Source: hello Section: devel Priority: optional Maintainer: Captain Packager <packager@coolness.com> Standards-Version: 3.6.1 Package: hello Architecture: any Depends: ${shlibs:Depends} Description: The classic greeting, and a good example The GNU hello program produces a familiar, friendly greeting. It allows non-programmers to use a classic computer science tool which would otherwise be unavailable to them. . Seriously, though: this is an example of how to do a Debian package. It is the Debian version of the GNU Project's 'hello world' program (which is itself an example for the GNU Project).

Create control using the information above (making sure to provide your information for the Maintainer field).

The first paragraph gives information about the source package. Let us go through each line:

  • Source: This is the name of the source package, in this case, hello.

  • Section: The apt repositories are split up into sections for ease of browsing and categorization of software. In this case, hello belongs in the devel section.

  • Priority: This sets the importance of the package to users. It should be one of the following:

    • Required - packages that are essential for the system to work properly. If they are removed it is highly likely that your system will break in an unrecoverable way.

    • Important - minimal set of packages for a usable system. Removing these packages will not produce an unrecoverable breakage of your system, but they are generally considered important tools without which any Linux installation would be incomplete. Note: This does not include things like Emacs or even the X Window System.

    • Standard - Somewhat self explanatory.

    • Optional - in essence this category is for non-required packages, or the bulk of packages. However, these packages should not conflict with each other.

    • Extra - packages that may conflict with packages in one of the above categories. Also used for specialized packages that would only be useful to people who already know the purpose of the package.

  • Maintainer: The package maintainer with email address.

  • Standards-Version: The version of the http://people.debian.org/~walters/descriptions.html to which the package adheres (in this case, version 3.6.1). An easy way to find the current version is apt-cache show debian-policy | grep Version.

  • Build-Depends: One of the most important fields and often the source of bugs, this line lists the binary packages (with versions if necessary) that need to be installed in order to create the binary package(s) from the source package. Packages that are essential are required by build-essential and do not need to be included in the Build-Depends line. In the case of hello, all the needed packages are a part of

* License

* Ubuntu Packaging Guide Index

  1. About.com
  2. Technology
  3. Linux
  4. Linux Distributions
  5. Popular Linux Distros
  6. Ubuntu
  7. Ubuntu Packaging Guide
  8. Ubuntu Packaging Guide - control

©2014 About.com. All rights reserved.