[systemd-commits] 2 commits - make-directive-index.py man/binfmt.d.xml man/modules-load.d.xml man/nss-myhostname.xml man/pam_systemd.xml man/sysctl.d.xml man/systemd.automount.xml man/systemd.device.xml man/systemd.exec.xml man/systemd.kill.xml man/systemd.mount.xml man/systemd-nspawn.xml man/systemd.path.xml man/systemd.service.xml man/systemd.snapshot.xml man/systemd.socket.xml man/systemd.swap.xml man/systemd.target.xml man/systemd.timer.xml

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Wed Feb 13 20:16:51 PST 2013


 make-directive-index.py   |   32 +++++++++++++++++++++++++++++++-
 man/binfmt.d.xml          |    2 +-
 man/modules-load.d.xml    |    4 ++--
 man/nss-myhostname.xml    |    4 +---
 man/pam_systemd.xml       |    4 +---
 man/sysctl.d.xml          |    2 +-
 man/systemd-nspawn.xml    |    4 ++--
 man/systemd.automount.xml |    2 +-
 man/systemd.device.xml    |    2 +-
 man/systemd.exec.xml      |    8 ++++----
 man/systemd.kill.xml      |    8 ++++----
 man/systemd.mount.xml     |    2 +-
 man/systemd.path.xml      |    2 +-
 man/systemd.service.xml   |    2 +-
 man/systemd.snapshot.xml  |    2 +-
 man/systemd.socket.xml    |    2 +-
 man/systemd.swap.xml      |    2 +-
 man/systemd.target.xml    |    2 +-
 man/systemd.timer.xml     |    2 +-
 19 files changed, 57 insertions(+), 31 deletions(-)

New commits:
commit e670b166a08b7c1031a9e7d7675fa9a29c3e19c9
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Feb 13 22:46:37 2013 -0500

    man: use <replaceable> in various places

diff --git a/man/binfmt.d.xml b/man/binfmt.d.xml
index 8c5083c..762d1fc 100644
--- a/man/binfmt.d.xml
+++ b/man/binfmt.d.xml
@@ -76,7 +76,7 @@
                 as delimiter in binary format rules.</para>
 
                 <para>Each configuration file shall be named in the
-                style of <filename><program>.conf</filename>.
+                style of <filename><replaceable>program</replaceable>.conf</filename>.
                 Files in <filename>/etc/</filename> override files
                 with the same name in <filename>/usr/lib/</filename>
                 and <filename>/run/</filename>. Files in
diff --git a/man/modules-load.d.xml b/man/modules-load.d.xml
index ea4f524..ce94bef 100644
--- a/man/modules-load.d.xml
+++ b/man/modules-load.d.xml
@@ -58,7 +58,7 @@
                 reads files from the above directories which contain
                 kernel modules to load during boot in a static list.
                 Each configuration file is named in the style of
-                <filename>/etc/modules-load.d/<program>.conf</filename>. Note
+                <filename>/etc/modules-load.d/<replaceable>program</replaceable>.conf</filename>. Note
                 that it is usually a better idea to rely on the
                 automatic module loading by PCI IDs, USB IDs, DMI IDs
                 or similar triggers encoded in the kernel modules
@@ -76,7 +76,7 @@
                 non-whitespace character is # or ; are ignored.</para>
 
                 <para>Each configuration file shall be named in the
-                style of <filename><program>.conf</filename>.
+                style of <filename><replaceable>program</replaceable>.conf</filename>.
                 Files in <filename>/etc/</filename> override files
                 with the same name in <filename>/usr/lib/</filename>
                 and <filename>/run/</filename>. Files in
diff --git a/man/nss-myhostname.xml b/man/nss-myhostname.xml
index 46b7471..3fc91ee 100644
--- a/man/nss-myhostname.xml
+++ b/man/nss-myhostname.xml
@@ -50,9 +50,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <cmdsynopsis>
-                        <command>nss-myhostname.la</command>
-                </cmdsynopsis>
+                <para><filename>nss-myhostname.la</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml
index 0093a8f..d74a918 100644
--- a/man/pam_systemd.xml
+++ b/man/pam_systemd.xml
@@ -48,9 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <cmdsynopsis>
-                        <command>pam_systemd.so</command>
-                </cmdsynopsis>
+                <para><filename>pam_systemd.so</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
index 0ef5545..759b874 100644
--- a/man/sysctl.d.xml
+++ b/man/sysctl.d.xml
@@ -77,7 +77,7 @@
                 entirely equivalent.</para>
 
                 <para>Each configuration file shall be named in the
-                style of <filename><program>.conf</filename>.
+                style of <filename><replaceable>program</replaceable>.conf</filename>.
                 Files in <filename>/etc/</filename> override files
                 with the same name in <filename>/usr/lib/</filename>
                 and <filename>/run/</filename>.  Files in
diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
index 2fa00e8..6a01ffd 100644
--- a/man/systemd-nspawn.xml
+++ b/man/systemd-nspawn.xml
@@ -262,13 +262,13 @@
                                 not linked. If <literal>host</literal>,
                                 the journal files are stored on the
                                 host file system (beneath
-                                <filename>/var/log/journal/<machine-id></filename>)
+                                <filename>/var/log/journal/<replaceable>machine-id</replaceable></filename>)
                                 and the subdirectory is bind-mounted
                                 into the container at the same
                                 location. If <literal>guest</literal>,
                                 the journal files are stored on the
                                 guest file system (beneath
-                                <filename>/var/log/journal/<machine-id></filename>)
+                                <filename>/var/log/journal/<replaceable>machine-id</replaceable></filename>)
                                 and the subdirectory is symlinked into the host
                                 at the same location. If
                                 <literal>auto</literal> (the default),
