The consfigurator Reference Manual

This is the consfigurator Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon May 15 04:42:55 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 consfigurator

Lisp declarative configuration management system

Author

Sean Whitton <>

License

GPL-3+

Version

1.2.0

Defsystem Dependency

cffi-grovel (system).

Dependencies
  • anaphora (system).
  • alexandria (system).
  • babel (system).
  • babel-streams (system).
  • bordeaux-threads (system).
  • cl-ppcre (system).
  • cl-heredoc (system).
  • cl-interpol (system).
  • named-readtables (system).
  • cffi (system).
  • osicat (system).
  • sb-posix (system)., required, for feature :sbcl
  • closer-mop (system).
  • agnostic-lizard (system).
  • trivial-backtrace (system).
Source

consfigurator.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 consfigurator/consfigurator.asd

Source

consfigurator.asd.

Parent Component

consfigurator (system).

ASDF Systems

consfigurator.


3.1.2 consfigurator/src/package.lisp

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Packages

3.1.3 consfigurator/src/reader.lisp

Dependency

src/package.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).


3.1.4 consfigurator/src/libc.lisp

Dependency

src/reader.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).


3.1.5 consfigurator/src/libacl.lisp

Dependency

src/libc.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).


3.1.6 consfigurator/src/libcap.lisp

If Feature

:linux

Dependency

src/libacl.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).


3.1.7 consfigurator/src/util.lisp

Dependencies
Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.8 consfigurator/src/util/posix1e.lisp

Dependency

src/util.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.9 consfigurator/src/connection.lisp

Dependency

src/util/posix1e.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.10 consfigurator/src/property.lisp

Dependency

src/connection.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.11 consfigurator/src/propspec.lisp

Dependency

src/property.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.12 consfigurator/src/host.lisp

Dependency

src/propspec.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.13 consfigurator/src/combinator.lisp

Dependency

src/host.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.14 consfigurator/src/deployment.lisp

Dependency

src/combinator.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.15 consfigurator/src/connection/local.lisp

Dependency

src/deployment.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

3.1.16 consfigurator/src/data.lisp

Dependency

src/connection/local.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.17 consfigurator/src/image.lisp

Dependency

src/data.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.18 consfigurator/src/property/cmd.lisp

Dependency

src/image.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

single (function).

Internals

single. (macro).


3.1.19 consfigurator/src/property/file.lisp

Dependency

src/property/cmd.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.20 consfigurator/src/property/etc-default.lisp

Dependency

src/property/file.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

contains (function).

Internals

contains. (macro).


3.1.21 consfigurator/src/property/os.lisp

Dependency

src/property/etc-default.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.22 consfigurator/src/property/container.lisp

Dependency

src/property/os.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.23 consfigurator/src/property/periodic.lisp

Dependency

src/property/container.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

at-most (macro).

Internals

at-most* (function).


3.1.24 consfigurator/src/property/mount.lisp

Dependency

src/property/periodic.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.25 consfigurator/src/property/service.lisp

Dependency

src/property/mount.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.26 consfigurator/src/property/apt.lisp

Dependency

src/property/service.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.27 consfigurator/src/property/package.lisp

Dependency

src/property/apt.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.28 consfigurator/src/property/chroot.lisp

Dependency

src/property/package.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.29 consfigurator/src/property/disk.lisp

Dependency

src/property/chroot.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.30 consfigurator/src/property/fstab.lisp

Dependency

src/property/disk.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.31 consfigurator/src/property/crypttab.lisp

Dependency

src/property/fstab.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.32 consfigurator/src/property/user.lisp

Dependency

src/property/crypttab.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.33 consfigurator/src/util/linux-namespace.lisp

Dependency

src/property/user.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

3.1.34 consfigurator/src/property/git.lisp

Dependency

src/util/linux-namespace.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.35 consfigurator/src/property/gnupg.lisp

Dependency

src/property/git.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.36 consfigurator/src/property/ssh.lisp

Dependency

src/property/gnupg.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.37 consfigurator/src/property/sshd.lisp

Dependency

src/property/ssh.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.38 consfigurator/src/property/locale.lisp

Dependency

src/property/sshd.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.39 consfigurator/src/property/reboot.lisp

Dependency

src/property/locale.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

at-end (function).

Internals

3.1.41 consfigurator/src/property/grub.lisp

Dependency

src/property/installer.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

grub-installed. (macro).


3.1.42 consfigurator/src/property/u-boot.lisp

Dependency

src/property/grub.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

installed-rockchip. (macro).


3.1.43 consfigurator/src/property/hostname.lisp

Dependency

src/property/u-boot.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.44 consfigurator/src/property/network.lisp

Dependency

src/property/hostname.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.45 consfigurator/src/property/libvirt.lisp

Dependency

src/property/network.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.46 consfigurator/src/property/ccache.lisp

Dependency

src/property/libvirt.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.47 consfigurator/src/property/schroot.lisp

Dependency

src/property/ccache.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.48 consfigurator/src/property/sbuild.lisp

Dependency

src/property/schroot.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.49 consfigurator/src/property/postfix.lisp

Dependency

src/property/sbuild.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.50 consfigurator/src/property/cron.lisp

Dependency

src/property/postfix.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.51 consfigurator/src/property/lets-encrypt.lisp

Dependency

src/property/cron.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.52 consfigurator/src/property/apache.lisp

Dependency

src/property/lets-encrypt.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.53 consfigurator/src/property/systemd.lisp

Dependency

src/property/apache.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.54 consfigurator/src/property/firewalld.lisp

Dependency

src/property/systemd.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.55 consfigurator/src/property/timezone.lisp

Dependency

src/property/firewalld.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.56 consfigurator/src/property/swap.lisp

Dependency

src/property/timezone.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

has-swap-file (function).

Internals

3.1.57 consfigurator/src/property/lxc.lisp

Dependency

src/property/swap.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.58 consfigurator/src/property/postgres.lisp

Dependency

src/property/lxc.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.59 consfigurator/src/connection/shell-wrap.lisp

Dependency

src/property/postgres.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

%readfile (function).


3.1.60 consfigurator/src/connection/fork.lisp

Dependency

src/connection/shell-wrap.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

3.1.61 consfigurator/src/connection/rehome.lisp

Dependency

src/connection/fork.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

3.1.62 consfigurator/src/connection/ssh.lisp

Dependency

src/connection/rehome.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.63 consfigurator/src/connection/sudo.lisp

Dependency

src/connection/ssh.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

sudo-connection (class).


3.1.64 consfigurator/src/connection/su.lisp

Dependency

src/connection/sudo.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

su-connection (class).


3.1.65 consfigurator/src/connection/sbcl.lisp

Dependency

src/connection/su.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

establish-connection (method).

Internals

*sbcl* (special variable).


3.1.66 consfigurator/src/connection/chroot.lisp

Dependency

src/connection/sbcl.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.67 consfigurator/src/connection/setuid.lisp

Dependency

src/connection/chroot.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

setuid-connection (class).


3.1.68 consfigurator/src/connection/as.lisp

Dependency

src/connection/setuid.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

establish-connection (method).

Internals

can-setuid (function).


3.1.69 consfigurator/src/connection/linux-namespace.lisp

Dependency

src/connection/as.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.70 consfigurator/src/data/util.lisp

Dependency

src/connection/linux-namespace.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

3.1.71 consfigurator/src/data/asdf.lisp

Dependency

src/data/util.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).

Internals

3.1.72 consfigurator/src/data/pgp.lisp

Dependency

src/data/asdf.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface
Internals

3.1.73 consfigurator/src/data/git-snapshot.lisp

Dependency

src/data/pgp.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).

Internals

3.1.74 consfigurator/src/data/gpgpubkeys.lisp

Dependency

src/data/git-snapshot.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).

Internals

3.1.75 consfigurator/src/data/ssh-askpass.lisp

Dependency

src/data/gpgpubkeys.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).

Internals

ssh-askpass (function).


3.1.76 consfigurator/src/data/local-file.lisp

Dependency

src/data/ssh-askpass.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).


3.1.77 consfigurator/src/data/pass.lisp

Dependency

src/data/local-file.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).


3.1.78 consfigurator/src/data/files-tree.lisp

Dependency

src/data/pass.lisp (file).

Source

consfigurator.asd.

Parent Component

consfigurator (system).

Public Interface

register-data-source (method).


4 Packages

Packages are listed by definition order.


4.1 consfigurator.property.user

Source

src/package.lisp.

Use List
Public Interface
Internals

4.2 consfigurator.data.local-file

Source

src/package.lisp.

Use List

4.3 consfigurator.connection.chroot

Source

src/package.lisp.

Use List
Internals

4.4 consfigurator.connection.ssh

Source

src/package.lisp.

Use List
Internals

4.5 consfigurator.data.pgp

Source

src/package.lisp.

Use List
Public Interface
Internals

4.6 consfigurator.property.ccache

Source

src/package.lisp.

Use List
Public Interface
Internals

4.7 consfigurator.connection.rehome

Source

src/package.lisp.

Use List
Used By List
Public Interface

4.8 consfigurator.property.grub

Source

src/package.lisp.

Use List
Public Interface

grub-installed (function).

Internals

grub-installed. (macro).


4.9 consfigurator.property.package

Source

src/package.lisp.

Use List
Public Interface
Internals

4.10 consfigurator.property.chroot

Source

src/package.lisp.

Use List
Public Interface
Internals

4.11 consfigurator.connection.setuid

Source

src/package.lisp.

Use List
Internals

setuid-connection (class).


4.13 consfigurator.property.etc-default

Source

src/package.lisp.

Use List
Public Interface

contains (function).

Internals

contains. (macro).


4.14 consfigurator.property.lets-encrypt

Source

src/package.lisp.

Use List
Public Interface
Internals

4.15 consfigurator.property.apt

Source

src/package.lisp.

Use List
Public Interface
Internals

4.16 consfigurator.connection.su

Source

src/package.lisp.

Use List
Internals

su-connection (class).


4.17 consfigurator.property.hostname

Source

src/package.lisp.

Use List
Public Interface
Internals

4.18 consfigurator.property.reboot

Source

src/package.lisp.

Use List
Public Interface

at-end (function).

Internals

4.19 consfigurator.data.git-snapshot

Source

src/package.lisp.

Use List
Internals

4.20 consfigurator.property.apache

Source

src/package.lisp.

Use List
Public Interface
Internals

4.21 consfigurator.util.linux-namespace

Source

src/package.lisp.

Use List
Used By List
Public Interface

4.22 consfigurator.property.swap

Source

src/package.lisp.

Use List
Public Interface

has-swap-file (function).

Internals

4.23 consfigurator.connection.sudo

Source

src/package.lisp.

Use List
Internals

sudo-connection (class).


4.24 consfigurator.property.crypttab

Source

src/package.lisp.

Use List
Public Interface
Internals

4.25 consfigurator.data.ssh-askpass

Source

src/package.lisp.

Use List
Internals

ssh-askpass (function).


4.26 consfigurator.property.gnupg

Source

src/package.lisp.

Use List
Public Interface
Internals

4.27 consfigurator.property.periodic

Source

src/package.lisp.

Use List
Public Interface

at-most (macro).

Internals

at-most* (function).


4.28 consfigurator.connection.shell-wrap

Source

src/package.lisp.

Use List
Used By List
Public Interface
Internals

%readfile (function).


4.29 consfigurator.data.asdf

Source

src/package.lisp.

Use List
Internals

4.30 consfigurator.property.file

Source

src/package.lisp.

Use List
Public Interface
Internals

4.32 consfigurator.data.pass

Source

src/package.lisp.

Use List

4.33 consfigurator.property.container

Source

src/package.lisp.

Use List
Public Interface
Internals

4.34 consfigurator.property.os

Source

src/package.lisp.

Use List
Public Interface
Internals

4.35 consfigurator.property.cron

Source

src/package.lisp.

Use List
Public Interface
Internals

4.36 consfigurator.data.gpgpubkeys

Source

src/package.lisp.

Use List
Internals

4.37 consfigurator.property.git

Source

src/package.lisp.

Use List
Public Interface
Internals

4.38 consfigurator.property.mount

Source

src/package.lisp.

Use List
Public Interface
Internals

4.39 consfigurator.property.u-boot

Source

src/package.lisp.

Use List
Public Interface

installed-rockchip (function).

Internals

installed-rockchip. (macro).


4.40 consfigurator.property.service

Source

src/package.lisp.

Use List
Public Interface
Internals

