Skip to content

Debian Packaging Guidelines

Antoine Delvaux edited this page Feb 24, 2020 · 3 revisions

Debian packaging background

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:

perfSONAR Debian packages guidelines

Generalities

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

Package naming

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).

Version and release numbering

We follow the general Debian version and release numbering principles tailored to the perfSONAR workflow that is described in Versioning.

Debian build files

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.

Debian specific patches

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.

Debian git tags

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.

Building packages

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.

Clone this wiki locally