In this post I want to describe content of a debian/ folder. This folder is needed for package creation and is placed in a root directory of a package. Files in this folder contain information required for tools like debhelper, uscan and etc, which are used during the process of package creation.
The easiest way to obtain a debian folder is to run uscan on the folder with the current version of a built package. It will scan debian/ watch file and produce an upstream version folder in a parent folder and will place an old debian/ folder (from the previously formed package) inside of it. For example, if you have a built source package <package>-0.1.0 and you want to create a source package from an upstream 0.2.0 version, you can run uscan inside of debianized source package <package>-0.1.0 and it will produce a folder <package>-0.2.0 in a parent directory with a debian/ folder from <package>-0.1.0
Content of a debian/folder
This file allows uscan to look for new upstream versions.
debian/control file contains the most vital (and version-independent) information about the source package and about the binary packages it creates.”
It is required by many tools during package building and allows, for example, to set package dependencies and their version, provide uploaders’ names, links to VCSes, specify debian policy version, etc.
This file allows to set licenses for the package and its parts. It also allows to exclude some files from the package. For example, in my case I had to exclude some RFC from the package because it had a closed-source license, I did it with:
Files-Excluded: debian/* specs/*
I also had to exclude the old debian/ folder from the package, because I wanted to replace it with my new one (created from the previous release and then changed accordingly).
In this file all the main changes are listed. In my case I also pointed out that my package should be built as experimental because it has some dependencies from the experimental tree.
This file is the most dark corner of a debian/ folder for me. This file consists of a rules for package building. But since the rules are complicated debhelper is used to generate most of the rules. So, it very often that only specific “override” rules are placed in debian/rules file.
These are the main files needed for package creation. In the next post I want to describe how I overcame some of my problems with lintian and what the debhelper tool is. Stay in touch!