Skip to content

debian/source

Configure a job to build a Debian source package (.dsc) for this project.

Latest release

latest badge

Usage

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

Inputs

Input Default value Description
stage "build" The stage to add jobs to
job_name "debian_source" Name to give this job
image igwn/builder:bookworm Docker image to use when building Debian source package (the built source package is not Debian version-specific)
needs List of jobs whose artifacts are needed for the Debian source build
source_distribution_name "*.tar.*" Name of the source distribution file
add_changelog_entry true Add a changelog entry when building the Debian source package, see Adding changelog entries for more details
dpkg_source_options "" Options to pass to dpkg-source

Notes

Requires an upstream source distribution

Creating a Debian source package is only supported when starting from an upstream tarball that contains a debian/ configuration directory.

This must be configured independently of this component and the tarball provided to the debian/source component via the needs input. See Examples for an example.

Adding changelog entries

If add_changelog_entry: true is given in inputs (the default), the build will include a call to dch to add/increment a debian changelog entry to (attempt to) make this build unique. This happens in one of two ways

  1. If the source distribution includes a PKG-INFO file, and the Version field in that file doesn't match the version in the latest Debian changelog entry, a new changelog entry will be added using the --newversion option to dch using the version from the PKG-INFO file.

    This entry will be tagged with a Debian build number of 9999+debNu1, where N is the Debian distribution version number (e.g. 12 for Bookworm).

  2. If the source distribution doesn't include a PKG-INFO file, a new --local changelog entry will be added.

    This entry will be tagged with a Debian build number of X+debNuY, where X is the Debian build number for the latest changelog entry already in the changelog, N is the Debian distribution version number (e.g. 12 for Bookworm), and Y is a counter for the number of +debNu rebuilds (almost always 1).

Examples

Create a Debian source package from a Python project 'sdist'

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