Skip to content

debian/build

Configure jobs to build Debian binary package (.deb) for this project from a source distribution or Debian source package.

Description

This component creates multiple jobs, each with a common prefix, that take in a pre-existing upstream source distribution (tarball) or Debian source package, and use dpkg-buildpackage to create a Debian binary package, one for each chosen Debian distribution version (selected by the version codename).

After each build, lintian is executed to produce a GitLab Code Quality report

Usage

include:
  - component: git.ligo.org/computing/gitlab/components/debian/build@<VERSION>

Inputs

Input Default value Description
stage build The stage to add jobs to
debian_versions [bullseye, bookworm] Debian versions to build
project_dir "." Project path that contains the relevant debian/ directory
needs [] List of jobs whose artifacts are needed for the Debian build
job_prefix debian_build Prefix to use for job name
add_changelog_entry true Add a changelog entry when building the Debian source package, see Adding changelog entries for more details
dpkg_buildpackage_options "-us -uc" Options to pass to dpkg-buildpackage
lintian_options --pedantic --display-info Options to pass to lintian, see lintianrc for details on using a lintian configuration file.

Notes

Requires an upstream source distribution or Debian source package

Creating a Debian binary package is only supported when starting from an upstream tarball that contains a debian/ configuration directory, OR a Debian source package (.dsc).

See Examples for examples.

Adding changelog entries

See Adding changelog entries in debian/source for details.

Customisation

lintianrc

The behaviour of lintian can be configured via the lintian_options input, or by creating a .lintianrc file in the root of your project.

See lintian(1) for details of the lintian configuration file syntax.

If you wish to choose a path other than .lintianrc for the lintian configuration file, pass that in lintian_options:

include:
  - component: git.ligo.org/computing/gitlab/components/debian/build@<VERSION>
    inputs:
      lintian_options: "--cfg mylintianrcfile"

Examples

Create Debian source and binary packages separately from a Python 'sdist'

include:
  - component: $CI_SERVER_FQDN/computing/gitlab/components/python/sdist@0.1
    inputs:
      stage: source
  - component: git.ligo.org/computing/gitlab/components/debian/source@<VERSION>
    inputs:
      needs: [sdist]
  - component: git.ligo.org/computing/gitlab/components/debian/build@<VERSION>
    inputs:
      needs: [debian_source]
      debian_versions:
        - bullseye
        - bookworm

Create a Debian binary package directly from a Python 'sdist'

include:
  - component: $CI_SERVER_FQDN/computing/gitlab/components/python/sdist@0.1
    inputs:
      stage: source
  - component: git.ligo.org/computing/gitlab/components/debian/build@<VERSION>
    inputs:
      needs: [sdist]