datalad deb-configure-builder
Synopsis
datalad deb-configure-builder [-h] [-d DATASET] [-f] [--template PATH] [--version] [property=value [property=value ...]]
Description
Configure a package build environment
A builder is a (containerized) build environment used to build binary Debian packages from Debian source packages. This command is typically run on the builder dataset in a distribution dataset and configures a builder recipe based on a template and user-specified values for the template's placeholders. The resulting recipe will be placed in the 'recipes/' directory of the builder dataset.
The following directory tree illustrates this. The configured builder takes the form of a Singularity recipe here.
bullseye/ <- distribution dataset├── builder <- builder subdataset│ ├── envs│ │ └── README.md│ ├── recipes│ │ ├── README.md│ │ └── singularity-any <- builder configuration│ ├── init <- additional builder content│ │ ├── README.md│ │ ├── finalize/ <- post-processing executables│ │ └── ...
Currently supported templates are
Template 'default'
This is a Singularity recipe with the following configuration items:
dockerbase
(required): name of a Docker base image for the container, i.e. 'debian:bullseye''debian_archive_sections
(optional): which sections of the Debian package archive to enable for APT in the build environment. To enable all sections set to 'main contrib non-free'. Default: 'main'
Any files placed in init/
will be copied into the build environment
when it is being bootstrapped, right after the base operating system was
installed. This can be used to, for example, configure additional
APT sources, by placing a sources.list
file into
init/etc/apt/sources.list.d/...
, and a corresponding GPG key into
init/usr/share/keyrings/...
.
Any executables placed into init/finalize/
will be executed at the
very end of the bootstrapping process. A finalizer (script) could be used
to adjust file permissions, or make arbitrary other modifications without
having to adjust the environment recipe directly.
Examples
Configure the default Singularity recipe in the builder subdataset, executed from a distribution superdataset:
% datalad deb-configure-builder -d builder dockerbase=debian:bullseye
Options
property=value
Values to replace placeholders in the specified template.
-h, --help, --help-np
show this help message. --help-np forcefully disables the use of a pager for displaying the help message
-d DATASET, --dataset DATASET
Specify a builder dataset in which an environment will be defined. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE
-f, --force
enforce creation of a package dataset in a non-empty directory.
--template PATH
Builder recipe template. This is a text file for placeholders in Python string formating syntax. Constraints: value must be a string or value must be NONE [Default: 'default']
--version
show the module and its version which provides the command