Changes between Initial Version and Version 1 of Control


Ignore:
Timestamp:
01/23/13 17:45:48 (11 years ago)
Author:
jdreed
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Control

    v1 v1  
     1= The control file = 
     2 
     3The control file contains metadata necessary for building the package.  Some of the metadata ends up in the `.dsc` file, some ends up in the binary package, some in the `.changes` file, and some is only used at build time. 
     4 
     5The canonical information about control fields and their meaning can be found at http://www.debian.org/doc/debian-policy/ch-controlfields.html 
     6 
     7== Sample `control` file == 
     8 
     9{{{ 
     10Source: rpncalc 
     11Section: utils 
     12Priority: extra 
     13Maintainer: Jonathan Reed <jdreed@mit.edu> 
     14Build-Depends: debhelper (>= 8.0.0) 
     15Standards-Version: 3.9.3 
     16 
     17Package: rpncalc 
     18Architecture: any 
     19Depends: ${shlibs:Depends}, ${misc:Depends} 
     20Description: Simple RPN calculator in bash 
     21 A simple RPN calculator, implemented in bash. 
     22 Not legal for trade. 
     23 This was taken from the O'Reilly bash cookbook. 
     24}}} 
     25 
     26As you may notice, the file is divided into 2 sections.  The `Source:` section and the `Package:` section, which correspond to the source and binary packages, respectively.  As noted earlier, a single source package can build multiple binary packages, and so `control` files may have multiple `Package:` sections.  Section breaks are indicated by a blank line. 
     27 
     28* `Priority`: Used by package managers to decide what to keep when there are conflicts.  This is general `optional` or `extra`.  You may also see `required`, or `essential` which will make it harder for package managers to resolve conflicts, and is generally reserved for things that are truly required, like the kernel, or libc. 
     29* `Section`: The Section is mostly irrelevant; copy it from a package similar to yours.  This field has a special format, section/subsection.  The section part determines what component of a Debian repository (i.e. the things after the name of the distro in the /etc/apt/sources.list line) to upload the package to (in standard Debian, main, contrib, or non-free; in Debathena, debathena, debathena-standard, debathena-system, or openafs); if it is not specified the section is assumed to be main.  The subsection field is simply used for organizing graphical user interfaces to the Debian archive.   
     30* `Standards-Version`: Indicates what version of the Debian Policy Manual the package is compatible with.  Should generally be the current version you're running.  Used by Lintian.  Get it using apt-cache show debian-policy | grep Version. 
     31* `Maintainer`: Your contact information, e.g. Tim Abbott <tabbott@mit.edu> 
     32* `Build-Depends`: List packages needed to build your package.  You don’t need to include any Priority: essential packages or anything depended on by build-essential. 
     33* `Architecture`: If your package is architecture-independent (e.g. a shell script), you want “all”.  If your package only works on some architectures, list those architectures.  Otherwise, you want “any”.  In Debathena, we generally use 'any' or 'all'. 
     34* `Depends`: A hard dependency; the package will not be installed unless the packages it depends on are installed.  Necessary 
     35shared libraries should be automatically added if you include “${shlibs:Depends}”.  Other useful dependencies may be added 
     36by debhelper if you include “${misc:Depends}”.  You don’t need to include any Priority: essential packages. 
     37* `Recommends:` A soft dependency; aptitude and recent apt-get will prompt you to install the recommended packages along with your 
     38package, but they will let you install your package without its recommended packages. 
     39* `Suggests:` A dependency that doesn’t do anything.  Modern package managers may tell the user that some packages are suggested, but will never automatically install them. 
     40* `Conflicts`: A dependency that prevents both packages from being installed simultaneously. 
     41* `Provides`: Assign virtual names to the package.  Debian uses this for defining alternatives (e.g. mail-transport-agent is anything providing sendmail), but Provides is useful for many other applications. 
     42* `Replaces`: When one package replaces or is a renaming of another, you want to specify Replaces: and Conflicts: against that package.  Files from the named packages will be overwritten with the files from your package and it’ll make aptitude happier about the upgrade. 
     43* `Pre-Depends`, `Breaks`: These are stronger versions of Depends and Conflicts, and should only be used in very specific situations. 
     44* `Description`: A description of the package.  This is a multi-line field.  The first line is a short synopsis of the package, and the remaining lines (indented by a single space) is a longer description.  Read Debian Policy for more information, as Lintian can be very pedantic about grammar and syntax in this field. 
     45