chiark / gitweb /
man: add various filenames to the index
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 May 2013 04:55:20 +0000 (00:55 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 May 2013 05:00:42 +0000 (01:00 -0400)
Everything which is an absolute filename marked with <filename></filename>
lands in the index, unless noindex= attribute is present. Should make
it easier for people to find stuff when they are looking at a file on
disk.

Various formatting errors in manpages are fixed, kernel-install(1) is
restored to formatting sanity.

14 files changed:
make-directive-index.py
man/journalctl.xml
man/kernel-install.xml
man/locale.conf.xml
man/systemd-cat.xml
man/systemd-nspawn.xml
man/systemd-remount-fs.service.xml
man/systemd.automount.xml
man/systemd.device.xml
man/systemd.exec.xml
man/systemd.mount.xml
man/systemd.swap.xml
man/systemd.unit.xml
man/vconsole.conf.xml

index 99e7bfaf2856e1500796d7af913ff615d63292e3..396947b3030f6c271fcec46d55e911abfbbc3a8a 100755 (executable)
@@ -193,16 +193,25 @@ def _extract_directives(directive_groups, formatting, page):
                     formatting[text] = name
 
     storfile = directive_groups['filenames']
-    for xpath in ('.//refsynopsisdiv//filename',
-                  './/refsynopsisdiv//command'):
+    for xpath, absolute_only in (('.//refsynopsisdiv//filename', False),
+                                 ('.//refsynopsisdiv//command', False),
+                                 ('.//filename', True)):
         for name in t.iterfind(xpath):
+            if absolute_only and not (name.text and name.text.startswith('/')):
+                continue
+            if name.attrib.get('noindex'):
+                continue
             name.tail = ''
             if name.text:
+                if name.text.endswith('*'):
+                    name.text = name.text[:-1]
                 if not name.text.startswith('.'):
                     text = name.text.partition(' ')[0]
                     if text != name.text:
                         name.clear()
                         name.text = text
+                    if text.endswith('/'):
+                        text = text[:-1]
                     storfile[text].append((pagename, section))
                     if text not in formatting:
                         # use element as formatted display
index 91cc322604531ba8aef1c74fb9c75066c5f1b0ba..cc7d1a0533fe8998564eee3e09aea6d73b5b9700 100644 (file)
 
                 <programlisting>journalctl /usr/bin/dbus-daemon</programlisting>
 
-                <para>Show all logs of the kernel device node <filename>/dev/sda</filename>:</para>
+                <para>Show all logs of the kernel device node <filename noindex='true'>/dev/sda</filename>:</para>
 
                 <programlisting>journalctl /dev/sda</programlisting>
 
index df3549dcb74aed0d4a128d5cf75efc70fe5df629..9c2ecc48b2163e68bdcc05bb3b78bc4597f7f908 100644 (file)
@@ -49,7 +49,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
   <refsynopsisdiv>
     <cmdsynopsis>
-      <command>kernel-install</command> <arg choice="req">COMMAND</arg> <arg choice="req">KERNEL VERSION</arg> <arg choice="req">KERNEL IMAGE</arg>
+      <command>kernel-install</command>
+      <arg choice="plain">COMMAND</arg>
+      <arg choice="plain"><replaceable>KERNEL-VERSION</replaceable></arg>
+      <arg choice="opt"><replaceable>KERNEL-IMAGE</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
 
@@ -60,9 +63,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       initramfs images to and from <filename>/boot</filename>.
     </para>
 
-    <para>kernel-install will execute the files located in the directory <filename>/usr/lib/kernel/install.d/</filename>
+    <para><command>kernel-install</command> will execute the files
+    located in the directory <filename>/usr/lib/kernel/install.d/</filename>
     and the local administration directory <filename>/etc/kernel/install.d/</filename>.
-    All files are collectively sorted and executed in lexical order, regardless of the directories in
+    All files are collectively sorted and executed in lexical order, regardless of the directory in
     which they live. However, files with identical file names replace each other.
     Files in <filename>/etc/kernel/install.d/</filename> take precedence over files with the same name
     in <filename>/usr/lib/kernel/install.d/</filename>. This can be used to override a system-supplied
@@ -78,29 +82,44 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>The following commands are understood:</para>
     <variablelist>
       <varlistentry>
-        <term>add &lt;KERNEL VERSION> &lt;KERNEL IMAGE></term>
+        <term><command>add <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable></command></term>
         <listitem>
-          <para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
-          and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
-          "add &lt;KERNEL VERSION> <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>"</para>
-
-          <para>kernel-install copies &lt;KERNEL IMAGE> to
-          <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/linux</filename>.</para>
-
-          <para>kernel-install also creates a boot loader entry according to the boot loader specification
-          in <filename>/boot/loader/entries/&lt;MACHINE-ID>-&lt;KERNEL VERSION>.conf</filename>.
-          If the file <filename>initrd</filename> is found next to the <filename>linux</filename> file,
-          the initrd will be added to the configuration.</para>
+          <para>calls every executable
+          <filename>/usr/lib/kernel/install.d/*.install</filename> and
+          <filename>/etc/kernel/install.d/*.install</filename> with
+          the arguments
+          <programlisting>
+add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+          </programlisting>
+          </para>
+
+          <para><command>kernel-install</command> copies
+          <replaceable>KERNEL-IMAGE</replaceable> to
+          <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/linux</filename>.
+          </para>
+
+          <para><command>kernel-install</command> also creates a boot
+          loader entry according to the boot loader specification in
+          <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
+          If the file <filename>initrd</filename> is found next to the
+          <filename>linux</filename> file, the initrd will be added to
+          the configuration.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term>remove &lt;KERNEL VERSION> &lt;KERNEL IMAGE></term>
-        <listitem><para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
-        and <filename>/etc/kernel/install.d/*.install</filename> with the arguments:
-        "remove &lt;KERNEL VERSION> <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>"
-        </para>
-        <para>kernel-install removes the entire directory <filename>/boot/&lt;MACHINE-ID>/&lt;KERNEL VERSION>/</filename>
-        and the file <filename>/boot/loader/entries/&lt;MACHINE-ID>-&lt;KERNEL VERSION>.conf</filename></para>
+        <term><command>remove</command> <replaceable>KERNEL-VERSION</replaceable> <replaceable>KERNEL-IMAGE</replaceable></term>
+        <listitem>
+          <para>calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
+          and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
+          <programlisting>
+remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+          </programlisting>
+          </para>
+
+          <para><command>kernel-install</command> removes the entire directory
+          <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
+          and the file
+          <filename>/boot/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename></para>
         </listitem>
       </varlistentry>
 
@@ -140,7 +159,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           <filename>/etc/machine-id</filename>
         </term>
           <listitem>
-            <para>The content of the file specifies the machine identification &lt;MACHINE-ID>.</para>
+            <para>The content of the file specifies the machine identification <replaceable>MACHINE-ID</replaceable>.</para>
           </listitem>
       </varlistentry>
       <varlistentry>
@@ -148,7 +167,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           <filename>/etc/os-release</filename>
         </term>
           <listitem>
-            <para>The content of the file specifies the operating system id &lt;OS-ID>.</para>
+            <para>The content of the file specifies the operating system id <replaceable>OS-ID</replaceable>.</para>
           </listitem>
       </varlistentry>
     </variablelist>
index 06c0af0bf7a9c5b7a50f6f36bd6b6db20ee8bf40..42634febac599b420e9af915e5673f1b612525be 100644 (file)
                 <example>
                         <title>German locale with English messages</title>
 
-                        <para><filename>/etc/locale.conf:</filename></para>
+                        <para><filename>/etc/locale.conf</filename>:</para>
 
                         <programlisting>LANG=de_DE.UTF-8
 LC_MESSAGES=C</programlisting>
index cac275b453df3762d5742e7d5a9bcaf239fbbdec..876ebfa3ccb65b1895d6b7d06bcecac5795e1890 100644 (file)
                 <example>
                         <title>Invoke a program</title>
 
-                        <para>This calls <filename>/bin/ls</filename>
+                        <para>This calls <filename noindex='true'>/bin/ls</filename>
                         with STDOUT/STDERR connected to the
                         journal:</para>
 
index a80cec4e6c62d8c781fa54cdbe88359e15bc3264..e7c859d11daea90f458b1ab63b2ebcaa74609d18 100644 (file)
 # systemd-nspawn -bD /srv/mycontainer</programlisting>
 
                 <para>This installs a minimal Fedora distribution into
-                the directory <filename>/srv/mycontainer/</filename> and
+                the directory <filename noindex='true'>/srv/mycontainer/</filename> and
                 then boots an OS in a namespace container in
                 it.</para>
         </refsect1>
index 9fe953e8c674376a1af7380b7c19d82a8d335a01..cf04713a006baaece6ff1871c59106a7dadf9868 100644 (file)
@@ -70,7 +70,7 @@
                 <filename>/usr</filename> and the virtual kernel API
                 file systems such as <filename>/proc</filename>,
                 <filename>/sys</filename> or
-                <filename>/dev/</filename>. This service executes no
+                <filename>/dev</filename>. This service executes no
                 operation if <filename>/etc/fstab</filename> does not
                 exist or lists no entries for the mentioned file
                 systems.</para>
index f0a4293deafe6ffd63e1c4726ea22130d4e754f6..e01cac7bc2513b2dba020c9e07a0d7acf7ced505 100644 (file)
@@ -70,7 +70,7 @@
 
                 <para>Automount units must be named after the
                 automount directories they control. Example: the
-                automount point <filename>/home/lennart</filename>
+                automount point <filename noindex='true'>/home/lennart</filename>
                 must be configured in a unit file
                 <filename>home-lennart.automount</filename>. For
                 details about the escaping logic used to convert a
index 3f6d012c11bf72fe54db45343f348e1bdb121bbe..7dffa236cf4147f7459125825c65c224093fb03d 100644 (file)
@@ -80,7 +80,7 @@
                 <para>Device units are named after the
                 <filename>/sys</filename> and
                 <filename>/dev</filename> paths they control. Example:
-                the device <filename>/dev/sda5</filename> is exposed
+                the device <filename noindex='true'>/dev/sda5</filename> is exposed
                 in systemd as <filename>dev-sda5.device</filename>. For
                 details about the escaping logic used to convert a
                 file system path to a unit name see
index c25d96e9fdde0c9aa4fb0dbfb6a1d809d937b85e..b3e0287d72dc5357643da99263a5aeb9f127ac5d 100644 (file)
                                 space-separated list of cgroup
                                 identifiers. A cgroup identifier is
                                 formatted like
-                                <filename>cpu:/foo/bar</filename>,
+                                <filename noindex='true'>cpu:/foo/bar</filename>,
                                 where "cpu" indicates the kernel
                                 control group controller used, and
-                                <filename>/foo/bar</filename> is the
+                                <filename noindex='true'>/foo/bar</filename> is the
                                 control group path. The controller
                                 name and ":" may be omitted in which
                                 case the named systemd control group
index 23e1e6c28eea439a3e8f45559d792a6342178ba8..21177a26232605da1a99d318d62ff412d842786e 100644 (file)
@@ -86,7 +86,7 @@
 
                 <para>Mount units must be named after the mount point
                 directories they control. Example: the mount point
-                <filename>/home/lennart</filename> must be configured
+                <filename noindex='true'>/home/lennart</filename> must be configured
                 in a unit file
                 <filename>home-lennart.mount</filename>. For details
                 about the escaping logic used to convert a file system
index 78b04f58d93e04045b734ef13f2e2638788f4271..8268e6164d91238a8becc58165209c568425daee 100644 (file)
@@ -79,7 +79,7 @@
 
                 <para>Swap units must be named after the devices
                 or files they control. Example: the swap device
-                <filename>/dev/sda5</filename> must be configured in a
+                <filename noindex='true'>/dev/sda5</filename> must be configured in a
                 unit file <filename>dev-sda5.swap</filename>. For
                 details about the escaping logic used to convert a
                 file system path to a unit name see
index f924ef69dd3149e64f67c9451a62b270aed9ed8d..2f2d1a1d4a689c4b2ff781fc09c1561748966b09 100644 (file)
                 <para>Some unit names reflect paths existing in the
                 file system name space. Example: a device unit
                 <filename>dev-sda.device</filename> refers to a device
-                with the device node <filename>/dev/sda</filename> in
+                with the device node <filename noindex='true'>/dev/sda</filename> in
                 the file system namespace. If this applies a special
                 way to escape the path name is used, so that the
                 result is usable as part of a file name. Basically,
index f60b571b72158d15ba38f391258c5b9b7dd68b8c..09a4776705e5de68975051c5aa1cda48ff38da92 100644 (file)
                 <example>
                         <title>German keyboard and console</title>
 
-                        <para><filename>/etc/vconsole.conf:</filename></para>
+                        <para><filename>/etc/vconsole.conf</filename>:</para>
 
                         <programlisting>KEYMAP=de-latin1
 FONT=latarcyrheb-sun16</programlisting>