4.41 consfigurator.property.postgres

Source

src/package.lisp.

Use List
Public Interface
Internals

4.42 consfigurator

Source

src/package.lisp.

Use List
  • alexandria.
  • anaphora.
  • cffi.
  • common-lisp.
Used By List
Public Interface
Internals

4.43 consfigurator.property.sshd

Source

src/package.lisp.

Use List
Public Interface
Internals

4.44 consfigurator.property.fstab

Source

src/package.lisp.

Use List
Public Interface
Internals

4.45 consfigurator.connection.local

Source

src/package.lisp.

Use List
Used By List

consfigurator.connection.fork.

Public Interface

local-connection (class).


4.46 consfigurator.data.util

Source

src/package.lisp.

Use List
Used By List
Public Interface

4.47 consfigurator.property.libvirt

Source

src/package.lisp.

Use List
Public Interface
Internals

4.48 consfigurator.property.disk

Source

src/package.lisp.

Use List
Used By List
Public Interface
Internals

4.49 consfigurator.property.schroot

Source

src/package.lisp.

Use List
Public Interface
Internals

4.50 consfigurator.property.cmd

Source

src/package.lisp.

Use List
Public Interface

single (function).

Internals

single. (macro).


4.51 consfigurator.property.firewalld

Source

src/package.lisp.

Use List
Public Interface
Internals

4.52 consfigurator.property.systemd

Source

src/package.lisp.

Use List
Public Interface
Internals

4.53 consfigurator.property.lxc

Source

src/package.lisp.

Use List
Public Interface
Internals

4.54 consfigurator.connection.as

Source

src/package.lisp.

Use List
Internals

can-setuid (function).


4.55 consfigurator.property.network

Source

src/package.lisp.

Use List
Public Interface
Internals

4.56 consfigurator.connection.linux-namespace

Source

src/package.lisp.

Use List
Internals

4.57 consfigurator.property.sbuild

Source

src/package.lisp.

Use List
Public Interface
Internals

4.58 consfigurator.data.files-tree

Source

src/package.lisp.

Use List

4.59 consfigurator.property.timezone

Source

src/package.lisp.

Use List
Public Interface
Internals

4.60 consfigurator.property.postfix

Source

src/package.lisp.

Use List
Public Interface
Internals

4.61 consfigurator.property.ssh

Source

src/package.lisp.

Use List
Public Interface
Internals

4.62 consfigurator.property.locale

Source

src/package.lisp.

Use List
Public Interface
Internals

4.63 consfigurator.connection.sbcl

Source

src/package.lisp.

Use List
Internals

*sbcl* (special variable).


4.64 consfigurator.util.posix1e

Source

src/package.lisp.

Use List
Used By List

consfigurator.util.linux-namespace.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Constants

Constant: +consfigurator-system-dependencies+
Package

consfigurator.property.package.

Source

src/property/package.lisp.

Constant: +linux-basic-vfs+
Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Constant: +linux-efivars-vfs+

Arguments to mount(8) to mount the UEFI NVRAM.
After mounting /sys, mount this when /sys/firmware/efi/efivars exists.

Package

consfigurator.property.mount.

Source

src/property/mount.lisp.


5.1.2 Special variables

Special Variable: *consfigurator-debug-level*

Integer. Higher values mean be more verbose during deploys.

Package

consfigurator.

Source

src/util.lisp.

Special Variable: *data-source-gnupghome*

Home directory for gnupg when used in a data source.

Because gnupg uses Unix domain sockets internally, this path should be short enough to avoid the 108 char limit on socket paths.

Package

consfigurator.

Source

src/data.lisp.


5.1.3 Macros

Macro: agree-tos (&key email-address)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Macro: as (user &body properties)

Apply PROPERTIES as USER by reconnecting with the :AS connection type. Note that the :AS connection type requires root, so as a special case, this macro just expands to ESEQPROPS if USER is the literal string "root" (without evaluation). This makes it possible to use this macro to annotate applications of properties which are normally applied by non-root, to make it explicit that in this case they’re being applied as root, e.g. that they will affect /root and not /home.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: at-most (period desc &rest propapps)

Only attempt to apply PROPAPPS at most every PERIOD. Supported values for PERIOD are :each-reboot, :hourly, :daily, :weekly, :monthly, :yearly. It is assumed that a month has 30 days and a year has 365.25 days.

The purpose of this combinator is to avoid applying properties that are expensive to apply more often than it is useful to apply them. It is not for scheduling tasks to occur at specific times or on specific days.

The application of PROPAPPS is tracked by creating a flagfile on the remote with a name computed from DESC. The mtime of this file is examined to determine whether PERIOD has passed and another attempt to apply PROPAPPS should be made. Thus, you must ensure that DESC is unique among the descriptions of all the properties that will be applied to this host as this user.

Package

consfigurator.property.periodic.

Source

src/property/periodic.lisp.

Macro: built. (options &rest properties)
Package

consfigurator.property.sbuild.

Source

src/property/sbuild.lisp.

