``CONSFIGURATOR.PROPERTY.SBUILD``
=================================
API reference
-------------

General
~~~~~~~

Property: ``SBUILD:INSTALLED``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``(sbuild:installed)``

Ensure that sbuild and associated utilities are installed.

Property: ``SBUILD:USABLE-BY``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``(sbuild:usable-by username)``

Add a user to the sbuild group in order to use sbuild.

Property: ``SBUILD:BUILT``
^^^^^^^^^^^^^^^^^^^^^^^^^^

``(sbuild:built options properties)``

Build and configure a schroot for use with sbuild.
For convenience we set up several enhancements, such as ccache and eatmydata.
In the case of Debian, we assume you are building for Debian stretch or newer,
and we assume that you have sbuild 0.71.0 or later and, if overlays are
enabled, Linux 3.18 or newer.

OPTIONS is a plist of keyword parameters:

  - :USE-CCACHE -- whether builds using the schroot should use ccache.  ccache
    is generally useful but breaks building some packages; this option allows
    you to toggle it on and off for particular schroots.  Defaults to t.

  - :CHROOT-OPTIONS -- passed on to CHROOT:OS-BOOTSTRAPPED-FOR, which see.

PROPERTIES should specify, at a minimum, the operating system for the schroot.

Example usage:

.. code-block:: none

  (os:debian-stable "bullseye" :amd64)
  (apt:uses-local-cacher)
  (apt:mirrors "...")
  (sbuild:usable-by "spwhitton")
  (schroot:overlays-in-tmpfs)
  (periodic:reapplied-at-most :monthly "sbuild sid schroot (re)built"
    (sbuild:built. nil
      (os:debian-unstable :amd64)
      (sbuild:standard-debian-schroot)
      (apt:uses-parent-proxy)
      (apt:uses-parent-mirrors)))

To take advantage of the piuparts and autopkgtest support, add to your
~/.sbuildrc:

.. code-block:: none

  $piuparts_opts = [
      '--no-eatmydata',
      '--schroot',
      '%r-%a-sbuild',
      '--log-level=info',
      ];
  
  $autopkgtest_root_args = "";
  $autopkgtest_opts = ["--", "schroot", "%r-%a-sbuild"];

Property: ``SBUILD:STANDARD-DEBIAN-SCHROOT``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``(sbuild:standard-debian-schroot &key upgrade)``

Properties that will be wanted in almost any Debian sbuild schroot, but not
in sbuild schroots for other operating systems.

Includes replacing use of sbuild-update(1).
