diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-10-21 18:03:48 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2025-10-21 18:03:48 +0000 |
| commit | 3b9836248ed7f5164140d63e96ece21973fc43f7 (patch) | |
| tree | 193242a4b634c84d712d8260e7707eae1be53601 | |
| parent | d71f18b44e4168e2d942b503110af5b5314364b5 (diff) | |
| download | s6-rc-3b9836248ed7f5164140d63e96ece21973fc43f7.tar.gz | |
add getserviceflags and use it in fillset; add some doc
| -rw-r--r-- | doc/s6-rc-compile.html | 9 | ||||
| -rw-r--r-- | doc/s6-rc-db.html | 23 | ||||
| -rw-r--r-- | doc/s6-rc-repo-init.html | 111 | ||||
| -rw-r--r-- | doc/s6-rc-repo-sync.html | 100 | ||||
| -rw-r--r-- | doc/s6-rc-set-copy.html | 72 | ||||
| -rw-r--r-- | doc/s6-rc-set-delete.html | 69 | ||||
| -rw-r--r-- | doc/s6-rc-set-new.html | 76 | ||||
| -rw-r--r-- | package/deps.mak | 10 | ||||
| -rw-r--r-- | src/include/s6-rc/repo.h | 1 | ||||
| -rw-r--r-- | src/libs6rc/deps-lib/s6rc | 2 | ||||
| -rw-r--r-- | src/libs6rc/s6rc_repo_fillset.c | 28 | ||||
| -rw-r--r-- | src/libs6rc/s6rc_repo_getserviceflags.c | 70 | ||||
| -rw-r--r-- | src/libs6rc/s6rc_repo_refcompile.c | 9 | ||||
| -rw-r--r-- | src/libs6rc/s6rc_repo_sync.c | 17 | ||||
| -rw-r--r-- | src/repo/s6-rc-repo-init.c | 5 | ||||
| -rw-r--r-- | src/repo/s6-rc-repo-sync.c | 5 | ||||
| -rw-r--r-- | src/repo/s6-rc-set-change.c | 2 | ||||
| -rw-r--r-- | src/repo/s6-rc-set-copy.c | 2 |
18 files changed, 558 insertions, 53 deletions
diff --git a/doc/s6-rc-compile.html b/doc/s6-rc-compile.html index e1ad82b..11ecb38 100644 --- a/doc/s6-rc-compile.html +++ b/doc/s6-rc-compile.html @@ -109,9 +109,14 @@ directory. </li> <li> An optional regular file named <tt>flag-essential</tt>. The contents of this file are irrelevant, only its presence is tested. If this file exists, the service will be marked as essential, which means that a <tt>s6-rc -d change <em>foo</em></tt> -command will not stop the service. Only a <tt>s6-rc -D change <em>foo</em></tt> +command will not stop the service; only a <tt>s6-rc -D change <em>foo</em></tt> command will. If the service is a bundle, the flag will be propagated to all its -contents, i.e. all the services it represents will be marked as essential. </li> +contents, i.e. all the services it represents will be marked as essential. + </li> + <li> An optional regular file named <tt>flag-recommended</tt>. The contents of this +file are irrelevant, only its presence is tested. If this file exists, the service +will be marked as recommended. This is only important for +<a href="repodefs.html">repo</a> commands, not when compiling the database. </li> </ul> <h3> For bundles </h3> diff --git a/doc/s6-rc-db.html b/doc/s6-rc-db.html index bc527a6..4794be6 100644 --- a/doc/s6-rc-db.html +++ b/doc/s6-rc-db.html @@ -222,10 +222,29 @@ for atomic service <em>atomicname</em>. </p> <p> - Those binary flags are currently unused, but this may change in a -future version of s6-rc. + Those binary flags are used by <a href="repodefs.html">repo</a> +commands: </p> +<ul> + <li> Bit 0 is set if there's a <tt>flag-essential</tt> file in the +source directory (or if the "essential" flag was inherited from a +bundle). It means the service cannot be downed by normal means: +<code>s6-rc -d change <em>atomicname</em></code> will not work, +the <tt>-D</tt> option to s6-rc is needed. Additionally, when +importing <em>atomicname</em> in a <a href="repodefs.html#set">set</a>, +it will automatically be put in the <tt>always</tt> sub, which means +it will always be enabled by default. </li> + <li> Bit 1 is set if there's a <tt>flag-recommended</tt> file in the +source directory (or if the "essential" flag was inherited from a +bundle). When +importing <em>atomicname</em> in a <a href="repodefs.html#set">set</a>, +it will automatically be put in the <tt>active</tt> sub rather than the +<tt>latent</tt> one: unless the user actively makes a change before +committing the set, <em>atomicname</em> will be in the default bundle +and be started at boot time. </li> +</ul> + <h3> s6-rc-db atomics <em>servicename...</em> </h3> <p> diff --git a/doc/s6-rc-repo-init.html b/doc/s6-rc-repo-init.html new file mode 100644 index 0000000..22baf52 --- /dev/null +++ b/doc/s6-rc-repo-init.html @@ -0,0 +1,111 @@ +<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-repo-init program</title> + <meta name="Description" content="s6-rc: the s6-rc-repo-init program" /> + <meta name="Keywords" content="s6-rc repo init initialisation update setup repository" /> + <!-- <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-repo-init program </h1> + +<p> + s6-rc-repo-init initializes a <a href="repodefs.html#repository">repository</a> +on a system, linking it to a list of <a href="repodefs.html#store">stores</a> +and ensuring that the set of all services defined in all the stores is +consistent. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-repo-init [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -h <em>fdhuser</em> ] [ -f ] [ -U ] [ -B ] <em>stores...</em> +</pre> + +<ul> + <li> s6-rc-repo-init creates an s6-rc repository at location <em>repo</em>. </li> + <li> It makes <em>stores...</em> (which must be a list of several locations in the +filesystem) the current list of stores for this repository. </li> + <li> It synchronizes with the list of stores, as if +<a href="s6-rc-repo-sync.html">s6-rc-repo-sync</a> had been called. That means +that it imports all the services in the stores and builds the +<a href="repodefs.html#refdb">reference database</a>. </li> + <li> It exits 0. </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. +The option is also passed to commands that s6-rc-repo-init may call, such +as <a href="s6-rc-compile.html">s6-rc-compile</a>, so their verbosity will +be similarly adjusted. </dd> + + <dt> -r <em>repo</em>, --repository=<em>repo</em> </dt> + <dd> Create the repository in <em>repo</em>. Default is +<strong>/var/lib/s6-rc/repository</strong>. Unless the <tt>-U</tt> option is +given, <em>repo</em> must not previously exist in the filesystem. + </dd> + + <dt> -h <em>fdhuser</em>, --fdholder-user=<em>fdhuser</em> </dt> + <dd> You can safely ignore this option and forget about it. What it does +is ensure that if a supervision tree is started as root on a compiled +database produced by this command (this will never happen to the reference +database, so it is only ever useful together with the <tt>-U</tt> +option when there are sets to update), the fd-holder daemon in that +supervision tree runs as <em>fdhuser</em> rather than root. Told you: +you can safely forget about that option. </dd> + + <dt> -f, --force </dt> + <dd> Make a new repository at <em>repo</em> even if one already exists. +This is dangerous, use of this option is not recommended. </dd> + + <dt> -U, --update-stores </dt> + <dd> Rather than create a new repository, change the list of stores in an +existing one. This is useful, for instance, when a distribution's policies +change and local stores are added, moved, or removed. It is not an operation +that should be done frequently, however. </dd> + + <dt> -B, --bare </dt> + <dd> Do not synchronize the repository with the stores. This is +useful if you are going to call +<a href="s6-rc-repo-sync.html">s6-rc-repo-sync</a> afterwards anyway. </dd> +</dl> + +<h2> Exit codes </h2> + +<dl> + <dt> 0 </dt> <dd> Success. </dd> + <dt> 1 </dt> <dd> Failure. The services in the listed stores do not make a +consistent reference database. With a nonzero <em>verbosity</em>, the error +messages from <a href="s6-rc-compile.html">s6-rc-compile</a> will be displayed +and detail exactly what went wrong. </dd> + <dt> 100 </dt> <dd> Incorrect usage. </dd> + <dt> 111 </dt> <dd> System call failed. This usually signals an issue with the +underlying operating system. </dd> +</dl> + +<h2> Notes </h2> + +<ul> + <li> s6-rc-repo-init is the first command to invoke when creating a repository, +or when a change occurs within the stores. </li> + <li> There is generally only one repository per system, but non-root users +who would want to run their own tree of s6-rc services can do so by specifying +an alternative <em>repo</em>. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-rc-repo-sync.html b/doc/s6-rc-repo-sync.html new file mode 100644 index 0000000..cc2501b --- /dev/null +++ b/doc/s6-rc-repo-sync.html @@ -0,0 +1,100 @@ +<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-repo-sync program</title> + <meta name="Description" content="s6-rc: the s6-rc-repo-sync program" /> + <meta name="Keywords" content="s6-rc repo sync synchronization update set store repository" /> + <!-- <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-repo-sync program </h1> + +<p> + s6-rc-repo-sync synchronizes a <a href="repodefs.html#repository">repository</a>, +which means making an up-to-date <a href="repodefs.html#refdb">reference +database</a>, and ensuring that all defined +<a href="repodefs.html#set">sets</a> include all the services in the +repository's stores, and only them. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-repo-sync [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -h <em>fdhuser</em> ] +</pre> + +<ul> + <li> s6-rc-repo-sync looks at all the services defined in the repository's +<a href="repodefs.html#store">stores</a>, and compiles them into a +<a href="repodefs.html#refdb">reference database</a>. </li> + <li> It then looks at all the <a href="repodefs.html#set">sets</a> +and synchronizes them with the services in all the stores: + <ul> + <li> Existing services are preserved as they are. </li> + <li> If a service doesn't appear in the stores, it is removed from all sets. </li> + <li> If a new service is defined in the stores, it is added to all sets. Services +with the <em>essential</em> flag are added to the <tt>always</tt> +<a href="repodefs.html#sub">sub</a>; services with +the <em>recommended</em> flag are added to the <tt>active</tt> sub; others are added +to the <tt>usable</tt> sub. </li> + </ul> </li> + <li> It exits 0. </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. +The option is also passed to commands that s6-rc-repo-sync may call, such +as <a href="s6-rc-compile.html">s6-rc-compile</a>, so their verbosity will +be similarly adjusted. </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> -h <em>fdhuser</em>, --fdholder-user=<em>fdhuser</em> </dt> + <dd> You can safely ignore this option and forget about it. What it does +is ensure that if a supervision tree is started as root on a compiled +database produced by this command, the fd-holder daemon in that +supervision tree runs as <em>fdhuser</em> rather than root. (It is okay +to run that daemon as root.) </dd> +</dl> + +<h2> Exit codes </h2> + +<dl> + <dt> 0 </dt> <dd> Success. </dd> + <dt> 1 </dt> <dd> Failure. Either the services in the listed stores do not make a +consistent reference database, or some set is inconsistent. +With a nonzero <em>verbosity</em>, the error messages from +<a href="s6-rc-compile.html">s6-rc-compile</a> will be displayed +and detail exactly what went wrong. </dd> + <dt> 100 </dt> <dd> Incorrect usage. </dd> + <dt> 111 </dt> <dd> System call failed. This usually signals an issue with the +underlying operating system. </dd> +</dl> + +<h2> Notes </h2> + +<ul> + <li> s6-rc-repo-sync should be called when the contents of the stores have +changed, for instance when the package manager has added packages that define +new services. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-rc-set-copy.html b/doc/s6-rc-set-copy.html new file mode 100644 index 0000000..9d0681c --- /dev/null +++ b/doc/s6-rc-set-copy.html @@ -0,0 +1,72 @@ +<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-copy program</title> + <meta name="Description" content="s6-rc: the s6-rc-set-copy program" /> + <meta name="Keywords" content="s6-rc s6-rc-set-copy repo set sub copy services" /> + <!-- <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-copy program </h1> + +<p> + s6-rc-set-copy makes a copy of a <a href="repodefs.html#set">set</a> under a +different name, in a <a href="repodefs.html#repository">repository</a>. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-set-copy [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -f ] <em>src</em> <em>dst</em> +</pre> + +<ul> + <li> s6-rc-set-copy makes an exact copy of set <em>src</em> and names it <em>dst</em>. </li> + <li> It exits 0. </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. </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> -f, --force </dt> + <dd> Overwrite set <em>dst</em> if it exists. </dd> +</dl> + +<h2> Exit codes </h2> + +<dl> + <dt> 0 </dt> <dd> Success. </dd> + <dt> 1 </dt> <dd> Set <em>dst</em> already exists and the <tt>-f</tt> option has not been 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> + +<h2> Notes </h2> + +<ul> + <li> s6-rc-set-copy can be used to create a dynamic working set, to be copied back +to its source when the user is happy with the changes. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-rc-set-delete.html b/doc/s6-rc-set-delete.html new file mode 100644 index 0000000..efb1820 --- /dev/null +++ b/doc/s6-rc-set-delete.html @@ -0,0 +1,69 @@ +<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-delete program</title> + <meta name="Description" content="s6-rc: the s6-rc-set-delete program" /> + <meta name="Keywords" content="s6-rc s6-rc-set-delete repo set sub deletion services" /> + <!-- <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-delete program </h1> + +<p> + s6-rc-set-delete deletes a whole <a href="repodefs.html#set">set</a> +from a <a href="repodefs.html#repository">repository</a>. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-set-delete [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] <em>setname...</em> +</pre> + +<ul> + <li> For every argument in <em>setname...</em>, s6-rc-set-delete deletes that +<a href="repodefs.html#set">set</a> from the repository. + <li> It exits 0. </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. </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> +</dl> + +<h2> Exit codes </h2> + +<dl> + <dt> 0 </dt> <dd> Success. </dd> + <dt> 100 </dt> <dd> Incorrect usage. </dd> + <dt> 111 </dt> <dd> System call failed. </dd> +</dl> + +<h2> Notes </h2> + +<ul> + <li> An error in one of the arguments (e.g. if the user specifies a non-existent +set) will prevent processing the rest of the command line. The user should +double-check the set names in case of multiple deletions. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-rc-set-new.html b/doc/s6-rc-set-new.html new file mode 100644 index 0000000..8cdc2f7 --- /dev/null +++ b/doc/s6-rc-set-new.html @@ -0,0 +1,76 @@ +<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-new program</title> + <meta name="Description" content="s6-rc: the s6-rc-set-new program" /> + <meta name="Keywords" content="s6-rc s6-rc-set-new repo set sub new services" /> + <!-- <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-new program </h1> + +<p> + s6-rc-set-new creates new <a href="repodefs.html#sets">sets</a> +in a <a href="repodefs.html#repository">repository</a>. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-set-delete [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] <em>setname...</em> +</pre> + +<ul> + <li> For every argument in <em>setname...</em>, s6-rc-set-new creates a +<a href="repodefs.html#set">set</a> with that name, in the repository +<em>repo</em>. Under that set name, it attributes a default +<a href="repodefs.html#sub">sub</a> to every service listed in the +<a href="repodefs.html#store">stores</a>: + <ul> + <li> Services with the <em>essential</em> flag are added to the <tt>always</tt> sub </li> + <li> Services with the <em>recommended</em> flag are added to the <tt>active</tt> sub </li> + <li> Others are added to the <tt>usable</tt> sub. </li> + </ul> </li> + <li> It exits 0. </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. </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> +</dl> + +<h2> Exit codes </h2> + +<dl> + <dt> 0 </dt> <dd> Success. </dd> + <dt> 100 </dt> <dd> Incorrect usage. </dd> + <dt> 111 </dt> <dd> System call failed. </dd> +</dl> + +<h2> Notes </h2> + +<ul> + <li> s6-rc-set-new can be called at the user's convenience, but in a typical +installation, two sets are enough: a stable committed set and a working set. </li> +</ul> + +</body> +</html> diff --git a/package/deps.mak b/package/deps.mak index 75851af..1e64adb 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -29,6 +29,7 @@ src/libs6rc/s6rc_repo_fillset.o src/libs6rc/s6rc_repo_fillset.lo: src/libs6rc/s6 src/libs6rc/s6rc_repo_fix.o src/libs6rc/s6rc_repo_fix.lo: src/libs6rc/s6rc_repo_fix.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_fixset.o src/libs6rc/s6rc_repo_fixset.lo: src/libs6rc/s6rc_repo_fixset.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_flattenservices.o src/libs6rc/s6rc_repo_flattenservices.lo: src/libs6rc/s6rc_repo_flattenservices.c src/include/s6-rc/config.h src/include/s6-rc/repo.h src/include/s6-rc/s6rc-utils.h +src/libs6rc/s6rc_repo_getserviceflags.o src/libs6rc/s6rc_repo_getserviceflags.lo: src/libs6rc/s6rc_repo_getserviceflags.c src/include/s6-rc/config.h src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_list_sets.o src/libs6rc/s6rc_repo_list_sets.lo: src/libs6rc/s6rc_repo_list_sets.c src/include/s6-rc/repo.h src/include/s6-rc/s6rc-utils.h src/libs6rc/s6rc_repo_listalldeps.o src/libs6rc/s6rc_repo_listalldeps.lo: src/libs6rc/s6rc_repo_listalldeps.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_listcontents.o src/libs6rc/s6rc_repo_listcontents.lo: src/libs6rc/s6rc_repo_listcontents.c src/include/s6-rc/config.h src/include/s6-rc/repo.h src/include/s6-rc/s6rc-utils.h @@ -42,7 +43,6 @@ src/libs6rc/s6rc_repo_makestores.o src/libs6rc/s6rc_repo_makestores.lo: src/libs src/libs6rc/s6rc_repo_makesvlist.o src/libs6rc/s6rc_repo_makesvlist.lo: src/libs6rc/s6rc_repo_makesvlist.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_makesvlist_byname.o src/libs6rc/s6rc_repo_makesvlist_byname.lo: src/libs6rc/s6rc_repo_makesvlist_byname.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_moveservices.o src/libs6rc/s6rc_repo_moveservices.lo: src/libs6rc/s6rc_repo_moveservices.c src/include/s6-rc/repo.h -src/libs6rc/s6rc_repo_refcompile.o src/libs6rc/s6rc_repo_refcompile.lo: src/libs6rc/s6rc_repo_refcompile.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_setcompile.o src/libs6rc/s6rc_repo_setcompile.lo: src/libs6rc/s6rc_repo_setcompile.c src/include/s6-rc/repo.h src/libs6rc/s6rc_repo_setuptodate.o src/libs6rc/s6rc_repo_setuptodate.lo: src/libs6rc/s6rc_repo_setuptodate.c src/include/s6-rc/repo.h src/include/s6-rc/s6rc-utils.h src/libs6rc/s6rc_repo_subnames.o src/libs6rc/s6rc_repo_subnames.lo: src/libs6rc/s6rc_repo_subnames.c src/include/s6-rc/repo.h @@ -82,15 +82,15 @@ src/s6-rc/s6-rc-update.o src/s6-rc/s6-rc-update.lo: src/s6-rc/s6-rc-update.c src src/s6-rc/s6-rc.o src/s6-rc/s6-rc.lo: src/s6-rc/s6-rc.c src/include/s6-rc/config.h src/include/s6-rc/s6rc.h ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) -libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.o src/libs6rc/s6rc_db_check_pipelines.o src/libs6rc/s6rc_db_check_revdeps.o src/libs6rc/s6rc_db_read.o src/libs6rc/s6rc_db_read_sizes.o src/libs6rc/s6rc_db_read_uint32.o src/libs6rc/s6rc_graph_closure.o src/libs6rc/s6rc_live_state_size.o src/libs6rc/s6rc_live_state_read.o src/libs6rc/s6rc_livedir_canon.o src/libs6rc/s6rc_livedir_create.o src/libs6rc/s6rc_livedir_prefix.o src/libs6rc/s6rc_livedir_prefixsize.o src/libs6rc/s6rc_lock.o src/libs6rc/s6rc_ls.o src/libs6rc/s6rc_nlto0.o src/libs6rc/s6rc_read_uint.o src/libs6rc/s6rc_repo_badsub.o src/libs6rc/s6rc_repo_checkset.o src/libs6rc/s6rc_repo_cleanup.o src/libs6rc/s6rc_repo_compile.o src/libs6rc/s6rc_repo_fillset.o src/libs6rc/s6rc_repo_fixset.o src/libs6rc/s6rc_repo_flattenservices.o src/libs6rc/s6rc_repo_list_sets.o src/libs6rc/s6rc_repo_listalldeps.o src/libs6rc/s6rc_repo_listcontents.o src/libs6rc/s6rc_repo_listdeps.o src/libs6rc/s6rc_repo_listdeps_internal.o src/libs6rc/s6rc_repo_listsub.o src/libs6rc/s6rc_repo_lock.o src/libs6rc/s6rc_repo_makedefbundle.o src/libs6rc/s6rc_repo_makesetbundles.o src/libs6rc/s6rc_repo_makestores.o src/libs6rc/s6rc_repo_makesvlist.o src/libs6rc/s6rc_repo_makesvlist_byname.o src/libs6rc/s6rc_repo_moveservices.o src/libs6rc/s6rc_repo_refcompile.o src/libs6rc/s6rc_repo_setcompile.o src/libs6rc/s6rc_repo_setuptodate.o src/libs6rc/s6rc_repo_subnames.o src/libs6rc/s6rc_repo_sv_bcmpr.o src/libs6rc/s6rc_repo_sv_cmpr.o src/libs6rc/s6rc_repo_sync.o src/libs6rc/s6rc_repo_syncset.o src/libs6rc/s6rc_repo_syncset_tmp.o src/libs6rc/s6rc_repo_touch.o src/libs6rc/s6rc_repo_touchset.o src/libs6rc/s6rc_sanitize_dir.o src/libs6rc/s6rc_servicedir_internal.o src/libs6rc/s6rc_servicedir_block.o src/libs6rc/s6rc_servicedir_unblock.o src/libs6rc/s6rc_servicedir_copy_offline.o src/libs6rc/s6rc_servicedir_copy_online.o src/libs6rc/s6rc_servicedir_manage.o src/libs6rc/s6rc_servicedir_unsupervise.o src/libs6rc/s6rc_type_check.o +libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.o src/libs6rc/s6rc_db_check_pipelines.o src/libs6rc/s6rc_db_check_revdeps.o src/libs6rc/s6rc_db_read.o src/libs6rc/s6rc_db_read_sizes.o src/libs6rc/s6rc_db_read_uint32.o src/libs6rc/s6rc_graph_closure.o src/libs6rc/s6rc_live_state_size.o src/libs6rc/s6rc_live_state_read.o src/libs6rc/s6rc_livedir_canon.o src/libs6rc/s6rc_livedir_create.o src/libs6rc/s6rc_livedir_prefix.o src/libs6rc/s6rc_livedir_prefixsize.o src/libs6rc/s6rc_lock.o src/libs6rc/s6rc_ls.o src/libs6rc/s6rc_nlto0.o src/libs6rc/s6rc_read_uint.o src/libs6rc/s6rc_repo_badsub.o src/libs6rc/s6rc_repo_checkset.o src/libs6rc/s6rc_repo_cleanup.o src/libs6rc/s6rc_repo_compile.o src/libs6rc/s6rc_repo_fillset.o src/libs6rc/s6rc_repo_fixset.o src/libs6rc/s6rc_repo_flattenservices.o src/libs6rc/s6rc_repo_getserviceflags.o src/libs6rc/s6rc_repo_list_sets.o src/libs6rc/s6rc_repo_listalldeps.o src/libs6rc/s6rc_repo_listcontents.o src/libs6rc/s6rc_repo_listdeps.o src/libs6rc/s6rc_repo_listdeps_internal.o src/libs6rc/s6rc_repo_listsub.o src/libs6rc/s6rc_repo_lock.o src/libs6rc/s6rc_repo_makedefbundle.o src/libs6rc/s6rc_repo_makesetbundles.o src/libs6rc/s6rc_repo_makestores.o src/libs6rc/s6rc_repo_makesvlist.o src/libs6rc/s6rc_repo_makesvlist_byname.o src/libs6rc/s6rc_repo_moveservices.o src/libs6rc/s6rc_repo_setcompile.o src/libs6rc/s6rc_repo_setuptodate.o src/libs6rc/s6rc_repo_subnames.o src/libs6rc/s6rc_repo_sv_bcmpr.o src/libs6rc/s6rc_repo_sv_cmpr.o src/libs6rc/s6rc_repo_sync.o src/libs6rc/s6rc_repo_syncset.o src/libs6rc/s6rc_repo_syncset_tmp.o src/libs6rc/s6rc_repo_touch.o src/libs6rc/s6rc_repo_touchset.o src/libs6rc/s6rc_sanitize_dir.o src/libs6rc/s6rc_servicedir_internal.o src/libs6rc/s6rc_servicedir_block.o src/libs6rc/s6rc_servicedir_unblock.o src/libs6rc/s6rc_servicedir_copy_offline.o src/libs6rc/s6rc_servicedir_copy_online.o src/libs6rc/s6rc_servicedir_manage.o src/libs6rc/s6rc_servicedir_unsupervise.o src/libs6rc/s6rc_type_check.o else -libs6rc.a.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_refcompile.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo +libs6rc.a.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_getserviceflags.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo endif libs6rc.pc: EXTRA_LIBS := -ls6 -lskarnet ${SPAWN_LIB} libs6rc.so.xyzzy: EXTRA_LIBS := -ls6 -lskarnet ${SPAWN_LIB} -libs6rc.so.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_refcompile.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo +libs6rc.so.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_getserviceflags.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo libs6rc.dylib.xyzzy: EXTRA_LIBS := -ls6 -lskarnet ${SPAWN_LIB} -libs6rc.dylib.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_refcompile.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo +libs6rc.dylib.xyzzy:src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_live_state_size.lo src/libs6rc/s6rc_live_state_read.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_ls.lo src/libs6rc/s6rc_nlto0.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_repo_badsub.lo src/libs6rc/s6rc_repo_checkset.lo src/libs6rc/s6rc_repo_cleanup.lo src/libs6rc/s6rc_repo_compile.lo src/libs6rc/s6rc_repo_fillset.lo src/libs6rc/s6rc_repo_fixset.lo src/libs6rc/s6rc_repo_flattenservices.lo src/libs6rc/s6rc_repo_getserviceflags.lo src/libs6rc/s6rc_repo_list_sets.lo src/libs6rc/s6rc_repo_listalldeps.lo src/libs6rc/s6rc_repo_listcontents.lo src/libs6rc/s6rc_repo_listdeps.lo src/libs6rc/s6rc_repo_listdeps_internal.lo src/libs6rc/s6rc_repo_listsub.lo src/libs6rc/s6rc_repo_lock.lo src/libs6rc/s6rc_repo_makedefbundle.lo src/libs6rc/s6rc_repo_makesetbundles.lo src/libs6rc/s6rc_repo_makestores.lo src/libs6rc/s6rc_repo_makesvlist.lo src/libs6rc/s6rc_repo_makesvlist_byname.lo src/libs6rc/s6rc_repo_moveservices.lo src/libs6rc/s6rc_repo_setcompile.lo src/libs6rc/s6rc_repo_setuptodate.lo src/libs6rc/s6rc_repo_subnames.lo src/libs6rc/s6rc_repo_sv_bcmpr.lo src/libs6rc/s6rc_repo_sv_cmpr.lo src/libs6rc/s6rc_repo_sync.lo src/libs6rc/s6rc_repo_syncset.lo src/libs6rc/s6rc_repo_syncset_tmp.lo src/libs6rc/s6rc_repo_touch.lo src/libs6rc/s6rc_repo_touchset.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo src/libs6rc/s6rc_type_check.lo s6-rc-repo-init: EXTRA_LIBS := ${SYSCLOCK_LIB} s6-rc-repo-init: src/repo/s6-rc-repo-init.o ${LIBS6RC} -lskarnet s6-rc-repo-sync: EXTRA_LIBS := ${SYSCLOCK_LIB} diff --git a/src/include/s6-rc/repo.h b/src/include/s6-rc/repo.h index f611059..ca17b4b 100644 --- a/src/include/s6-rc/repo.h +++ b/src/include/s6-rc/repo.h @@ -50,6 +50,7 @@ extern int s6rc_repo_listdeps (char const *, char const *, stralloc *, genalloc extern int s6rc_repo_listalldeps (char const *, char const *const *, uint32_t, stralloc *, genalloc *, int) ; extern int s6rc_repo_listdeps_internal (char const *, char const *const *, uint32_t, stralloc *, genalloc *, uint32_t) ; +extern int s6rc_repo_getserviceflags (char const *, char const *, uint32_t *) ; extern int s6rc_repo_flattenservices (char const *, char const *const *, uint32_t n, stralloc *storage, genalloc *indices) ; extern int s6rc_repo_makesvlist (char const *, char const *, stralloc *, genalloc *, uint32_t *) ; extern int s6rc_repo_makesvlist_byname (char const *, char const *, stralloc *, genalloc *) ; diff --git a/src/libs6rc/deps-lib/s6rc b/src/libs6rc/deps-lib/s6rc index ea3c4fd..ec22808 100644 --- a/src/libs6rc/deps-lib/s6rc +++ b/src/libs6rc/deps-lib/s6rc @@ -22,6 +22,7 @@ s6rc_repo_compile.o s6rc_repo_fillset.o s6rc_repo_fixset.o s6rc_repo_flattenservices.o +s6rc_repo_getserviceflags.o s6rc_repo_list_sets.o s6rc_repo_listalldeps.o s6rc_repo_listcontents.o @@ -35,7 +36,6 @@ s6rc_repo_makestores.o s6rc_repo_makesvlist.o s6rc_repo_makesvlist_byname.o s6rc_repo_moveservices.o -s6rc_repo_refcompile.o s6rc_repo_setcompile.o s6rc_repo_setuptodate.o s6rc_repo_subnames.o diff --git a/src/libs6rc/s6rc_repo_fillset.c b/src/libs6rc/s6rc_repo_fillset.c index 1b2e2b6..15832c3 100644 --- a/src/libs6rc/s6rc_repo_fillset.c +++ b/src/libs6rc/s6rc_repo_fillset.c @@ -1,6 +1,7 @@ /* ISC license. */ #include <string.h> +#include <stdint.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> @@ -33,37 +34,24 @@ int s6rc_repo_fillset (char const *repo, char const *set, char const *const *exi for (;;) { size_t len ; - unsigned int subi = 1 ; + uint32_t flags ; direntry *d ; + uint8_t subi ; errno = 0 ; d = readdir(dir) ; if (!d) break ; if (d->d_name[0] == '.') continue ; len = strlen(d->d_name) ; - char src[len + 30] ; + char src[len + 13] ; char dst[repolen + 18 + setlen + len] ; memcpy(src, "../.atomics/", 12) ; memcpy(src + 12, d->d_name, len+1) ; if (n && bsearch(d->d_name, existing, n, sizeof(char const *), &str_bcmp)) continue ; - memcpy(src + 12 + len, "/flag-essential", 16) ; - if (access(src, F_OK) == 0) subi = 3 ; - else - { - if (errno != ENOENT) - { - strerr_warnfu2sys("access ", src) ; - break ; - } - memcpy(src + 18 + len, "recommended", 12) ; - if (access(src, F_OK) == 0) subi = 2 ; - else if (errno != ENOENT) - { - strerr_warnfu2sys("access ", src) ; - break ; - } - } - src[12 + len] = 0 ; + if (s6rc_repo_getserviceflags(repo, d->d_name, &flags) <= 0) return 0 ; + if (flags & 1) subi = 3 ; + else if (flags & 2) subi = 2 ; + else subi = 1 ; memcpy(dst, setfn, repolen + 10 + setlen) ; memcpy(dst + repolen + 10 + setlen, s6rc_repo_subnames[subi], 6) ; dst[repolen + setlen + 16] = '/' ; diff --git a/src/libs6rc/s6rc_repo_getserviceflags.c b/src/libs6rc/s6rc_repo_getserviceflags.c new file mode 100644 index 0000000..0ad68e7 --- /dev/null +++ b/src/libs6rc/s6rc_repo_getserviceflags.c @@ -0,0 +1,70 @@ +/* ISC license. */ + +#include <sys/wait.h> +#include <string.h> +#include <unistd.h> +#include <errno.h> + +#include <skalibs/posixplz.h> +#include <skalibs/uint32.h> +#include <skalibs/types.h> +#include <skalibs/strerr.h> +#include <skalibs/cspawn.h> +#include <skalibs/djbunix.h> + +#include <s6-rc/config.h> +#include <s6-rc/repo.h> + +#include <skalibs/posixishard.h> + +int s6rc_repo_getserviceflags (char const *repo, char const *name, uint32_t *flags) +{ + size_t repolen = strlen(repo) ; + ssize_t r ; + pid_t pid ; + int fd ; + int wstat ; + char flagstr[10] ; + char refdb[repolen + 15] ; + char const *argv[8] = { S6RC_BINPREFIX "s6-rc-db", "-c", refdb, "-b", "--", "flags", name, 0 } ; + + memcpy(refdb, repo, repolen) ; + memcpy(refdb + repolen, "/compiled/.ref", 15) ; + pid = child_spawn1_pipe(argv[0], argv, (char const *const *)environ, &fd, 1) ; + if (!pid) { strerr_warnfu2sys("spawn ", argv[0]) ; return -1 ; } + r = readnclose(fd, flagstr, 10) ; + if (r != 9) + { + if (r == 10) goto err ; + else if (r >= 0) errno = EPIPE ; + strerr_warnfu2sys("read output from ", argv[0]) ; + return -1 ; + } + if (wait_pid(pid, &wstat) == -1) + { + strerr_warnfu2sys("wait for ", argv[0]) ; + return -1 ; + } + if (WIFSIGNALED(wstat)) + { + char fmt[UINT_FMT] ; + fmt[uint_fmt(fmt, WTERMSIG(wstat))] = 0 ; + strerr_warnf3x(argv[0], " crashed with signal ", fmt) ; + return -1 ; + } + if (WEXITSTATUS(wstat)) + { + char fmt[UINT_FMT] ; + fmt[uint_fmt(fmt, WEXITSTATUS(wstat))] = 0 ; + strerr_warnf3x(argv[0], " exited with code ", fmt) ; + return (WEXITSTATUS(wstat) < 99) - 1 ; + } + flagstr[8] = 0 ; + if (!uint320_xscan(flagstr, flags)) goto err ; + return 1 ; + + err: + strerr_warnf2x("invalid output from ", S6RC_BINPREFIX "s6-rc-db") ; + errno = EPROTO ; + return -1 ; +} diff --git a/src/libs6rc/s6rc_repo_refcompile.c b/src/libs6rc/s6rc_repo_refcompile.c deleted file mode 100644 index baffe87..0000000 --- a/src/libs6rc/s6rc_repo_refcompile.c +++ /dev/null @@ -1,9 +0,0 @@ -/* ISC license. */ - -#include <s6-rc/repo.h> - -int s6rc_repo_refcompile (char const *repo, char *oldc, unsigned int verbosity, char const *fdhuser) -{ - static char const *const subs[2] = { ".atomics", ".bundles" } ; - return s6rc_repo_compile(repo, ".ref", subs, 2, oldc, verbosity, fdhuser) ; -} diff --git a/src/libs6rc/s6rc_repo_sync.c b/src/libs6rc/s6rc_repo_sync.c index 2ec1356..9458dcb 100644 --- a/src/libs6rc/s6rc_repo_sync.c +++ b/src/libs6rc/s6rc_repo_sync.c @@ -53,13 +53,13 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse { strerr_warnfu2sys("mkdtemp ", ato) ; umask(m) ; - return 0 ; + return -1 ; } if (chmod(ato, 02755) == -1) { strerr_warnfu2sys("chmod ", ato) ; umask(m) ; - return 0 ; + return -1 ; } if (!mkdtemp(bun)) @@ -67,13 +67,13 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse strerr_warnfu2sys("mkdtemp ", bun) ; rmdir(ato) ; umask(m) ; - return 0 ; + return -1 ; } umask(m) ; if (chmod(bun, 02755) == -1) { strerr_warnfu2sys("chmod ", bun) ; - return 0 ; + return -1 ; } for (uint16_t istore = 0 ;; istore++) @@ -159,7 +159,8 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse char const *subs[2] = { ato + repolen + 9, bun + repolen + 9 } ; char oldc[repolen + 49] ; int r = s6rc_repo_compile(repo, ".ref", subs, 2, oldc, verbosity, fdhuser) ; - if (r <= 0) goto err ; + if (r < 0) goto err ; + if (!r) { cleanup(ato, bun) ; return 0 ; } if (r == 2) rm_rf(oldc) ; } @@ -201,7 +202,7 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse if (!dir) { strerr_warnfu2sys("opendir ", ato) ; - return 0 ; + return -1 ; } for (;;) { @@ -218,7 +219,7 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse if (errno) { strerr_warnfu2sys("readdir ", ato) ; - return 0 ; + return -1 ; } } @@ -226,5 +227,5 @@ int s6rc_repo_sync (char const *repo, unsigned int verbosity, char const *fdhuse err: cleanup(ato, bun) ; - return 0 ; + return -1 ; } diff --git a/src/repo/s6-rc-repo-init.c b/src/repo/s6-rc-repo-init.c index 335d83f..3c353fe 100644 --- a/src/repo/s6-rc-repo-init.c +++ b/src/repo/s6-rc-repo-init.c @@ -189,7 +189,8 @@ int main (int argc, char const *const *argv) if (!(wgolb & GOLB_BARE)) { - if (!s6rc_repo_sync(wgola[GOLA_REPODIR], verbosity, wgola[GOLA_FDHUSER])) + int r = s6rc_repo_sync(wgola[GOLA_REPODIR], verbosity, wgola[GOLA_FDHUSER]) ; + if (r <= 0) { char stores[repolen + 8] ; char snew[repolen + 16] ; @@ -200,7 +201,7 @@ int main (int argc, char const *const *argv) if (!atomic_symlink4(sold + repolen + 1, stores, snew + repolen + 1, 15)) strerr_diefu7sys(111, "atomically switch back stores at ", wgola[GOLA_REPODIR], " - old store is ", sold + repolen + 1, " and new (invalid) store is ", snew + repolen + 1, " - reported error was") ; rm_rf(snew) ; - _exit(111) ; + _exit(r ? 111 : 1) ; } } diff --git a/src/repo/s6-rc-repo-sync.c b/src/repo/s6-rc-repo-sync.c index 474eec5..ce04d7b 100644 --- a/src/repo/s6-rc-repo-sync.c +++ b/src/repo/s6-rc-repo-sync.c @@ -32,7 +32,7 @@ int main (int argc, char const *const *argv) char const *wgola[GOLA_N] = { 0 } ; unsigned int verbosity = 1 ; unsigned int golc ; - int fdlock ; + int fdlock, r ; PROG = "s6-rc-repo-sync" ; wgola[GOLA_REPODIR] = S6RC_REPO_BASE ; @@ -45,7 +45,8 @@ int main (int argc, char const *const *argv) fdlock = s6rc_repo_lock(wgola[GOLA_REPODIR], 1) ; if (fdlock == -1) strerr_diefu2sys(111, "lock ", wgola[GOLA_REPODIR]) ; - if (!s6rc_repo_sync(wgola[GOLA_REPODIR], verbosity, wgola[GOLA_FDHUSER])) _exit(111) ; + r = s6rc_repo_sync(wgola[GOLA_REPODIR], verbosity, wgola[GOLA_FDHUSER]) ; + if (r <= 0) _exit(r ? 111 : 1) ; if (!s6rc_repo_touch(wgola[GOLA_REPODIR])) _exit(111) ; _exit(0) ; diff --git a/src/repo/s6-rc-set-change.c b/src/repo/s6-rc-set-change.c index 188b11c..2758fa6 100644 --- a/src/repo/s6-rc-set-change.c +++ b/src/repo/s6-rc-set-change.c @@ -127,7 +127,7 @@ int main (int argc, char const *const *argv) newsub = bsearch(argv[1], accepted_subs, sizeof(accepted_subs)/sizeof(struct subname_s), sizeof(struct subname_s), &subname_cmp) ; if (!newsub) strerr_dief2x(100, "unrecognized state change directive:", argv[1]) ; if (newsub->sub == 3 && !(wgolb & GOLB_FORCE_ESSENTIAL)) - strerr_dief1x(100, " artificially mark a service as essential without --force-essential") ; + strerr_diefu1x(10, " artificially mark a service as essential without --force-essential") ; fdlock = s6rc_repo_lock(wgola[GOLA_REPODIR], 1) ; if (fdlock == -1) strerr_diefu2sys(111, "lock ", wgola[GOLA_REPODIR]) ; diff --git a/src/repo/s6-rc-set-copy.c b/src/repo/s6-rc-set-copy.c index 372a23c..3093aaf 100644 --- a/src/repo/s6-rc-set-copy.c +++ b/src/repo/s6-rc-set-copy.c @@ -79,7 +79,7 @@ static inline void docopy (char const *repo, char const *srcname, char const *ds if (r == -1) strerr_diefu2sys(111, "readlink ", dst) ; if (r != dstlen + 8) strerr_dief3x(102, "symlink ", dst, "doesn't point to a valid name") ; } - else strerr_dief4x(100, "set ", dstname, " already exists in repository ", repo) ; + else strerr_dief4x(1, "set ", dstname, " already exists in repository ", repo) ; memcpy(realsrc, src, repolen + 9) ; r = readlink(src, realsrc + repolen + 9, srclen + 9) ; |
