man: document that separate /usr/local/ must not be used for config
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Jun 2024 17:12:17 +0000 (19:12 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 11 Jun 2024 17:02:31 +0000 (18:02 +0100)
Since we document /usr/local/lib/systemd/ and other paths for various things,
add notes that this is not supported if /usr/local is a separate partition. In
systemd.unit, I tried to add the footnote in the table where
/usr/local/lib/systemd/ is listed, but that get's rendered as '[sup]a[/sup]'
with a mangled footnote at the bottom of the table :( .

Also, split paragraphs in one place where the subject changes without any
transition.

Follow-up for 02f35b1c905ac63ba62f94efebf858412e961fc1.
Replaces https://github.com/systemd/systemd/pull/33231.

man/standard-conf.xml
man/systemd.environment-generator.xml
man/systemd.generator.xml
man/systemd.link.xml
man/systemd.network.xml
man/systemd.unit.xml

index f54475f30669747ff42a9e814f28af1ab828b2dc..0ff71ece722d8e0e376cfbbadcd726f2ad76f475 100644 (file)
@@ -7,7 +7,7 @@
   Copyright © 2014 Josh Triplett
 -->
 
-<refentry>
+<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
   <refnamediv>
     <refname/>
     <refpurpose/>
     that is ordered later).</para>
 
     <para>Packages should install their configuration files in <filename>/usr/lib/</filename> (distribution
-    packages) or <filename>/usr/local/lib/</filename> (local installs). Files in <filename>/etc/</filename>
-    are reserved for the local administrator, who may use this logic to override the configuration files
-    installed by vendor packages. It is recommended to prefix all filenames with a two-digit number and a
-    dash, to simplify the ordering of the files. It is recommended to use the range 10-40 for configuration
-    files in <filename>/usr/</filename> and the range 60-90 for configuration files in
-    <filename>/etc/</filename> and <filename>/run/</filename>, to make sure that local and transient
-    configuration files will always take priority over configuration files shipped by the OS vendor.</para>
+    packages) or <filename>/usr/local/lib/</filename> (local installs)
+    <xi:include xpointer="usr-local-footnote" />.
+    Files in <filename>/etc/</filename> are reserved for the local administrator, who may use this logic to
+    override the configuration files installed by vendor packages.</para>
+
+    <para>It is recommended to prefix all filenames with a two-digit number and a dash to simplify the
+    ordering. It is recommended to use the range 10-40 for configuration files in <filename>/usr/</filename>
+    and the range 60-90 for configuration files in <filename>/etc/</filename> and <filename>/run/</filename>,
+    to make sure that local and transient configuration files will always take priority over configuration
+    files shipped by the OS vendor.</para>
 
     <para>If the administrator wants to disable a configuration file supplied by the vendor, the recommended
     way is to place a symlink to <filename>/dev/null</filename> in the configuration directory in
@@ -54,7 +57,7 @@
     listed directories in order of priority, only the first file found is used:
     <filename>/etc/systemd/</filename>,
     <filename>/run/systemd/</filename>,
-    <filename>/usr/local/lib/systemd/</filename>,
+    <filename>/usr/local/lib/systemd/</filename> <xi:include xpointer="usr-local-footnote" />,
     <filename>/usr/lib/systemd/</filename>.
     The vendor version of the file contains commented out entries showing the defaults as a guide to the
     administrator. Local overrides can also be created by creating drop-ins, as described below. The main
     who may use this logic to override the configuration files installed by vendor packages. Drop-ins have to
     be used to override package drop-ins, since the main configuration file has lower precedence. It is
     recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to
-    simplify the ordering of the files. This also defines a concept of drop-in priorities to allow
-    OS vendors to ship drop-ins within a specific range lower than the range used by users. This should
-    lower the risk of package drop-ins overriding accidentally drop-ins defined by users. It is recommended
-    to use the range 10-40 for drop-ins in <filename>/usr/</filename> and the range 60-90 for drop-ins in
+    simplify the ordering. This also defines a concept of drop-in priorities to allow OS vendors to ship
+    drop-ins within a specific range lower than the range used by users. This should lower the risk of
+    package drop-ins overriding accidentally drop-ins defined by users. It is recommended to use the range
+    10-40 for drop-ins in <filename>/usr/</filename> and the range 60-90 for drop-ins in
     <filename>/etc/</filename> and <filename>/run/</filename>, to make sure that local and transient drop-ins
     take priority over drop-ins shipped by the OS vendor.</para>
 
     to <filename>/dev/null</filename> in the configuration directory in <filename>/etc/</filename>, with the
     same filename as the vendor configuration file.</para>
   </refsect1>
+
+  <refsect1>
+    <title>Extras</title>
+
+    <para><filename>/usr/local/lib/systemd</filename>
+    <footnote id='usr-local-footnote'>
+      <para>💣💥🧨💥💥💣 Please note that those configuration files must be available at all times. If
+      <filename>/usr/local/</filename> is a separate partition, it may not be available during early boot,
+      and must not be used for configuration.</para>
+    </footnote>
+    </para>
+  </refsect1>
+
 </refentry>
index 79baffc87164bde4bad53ed2d1a10122480103c9..98acbcb3069979a3e9ff3fa9fec772c2f8f13579 100644 (file)
     above. System and user environment generators are loaded from directories with names ending in
     <filename>system-environment-generators/</filename> and
     <filename>user-environment-generators/</filename>, respectively. Generators found in directories
