aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-12-20 11:04:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2025-12-20 11:04:11 +0000
commite63674eed9e59448118a5bd74e04578f4042fe01 (patch)
tree7ee102c5d34b3f16981008ed268e477752727126 /doc
parent3be4cf90beaf874f9c116696a8c0a17ec396843b (diff)
downloads6-rc-e63674eed9e59448118a5bd74e04578f4042fe01.tar.gz
Add s6-rc-set-fix
Diffstat (limited to 'doc')
-rw-r--r--doc/index.html1
-rw-r--r--doc/repodefs.html2
-rw-r--r--doc/s6-rc-set-fix.html101
3 files changed, 104 insertions, 0 deletions
diff --git a/doc/index.html b/doc/index.html
index 25c47de..3b9d60c 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -139,6 +139,7 @@ the previous versions of s6-rc and the current one. </li>
<li> <a href="s6-rc-set-copy.html">The <tt>s6-rc-set-copy</tt> program</a> </li>
<li> <a href="s6-rc-set-delete.html">The <tt>s6-rc-set-delete</tt> program</a> </li>
<li> <a href="s6-rc-set-change.html">The <tt>s6-rc-set-change</tt> program</a> </li>
+ <li> <a href="s6-rc-set-fix.html">The <tt>s6-rc-set-fix</tt> program</a> </li>
<li> <a href="s6-rc-set-commit.html">The <tt>s6-rc-set-commit</tt> program</a> </li>
<li> <a href="s6-rc-set-install.html">The <tt>s6-rc-set-install</tt> program</a> </li>
</ul>
diff --git a/doc/repodefs.html b/doc/repodefs.html
index c234ba0..bbd6811 100644
--- a/doc/repodefs.html
+++ b/doc/repodefs.html
@@ -286,6 +286,8 @@ or delete sets with <a href="s6-rc-set-delete.html">s6-rc-set-delete</a>. </li>
<a href="s6-rc-set-change.html">s6-rc-set-change</a>. </li>
<li> They can check the list of services and their subs with
<a href="s6-rc-set-status.html">s6-rc-set-status</a>. </li>
+ <li> They can check for inconsistencies and fix them with
+<a href="s6-rc-set-fix.html">s6-rc-set-fix</a>. </li>
<li> They commit the set with <a href="s6-rc-set-commit.html">s6-rc-set-commit</a>. </li>
<li> They install the set with <a href="s6-rc-set-install.html">s6-rc-set-install</a>.
This action potentially modifies the current state of the machine! </li>
diff --git a/doc/s6-rc-set-fix.html b/doc/s6-rc-set-fix.html
new file mode 100644
index 0000000..e8c0fb3
--- /dev/null
+++ b/doc/s6-rc-set-fix.html
@@ -0,0 +1,101 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>s6-rc: the s6-rc-set-fix program</title>
+ <meta name="Description" content="s6-rc: the s6-rc-set-fix program" />
+ <meta name="Keywords" content="s6-rc s6-rc-set-fix repo set check fix consistency dependencies" />
+ <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">s6-rc</a><br />
+<a href="//skarnet.org/software/">Software</a><br />
+<a href="//skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The s6-rc-set-fix program </h1>
+
+<p>
+ s6-rc-set-fix checks one or more <a href="repodefs.html#set">sets</a> of services for
+dependency inconsistencies, and fixes them.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+ s6-rc-set-fix [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -u | -d ] [ -E | -e ] [ -n ] [ <em>sets...</em> ]
+</pre>
+
+<ul>
+ <li> s6-rc-set-fix checks all the sets listed in <em>sets...</em> for dependency inconsistencies
+that may prevent <a href="s6-rc-set-commit.html">s6-rc-set-commit</a> from succeeding. If
+<em>sets...</em> is empty, all the sets in the repository are checked. </li>
+ <li> s6-rc-set-fix prints what it finds and changes the <a href="repodefs.html#sub">subs</a>
+of impacted services so the resulting set is consistent. </li>
+</ul>
+
+<h2> Options </h2>
+
+<dl>
+ <dt> -v <em>verbosity</em>, --verbosity=<em>verbosity</em> </dt>
+ <dd> Be more or less verbose. The default is <strong>1</strong>, 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.
+Dependency inconsistencies are warnings, so will be displayed at the default
+level (but not at 0); more details can be obtained by increasing the verbosity. </dd>
+
+ <dt> -r <em>repo</em>, --repository=<em>repo</em> </dt>
+ <dd> Use the repository in <em>repo</em>, which must exist. Default is
+<strong>/var/lib/s6-rc/repository</strong>.
+ </dd>
+
+ <dt> -u, --fix-up </dt>
+ <dd> When a dependency inconsistency is found, fix it by bringing in <em>more</em>
+services into the starting bundle. If <tt>B</tt> depends on <tt>A</tt>, <tt>B</tt> is
+<em>active</em> but <tt>A</tt> is only <em>usable</em> or even <em>masked</em>, fix
+the situation by making <tt>A</tt> <em>active</em>. This means that more services
+will be started at boot time than the set initially declared. </dd>
+
+ <dt> -d, --fix-down </dt>
+ <dd> When a dependency inconsistency is found, fix it by bringing in <em>fewer</em>
+services into the starting bundle. If <tt>B</tt> depends on <tt>A</tt>, <tt>B</tt> is
+<em>active</em> but <tt>A</tt> is only <em>usable</em> or even <em>masked</em>, fix
+the situation by making <tt>B</tt> <em>usable</em> (if <tt>A</tt> is <em>usable</em>)
+or <em>masked</em> (if <tt>A</tt> is <em>masked</em>). This means that fewer services
+will be started at boot time than the set initially declared. This is the default. </dd>
+
+ <dt> -E, --no-force-essentials </dt>
+ <dd> If fixing a dependency inconsistency would imply moving a service down from the
+<em>always</em> sub, or up to the <em>always</em> sub, when its service definition
+directory does not declare it as essential, do not attempt fixing it and fail the operation.
+This is the default. If such a situation occurs, it means that the set of services
+provided in the <a href="repodefs.html#sub">stores</a> is not consistent, and that
+is what should be fixed. </dd>
+
+ <dt> -e, --force-essentials </dt>
+ <dd> If fixing a dependency inconsistency would imply moving a service down from the
+<em>always</em> sub, or up to the <em>always</em> sub, when its service definition
+directory does not declare it as essential, do it, even though it goes against a
+service definition in a store. This can help you keep a service set consistent
+until the store is fixed. </dd>
+
+ <dt> -n, --dry-run </dt>
+ <dd> Check for inconsistencies, but only print what would be needed to fix the set;
+do not perform the fix. </dd>
+</dl>
+
+<h2> Exit codes </h2>
+
+<dl>
+ <dt> 0 </dt> <dd> Success. </dd>
+ <dt> 1 </dt> <dd> A needed modification could not be made because the <tt>-e</tt> option was not given. </dd>
+ <dt> 100 </dt> <dd> Incorrect usage. </dd>
+ <dt> 102 </dt> <dd> Inconsistent repository. </dd>
+ <dt> 111 </dt> <dd> System call failed. </dd>
+</dl>
+
+</body>
+</html>