aboutsummaryrefslogtreecommitdiffstats
s6-rc: the s6-rc-set-commit program

s6-rc
Software
skarnet.org

The s6-rc-set-commit program

s6-rc-set-commit compiles a set of services, ensuring it is ready for installation.

Interface

     s6-rc-set-commit [ -v verbosity ] [ -r repo ] [ -D defaultbundle ] [ -h fdhuser ] [ -K ] [ -f ] set
  • s6-rc-set-commit checks that no changes have occurred for set set of the repository repo since the last commit, if any.
  • It examines all the services in set that are not masked and makes a temporary source directory with them. It includes all the bundles defined in the stores, as long as none of the atomic services composing a bundle is masked. If any service in a bundle is masked, the bundle does not appear in the database.
  • It makes an additional bundle, defaultbundle, based on the services' rxs:
    • If a service is masked, it will not appear in the database at all, and neither will any bundle it's a part of.
    • If a service is latent, it will be included in the database, but not in defaultbundle.
    • If a service is active or essential, it will be included in the database and in defaultbundle.
  • It compiles the resulting temporary source directory, by calling s6-rc-compile, and stores the compiled database in the repository.

Options

-v verbosity, --verbosity=verbosity
Be more or less verbose. The default is 1, which means that error messages and warnings will be written to stderr. 0 means that only error messages will be written, and 2 or more adds informational messages.
-r repo, --repository=repo
Use the repository in repo, which must exist. Default is /var/lib/s6-rc/repository.
-D defaultbundle, --default-bundle=defaultbundle
This option specifies the name of the bundle that will contain all the active and essential services. It should be the name that is used to bring up the machine at boot time when invoking the s6-rc change command. The default is default.
-h fdhuser, --fdholder-user=fdhuser
Specifies fdhuser as the user the fd-holder daemon will run as if the service database is installed and booted on. The default is root, which is fine, but paranoid users may want to specify a non-root account.
-K, --keep-old
If this option is given: if there is a previous compiled database for set set, it will be kept around. On sucess, s6-rc-set-commit will print a line to stdout that is the path to the old compiled database. You can copy it with cp -PR, move it with mv or delete it with rm -r. By default, old compiled databases are not kept — they're deleted when a new commit operation succeeds.
-f, --force
Force a new compilation even if a compiled database already exists for the set and it has not changed since the last commit. By default, when a compiled version of set exists and is more recent than the last change to the source version, s6-rc-set-commit notices it and does nothing.

Exit codes

0
Success.
1
The set failed to compile.
3
set was not found in the repository.
100
Incorrect usage.
102
Inconsistent repository.
111
System call failed.

Notes

  • s6-rc-set-commit is essentially a wrapper around s6-rc-compile, that translates a user-oriented view of services ("which services do I want available, and which do I want started at boot time?"), implemented via rxs, into the source format for s6-rc-compile, then builds the corresponding service database.
  • s6-rc-set-commit is the ultimate verification step for consistency. When it passes, the compiled set is ready to be installed.