Implement the "sbuild" task
As a debusine user I can schedule "sbuild" tasks that will:
- download a source package from a given URL
- run sbuild on that source package in a given distribution
- cleanup the build artifacts (remove the files)
The task_data associated the sbuild task respects the schema proposed for the generic PackageBuild task. The first implementation must at least translate the following keys as described here:
- distribution: name of the target distribution (
-d
option to pass tosbuild
) - build_components: a list that can contain up to three entries:
-
any
: triggers addition of--arch-any
if present or--no-arch-any
if absent -
all
: triggers addition of--arch-all
if present or--no-arch-all
if absent -
source
: triggers addition of--source
if present or--no-source
if absent
-
- host_architecture: passed to sbuild with
--arch=<value>
The first implementation also supports the following key to account for the lack of artifact handling in debusine:
- sbuild_options: additional command line options to pass to
sbuild
This will let us pass --post-build-commands="/usr/local/bin/post-process %SBUILD_CHANGES"
to call a script that can do additional operations like signing the source package, uploading it and storing a copy of the build log.
The setup of the sbuild chroots, the creation of the GPG key, and the dput configuration is outside the scope of the task for now and we assume that they have been setup by the administrator.
debusine should then schedule the task on an appropriate worker (cf #8 (closed)). The task should be able to identify whether a worker is suitable by ensuring that the worker's metadata reference an appropriate sbuild chroot:
sbuild_chroots:
- jessie-amd64
- jessie-i386
That list is built with the output of this command: schroot -l | sed -n -e 's/chroot:\(.*\)-sbuild$/\1/p'