Control Files

Authoritative Source:
Debian Policy Manual
To Install on your Debian system:
sudo apt-get install debian-policy

This page lists the different fields that wpkg supports in the control file.

All the fields that are not supported (i.e. that are not listed below) are just ignored. When building a package, those fields are just passed through so they appear in the destination .deb file as they were in the original WPKG/control file.

Fields support variables and expressions. Variables can be defined on the command line with the --field-variables command line option, or in the sustvars file. Variables are accessed using the ${...} syntax (curly brackets.) Expressions are defined using the $(...) syntax (parenthesis.)

Example of variables and expressions1:

Architecture: $(architecture())
Distribution: ${CROSS_COMPILER_DISTRIBUTION}
Version: ${PROJECT_VERSION}
X-Unix-Date: $(time())

Each field is defined with a Quick Info box at the top-right corner of the page. This box defines how and/or for what the field is used. The following table defines the different terms used in the Quick Info box.

Term Comments
Date This field represents a date. If the field also includes a Time, it is represented as Date & Time. Dates are expected to be formatted using RFC 2822.
email The field value is a valid email, optionally with a name.
Format The field expects a very specific format as defined on the page.
Generated If the field is not defined, it will automatically be generated by the Build process when creating a package. (When followed by an asterisk, the field is always generated. If you defined it, that value is overwritten.)
.info only This field can only be used in a control.info file. If that field appears in a regular control file, an error is generated.
List This field is a comma separated list of something (i.e. package names.) It is likely that each component of the list is also formatted.
Number This field is a number, most often a size or a count. For example, the Extra-Size field used as a byte size to add to the total size the package takes once installed.
Path This field represents a path.
Present This field is always expected to be present in a package. This means the packager adds it to the control if it does not exist.
Removed This field is used by the build process and removed before the final control file is saved in the output package.
Required This field is rquired in a Control File. Since we support several different types of control files, the following table shows which field is required in which type of control file:
Field Control File .info file source .info Status File
Architecture Yes Yes    
Description Yes Yes    
Maintainer Yes Yes    
Package Yes Yes Yes (including sub-package)  
Sub-Packages   Yes Yes  
Version Yes Yes    
X-Status       Yes
Note: in the list below, the main Control File fields are marked as mandatory.
Set This field accepts a specific set of entries. Any other value is considered invalid and an error is generated.
Sub-Package This field can be used with the Sub-Package designation. For example, the Description field can be defined as follow for your documentation:
   Description/doc: Detailed documentation of my package.
Time This field represents a time. If the fields also includes a Date, it is represented as Date & Time. Time is expected to be formatted using RFC 2822.
URL This field represents a URL to a resource. It is not limited to HTTP.
wpkg-status This field is found in the wpkg-status file, not in the control file.
Yes/No This field is a Boolean field and it only accepts Yes or No as a valid value.

 

  • 1. Note that wpkg forbids you from using variables and expressions in the Package field. Debian also forbids such in the Architecture and Source fields.