Skip to content

Debian Build Instructions

Andrew R. Lake edited this page Mar 15, 2015 · 5 revisions

Building Debian packages for perfSONAR

Debian packaging for perfSONAR tools is described in DebianPackaging.

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 (tailor the DIST and ARCH variables to your needs):

DIST=wheezy ARCH=armhf git-pbuilder create --debootstrap qemu-debootstrap

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 (you must have a 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:

DIST=wheezy ARCH=armhf git-pbuilder update

Building multiple packages

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

The setup we use 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 job as further documentation.

Building the toolkit images

Clone this wiki locally