summaryrefslogtreecommitdiffstats
path: root/doc/bin/compile-db.html
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-07 10:20:30 +0100
committerPS <p@0x53.net>2026-02-07 10:20:30 +0100
commit5e95d487982b9362b544139b98d1da55fa6ef78c (patch)
tree1abf6d91f9e6d0b6d0ac7b7d759663f2531eb51b /doc/bin/compile-db.html
parentf7df2f7bb6abbea365cccb1345dcf1a1b7a80797 (diff)
downloadgoetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.gz
goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.bz2
goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.zip
Add doc
Diffstat (limited to 'doc/bin/compile-db.html')
-rw-r--r--doc/bin/compile-db.html98
1 files changed, 98 insertions, 0 deletions
diff --git a/doc/bin/compile-db.html b/doc/bin/compile-db.html
new file mode 100644
index 0000000..c0ed957
--- /dev/null
+++ b/doc/bin/compile-db.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>compile-db</title>
+ <meta name="Description" content="A helper script for compiling s6-rc databases." />
+ <meta name="Keywords" content="goetia s6-rc s6-rc-compile source directory" />
+ </head>
+ <header>
+ <p>
+ <a href="//0x53.net/software/goetia/goetia-base">goetia-base</a>
+ <br />
+ <a href="//0x53.net/software/goetia">goetia</a>
+ <br />
+ <a href="//0x53.net/software">Software</a>
+ <br />
+ <a href="//0x53.net">0x53.net</a>
+ </p>
+ </header>
+ <body>
+ <h1>The compile-db program</h1>
+ <p>
+ compile-db is a helper script for use by other software
+ that compiles a general <code><em>confdir</em></code>
+ tries to use the result to update a general
+ <code><em>livedir</em></code>.
+ </p>
+ <h2>Interface</h2>
+ <pre> compile-db <em>confdir</em> <em>livedir</em></pre>
+ <ul>
+ <li>
+ compile-db runs
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html">s6-rc-compile</a>
+ on <code><em>confdir</em>/src/*</code>.
+ </li>
+ <li>
+ This creates a new <code><em>confdir</em>/<var>@xyz@</var>_db</code>
+ file with <code><var>@xyz@</var></code> based on the current UNIX time.
+ </li>
+ <li>
+ If <code><em>livedir</em></code> exists, that is,
+ a goetia based supervision tree is running,
+ compile-db the tries to update the live state at <code><em>livedir</em></code>
+ to <code><var>@xyz@</var>_db</code> using
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-update.html">s6-rc-update</a>.
+ </li>
+ <li>
+ If it succeeds, it updates the symlink
+ <code><em>confdir</em>/compiled</code>
+ to point to
+ <code><em>confdir</em>/<var>@xyz@</var>_db</code>
+ and deletes the old database
+ <code><em>confdir</em>/<var>@abc@</var>_db</code>.
+ </li>
+ <li>
+ If it does <em>not</em> succeed,
+ it runs s6-rc-update to switch back to
+ <code><em>confdir</em>/compiled</code>
+ which points to
+ <code><em>confdir</em>/<var>@abc@</var>_db</code>.
+ Followed by deleting
+ <code><em>confdir</em>/<var>@xyz@</var>_db</code>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 0: success
+ </li>
+ <li>
+ Since compile-db is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ compile-db mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to compile-db.
+ </li>
+ </ul>
+ </body>
+</html>