Macro: debian-live-iso-built. (options image-pathname &rest properties)
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Macro: debian-suite-case (&body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: debian-suite-ecase (&body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: defdeploy (name (connections host) &body additional-properties)

Define a function which does (DEPLOY CONNECTIONS HOST ADDITIONAL-PROPERTIES). You can then eval (NAME) to execute this deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: defdeploy-these (name (connections host) &body properties)

Define a function which does (DEPLOY-THESE CONNECTIONS HOST PROPERTIES). You can then eval (NAME) to execute this deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: defhost (hostname (&key deploy) &body properties)

Define a host with hostname HOSTNAME and properties PROPERTIES.
HOSTNAME can be a string or a symbol. In either case, the host will get a static informational property with its hostname as a string, and the symbol whose name is the hostname will be bound to the host object.

DEPLOY represents the usual way you’ll connect to the host to deploy properties, and if specified, a function named HOSTNAME will be defined to deploy the host using that connection chain. This is an optional convenience feature; you can always use DEPLOY and DEPLOY-THESE to apply properties to the host using an arbitrary chain of connections.

If the first entry in PROPERTIES is a string, it will be considered a human-readable description of the host. Otherwise, PROPERTIES is an unevaluated property application specification. Recall that for atomic entries (PROPERTY . ARGS), PROPERTY refers to the property that symbol names in the global environment, not whatever it may name in the current dynamic and/or lexical environments. Property application specifications cannot close over globally anonymous properties.

The order of PROPERTIES matters: deployments will apply properties to the host in the order specified here, so later properties implicitly depend on earlier ones. In addition, static informational attributes set by later properties are allowed to override any attributes with the same name set by earlier entries.

Package

consfigurator.

Source

src/host.lisp.

Macro: define-choosing-property-combinator (name lambda-list &key type choose)
Package

consfigurator.

Source

src/combinator.lisp.

Macro: define-error-retval-cfun ((&key errno failure-val) &body defcfun-args)
Package

consfigurator.

Source

src/util.lisp.

Macro: define-function-property-combinator (name args &body body)

Define a function property combinator NAME with lambda list ARGS.

Usage notes:

- If you need to read individual arguments to propapps passed as arguments to NAME, call PROPAPP-ARGS to access them. For passing a whole list of args on to a property subroutine, just take the cdr of the propapp.

For an example showing both techniques at work, see POSTFIX:MAPPED-FILE.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: define-simple-error (name &optional parent-types docstring)
Package

consfigurator.

Source

src/util.lisp.

Macro: define-simple-print-object (class)

Define an implementation of PRINT-OBJECT suitable for classes representing simple collections of readably-printable values.

Package

consfigurator.

Source

src/util.lisp.

Macro: defpackage-consfig (name &body forms)

Convenience wrapper around DEFPACKAGE for consfigs.
Adds recommended local nicknames for all the property and data source packages that come with Consfigurator. Either use this directly or use its macro expansion as a starting point for your own DEFPACKAGE form for your consfig.

Package

consfigurator.

Source

src/util.lisp.

Macro: defprop (name type lambda &body body0)

Define a property by providing code for its subroutines.

Package

consfigurator.

Source

src/property.lisp.

Macro: defproplist (name type lambda &body properties)

Like DEFPROPSPEC, but define the function which yields the propspec using the unevaluated property application specification PROPERTIES, where the implicit surrounding combinator is ESEQPROPS.

If the first element of PROPERTIES is a string, it will be considered a docstring for the resulting property. If the first element of PROPERTIES after any such string is a list beginning with :DESC, the remainder will be used as the :DESC subroutine for the resulting property, like DEFPROP. Supplying :CHECK and :HOSTATTRS subroutines in the same way is also supported.

Otherwise, the body should not contain any references to variables other than those in LAMBDA. LAMBDA is an ordinary lambda list, so you can use &AUX variables to compute intermediate values. The evaluation of arguments to propapps in PROPERTIES, and the evaluation of any &AUX variables in LAMBDA, will happen at :HOSTATTRS-time for the host to which the resulting property is to be applied, so you can retrieve static informational attributes set by other properties applied to the host (unlike with unevaluated property application specifications appearing in DEFHOST forms). The evaluation should otherwise be purely functional.

You will usually be able to use DEFPROPLIST instead of DEFPROPSPEC. However, sometimes you will need to fall back on DEFPROPSPEC. For example, an unevaluated property application specification cannot express passing values other than constant values and propapps to property combinators.

Package

consfigurator.

Source

src/property.lisp.

Macro: defpropspec (g0 type lambda &body body1)

Define a property which constructs, evaluates and applies a propspec.

This is how you can define a property which works by calling other properties, in accordance with property combinators.

Except in very simple cases, it is usually better to use this macro (or DEFPROPLIST) to combine several smaller properties rather than writing a property using DEFPROP which programmatically calls other properties. This is because using this macro takes care of calling property :HOSTATTRS subroutines at the right time.

If the first element of the body is a string, it will be considered a docstring for the resulting property. If the first element of the body after any such string is a list beginning with :DESC, the remainder will be used as the :DESC subroutine for the resulting property, like DEFPROP. Supplying :CHECK and :HOSTATTRS subroutines in the same way is also supported. Otherwise, the body defines a function of the arguments specified by the lambda list which returns the property application specification expression to be evaluated and applied. It should be a pure function aside from retrieving hostattrs (as set by other properties applied to the hosts to which the resulting property is applied, not as set by the properties in the returned propspec).

Macro property combinators should be usable in the normal way in the body, but some other macros commonly used in DEFHOST and DEFPROPLIST forms will not work as expected. In particular, the macros implementing dotted propapp notation expect to be used within unevaluated property application specification expressions and may not behave as expected in the body of DEFPROPSPEC. You can work around this particular limitation using the PROPAPP macro. See DISK:RAW-IMAGE-BUILT-FOR for an example of this technique.

You can usually use DEFPROPLIST instead of DEFPROPSPEC, which see.

Package

consfigurator.

Source

src/property.lisp.

Macro: deploy (connections host &body additional-properties)

Establish CONNECTIONS to HOST, and apply each of the host’s usual properties, followed by specified by ADDITIONAL-PROPERTIES, an unevaluated property application specification.

CONNECTION is a keyword identifying a connection type, a list beginning with such a keyword and followed by keyword arguments required to establish the connection, or a list of such lists.

Then HOST has all its usual static informational attributes, plus any set by ADDITIONAL-PROPERTIES. Static informational attributes set by ADDITIONAL-PROPERTIES can override the host’s usual static informational attributes, in the same way that later entries in the list of properties specified in DEFHOST forms can override earlier entries (see DEFHOST’s docstring).

The evaluation of ADDITIONAL-PROPERTIES to produce a property application specification may retrieve existing hostattrs, but should not set any new ones (not to be confused with how the :HOSTATTRS subroutines of properties in ADDITIONAL-PROPERTIES may set additional hostattrs).

Package

consfigurator.

Source

src/deployment.lisp.

Macro: deploy-these (connections host &body properties)

Like DEPLOY, except apply each of the properties specified by PROPERTIES, and not the host’s usual properties, unless they also appear in PROPERTIES. PROPERTIES is an unevaluated property application specification.

This function is useful to apply one or two properties to a host right now, e.g. at the REPL when when testing new property definitions. If HOST is usually deployed using a Lisp-type connection, and the property you are testing is :POSIX, you might use a connection type like :SSH so that you can quickly alternate between redefining your work-in-progress property and seeing what happens when you apply it to HOST.

HOST has all its usual static informational attributes, as set by its usual properties, plus any set by PROPERTIES. Static informational attributes set by PROPERTIES can override the host’s usual static informational attributes, in the same way that later entries in the list of properties specified in DEFHOST forms can override earlier entries (see DEFHOST’s docstring).

The evaluation of PROPERTIES to produce a property application specification may retrieve existing hostattrs, but should not set any new ones (not to be confused with how the :HOSTATTRS subroutines of properties in PROPERTIES may set additional hostattrs).

Package

consfigurator.

Source

src/deployment.lisp.

Macro: deploys-these. (root host &rest properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Macro: deploys-these. (connections host &rest properties)
Package

consfigurator.

Source

src/deployment.lisp.

Macro: deploys. (root host &rest additional-properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Macro: deploys. (connections host &rest additional-properties)
Package

consfigurator.

Source

src/deployment.lisp.

Macro: etypecase (&body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: exit-code-to-retval (exit &key on-failure)
Package

consfigurator.

Source

src/util.lisp.

Macro: has-volumes (&rest volume-specifications)

Specify non-removable volumes normally accessible to the kernel on this host.

The order of the list of volumes is significant: it is the order in which attempts to open all of the volumes should be made. So, for example, any LVM volume groups should occur later in the list than the partitions containing the LVM physical volumes corresponding to those volume groups.

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Macro: host-debian-suite-case (host0 &body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: host-debian-suite-ecase (host0 &body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: host-etypecase (host0 &body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: host-typecase (host0 &body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: hostdeploy (host &body additional-properties)

Like DEPLOY, but use the host’s default deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: hostdeploy-these (host &body properties)

Like DEPLOY-THESE, but use the host’s default deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: ignoring-hostattrs (form)

Where FORM is a programmatic call to a property which has a :HOSTATTRS subroutine, muffle warnings about calling a property with a :HOSTATTRS subroutine programmatically. Use this only when you know that the :HOSTATTRS subroutine does not push any new hostattrs.

Package

consfigurator.

Source

src/property.lisp.

Macro: in-consfig (&rest systems)

Sets the variable *CONSFIG* in the current package to SYSTEMS.
Used at the top of your consfig, right after IN-PACKAGE.

This is used to record a list of the names of the ASDF systems in which you define your hosts, site-specific properties and deployments. These systems should depend on the "consfigurator" system.

SYSTEMS should satisfy the following condition: in normal usage of Consfigurator, evaluating (mapc #’asdf:load-system SYSTEMS) should be sufficient to define all the properties you intend to apply to hosts and property combinators you intend to use in specifying propspecs.

Consfigurator uses this information when starting up remote Lisp images to effect deployments: it sends over the ASDF systems specified by SYSTEMS.

Package

consfigurator.

Source

src/propspec.lisp.

Macro: kvm-boots-chroot-for. (options host &rest additional-properties)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Macro: kvm-boots-chroot. (options &rest properties)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Macro: lambda-ignoring-args (&body body)
Package

consfigurator.

Source

src/util.lisp.

Macro: localhd (&rest properties)

Deploy PROPERTIES to localhost using HOSTDEPLOY-THESE*.

It is assumed that on this system the shell command ’hostname -f’ will return the full hostname. Useful for testing properties at the REPL. See also EVALS.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: localsudo (&rest properties)

Deploy PROPERTIES to localhost using a :SUDO connection.

It is assumed that on this system the shell command ’hostname -f’ will return the full hostname, and that sudo is configured to ask for a password. Useful for testing properties at the REPL. See also EVALS.

Package

consfigurator.

Source

src/deployment.lisp.

Macro: on-apply-change (propapp &body on-change)

If applying PROPAPP makes a change, also apply each of the propapps ON-CHANGE in order.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: on-change (propapp &body on-change)

If applying or unapplying PROPAPP makes a change, also apply each of the propapps ON-CHANGE in order.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: os-bootstrapped-for. (options root host &rest additional-properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Macro: os-bootstrapped. (options root &rest properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Macro: prog-changes (&body body)
Package

consfigurator.

Source

src/util.lisp.

Macro: propapp (form)

Convert a single element of an unevaluated property application specification expression to a property application specification expression.

Package

consfigurator.

Source

src/propspec.lisp.

Macro: typecase (&body cases1)
Package

consfigurator.property.os.

Source

src/property/os.lisp.

Macro: unapply (form)

Where FORM is a programmatic application of a property (i.e. an application of a property directly inside an :APPLY or :UNAPPLY subroutine), unapply the property instead of applying it.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: user-container-for. (options user host &rest additional-properties)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Macro: user-container. (options user &rest properties)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Macro: volumes (&body volume-specifications)

Return a list of instances of VOLUME, one for each element of VOLUME-SPECIFICATIONS. Each of VOLUME-SPECIFICATIONS is an (unquoted) list of the form (TYPE &REST INITARGS).

TYPE is a symbol naming the volume type to be initialised. If the symbol does not name a subclass of VOLUME, it will be replaced with a symbol of the same name in the DISK package; this allows type names to be used unqualified.

INITARGS is an even-length plist, possibly with a final additional element, which is either another volume specification or an (unquoted) list of volume specifications. This becomes the VOLUME-CONTENTS of the VOLUME.

The following keys in INITARGS are handled specially:

- :VOLUME-SIZE – may be a string like "100M", "2G", "1T" which will be converted into a whole number of mebibytes. "M", "G", and "T" are currently supported.

Example usage:

(volumes
(physical-disk
(partitioned-volume
((partition
:partition-typecode #xef00
(fat32-filesystem
:volume-size "512M"
:mount-point #P"/boot/efi"))
(partition
(luks-container
(lvm-physical-volume
:volume-group "vg_laptop"))))))
(lvm-logical-volume
:volume-group "vg_laptop"
:volume-label "lv_laptop_root"
(ext4-filesystem :mount-point #P"/")))

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Macro: when-contained ((&rest contained) &body propapps)

Macro property combinator. Apply each of PROPAPPS only when outside of any container, or when each of CONTAINED, a list of symbols, is contained by this container type.

Package

consfigurator.property.container.

Source

src/property/container.lisp.

Macro: when-started (host &body propapps)

Apply PROPAPPS only when the libvirt domain for the host designated by HOST is already running.
Useful to conditionalise a DEPLOYS property to do nothing unless the VM is already running, for a VM which is not always booted, e.g. on a laptop.

Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Macro: when-user-container-running ((host &key owner) &body propapps)

Apply PROPAPPS only when the unprivileged LXC for the host designated by HOST and owned by OWNER, defaulting to the current user, is already started.

Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Macro: with-acl-free (((aclvar aclcall)) &body forms)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Macro: with-change-if-changes-file ((file) &body forms)

Execute FORMS and yield :NO-CHANGE if FILE does not change.
Since stat(1) is not POSIX, this is implemented by calling ‘ls -dlL’ and cksum(1), and seeing if any of the information reported there, except for the number of links, has changed. Thus, you should not use this macro to detect changes in properties which will change the file but not the output of ‘ls -dlL’ and cksum(1).

Package

consfigurator.

Source

src/property.lisp.

Macro: with-change-if-changes-file-content ((file) &body forms)

Execute FORMS and yield :NO-CHANGE if FILE has the same content afterwards.

Package

consfigurator.

Source

src/property.lisp.

Macro: with-change-if-changes-files ((&rest files) &body forms)

Execute FORMS and yield :NO-CHANGE if none of FILES change.
See WITH-CHANGE-IF-CHANGES-FILE docstring regarding the sense of ’change’.

Package

consfigurator.

Source

src/property.lisp.

Macro: with-cleanly-installed-once ((&optional options original-os) &body propapps)

Apply INSTALLER:CLEANLY-INSTALLED-ONCE, passing along OPTIONS and ORIGINAL-OS, and attach to that application, using other property combinators, the application of PROPAPPS.

PROPAPPS is a concatenation of three lists of propapps delimited by keywords:

’(:post-install
(propapp1) (propapp2) ...

:always
(propapp3) (propapp4) ...

:post-first-reboot
(propapp5) (propapp6) ...)

Any of the keywords and their propapps may be absent, but the three lists must appear in this order. The :POST-INSTALL propapps are applied only if this deployment performed the clean reinstallation, right after that. The :ALWAYS propapps are applied next, whether or not this deployment performed the clean reinstallation. Finally, the :POST-FIRST-REBOOT propapps are applied, only if this deployment did not perform the clean reinstallation.

This mechanism handles common usages of INSTALLER:CLEANLY-INSTALLED-ONCE. For example:

(installer:with-cleanly-installed-once (...)
:post-install
(installer:bootloaders-installed)
(file:is-copy-of "/etc/resolv.conf" "/old-os/etc/resolv.conf") (mount:unmounted-below-and-removed "/old-os")

:always
(apt:installed "openssh-server")
(ssh:authorized-keys ...)
(network:static "enp1s0" ...)

:post-first-reboot
(my-cool-web-service)
(apache:https-vhost ...))

Properties that should be applied only once, or that rely on accessing files from /old-os, are applied under :POST-INSTALL. Networking and shell access are established before the first reboot, so we don’t lock ourselves out. However, as these properties are part of the usual definition of the host, they go under :ALWAYS, not :POST-INSTALL, so that Consfigurator checks they are still applied each deployment. Finally, we defer setting up the host’s sites and services until after the first reboot, in case there are any problems setting those up when it’s still the old OS’s kernel that’s running.

Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Macro: with-connattrs ((&rest connattrs) &body forms)

Execute FORMS with connattrs replaced as specified by CONNATTRS, a plist.

Package

consfigurator.

Source

src/connection.lisp.

Macro: with-data-stream ((s iden1 iden2) &body body)
Package

consfigurator.

Source

src/data.lisp.

Macro: with-flagfile (flagfile &body propapps)

Apply PROPAPPS unless FLAGFILE exists on the remote; after applying, create FLAGFILE.
Useful to ensure that something is done just once. Has the semantics that if FLAGFILE exists, PROPAPPS are assumed to all be already applied.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: with-homedir ((&key user dir) &body propapps)

Apply PROPAPPS with a different home and initial working directory, either DIR or the home directory of USER.

Package

consfigurator.

Source

src/combinator.lisp.

Macro: with-indented-inform (&body forms)
Package

consfigurator.

Source

src/util.lisp.

Macro: with-local-temporary-directory ((dir) &body forms)

Execute FORMS with a local temporary directory’s pathname in DIR. Currently assumes GNU mktemp(1).

There is no WITH-REMOTE-TEMPORARY-DIRECTORY because POSIX doesn’t include a shell utility to create temporary directories. If you need a remote temporary directory, one solution is to convert your property to a :LISP property.

Package

consfigurator.

Source

src/util.lisp.

Macro: with-opened-volumes ((volumes &key mount-below leave-open) &body propapps)

Macro property combinator. Where each of VOLUMES is a VOLUME which may be opened by calling OPEN-VOLUME with NIL as the second argument, recursively open each of VOLUMES and any contents thereof, apply PROPAPPS, and, unless LEAVE-OPEN, close all volumes that were opened.

MOUNT-BELOW specifies a pathname to prefix to mount points when opening FILESYSTEM volumes. During the application of PROPAPPS, all ’DISK:OPENED-VOLUMES and ’DISK:OPENED-VOLUME-PARENTS connattrs are replaced with lists of the volumes that were opened/already open and corresponding immediate parent volumes.

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Macro: with-preserve-hostattrs (&body forms)

Evaluate FORMS then throw away any newly added hostattrs.
Useful in property combinators when you need to run some :HOSTATTRS subroutines but ignore any new hostattrs they may push. Shouldn’t be used in properties.

Package

consfigurator.

Source

src/host.lisp.

Macro: with-remote-current-directory ((dir) &body forms)

Execute FORMS with the current working directory DIR.
This affects the working directory for commands run using RUN and MRUN, and the resolution of relative pathnames passed as the first argument of READ-REMOTE-FILE and WRITE-REMOTE-FILE. For Lisp-type connections, it additionally temporarily sets the working directory of the Lisp process using UIOP:WITH-CURRENT-DIRECTORY.

Package

consfigurator.

Source

src/connection.lisp.

Macro: with-remote-temporary-file ((file &key connection directory) &body body)

Execute BODY with FILE containing the path to a freshly created remote file, which will be cleaned up when BODY is finished.

Package

consfigurator.

Source

src/connection.lisp.

Macro: with-reset-data-sources (&body body)

Run BODY with initially empty data sources and string data.

This macro is typically used for testing or debugging.

Package

consfigurator.

Source

src/data.lisp.


5.1.4 Ordinary functions

Function: aborted-change (message &rest args)

Like FAILED-CHANGE, except the attempt to apply or unapply the property has failed before any changes have been made to the system. Signalled when a property is able to determine that it cannot be applied/unapplied by examining the actual state of the host but without making any changes.

Not to be confused with INAPPLICABLE-PROPERTY.

Package

consfigurator.

Source

src/property.lisp.

Function: acl-get-entry (acl entry-id entry-p)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: acl-get-file (path-p type)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: acl-get-qualifier (entry-d type)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: acl-get-tag-type (entry-d)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: acl-set-file (path-p type acl)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: acl-set-qualifier (entry-d qualifier-p)
Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: additional-sources (basename content)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: all-configured ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: all-installed-p (&rest packages)

Return true if all of PACKAGES, a list of non-virtual packages, are installed.

Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: all-mounts (&optional below)

Retrieve all mountpoints below BELOW, ordered lexicographically.
If BELOW is itself a mountpoint, it will be included as the first element.

Uses findmnt(8), so Linux-specific.

Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Function: apply-propapp (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: asdf-requirements-for-host-and-features (remote-lisp-features)

Make an instance of ASDF-REQUIREMENTS for starting up a remote Lisp image in which *FEATURES* has the value of REMOTE-LISP-FEATURES, based on the Lisp systems required by the host currently being deployed.

Called by connection types which start up remote Lisp images.

Package

consfigurator.

Source

src/image.lisp.

Function: assert-devtmpfs-udev-/dev ()

On a system with the Linux kernel, assert that /dev has fstype devtmpfs.

Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Function: assert-remote-euid-root ()

Assert that the remote user has uid 0 (root)

Package

consfigurator.

Source

src/property.lisp.

Function: at-end ()
Package

consfigurator.property.reboot.

Source

src/property/reboot.lisp.

Function: at-end (function)

Request that FUNCTION be called at the end of the current (sub)deployment. Called by property :APPLY and :UNAPPLY subroutines. FUNCTION will be passed a single argument representing whether or not the deployment made a change.

Properties which call this are responsible for ensuring that the I/O performed by FUNCTION is compatible with the connection type. This amounts to the following requirement: if FUNCTION performs I/O beyond what :POSIX property :APPLY subroutines are permitted to perform, the property calling AT-END to register FUNCTION must be declared to be a :LISP property.

Package

consfigurator.

Source

src/deployment.lisp.

Function: authorized-keys (&rest keys)
Package

consfigurator.property.ssh.

Source

src/property/ssh.lisp.

Function: autoremoved ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: available (locale)
Package

consfigurator.property.locale.

Source

src/property/locale.lisp.

Function: backports-installed (&rest packages)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: backports-installed-minimally (&rest packages)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: bootloader-binaries-installed ()
Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Function: bootloaders-installed ()
Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Function: built (options properties)
Package

consfigurator.property.sbuild.

Source

src/property/sbuild.lisp.

Function: cache-cleaned ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: cache-for-group (group &key max-size max-files)
Package

consfigurator.property.ccache.

Source

src/property/ccache.lisp.

Function: certificate-for (domain)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: certificate-obtained (agree-tos htdocs &rest domains)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: certificate-obtained-standalone (agree-tos &rest domains)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: chain-for (domain)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: check-propapp (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: chroot (path)
Package

consfigurator.

Source

src/util.lisp.

Function: chroot-pathname (pathname chroot)
Package

consfigurator.

Source

src/util.lisp.

Function: clean-/etc/network/interfaces ()
Package

consfigurator.property.network.

Source

src/property/network.lisp.

Function: cleanly-installed-once (&optional options original-os)
Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Function: cloned (url dest &optional branch)
Package

consfigurator.property.git.

Source

src/property/git.lisp.

Function: combine-propapp-types (&rest lists)
Package

consfigurator.

Source

src/property.lisp.

Function: conf-available (name config)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: conf-enabled (name &optional config)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: configured (&optional hostname)
Package

consfigurator.property.hostname.

Source

src/property/hostname.lisp.

Function: configured (&rest pairs)
Package

consfigurator.property.sshd.

Source

src/property/sshd.lisp.

Function: configured (timezone)
Package

consfigurator.property.timezone.

Source

src/property/timezone.lisp.

Function: configured-from-parent ()
Package

consfigurator.property.timezone.

Source

src/property/timezone.lisp.

Function: (setf connection-connattr) (connection k)
Package

consfigurator.

Source

src/connection.lisp.

Function: consfigure (propspec-expression &key collect-at-end)

Immediately preprocess and apply PROPSPEC-EXPRESSION in the context of the current target host and connection. This function is provided for use by specialised property combinators. It should not be used in property definitions nor in consfigs (except via the UNAPPLY macro).

The :HOSTATTRS subroutines of properties applied by PROPSPEC-EXPRESSION will be executed, but any new hostattrs they push will be discarded. Thus either PROPSPEC-EXPRESSION should not apply any properties whose :HOSTATTRS subroutines push new hostattrs, or the caller should seperately arrange for those subroutines to be executed in a context in which newly pushed hostattrs will not be discarded.

Package

consfigurator.

Source

src/deployment.lisp.

Function: contained-p (&rest contained)

Return non-nil if we are outside of any container, or when each of CONTAINED, a list of symbols, is contained by this container type.

Package

consfigurator.property.container.

Source

src/property/container.lisp.

Function: containing-directory-exists (file)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains (file &rest pairs)
Package

consfigurator.property.etc-default.

Source

src/property/etc-default.lisp.

Function: contains-conf-equals (file &rest pairs)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-conf-shell (file &rest pairs)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-conf-space (file &rest pairs)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-conf-tab (file &rest pairs)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-conf-unspaced (file &rest pairs)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-ini-settings (file &rest triples)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: contains-lines (path &rest lines)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: continue-deploy* (connection remaining-connections)

Complete the work of an enclosing call to DEPLOY* or DEPLOY-THESE*.

Used by implementations of ESTABLISH-CONNECTION which need to do something like fork(2) and then return to Consfigurator’s primary loop in the child.

Package

consfigurator.

Source

src/deployment.lisp.

Function: daemon-reloaded (&key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: daemon-socket-directory (daemon-user &optional daemon-group name)
Package

consfigurator.property.postfix.

Source

src/property/postfix.lisp.

Function: data-cache-purged ()
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: data-pathname (root &rest segments)
Package

consfigurator.

Source

src/data.lisp.

Function: data-source-providing-p (iden1 iden2)

Is there a data source which can provide the item of prerequisite data identified by IDEN1 and IDEN2?

This function is for implementation of REGISTER-DATA-SOURCE to check for clashes. It should not be called by properties.

Package

consfigurator.

Source

src/data.lisp.

Function: data-uploaded (iden1 iden2 destination)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: database-has-owner (database owner)
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: debian-live-iso-built (options image-pathname properties)
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: default-network-autostarted ()
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: default-network-started ()
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: default-route-zoned-once (&optional zone)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: defined-for (host &rest arguments)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: delete-remote-trees (&rest paths)

Recursively delete each of PATHS.

Package

consfigurator.

Source

src/connection.lisp.

Function: deploy* (connections host &optional additional-properties)

Execute the deployment which is defined by the pair (CONNECTIONS . HOST), except possibly with the property application specification ADDITIONAL-PROPERTIES also applied to HOST.

This is the entry point to Consfigurator’s primary loop. Typically users use DEPLOY, DEPLOY-THESE, and the function definitions established by DEFDEPLOY, DEFDEPLOY-THESE, etc., rather than calling this function directly. However, code which programmatically constructs deployments will need to call this.

Package

consfigurator.

Source

src/deployment.lisp.

Function: deploy-these* (connections host properties)

Like DEPLOY*, but replace the properties of HOST with PROPERTIES.

HOST has all its usual static informational attributes, as set by its usual properties, plus any set by PROPERTIES. Static informational attributes set by PROPERTIES can override the host’s usual static informational attributes, in the same way that later entries in the list of properties specified in DEFHOST forms can override earlier entries (see DEFHOST’s docstring).

Package

consfigurator.

Source

src/deployment.lisp.

Function: deploys (root host &optional additional-properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Function: deploys (connections host &optional additional-properties)
Package

consfigurator.

Source

src/deployment.lisp.

Function: deploys-these (root host properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Function: deploys-these (connections host properties)
Package

consfigurator.

Source

src/deployment.lisp.

Function: desc (desc propapp)
Package

consfigurator.

Source

src/combinator.lisp.

Function: destroyed (host)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: directory-does-not-exist (&rest directories)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: directory-exists (dir)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: disabled (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: does-not-exist (&rest paths)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: drop-trailing-slash (namestring)
Package

consfigurator.

Source

src/util.lisp.

Function: empty-remote-directory (directory)

Recursively delete the contents of DIRECTORY, but not DIRECTORY itself.

Package

consfigurator.

Source

src/connection.lisp.

Function: enabled (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: ensure-trailing-slash (namestring)
Package

consfigurator.

Source

src/util.lisp.

Function: eseqprops (&rest propapps)
Package

consfigurator.

Source

src/combinator.lisp.

Function: eseqprops-until (condition &rest propapps)

Like ESEQPROPS, but if CONDITION is signalled, handle it simply by skipping remaining elements of PROPAPPS. CONDITION usually names a subclass of FAILED-CHANGE.

Package

consfigurator.

Source

src/combinator.lisp.

Function: eval-in-grandchild (prerequest request)

Evaluate PREREQUEST and REQUEST, both readably printable Lisp forms, in a grandchild process. PREREQUEST and REQUEST must be evaluable using only definitions established statically by your consfig, or in one of the ASDF systems upon which your consfig depends. Returns the stdout, stderr and exit code of that process.

PREREQUEST will be evaluated before the grandchild calls fork(2) to establish its own infrastructure for subsequent uses of this macro, and REQUEST after. Thus, PREREQUEST must not start up any threads.

Package

consfigurator.

Source

src/image.lisp.

Function: eval-in-reinvoked (prerequest request)

In a grandchild process, evaluate PREREQUEST, dump an executable image, and immediately reinvoke that image to evaluate REQUEST. PREREQUEST and REQUEST must be evaluable using only definitions established statically by your consfig, or in one of the ASDF systems upon which your consfig depends. Returns the stdout, stderr and exit code of that process.

Package

consfigurator.

Source

src/image.lisp.

Function: evals (&rest forms)
Package

consfigurator.

Source

src/deployment.lisp.

Function: exists-with-content (path content &key mode)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: failed-change (message &rest args)

Signal problems with the connection and errors while actually attempting to apply or unapply properties.

Package

consfigurator.

Source

src/property.lisp.

Function: filename-to-string (s)
Package

consfigurator.

Source

src/util.lisp.

Function: files-installed-to-volumes-for (options host volumes &key chroot leave-open mount-below)
Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Function: first-disk-installed-for (options host device-file &key chroot)
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: fullchain-for (domain)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: get-connattr (k)

Get the connattr identified by K for the current connection.

Package

consfigurator.

Source

src/connection.lisp.

Function: (setf get-connattr) (k)
Package

consfigurator.

Source

src/connection.lisp.

Function: get-data (location iden1 iden2)

Fetch a piece of prerequisite data.

Useful at the REPL.

Package

consfigurator.data.pgp.

Source

src/data/pgp.lisp.

Function: get-data-protected-string (iden1 iden2)

Like GET-DATA-STRING, but wrap the content in an object which is unprintable by default. Intended for code which fetches passwords and wants to lessen the chance of those passwords showing up in the clear in the Lisp debugger.

Package

consfigurator.

Source

src/data.lisp.

Function: get-data-stream (iden1 iden2)

Return a stream which will produce the content of an item of prerequisite data. The elements of the stream are always octets. If the item of prerequisite data was provided by the prerequisite data source as a string, it will be encoded in UTF-8.

This function is called by property :APPLY and :UNAPPLY subroutines.

Package

consfigurator.

Source

src/data.lisp.

Function: get-data-string (iden1 iden2)

Return the content of an item of prerequisite data as a string.

This function is called by property :APPLY and :UNAPPLY subroutines.

Package

consfigurator.

Source

src/data.lisp.

Function: get-highest-local-cached-prerequisite-data (iden1 iden2)

Get the highest version of prerequisite data identified by IDEN1 and IDEN2 available in the local cache.

This is exported for use by prerequisite data sources which work by generating new files and need somewhere to store them. It should not be used by properties, or data sources which return objects referencing existing files.

Package

consfigurator.

Source

src/data.lisp.

Function: get-hostattrs (k &optional host)

Retrieve the list of static informational attributes of type KEY.

Called by property :HOSTATTRS, :APPLY and :UNAPPLY subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: get-hostattrs-car (k &optional host)
Package

consfigurator.

Source

src/property.lisp.

Function: get-hostname (&optional host)

Get the hostname of HOST, defaulting to the host to which properties are being applied.

Called by property subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: get-ids-offset (file identifier)

Where IDENTIFIER is a username or uid, and FILE is structured like /etc/subuid and /etc/subuid (see subuid(5) and subgid(5)), return the numerical subordinate ID and numerical subordinate ID count for the first entry in FILE for IDENTIFIER.

Package

consfigurator.util.linux-namespace.

Source

src/util/linux-namespace.lisp.

Function: get-local-cached-prerequisite-data (where)

Scan a local cache of prerequisite data at WHERE, and return a list of items of prerequisite data where each entry is of the form

’(iden1 iden2 version).

This is exported for use by implementations of CONNECTION-UPLOAD, which should always supply a value for WHERE.

Package

consfigurator.

Source

src/data.lisp.

Function: get-mirrors ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: get-parent-hostattrs (k &optional host)
Package

consfigurator.

Source

src/property.lisp.

Function: get-parent-hostattrs-car (k &optional host)
Package

consfigurator.

Source

src/property.lisp.

Function: get-short-hostname (&optional host)

Get the short hostname of HOST, defaulting to the host to which properties are being applied.

Called by property subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: get-userns-owner (fd)
Package

consfigurator.util.linux-namespace.

Source

src/util/linux-namespace.lisp.

Function: gpg (args &key input output)

Run gnupg, taking homedir from *DATA-SOURCE-GNUPGHOME* if set.

INPUT and OUTPUT have the same meaning as for RUN-PROGRAM, except that OUTPUT defaults to :STRING. The default return value is thus the output from gnupg, as a string.

Package

consfigurator.data.util.

Source

src/data/util.lisp.

Function: gpg-file-as-string (location)

Decrypt the contents of a gpg encrypted file at LOCATION, return as a string.

Package

consfigurator.data.util.

Source

src/data/util.lisp.

Function: group-exists (groupname)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: grub-installed (volume &key target force-extra-removable)
Package

consfigurator.property.grub.

Source

src/property/grub.lisp.

Function: has-account (username)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-account-with-uid (username uid &key gid)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-content (path content &key mode)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: has-database (db-name)
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: has-default-zone (zone)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: has-desktop-groups (username)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-direct-rule (&rest rule-args)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: has-enabled-password (username &key initial-password)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-entries (&rest entries)
Package

consfigurator.property.fstab.

Source

src/property/fstab.lisp.

Function: has-entries-for-opened-volumes ()
Package

consfigurator.property.crypttab.

Source

src/property/crypttab.lisp.

Function: has-entries-for-opened-volumes ()
Package

consfigurator.property.fstab.

Source

src/property/fstab.lisp.

Function: has-entries-for-volumes (&optional volumes)
Package

consfigurator.property.fstab.

Source

src/property/fstab.lisp.

Function: has-group (user group)
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: has-groups (username &rest groups)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-host-key (type public-key)
Package

consfigurator.property.sshd.

Source

src/property/sshd.lisp.

Function: has-limits (cache &key max-size max-files)
Package

consfigurator.property.ccache.

Source

src/property/ccache.lisp.

Function: has-locked-password (username)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-login-shell (username shell)
Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: has-mode (path mode)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: has-ownership (path &key user group)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: has-policy (policy xml)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: has-role (role)
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: has-swap-file (size &key location)
Package

consfigurator.property.swap.

Source

src/property/swap.lisp.

Function: has-user-key (dest public-key &key iden1)
Package

consfigurator.property.ssh.

Source

src/property/ssh.lisp.

Function: has-zone (zone)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: has-zone-xml (zone xml)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: host-data-uploaded (destination)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: host-logical-volumes-exist ()
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: host-secret-uploaded (destination)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: hostdeploy* (host &optional additional-properties)

Like DEPLOY*, but use the host’s default deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Function: hostdeploy-these* (host properties)

Like DEPLOY-THESE*, but use the host’s default deployment.

Package

consfigurator.

Source

src/deployment.lisp.

Function: https-vhost (domain htdocs agree-tos &key aliases additional-config additional-config-https)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: image-dumped (&optional filename form always)
Package

consfigurator.

Source

src/image.lisp.

Function: in-chroot-pathname (pathname chroot)
Package

consfigurator.

Source

src/util.lisp.

Function: inapplicable-property (message &rest args)

Signal, in a :HOSTATTRS subroutine, that the host’s hostattrs indicate that this property cannot be applied to this host. E.g. the property will try to install an apt package but the host is FreeBSD.

Package

consfigurator.

Source

src/property.lisp.

Function: inform (level output &key strip-empty fresh-line)

Print something to the user during deploys.

Package

consfigurator.

Source

src/util.lisp.

Function: informat (level control-string &rest format-arguments)

Print something to the user during deploys using FORMAT.
Be sure to begin CONTROL-STRING with ~& unless you want to continue from previous output.

Package

consfigurator.

Source

src/util.lisp.

Function: installed ()
Package

consfigurator.property.ccache.

Source

src/property/ccache.lisp.

Function: installed (package-manager &rest package-lists)
Package

consfigurator.property.package.

Source

src/property/package.lisp.

Function: installed ()
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: installed (&rest packages)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: installed ()
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: installed ()
Package

consfigurator.property.git.

Source

src/property/git.lisp.

Function: installed ()
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: installed ()
Package

consfigurator.property.sshd.

Source

src/property/sshd.lisp.

Function: installed ()
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: installed ()
Package

consfigurator.property.schroot.

Source

src/property/schroot.lisp.

Function: installed ()
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: installed ()
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: installed ()
Package

consfigurator.property.sbuild.

Source

src/property/sbuild.lisp.

Function: installed ()
Package

consfigurator.property.postfix.

Source

src/property/postfix.lisp.

Function: installed-minimally (&rest packages)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: installed-rockchip (volume &key target)
Package

consfigurator.property.u-boot.

Source

src/property/u-boot.lisp.

Function: is-copy-of (dest source)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: known-host (host &key short-hostname aliases ips additional-names)
Package

consfigurator.property.ssh.

Source

src/property/ssh.lisp.

Function: known-installed-removed-packages-reset ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: knows-service (service xml)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: kvm-boots-chroot (options properties)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: kvm-boots-chroot-for (options host &optional additional-properties)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: lacks-lines (path &rest lines)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: lacks-lines-matching (path &rest patterns)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: lines (text &optional trimfun trimchars)
Package

consfigurator.

Source

src/util.lisp.

Function: lingering-enabled (user)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: lisp-connection-p ()
Package

consfigurator.

Source

src/connection.lisp.

Function: list-data (location)

List all prerequisite data in the PGP store at LOCATION.

Useful at the REPL.

Package

consfigurator.data.pgp.

Source

src/data/pgp.lisp.

Function: literal-data-pathname (base-path iden1 iden2 &key type)

Generate a path from BASE-PATH, IDEN1 and IDEN2 by concatentation, optionally adding extension TYPE.

No escaping of special characters is done, but extra ’/’ characters between pathname components are removed.

The intended use case is to map IDEN1 and IDEN2 to files in a user-maintained hierarchy under BASE-PATH. In particular IDEN2 and (if prefixed by ’_’) IDEN1 may contain ’/’ characters to map into multiple levels of directory.

Package

consfigurator.data.util.

Source

src/data/util.lisp.

Function: local-data-pathname (&optional iden1 iden2 version)

Get a pathname where an item of prerequisite data may be cached, ensuring that parent directories exist.
This is exported for use by prerequisite data sources which work by generating new files and need somewhere to store them. It should not be used by properties, or data sources which return objects referencing existing files.

Note that since prerequisite data sources are queried only in the root Lisp, but items of prerequisite data are never uploaded to the root Lisp, there is no risk of clashes between fresly generated files and cached copies of files.

Package

consfigurator.

Source

src/data.lisp.

Function: local-directory-contents (pathname)

Return the immediate contents of PATHNAME, a directory, without resolving symlinks. Not suitable for use by :POSIX properties.

Package

consfigurator.

Source

src/util.lisp.

Function: lxc-ls (&optional owner &rest args)

Return the lines of output from lxc-ls(1) called with ARGS and for OWNER.

Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: mailname-configured (&optional mailname)
Package

consfigurator.property.hostname.

Source

src/property/hostname.lisp.

Function: main-configured (&rest pairs)
Package

consfigurator.property.postfix.

Source

src/property/postfix.lisp.

Function: make-child-host (&key hostattrs propspec)

Make a host object to represent a chroot, container or the like.
Called by properties which set up such subhosts, like CHROOT:OS-BOOTSTRAPPED.

Package

consfigurator.

Source

src/host.lisp.

Function: make-host (&key hostattrs propspec deploy)
Package

consfigurator.

Source

src/host.lisp.

Function: make-propspec (&key systems propspec)

Convert a property application specification expression into a property application specification proper by associating it with a list of ASDF systems.

Package

consfigurator.

Source

src/propspec.lisp.

Function: map-remote-file-lines (file function)

Apply FUNCTION to the lines of FILE. Safe to use in a :POSIX property.

For efficiency, a :LISP property might want to use streams, but there’s no point in doing that here because WRITE-REMOTE-FILE is synchronous.

Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: mapc-open-input-streams (function streams)
Package

consfigurator.

Source

src/util.lisp.

Function: mapc-open-output-streams (function streams)
Package

consfigurator.

Source

src/util.lisp.

Function: mapped-file (propapp &optional file)

Apply PROPAPP, and if it makes a change, run postmap(1) on FILE, which defaults to the first argument to PROPAPP.

Package

consfigurator.property.postfix.

Source

src/property/postfix.lisp.

Function: masked (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: maybe-write-remote-file-data (path iden1 iden2 &key mode)

Wrapper around WRITE-REMOTE-FILE which returns :NO-CHANGE and avoids touching PATH if PATH’s content is already the prerequisite data identified by IDEN1 and IDEN2 and PATH has mode MODE.

Package

consfigurator.

Source

src/data.lisp.

Function: maybe-write-remote-file-string (path content &key mode)

Wrapper around WRITE-REMOTE-FILE which returns :NO-CHANGE and avoids writing PATH if PATH already has the specified CONTENT and MODE.

Package

consfigurator.

Source

src/property.lisp.

Function: memstr= (string list)
Package

consfigurator.

Source

src/util.lisp.

Function: missing-data-source (message &rest args)
Package

consfigurator.

Source

src/data.lisp.

Function: mkstemp-cmd (&optional template)
Package

consfigurator.

Source

src/connection.lisp.

Function: mktemp (&key connection directory)

Make a temporary file on the remote side, in DIRECTORY, defaulting to /tmp.

Package

consfigurator.

Source

src/connection.lisp.

Function: mod-enabled (name)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: mounted (&key target)
Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Function: mrun (&rest args)

Like RUN but don’t separate stdout and stderr ("m" for "merged"; note
that this might mean interleaved or simply concatenated, depending on the connection chain).

Some (but not all) connection types will want to use this when implementing ESTABLISH-CONNECTION, CONNECTION-RUN, CONNECTION-WRITE-FILE etc. to avoid the overhead of splitting the output streams only to immediately recombine them.

Code in property definitions which will not examine command output should usually use this in preference to RUN for a performance boost; an exception is when the command sends a lot of text to stdout which might make it harder for the user to pick out error messages. Code which examines command output should use RUN and only examine the stream from which the output to be read is expected.

Package

consfigurator.

Source

src/connection.lisp.

Function: multiple-value-mapcan (function &rest lists)

Variant of MAPCAN which preserves multiple return values.

Package

consfigurator.

Source

src/util.lisp.

Function: nice-system-job (desc when user shell-command)
Package

consfigurator.property.cron.

Source

src/property/cron.lisp.

Function: no-passwords ()
Package

consfigurator.property.sshd.

Source

src/property/sshd.lisp.

Function: no-pdiffs ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: no-services ()
Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: no-services-p ()

Returns true if no services should be started by the current deployment.

Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: none-installed-p (&rest packages)

Returns true if none of PACKAGES, a list of non-virtual packages, are installed.

Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: os-bootstrapped (options root properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Function: os-bootstrapped-for (options root host &optional additional-properties)
Package

consfigurator.property.chroot.

Source

src/property/chroot.lisp.

Function: overlays-in-tmpfs ()
Package

consfigurator.property.schroot.

Source

src/property/schroot.lisp.

Function: package-manager-not-found (message &rest args)
Package

consfigurator.property.package.

Source

src/property/package.lisp.

Function: parent-is-system-known-host (&key short-hostname aliases ips additional-names)
Package

consfigurator.property.ssh.

Source

src/property/ssh.lisp.

Function: parse-cidr (address-with-suffix)
Package

consfigurator.

Source

src/util.lisp.

Function: passwd-field (n username-or-uid)

Get the nth entry in the getent(1) output for USERNAME-OR-UID.
Note that getent(1) is not specified in POSIX so use of this function makes properties not strictly POSIX-compatible.

Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: pathname-file (pathname)

Like PATHNAME-NAME but include any file extension.

Package

consfigurator.

Source

src/util.lisp.

Function: periodic-updates ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: pinned (preferences &rest pairs)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: plist-to-long-options (plist)
Package

consfigurator.

Source

src/util.lisp.

Function: posix-capability-p (set &rest capabilities)

Does the current thread have each of CAPABILITIES in SET?

Package

consfigurator.util.posix1e.

Source

src/util/posix1e.lisp.

Function: posix-login-environment (&optional uid logname home)

Reset the environment after switching UID, or similar, in a :LISP connection. Does not currently establish a PAM session.

Package

consfigurator.

Source

src/util.lisp.

Function: preserve-static-once (&optional interface &rest options)
Package

consfigurator.property.network.

Source

src/property/network.lisp.

Function: privkey-for (domain)
Package

consfigurator.property.lets-encrypt.

Source

src/property/lets-encrypt.lisp.

Function: propapp-args (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: propapp-attrs (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: propapp-desc (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: propapp-type (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: proxy (uri)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: public-key-imported (fingerprint &key trust-level)
Package

consfigurator.property.gnupg.

Source

src/property/gnupg.lisp.

Function: pulled (url dest &optional branch)
Package

consfigurator.property.git.

Source

src/property/git.lisp.

Function: push-hostattr (k v)

Push new static informational attribute V of type K.

Called by property :HOSTATTRS subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: push-hostattrs (k vs)

Push new static informational attributes VS of type K.

Called by property :HOSTATTRS subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: pushnew-hostattr (k v &key test)

Push new static informational attribute V of type K.
TEST is passed on to PUSHNEW. Called by property :HOSTATTRS subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: pushnew-hostattrs (k vs &key test)

Push new static informational attributes VS of type K.
VS is a list of items. TEST is passed on to PUSHNEW. Called by property :HOSTATTRS subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: random-alphanumeric (length)

Return a random alphanumeric string of length LENGTH.

Package

consfigurator.

Source

src/util.lisp.

Function: raw-image-built-for (options host image-pathname &key rebuild)
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: read-remote-file (path)
Package

consfigurator.

Source

src/connection.lisp.

Function: reconfigured (package &rest triples)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: reduce-id-maps (id-maps)

Where each of ID-MAPS is a list of three integers corresponding to the lines of the uid_map (resp. gid_map) of a process in a different user namespace as would be read by a process in the current user namespace, return a function which maps UIDs (resp. GIDs) in the current user namespace to UIDs
(resp. GIDs) in the user namespace of the process. The function returns NIL, not 65534, for values which are unmapped.

A process’s uid_map & gid_map files are under /proc; see user_namespaces(7).

Package

consfigurator.util.linux-namespace.

Source

src/util/linux-namespace.lisp.

Function: regex-replaced-lines (file regex replace)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: reloaded ()
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: reloaded (service)
Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: reloaded (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: reloaded ()
Package

consfigurator.property.postfix.

Source

src/property/postfix.lisp.

Function: remote-data-pathname (&rest args)
Package

consfigurator.

Source

src/data.lisp.

Function: remote-executable-find (executable)
Package

consfigurator.

Source

src/connection.lisp.

Function: remote-exists-every-p (&rest paths)

Does each of PATHS exist?
PATH may be any kind of file, including directories.

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-exists-p (&rest paths)

Does each of PATHS exist?
PATH may be any kind of file, including directories.

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-exists-some-p (&rest paths)

Do any of PATHS exist?
PATH may be any kind of file, including directories.

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-file-stats (path)

Get the numeric mode, size in bytes, mtime, owner and group of PATH, or NIL if it does not exist.

The mtime is only accurate to the nearest UTC day, rounding down, if the file was modified in the past six months or its mtime is in the future, and only accurate to the nearest minute, rounding down, otherwise (see the specification of POSIX ls(1)).

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-last-reboot ()

Get the time of the last reboot, rounded down to the nearest minute.

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-mount-point-p (path)

Is PATH a mount point?

Uses mountpoint(1) from util-linux, so add a property requiring OS:LINUX or a subclass to the :HOSTATTRS subroutine of properties calling this.

Package

consfigurator.

Source

src/connection.lisp.

Function: remote-test (&rest args)
Package

consfigurator.

Source

src/connection.lisp.

Function: removed (&rest packages)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: repo-configured (repo &rest pairs)
Package

consfigurator.property.git.

Source

src/property/git.lisp.

Function: require-data (iden1 iden2)

Wrapper around PUSHNEW-HOSTATTR to indicate that a piece of prerequisite data is needed to deploy a property.

Called by property :HOSTATTRS subroutines.

Package

consfigurator.

Source

src/property.lisp.

Function: require-volumes-data (volumes)

Call REQUIRE-DATA on each item of prerequisite data requires for opening and/or creating each of VOLUMES.

Called by property :HOSTATTRS subroutines.

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: required (type)

Error out if the OS of the host being deployed is not of type TYPE.

Used in property :HOSTATTRS subroutines.

Package

consfigurator.property.os.

Source

src/property/os.lisp.

Function: reset-data-sources ()

Forget all data sources registered in this Lisp image and items of string data obtained from data sources by this Lisp image.
This function is typically called at the REPL.

Package

consfigurator.

Source

src/data.lisp.

Function: restarted (service)
Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: restarted (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: run (&rest args)

Synchronous execution of shell commands using the current connection.
ARGS can contain keyword-value pairs (and singular keywords) to specify aspects of this function’s behaviour, and remaining elements of ARGS are the shell command and its parameters, or, as a special case, a single string specifying the shell command, with any necessary escaping already performed. It is recommended that all keywords and corresponding values come first, followed by argument(s) specifying the shell command to execute.

You can additionally supply lists of arguments and these will be spliced into the resulting list of arguments to be passed to the command. I.e.
(run "a" (list "b" "c")) is equivalent to (run "a" "b" "c").

Keyword arguments accepted:

- :FOR-EXIT / :MAY-FAIL – don’t signal an error condition if the command does not exit nonzero, usually because it is being called partly or only for its exit code

- :INFORM – send a copy of the output to *STANDARD-OUTPUT*

- :INPUT INPUT – pass the content of the string or stream INPUT on stdin

- :ENV ENVIRONMENT – where ENVIRONMENT is a plist specifying environment variable names and values, use env(1) to set these variables when running the command. An environment variable value of nil means that the variable should be unset.

Returns command’s stdout, stderr and exit code, unless :FOR-EXIT, in which case return only the exit code.

Package

consfigurator.

Source

src/connection.lisp.

Function: runlines (&rest args)
Package

consfigurator.

Source

src/connection.lisp.

Function: running (service)
Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: runs-consfigurator (when)
Package

consfigurator.property.cron.

Source

src/property/cron.lisp.

Function: search-configured (&optional domain)
Package

consfigurator.property.hostname.

Source

src/property/hostname.lisp.

Function: secret-key-imported (fingerprint)
Package

consfigurator.property.gnupg.

Source

src/property/gnupg.lisp.

Function: secret-uploaded (iden1 iden2 destination)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: selected-for (locale &rest locale-variables)
Package

consfigurator.property.locale.

Source

src/property/locale.lisp.

Function: seqprops (&rest propapps)
Package

consfigurator.

Source

src/combinator.lisp.

Function: service-installed-running (package)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: set-data (location iden1 iden2 val)

Set a piece of prerequisite data.

Useful at the REPL.

Package

consfigurator.data.pgp.

Source

src/data/pgp.lisp.

Function: set-data-from-file (location iden1 iden2 file)

Set a piece of prerequisite data from the contents of a file.

Useful at the REPL.

Package

consfigurator.data.pgp.

Source

src/data/pgp.lisp.

Function: setgroups-p ()

In a Lisp-type connection, do we have the ability to use setgroups(2)?

Package

consfigurator.util.linux-namespace.

Source

src/util/linux-namespace.lisp.

Function: sh-escape (token-or-cmd &optional s)
Package

consfigurator.

Source

src/util.lisp.

Function: sh-script-to-single-line (script)

Attempt to convert a multiline POSIX sh script to a single line.

The current implementation is na├»ve, and certainly unsuitable for converting arbitrary scripts. Thus, this function is presently intended to be used only on simple scripts embedded in source code, written with newlines for the sake of maintainability. Converting those scripts to single lines before they are executed improves Consfigurator’s debug output, and also makes process names visible to remote commands like ps(1) more readable.

Package

consfigurator.

Source

src/util.lisp.

Function: shift-ids (root uidmap gidmap)

Recursively map the ownership and POSIX ACLs of files under ROOT by applying the function UIDMAP to user ownership and UIDs appearing in ACLs, and the function GIDMAP to group ownership and GIDs appearing in ACLs. Each of UIDMAP and GIDMAP should return a non-negative integer or NIL for each non-negative integer input; in the latter case, no update will be made to the UID or GID.

For example, to recursively shift the ownership and POSIX ACLs of a filesystem hierarchy to render it suitable for use as a root filesystem in a different user namespace, you might use

(shift-ids "/var/lib/lxc/mycontainer/rootfs"
(reduce-id-maps ’(0 100000 65536))
(reduce-id-maps ’(0 100000 65536)))

Here the list (0 100000 65536) describes the relationship between the present user namespace and the container’s user namespace; see the docstring for CONSFIGURATOR.UTIL.LINUX-NAMESPACE:REDUCE-ID-MAPS and user_namespaces(7).

Package

consfigurator.util.linux-namespace.

Source

src/util/linux-namespace.lisp.

Function: silent-seqprops (&rest propapps)
Package

consfigurator.

Source

src/combinator.lisp.

Function: single (&rest args)
Package

consfigurator.property.cmd.

Source

src/property/cmd.lisp.

Function: site-available (domain config)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: site-enabled (domain &optional config)
Package

consfigurator.property.apache.

Source

src/property/apache.lisp.

Function: snapshot-extracted (snapshot-name directory &key replace)
Package

consfigurator.property.git.

Source

src/property/git.lisp.

Function: standard-debian-schroot (&key upgrade)
Package

consfigurator.property.sbuild.

Source

src/property/sbuild.lisp.

Function: standard-sources.list ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: started (host)
Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: started (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: static (interface address &optional gateway netmask &rest options)
Package

consfigurator.property.network.

Source

src/property/network.lisp.

Function: stopped (service &key user-instance)
Package

consfigurator.property.systemd.

Source

src/property/systemd.lisp.

Function: string-to-filename (s)
Package

consfigurator.

Source

src/util.lisp.

Function: strip-prefix (prefix string)

If STRING is prefixed by PREFIX, return the rest of STRING, otherwise return NIL.

Package

consfigurator.

Source

src/util.lisp.

Function: suites-available-pinned (&rest pairs)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: symlinked (&key from to)
Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: system-job (desc when user shell-command)
Package

consfigurator.property.cron.

Source

src/property/cron.lisp.

Function: system-known-host (host &key short-hostname aliases ips additional-names)
Package

consfigurator.property.ssh.

Source

src/property/ssh.lisp.

Function: systemd-user-instance-args (args)

Where ARGS are args to RUN or MRUN for an invocation of a systemd command which can take "–user", insert the "–user" parameter, and modify or insert an :ENV parameter so that the call is more likely to succeed.

Package

consfigurator.

Source

src/util.lisp.

Function: trusts-key (fingerprint &optional basename)
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: try-register-data-source (&rest args)

Register sources of prerequisite data.
This function is typically called in consfigs. Any relative pathnames in ARGS will be resolved as paths under the home directory of the user Lisp is running as, before being passed to implementations of REGISTER-DATA-SOURCE.

Package

consfigurator.

Source

src/data.lisp.

Function: unapplied (propapp)
Package

consfigurator.

Source

src/combinator.lisp.

Function: unapply-propapp (propapp)
Package

consfigurator.

Source

src/property.lisp.

Function: unattended-upgrades ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: unlines (lines)
Package

consfigurator.

Source

src/util.lisp.

Function: unmounted-below (dir &key and-at)
Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Function: unmounted-below-and-removed (dir)
Package

consfigurator.property.mount.

Source

src/property/mount.lisp.

Function: unshare (flags)
Package

consfigurator.

Source

src/util.lisp.

Function: unwords (words)
Package

consfigurator.

Source

src/util.lisp.

Function: update-unix-table (file source target entries &key no-source)

Ensure that the UNIX table at FILE (e.g. /etc/fstab) contains each of ENTRIES, using a simple merge procedure: existing lines of the file with the same value for the TARGETth field are updated to match the corresponding members of ENTRIES, except that if the SOURCEth field of the existing entry is not NO-SOURCE and the corresponding member of ENTRIES is STRING= to either NO-SOURCE or "PLACEHOLDER", use the existing field value.

Sort the lines to avoid certain possible failures. For each pair of lines, if the TARGETth or the SOURCEth field of the first line is a path and a subpath of the TARGETth field of the second line, sort the second line earlier. Otherwise, try to avoid disturbing line order. This avoids failures to mount because the filesystem containing the mount point is not mounted yet, and ensures that partitions containing things like swap files are mounted before an attempt is made to activate the swap, set up the bind mount, etc.

Package

consfigurator.property.file.

Source

src/property/file.lisp.

Function: updated ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: upgraded ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: upload-all-prerequisite-data (&optional connection)

Upload all prerequisite data required by the current deployment to the remote cache of the current connection hop, or to the remote cache of CONNECTION.

This is called by implementations of ESTABLISH-CONNECTION which call CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM.

Package

consfigurator.

Source

src/data.lisp.

Function: usable-by (username)
Package

consfigurator.property.sbuild.

Source

src/property/sbuild.lisp.

Function: user-can-login (user)
Package

consfigurator.property.postgres.

Source

src/property/postgres.lisp.

Function: user-container (options user properties)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: user-container-for (options user host &optional additional-properties)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: user-container-started (host &optional owner)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: user-containers-autostart (user)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: user-crontab-installed (env &rest jobs)
Package

consfigurator.property.cron.

Source

src/property/cron.lisp.

Function: user-info (username-or-uid)

Return passwd database entry for USERNAME-OR-UID as an alist.

Falls back to getent(1), which is not specified in POSIX, so use of this function makes properties not strictly POSIX-compatible.

Package

consfigurator.property.user.

Source

src/property/user.lisp.

Function: usernet-veth-usable-by (user &optional interface count)
Package

consfigurator.property.lxc.

Source

src/property/lxc.lisp.

Function: uses-local-cacher ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: uses-parent-mirrors ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: uses-parent-proxy ()
Package

consfigurator.property.apt.

Source

src/property/apt.lisp.

Function: valid-hostname-p (string)

Test whether STRING looks like a valid hostname, as defined by RFCs 952 and 1123.

Package

consfigurator.

Source

src/util.lisp.

Function: version< (x y)
Package

consfigurator.

Source

src/util.lisp.

Function: version<= (x y)
Package

consfigurator.

Source

src/util.lisp.

Function: version> (x y)
Package

consfigurator.

Source

src/util.lisp.

Function: version>= (x y)
Package

consfigurator.

Source

src/util.lisp.

Function: virsh-get-columns (&rest arguments)

Run a virsh command that is expected to yield tabular output, with the given list of ARGUMENTS, and return the rows.

Package

consfigurator.property.libvirt.

Source

src/property/libvirt.lisp.

Function: volumes-installed-for (options host &key chroot leave-open)
Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Function: with-unapply (&rest propapps)

As ESEQPROPS, except that if :UNAPPLY appears in PROPAPPS, then return a property which applies the elements of PROPAPPS prior to :UNAPPLY, but which when unapplied ignores the elements of PROPAPPS prior to :UNAPPLY, and instead applies the elements of PROPAPPS appearing after :UNAPPLY.

Analogously to how DEFPROPLIST/DEFPROPSPEC allow you to define a property which works by calling other properties, this combinator allows you to define an :UNAPPLY subroutine for a property which works by calling other properties.

Package

consfigurator.

Source

src/combinator.lisp.

Function: without-starting-services (&rest propapps)

Apply PROPAPPS with the :NO-SERVICES connattr temporarily in effect. Also disable starting services by the package manager.

Package

consfigurator.property.service.

Source

src/property/service.lisp.

Function: words (text)
Package

consfigurator.

Source

src/util.lisp.

Function: wrap-passphrase (passphrase)

Make an object which is unprintable by default to contain a passphrase.

Package

consfigurator.

Source

src/data.lisp.

Function: write-remote-file (path content &key mode)
Package

consfigurator.

Source

src/connection.lisp.

Function: wrong-execution-context-for-image-dump (message &rest args)
Package

consfigurator.

Source

src/image.lisp.

Function: zone-has-interface (zone interface)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: zone-has-masquerade (zone)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: zone-has-rich-rule (zone rule)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: zone-has-service (zone service)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: zone-has-source (zone source)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.

Function: zone-has-target (zone target)
Package

consfigurator.property.firewalld.

Source

src/property/firewalld.lisp.


5.1.5 Generic functions

Generic Function: all-subvolumes (volume)

Recursively examine VOLUME and its VOLUME-CONTENTS and return a list of all volumes encountered.

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Methods
Method: all-subvolumes ((volume volume))
Generic Function: append-propspecs (first second)
Package

consfigurator.

Methods
Method: append-propspecs ((first null) (second null))
Source

src/propspec.lisp.

Method: append-propspecs ((first unpreprocessed-propspec) (second null))
Source

src/propspec.lisp.

Method: append-propspecs ((first null) (second unpreprocessed-propspec))
Source

src/propspec.lisp.

Method: append-propspecs ((first unpreprocessed-propspec) (second unpreprocessed-propspec))
Source

src/propspec.lisp.

Generic Function: connection-clear-data-cache (connection iden1 iden2)

Delete all versions of the data identified by IDEN1 and IDEN2 from the remote cache of CONNECTION. Called by UPLOAD-ALL-PREREQUISITE-DATA before uploading new versions of data, to avoid them piling up.

Package

consfigurator.

Source

src/data.lisp.

Methods
Method: connection-clear-data-cache ((connection rehome-connection) iden1 iden2)
Source

src/connection/rehome.lisp.

Method: connection-clear-data-cache ((connection connection) iden1 iden2)
Generic Function: connection-connattr (connection k)

Get the connattr identified by K for CONNECTION.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-connattr ((connection connection) (k (eql consfigurator::cached-data)))
Source

src/data.lisp.

Method: connection-connattr ((connection local-connection) (k (eql :xdg_cache_home)))
Source

src/connection/local.lisp.

Method: connection-connattr ((connection connection) (k (eql :consfigurator-cache)))
Method: connection-connattr ((connection connection) (k (eql :xdg_cache_home)))
Method: connection-connattr ((connection connection) (k (eql :remote-home)))

Fetch home directory using tilde expansion, which is POSIX.
Note that looking at $HOME can give the wrong answer when chrooting, as /etc/passwd inside the chroot is not consulted even for login shells, e.g. "chroot /chroot sh -lc ’echo $HOME’" (we would need something which emulates login(1)). Tilde expansion works correctly.

Method: connection-connattr ((connection connection) (k (eql :remote-gid)))
Method: connection-connattr ((connection connection) (k (eql :remote-uid)))
Method: connection-connattr ((connection connection) (k (eql :remote-user)))
Method: connection-connattr ((connection connection) (k (eql consfigurator::id)))
Method: connection-connattr :around ((connection connection) (k symbol))

Retrieve stored connattr or call next method to determine connattr.

Method: connection-connattr ((connection connection) (k symbol))

Default: if no stored value, there is no connattr identified by K.

Generic Reader: connection-parent (object)
Package

consfigurator.

Methods
Reader Method: connection-parent ((connection connection))

The value of *CONNECTION* at the time this connection was established.

Source

src/connection.lisp.

Target Slot

parent.

Generic Function: connection-read-and-remove-file (connection path)

As READ-REMOTE-FILE and then delete the file.

For some connection types, when latency is high, combining these two operations is noticeably faster than doing one after the other. For every use of RUN we read and delete the file containing the command’s stdout, so the time savings add up.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-read-and-remove-file ((c shell-wrap-connection) path)
Source

src/connection/shell-wrap.lisp.

Method: connection-read-and-remove-file ((connection local-connection) path)
Source

src/connection/local.lisp.

Method: connection-read-and-remove-file ((connection connection) path)
Method: connection-read-and-remove-file :around ((connection connection) path)
Generic Function: connection-read-file (connection path)

Subroutine to read the contents of files on the host.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-read-file ((c shell-wrap-connection) path)
Source

src/connection/shell-wrap.lisp.

Method: connection-read-file ((connection local-connection) path)
Source

src/connection/local.lisp.

Method: connection-read-file :around ((connection connection) path)
Generic Function: connection-run (connection cmd input)

Subroutine to run shell commands on the host.

INPUT is a string to send to the shell command’s stdin, or a stream which will be emptied into the shell command’s stdin.

Implementations can specialise on both the CONNECTION and INPUT arguments, if they need to handle streams and strings differently.

Returns (values OUT EXIT) where OUT is either merged stdout and stderr or stderr followed by stdout, and EXIT is the exit code. Should not signal any error condition just because EXIT is non-zero.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-run ((connection sudo-connection) cmd input)
Source

src/connection/sudo.lisp.

Method: connection-run ((c shell-wrap-connection) cmd input)
Source

src/connection/shell-wrap.lisp.

Method: connection-run ((connection local-connection) shell-cmd input)
Source

src/connection/local.lisp.

Method: connection-run ((c local-connection) cmd (s string))
Source

src/connection/local.lisp.

Method: connection-run ((c local-connection) cmd (s stream))
Source

src/connection/local.lisp.

Method: connection-run :around ((connection connection) cmd input)
Generic Function: connection-shell-wrap (connection cmd)
Package

consfigurator.connection.shell-wrap.

Source

src/connection/shell-wrap.lisp.

Methods
Method: connection-shell-wrap ((connection lxc-unpriv-attach-connection) cmd)
Source

src/connection/linux-namespace.lisp.

Method: connection-shell-wrap ((connection nsenter-connection) cmd)
Source

src/connection/linux-namespace.lisp.

Method: connection-shell-wrap ((connection shell-chroot-connection) cmd)
Source

src/connection/chroot.lisp.

Method: connection-shell-wrap ((connection su-connection) cmd)
Source

src/connection/su.lisp.

Method: connection-shell-wrap ((connection ssh-connection) cmd)
Source

src/connection/ssh.lisp.

Generic Function: connection-tear-down (connection)

Subroutine to disconnect from the host.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-tear-down :before ((connection shell-chroot-connection))
Source

src/connection/chroot.lisp.

Method: connection-tear-down :after ((connection sudo-connection))
Source

src/connection/sudo.lisp.

Method: connection-tear-down ((connection connection))
Method: connection-tear-down :around ((connection connection))
Generic Function: connection-upload (connection data)

Subroutine to upload an item of prerequisite data to the remote cache. The default implementation will work for any connection which implements CONNECTION-WRITE-FILE and CONNECTION-RUN, but connection types which work by calling CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM will need their own implementation.

Package

consfigurator.

Source

src/data.lisp.

Methods
Method: connection-upload ((connection rehome-connection) (data file-data))
Source

src/connection/rehome.lisp.

Method: connection-upload ((connection connection) (data data))
Generic Function: connection-write-file (connection path content mode)

Subroutine to replace/create the contents of files on the host.

CONTENT is the new contents of the file or a stream which will produce it.

MODE is the numeric mode that the file should have by the time this function returns. Implementations should ensure that CONTENT is not stored on disk with a mode greater than MODE, and also that if CONTENT is stored on disk outside of (UIOP:PATHNAME-DIRECTORY-PATHNAME PATH), then it does not have a mode greater than 700. It is recommended that implementations write CONTENT to a temporary file in (UIOP:PATHNAME-DIRECTORY-PATHNAME PATH), change the mode of that file to MODE, and then rename to PATH. WITH-REMOTE-TEMPORARY-FILE can be used to do this.

Implementations can specialise on both the CONNECTION and CONTENT arguments, if they need to handle streams and strings differently.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: connection-write-file ((conn shell-wrap-connection) path content mode)
Source

src/connection/shell-wrap.lisp.

Method: connection-write-file ((connection local-connection) path content mode)
Source

src/connection/local.lisp.

Method: connection-write-file :around ((connection connection) path content mode)
Generic Function: continue-connection (connection remaining)

Called by implementations of ESTABLISH-CONNECTION which return nil. Calls CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: continue-connection :before ((connection rehome-connection) remaining)
Source

src/connection/rehome.lisp.

Method: continue-connection ((connection init-hooks-connection) remaining)
Source

src/connection/fork.lisp.

Method: continue-connection ((connection fork-connection) remaining)
Source

src/connection/fork.lisp.

Generic Function: continue-deploy*-program (remaining-connections asdf-requirements)

Return a program to complete the work of an enclosing call to DEPLOY*.

Implementations of ESTABLISH-CONNECTION which start up remote Lisp images call this function, instead of CONTINUE-DEPLOY*, and use the result to instruct the newly started image.

Will query the remote cache for paths to Lisp systems, so a connection to the host which will run the Lisp image must already be established.

The program returned is a single string consisting of a number of sexps separated by newlines. Each sexp must be evaluated by the remote Lisp image before the following sexp is offered to its reader, on standard input.

Package

consfigurator.

Source

src/image.lisp.

Methods
Method: continue-deploy*-program (remaining-connections (asdf-requirements asdf-requirements))
Generic Function: copy-volume-and-contents (volume &rest initialisations &key &allow-other-keys)

Make a fresh copy of VOLUME, shallowly, except for the VOLUME-CONTENTS of volume, which is recursively copied. Keyword arguments may be used to subsequently replace the copied values of some slots.

Package

consfigurator.property.disk.

Source

src/property/disk.lisp.

Methods
Method: copy-volume-and-contents ((volume volume) &rest initialisations &key &allow-other-keys)
Generic Reader: crypttab-keyfile (object)
Package

consfigurator.property.disk.

Methods
Reader Method: crypttab-keyfile ((luks-container luks-container))

automatically generated reader method

Source

src/property/disk.lisp.

Target Slot

crypttab-keyfile.

Generic Writer: (setf crypttab-keyfile) (object)
Package

consfigurator.property.disk.

Methods
Writer Method: (setf crypttab-keyfile) ((luks-container luks-container))

automatically generated writer method

Source

src/property/disk.lisp.

Target Slot

crypttab-keyfile.

Generic Reader: crypttab-options (object)
Package

consfigurator.property.disk.

Methods
Reader Method: crypttab-options ((luks-container luks-container))

automatically generated reader method

Source

src/property/disk.lisp.

Target Slot

crypttab-options.

Generic Writer: (setf crypttab-options) (object)
Package

consfigurator.property.disk.

Methods
Writer Method: (setf crypttab-options) ((luks-container luks-container))

automatically generated writer method

Source

src/property/disk.lisp.

Target Slot

crypttab-options.

Generic Reader: data-file (object)
Package

consfigurator.

Methods
Reader Method: data-file ((file-data file-data))

automatically generated reader method

Source

src/data.lisp.

Target Slot

data-file.

Generic Reader: data-iden1 (object)
Package

consfigurator.

Methods
Reader Method: data-iden1 ((data data))

automatically generated reader method

Source

src/data.lisp.

Target Slot

data-iden1.

Generic Reader: data-iden2 (object)
Package

consfigurator.

Methods
Reader Method: data-iden2 ((data data))

automatically generated reader method

Source

src/data.lisp.

Target Slot

data-iden2.

Generic Reader: data-mime (object)
Generic Writer: (setf data-mime) (object)
Package

consfigurator.

Methods
Reader Method: data-mime ((data data))
Writer Method: (setf data-mime) ((data data))

The MIME type of the data, if known.

Source

src/data.lisp.

Target Slot

data-mime.

Generic Reader: data-string (object)
Package

consfigurator.

Methods
Reader Method: data-string ((string-data string-data))

automatically generated reader method

Source

src/data.lisp.

Target Slot

data-string.

Generic Reader: data-version (object)
Package

consfigurator.

Methods
Reader Method: data-version ((data data))

automatically generated reader method

Source

src/data.lisp.

Target Slot

data-version.

Generic Reader: debian-architecture (object)
Package

consfigurator.property.os.

Methods
Reader Method: debian-architecture ((debian debian))

Keyword whose name is Debian’s name for this architecture, e.g. :AMD64

Source

src/property/os.lisp.

Target Slot

architecture.

Generic Function: debian-architecture-string (os)
Package

consfigurator.property.os.

Methods
Method: debian-architecture-string ((os debian))

Return a string representing the architecture of OS as used by Debian.

Source

src/property/os.lisp.

Generic Reader: debian-suite (object)
Package

consfigurator.property.os.

Methods
Reader Method: debian-suite ((debian debian))

automatically generated reader method

Source

src/property/os.lisp.

Target Slot

suite.

Generic Reader: device-file (object)
Generic Writer: (setf device-file) (object)
Package

consfigurator.property.disk.

Methods
Reader Method: device-file ((opened-volume opened-volume))
Writer Method: (setf device-file) ((opened-volume opened-volume))

File under /dev giving access to the opened volume.

Source

src/property/disk.lisp.

Target Slot

device-file.

Generic Function: ensure-host (host)

Return the HOST value designated by HOST.

Package

consfigurator.

Source

src/host.lisp.

Methods
Method: ensure-host ((host host))
Method: ensure-host ((hostname string))
Generic Function: establish-connection (type remaining &key pid posix-type owner name uid gid user into package-manager to password hop &allow-other-keys)

Within the context of the current connection, connect to HOST by establishing a new connection of type TYPE.
Either returns an object suitable to be the value of *CONNECTION*, or calls either CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM and returns nil.

Any implementation which calls CONTINUE-DEPLOY*-PROGRAM will need to call UPLOAD-ALL-PREREQUISITE-DATA.

Package

consfigurator.

Source

src/connection.lisp.

Methods
Method: establish-connection ((type (eql consfigurator.connection.linux-namespace::setns)) remaining &rest args &key pid posix-type &allow-other-keys)

Use setns(2) to enter the Linux namespaces of process PID. Additionally,

- If PID has a distinct user namespace and we have permission to setgroups(2) in the initial user namespace, then before entering the target userns,

- if the target userns is owned by root, clear supplementary groups

- if the target userns is owned by nonroot, call initgroups(3) to assume the supplementary groups of the owner.

- After entering the target namespaces:

- If UID, or PID has a distinct userns, attempt to setuid(2) to UID, in the latter case defaulting UID to 0. Also change to UID’s home directory, and update HOME, PATH, USER and LOGNAME environment variables.

- If GID, or PID has a distinct userns, attempt to setgid(2) to GID, in the latter case defaulting GID to 0. Also, if setgroups(2) is permitted within the target user namespace,

- if we also called setuid(2) then call initgroups(3) to assume the supplementary groups belonging to UID

- if we called only setgid(2), clear supplementary groups.

Thus, if PID has a distinct userns then the userns’s uid_map and gid_map must already have been written, and must include mappings for UID and GID, which default to 0 and 0. It is not an error if we do not have the ability to setgroups(2) in either the starting user namespace or the target user namespace, in each case either due to a lack of privilege or because setgroups(2) is denied in the namespace.

Source

src/connection/linux-namespace.lisp.

Method: establish-connection ((type (eql :lxc)) remaining &key owner name uid gid)

Attach to the LXC named NAME and owned by OWNER, defaulting to the current user. Switch to UID and GID inside the LXC.

When the previously established connection hop is a Lisp-type connection, this connection type will dump and reinvoke Lisp. Thus, connections established since the Lisp image was started up but before this one must not have rendered the original ~/.cache/common-lisp/ unreadable, or the reinvoked image will fail to start. For example,

(:ssh :sbcl (:lxc :name "foo"))

and

((:ssh :user "root") :sbcl (:lxc :owner "user" :name "foo"))

will work but

((:ssh :user "root") :sbcl (:setuid :user "user") (:lxc :name "foo"))

will not. See "Dumping and reinvoking Lisp" in the "Pitfalls and limitations" section of the Consfigurator manual.

When the current connection is a Lisp-type connection, this internally uses setns(2) to enter the container. See "Connections which use setns(2) to enter containers" in the Consfigurator manual for security implications.

Source

src/connection/linux-namespace.lisp.

Method: establish-connection ((type (eql :lxc-unpriv-attach)) remaining &key owner name pid uid gid)
Source

src/connection/linux-namespace.lisp.

Method: establish-connection ((type (eql :systemd-machined)) remaining &key name uid gid)
Source

src/connection/linux-namespace.lisp.

Method: establish-connection ((type (eql :nsenter)) remaining &key name pid uid gid)
Source

src/connection/linux-namespace.lisp.

Method: establish-connection ((type (eql :as)) remaining &key user)

Establish a :SETUID or :SU connection to another user account, depending on whether it is possible to establish a :SETUID connection.

Note that both these connection types require root.

Source

src/connection/as.lisp.

Method: establish-connection ((type (eql :setuid)) remaining &key user)
Source

src/connection/setuid.lisp.

Method: establish-connection ((type (eql :chroot.shell)) remaining &key into)
Source

src/connection/chroot.lisp.

Method: establish-connection ((type (eql :chroot.fork)) remaining &key into)
Source

src/connection/chroot.lisp.

Method: establish-connection ((type (eql :chroot)) remaining &key into)
Source

src/connection/chroot.lisp.

Method: establish-connection ((type (eql :sbcl)) remaining &key package-manager)

Start up a remote Lisp image using SBCL.

Specifying PACKAGE-MANAGER avoids the need to see what package managers are available on PATH, which can provide a performance improvement.

Source

src/connection/sbcl.lisp.

Method: establish-connection ((type (eql :su)) remaining &key to)
Source

src/connection/su.lisp.

Method: establish-connection ((type (eql :sudo)) remaining &key user password)
Source

src/connection/sudo.lisp.

Method: establish-connection ((type (eql :ssh)) remaining &key hop user)
Source

src/connection/ssh.lisp.

Method: establish-connection ((type (eql :local)) host &key)
Source

src/connection/local.lisp.

Generic Function: get-remote-cached-prerequisite-data (connection)

Return a list of items of prerequisite data in the cache on the remote side of CONNECTION, where each entry is of the form

’(iden1 iden2 version).

Package

consfigurator.

Source

src/data.lisp.

Methods
Method: get-remote-cached-prerequisite-data ((connection rehome-connection))
Source

src/connection/rehome.lisp.

Method: get-remote-cached-prerequisite-data ((connection connection))
Generic Reader: host-propspec (object)
Package

consfigurator.

Methods
Reader Method: host-propspec ((host host))

Propspec of the properties to be applied to the host.

Source

src/host.lisp.

Target Slot

propspec.

Generic Reader: hostattrs (object)
Package

consfigurator.

Methods
Reader Method: hostattrs ((host host))

Plist of the host’s static informational attributes.

Source

src/host.lisp.

Target Slot

hostattrs.

Generic Reader: image-file (object)
Package

consfigurator.property.disk.

Methods
Reader Method: image-file ((disk-image disk-image))

automatically generated reader method

Source

src/property/disk.lisp.

Target Slot

image-file.

Generic Writer: (setf image-file) (object)
Package

consfigurator.property.disk.

Methods
Writer Method: (setf image-file) ((disk-image disk-image))

automatically generated writer method

Source

src/property/disk.lisp.

Target Slot

image-file.

Generic Function: install-bootloader-binaries-propspec (bootloader-type volume &key target &allow-other-keys)

Return a propspec expression evaluating to a :POSIX propapp which fetches/installs whatever binaries/packages need to be available to install BOOTLOADER-TYPE to VOLUME.

Package

consfigurator.property.installer.

Source

src/property/installer.lisp.

Methods
Method: install-bootloader-binaries-propspec ((type (eql consfigurator.property.u-boot:install-rockchip)) volume &key &allow-other-keys)
Source

src/property/u-boot.lisp.

Method: install-bootloader-binaries-propspec ((type (eql consfigurator.property.grub:grub)) volume &key target &allow-other-keys)
Source

src/property/grub.lisp.

Generic Function: install-bootloader-propspec (bootloader-type volume &key &allow-other-keys)