-    listed earlier override the ones with the same name in directories lower in the list. A symlink
-    to <filename>/dev/null</filename> or an empty file can be used to mask a generator, thereby
-    preventing it from running. Please note that the order of the two directories with the highest
-    priority is reversed with respect to the unit load path, and generators in
-    <filename>/run/</filename> overwrite those in <filename>/etc/</filename>.</para>
+    listed earlier override the ones with the same name in directories lower in the list
+    <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />.
+    A symlink to <filename>/dev/null</filename> or an empty file can be used to mask a generator,
+    thereby preventing it from running. Please note that the order of the two directories with the highest
+    priority is reversed with respect to the unit load path, and generators in <filename>/run/</filename>
+    overwrite those in <filename>/etc/</filename>.</para>
 
     <para>After installing new generators or updating the configuration, <command>systemctl
     daemon-reload</command> may be executed. This will re-run all generators, updating environment
index a7e7467e8b9f35c9dbeb39eb18c2fa83c605394a..ae4c2c5c0b3c0a319b6f44b7c0c9a57158819438 100644 (file)
     and user generators are loaded from directories with names ending in
     <filename>system-generators/</filename> and <filename>user-generators/</filename>,
     respectively. Generators found in directories listed earlier override the ones with the same name in
-    directories lower in the list. A symlink to <filename>/dev/null</filename> or an empty file can be used
-    to mask a generator, thereby preventing it from running. Please note that the order of the two
-    directories with the highest priority is reversed with respect to the unit load path, and generators in
-    <filename>/run/</filename> overwrite those in <filename>/etc/</filename>.</para>
+    directories lower in the list <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />.
+    A symlink to <filename>/dev/null</filename> or an empty file can be used to mask a generator, thereby
+    preventing it from running. Please note that the order of the two directories with the highest priority
+    is reversed with respect to the unit load path, and generators in <filename>/run/</filename> overwrite
+    those in <filename>/etc/</filename>.</para>
 
     <para>After installing new generators or updating the configuration, <command>systemctl
     daemon-reload</command> may be executed. This will delete the previous configuration created by
index 5d8c3251ef4a0bd21b78937773048f96dc6b7017..3991d9188106ca6ce1a3e0e1661794d2e605178a 100644 (file)
@@ -35,7 +35,9 @@
 
     <para>The <filename>.link</filename> files are read from the files located in the system network
     directory <filename>/usr/lib/systemd/network</filename> and
-    <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
+    <filename>/usr/local/lib/systemd/network</filename>
+    <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />,
+    the volatile runtime network directory
     <filename>/run/systemd/network</filename>, and the local administration network directory
     <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
     processed in alphanumeric order, regardless of the directories in which they live. However, files
index 22462312a88b4b642ade900c79a516e6adec1a26..b0efd62dbd558fbd2dc43b8295c14a0967870414 100644 (file)
 
     <para>The <filename>.network</filename> files are read from the files located in the system network
     directories <filename>/usr/lib/systemd/network</filename> and
-    <filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
-    <filename>/run/systemd/network</filename> and the local administration network directory
-    <filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
-    processed in alphanumeric order, regardless of the directories in which they live. However, files
-    with identical filenames replace each other. It is recommended that each filename is prefixed with
-    a number smaller than <literal>70</literal> (e.g. <filename>10-eth0.network</filename>). Otherwise, the
-    default <filename>.network</filename> files or those generated by
+    <filename>/usr/local/lib/systemd/network</filename>
+    <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />,
+    the volatile runtime network directory <filename>/run/systemd/network</filename> and the local
+    administration network directory <filename>/etc/systemd/network</filename>. All configuration files are
+    collectively sorted and processed in alphanumeric order, regardless of the directories in which they
+    live. However, files with identical filenames replace each other. It is recommended that each filename is
+    prefixed with a number smaller than <literal>70</literal> (e.g. <filename>10-eth0.network</filename>).
+    Otherwise, the default <filename>.network</filename> files or those generated by
     <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
     may take precedence over user configured files. Files in <filename>/etc/</filename> have the highest
     priority, files in <filename>/run/</filename> take precedence over files with the same name under
index 8bae3352824d3bf8fa73799ba787107ee6695e9f..919e641c5c0c0ed0bd7c8324ab5d0f4e40dc8ee4 100644 (file)
     <para>Unit files are loaded from a set of paths determined during
     compilation, described in the two tables below. Unit files found
     in directories listed earlier override files with the same name in
-    directories lower in the list.</para>
+    directories lower in the list
+    <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />.
+    </para>
 
     <para>When the variable <varname>$SYSTEMD_UNIT_PATH</varname> is set,
     the contents of this variable overrides the unit load path. If
           </row>
           <row>
             <entry><filename>/usr/local/lib/systemd/system</filename></entry>
-            <entry>System units installed by the administrator </entry>
+            <entry>System units installed by the administrator</entry>
           </row>
           <row>
             <entry><filename>/usr/lib/systemd/system</filename></entry>
@@ -2687,5 +2689,4 @@ OnFailure=failure-handler@%N.service
       <member><citerefentry project='man-pages'><refentrytitle>uname</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
     </simplelist></para>
   </refsect1>
-
 </refentry>