-
Notifications
You must be signed in to change notification settings - Fork 10
Debian Packaging Guidelines
All Debian packaging related files are contained within the debian/
directory of each package.
More information about Debian packaging can be found at the following locations:
- A good starting point: https://wiki.debian.org/Packaging
- The package maintainer guide: https://www.debian.org/doc/manuals/maint-guide/
- The full Debian packaging policy: https://www.debian.org/doc/debian-policy/
- The perl packages specific policy: https://www.debian.org/doc/packaging-manuals/perl-policy/
- The python packages specific policy: https://www.debian.org/doc/packaging-manuals/python-policy/
Debian packaging is a lot easier if usual conventions are followed. These mainly are:
- using FHS guidelines (ie: installation in
/usr/
) - using GNU build conventions, for example using the
$DISTDIR
variable in the Makefile - using the regular Makefile with the
install
target
The Debian policy states: “ Package names must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character. ”
We have 2 set of names:
- services, daemons, binaries, etc will have a name starting with perfsonar-
- common libraries will have a name starting with libperfsonar- then suffixed by the implementation language as recommended by the Debian policy (-perl for example).
We follow the general Debian version and release numbering principles tailored to the perfSONAR workflow that is described in Versioning.
The git-buildpackage
package provides a very useful set of tools to maintain Debian packaging files and directives. We ship the /debian/
directory in the main branches of our repositories, alongside the main source code. The git-buildpackage
specific configurations for each package are stored in the debian/gbp.conf
file in each branch, this file should contain everything that is needed for gbp to work under our Vagrant or Jenkins environments. Refer to the man page of git-buildpackage
for more information.
When building packages yourself, you can make use of a Vagrant machine from our distribution repository. See Debian-Build-Instructions for more details about that process.
When there are Debian specific patches to be applied to the source code, build patches are used. They reside in the debian/patches
directory and are usually maintained with the quilt
tool.
To make use of git-buildpackage
each Debian package release need to have its corresponding git tag in the master branch. This tag must always begin with the full name of the Debian release it is made for, followed by a /
and the version-release number of the Debian package. This version-release number should correspond to the upstream tag on the master
branch.
Refer to Debian build instrustructions for information about actually building the Debian packages.
The build process is also documented in the Jenkins configurations on our Jenkins building host.