diff --git a/man/systemd.automount.xml b/man/systemd.automount.xml
index f428ddf..f0a4293 100644
--- a/man/systemd.automount.xml
+++ b/man/systemd.automount.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.automount</filename></para>
+                <para><filename><replaceable>automount</replaceable>.automount</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
index 4c4bb7c..3f6d012 100644
--- a/man/systemd.device.xml
+++ b/man/systemd.device.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.device</filename></para>
+                <para><filename><replaceable>device</replaceable>.device</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 952bb95..9c31baf 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -48,10 +48,10 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.service</filename>,
-                <filename>systemd.socket</filename>,
-                <filename>systemd.mount</filename>,
-                <filename>systemd.swap</filename></para>
+                <para><filename><replaceable>service</replaceable>.service</filename>,
+                <filename><replaceable>socket</replaceable>.socket</filename>,
+                <filename><replaceable>mount</replaceable>.mount</filename>,
+                <filename><replaceable>swap</replaceable>.swap</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.kill.xml b/man/systemd.kill.xml
index 5ff8fee..b41ce46 100644
--- a/man/systemd.kill.xml
+++ b/man/systemd.kill.xml
@@ -48,10 +48,10 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.service</filename>,
-                <filename>systemd.socket</filename>,
-                <filename>systemd.mount</filename>,
-                <filename>systemd.swap</filename></para>
+                <para><filename><replaceable>service</replaceable>.service</filename>,
+                <filename><replaceable>socket</replaceable>.socket</filename>,
+                <filename><replaceable>mount</replaceable>.mount</filename>,
+                <filename><replaceable>swap</replaceable>.swap</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index 022be46..23e1e6c 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.mount</filename></para>
+                <para><filename><replaceable>mount</replaceable>.mount</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.path.xml b/man/systemd.path.xml
index ccf16df..cc2d366 100644
--- a/man/systemd.path.xml
+++ b/man/systemd.path.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.path</filename></para>
+                <para><filename><replaceable>path</replaceable>.path</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index d2feb98..aecf9c6 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.service</filename></para>
+                <para><filename><replaceable>service</replaceable>.service</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.snapshot.xml b/man/systemd.snapshot.xml
index f7688e9..08d14c4 100644
--- a/man/systemd.snapshot.xml
+++ b/man/systemd.snapshot.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.snapshot</filename></para>
+                <para><filename><replaceable>snapshot</replaceable>.snapshot</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index f2d4dbe..e594422 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.socket</filename></para>
+                <para><filename><replaceable>socket</replaceable>.socket</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index e547e71..78b04f5 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.swap</filename></para>
+                <para><filename><replaceable>swap</replaceable>.swap</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.target.xml b/man/systemd.target.xml
index efbad15..fd51cfd 100644
--- a/man/systemd.target.xml
+++ b/man/systemd.target.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.target</filename></para>
+                <para><filename><replaceable>target</replaceable>.target</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
index 2c2ba58..2b9d91a 100644
--- a/man/systemd.timer.xml
+++ b/man/systemd.timer.xml
@@ -48,7 +48,7 @@
         </refnamediv>
 
         <refsynopsisdiv>
-                <para><filename>systemd.timer</filename></para>
+                <para><filename><replaceable>timer</replaceable>.timer</filename></para>
         </refsynopsisdiv>
 
         <refsect1>

commit a4e0b94d318e35b1441fc56f590668e80ff2e44e
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Feb 13 21:51:31 2013 -0500

    man: add filenames to the index
    
    Limiting the addition to filenames from <refsynopsis>
    seems to give a good enough S/N ratio.

diff --git a/make-directive-index.py b/make-directive-index.py
index b06a54c..15bd9b9 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -147,6 +147,15 @@ TEMPLATE = '''\
         </refsect1>
 
         <refsect1>
+                <title>Files and directories</title>
+
+                <para>Paths and file names referred to in the
+                documentation.</para>
+
+                <variablelist id='filenames' />
+        </refsect1>
+
+        <refsect1>
                 <title>Colophon</title>
                 <para id='colophon' />
         </refsect1>
@@ -162,10 +171,11 @@ def _extract_directives(directive_groups, formatting, page):
     t = tree.parse(page)
     section = t.find('./refmeta/manvolnum').text
     pagename = t.find('./refmeta/refentrytitle').text
+
+    storopt = directive_groups['options']
     for variablelist in t.iterfind('.//variablelist'):
         klass = variablelist.attrib.get('class')
         storvar = directive_groups[klass or 'miscellaneous']
-        storopt = directive_groups['options']
         # <option>s go in OPTIONS, unless class is specified
         for xpath, stor in (('./varlistentry/term/varname', storvar),
                             ('./varlistentry/term/option',
@@ -179,6 +189,26 @@ def _extract_directives(directive_groups, formatting, page):
                     name.text = text
                     formatting[text] = name
 
+    storfile = directive_groups['filenames']
+    for xpath in ('.//refsynopsisdiv//filename',
+                  './/refsynopsisdiv//command'):
+        for name in t.iterfind(xpath):
+            name.tail = ''
+            if name.text:
+                if not name.text.startswith('.'):
+                    text = name.text.partition(' ')[0]
+                    if text != name.text:
+                        name.clear()
+                        name.text = text
+                    storfile[text].append((pagename, section))
+                    if text not in formatting:
+                        # use element as formatted display
+                        formatting[text] = name
+            else:
+                text = ' '.join(name.itertext())
+                storfile[text].append((pagename, section))
+                formatting[text] = name
+
 def _make_section(template, name, directives, formatting):
     varlist = template.find(".//*[@id='{}']".format(name))
     for varname, manpages in sorted(directives.items()):



More information about the systemd-commits mailing list