Skip to content

Debian Build Instructions

Antoine Delvaux edited this page May 4, 2016 · 5 revisions

Build Status (Debian)

Building Debian packages for perfSONAR

Debian packaging for perfSONAR tools is described in Debian Packaging Guidelines.

This document will describe how to actually build the packages from the code repository.

Building host

The building host needs the following packages to be installed prior to any build:

  • the usual Debian building scripts and packages:
    • build-essential
    • devscripts
    • debhelper
    • dh-make
    • dh-make-perl
    • dh-exec
    • dh-autoreconf
  • git-buildpackage (to easily manage the debian packaging files in the git repository)
  • quilt (to manage the Debian patches)
  • qemu-user-static (to compile for other architectures)

On a regular Debian 7 host, this can be easily installed with:

apt-get -y install build-essential devscripts debhelper dh-make dh-make-perl dh-exec dh-autoreconf git-buildpackage qemu-user-static quilt

Building a single package

First setup

If you build the packages for the first time on the building host, you'll first need to setup the required qemu chroot or images. This can be done with a command like the following (tailor the DIST and ARCH variables to your needs):

for arch in i386 amd64 armhf armel; do
    DIST=wheezy ARCH=$arch git-pbuilder create --debootstrap qemu-debootstrap
done

Actual build

As a regular user, launch the following build command in the package directory with a checkout of the Debian branch you want to build for (so you have the debian directory inside the package directory):

ARCH=armhf gbp buildpackage

Maintaining the qemu chroot

The chroot and qemu images need to be updated from time to time to have the latest versions of the build packages. Keeping the images updated is as simple as running:

for arch in i386 amd64 armhf armel; do
    DIST=wheezy ARCH=armhf git-pbuilder update
done

Building multiple packages

To build multiple packages, we'll prefer to use the perfSONAR Jenkins infrastructure.

The setup we have is using the jenkins-debian-glue packages and configuration. The internal of this setup is similar to the use of git-buildpackage described above, but everything is automatised by jenkins-debian-glue if you give it the correct configuration.

Installing jenkins-debian-glue

To install the jenkins-debian-glue package we need to add its repository from http://jenkins.grml.org/job/jenkins-debian-glue-release-binaries/ and then run:

apt-get -y install jenkins-debian-glue jenkins-debian-glue-buildenv-lintian

Configuring the Jenkins jobs

As per the jenkins-debian-glue documentation you'll need to setup a source package job and a dependant binary job. The binary job is automatically run after each source build and is taking care of building for multiple architectures thanks to a configuration matrix.

See the comments in the Jenkins jobs as further documentation.

Clone this wiki locally