[systemd-commits] 7 commits - Makefile.am TODO make-directive-index.py make-man-index.py man/.gitignore man/bootchart.conf.xml man/systemd.automount.xml man/systemd.conf.xml man/systemd.device.xml man/systemd.exec.xml man/systemd.journal-fields.xml man/systemd.kill.xml man/systemd.mount.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.time.xml man/systemd.timer.xml man/systemd.unit.xml man/systemd.xml
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Tue Jan 15 08:31:01 PST 2013
Makefile.am | 25 ++----
TODO | 4 -
make-directive-index.py | 75 ++++++++++++++++---
make-man-index.py | 155 ++++++++++++++++++++++++-----------------
man/.gitignore | 1
man/bootchart.conf.xml | 3
man/systemd.automount.xml | 3
man/systemd.conf.xml | 3
man/systemd.device.xml | 3
man/systemd.exec.xml | 3
man/systemd.journal-fields.xml | 3
man/systemd.kill.xml | 3
man/systemd.mount.xml | 3
man/systemd.path.xml | 3
man/systemd.service.xml | 3
man/systemd.snapshot.xml | 3
man/systemd.socket.xml | 3
man/systemd.swap.xml | 3
man/systemd.target.xml | 3
man/systemd.time.xml | 3
man/systemd.timer.xml | 3
man/systemd.unit.xml | 3
man/systemd.xml | 7 +
23 files changed, 203 insertions(+), 115 deletions(-)
New commits:
commit dd6f5e4fb8a18822d1de8f98d5b24d1cb4d9e851
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Jan 15 10:34:59 2013 -0500
make-man-index: work around UnicodeDecodeError
diff --git a/make-man-index.py b/make-man-index.py
index 5fa90ae..2dbc2da 100755
--- a/make-man-index.py
+++ b/make-man-index.py
@@ -21,6 +21,7 @@
import collections
import xml.etree.ElementTree as tree
import sys
+MDASH = ' â ' if sys.version_info.major >= 3 else ' -- '
TEMPLATE = '''\
<refentry id="systemd.index">
@@ -91,7 +92,7 @@ def add_letter(template, letter, pages):
d = tree.SubElement(b, 'manvolnum')
d.text = section
- b.tail = ' â ' + purpose # + ' (' + p + ')'
+ b.tail = MDASH + purpose # + ' (' + p + ')'
tree.SubElement(para, 'sbr')
commit f6b6728d1dc92754026a7f04d26f83e2290778f4
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 22:17:49 2013 -0500
man: generate xml not html for index
This way we also get a man page. The output is not as polished.
I hope that it doesn't matter too much.
index.html is not generated now, the page is called
systemd.index.html. If necessary, an install hook should be added.
diff --git a/Makefile.am b/Makefile.am
index ed6c307..9c7267b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -682,22 +682,10 @@ CLEANFILES += \
${XML_FILES:.xml=.html}
if HAVE_PYTHON
-noinst_DATA += \
- man/index.html
-
-CLEANFILES += \
- man/index.html
-
-man/index.html: make-man-index.py $(XML_FILES)
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(PYTHON) $^ > $@
-
MANPAGES += \
+ man/systemd.index.7 \
man/systemd.directives.7
-EXTRA_DIST += \
- man/index.html
-
XML_DIRECTIVE_FILES = \
man/systemd.xml \
man/systemd.unit.xml \
@@ -718,11 +706,16 @@ XML_DIRECTIVE_FILES = \
man/systemd.time.xml \
man/bootchart.conf.xml
+man/systemd.index.xml: make-man-index.py $(filter-out man/systemd.index.xml,$(XML_FILES))
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN)$(PYTHON) $^ > $@
+
man/systemd.directives.xml: make-directive-index.py $(XML_DIRECTIVE_FILES)
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(PYTHON) $^ > $@
EXTRA_DIST += \
+ man/systemd.index.xml \
man/systemd.directives.xml
endif
diff --git a/TODO b/TODO
index 7eeca3d..d3d4699 100644
--- a/TODO
+++ b/TODO
@@ -32,8 +32,6 @@ Features:
* support high-level cgroup setting syntax in systemctl. Example: "systemctl set-cgroup-attr MemoryLimit 5K"
-* add a man page "systemdall" that lists all of systemd's man pages, inspired by zsh's "zshall" page
-
* print a nicer explanation if people use variable/specifier expansion in ExecStart= for the first word
* kernel cmdline switch to turn off predictable network interface names
diff --git a/make-man-index.py b/make-man-index.py
index b40c963..5fa90ae 100755
--- a/make-man-index.py
+++ b/make-man-index.py
@@ -1,8 +1,9 @@
-# -*- Mode: python; indent-tabs-mode: nil -*- */
+# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd.
#
# Copyright 2012 Lennart Poettering
+# Copyright 2013 Zbigniew JÄdrzejewski-Szmek
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@@ -17,79 +18,108 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-from xml.etree.ElementTree import parse, Element, SubElement, tostring
-from sys import argv, stdout
-
-index = {}
-
-def prettify(elem, indent = 0):
- s = "\n" + indent * " "
- if len(elem):
- if not elem.text or not elem.text.strip():
- elem.text = s + " "
- for e in elem:
- prettify(e, indent + 1)
- if not e.tail or not e.tail.strip():
- e.tail = s + " "
- if not e.tail or not e.tail.strip():
- e.tail = s
- else:
- if indent and (not elem.tail or not elem.tail.strip()):
- elem.tail = s
-
-for p in argv[1:]:
- t = parse(p)
+import collections
+import xml.etree.ElementTree as tree
+import sys
+
+TEMPLATE = '''\
+<refentry id="systemd.index">
+
+ <refentryinfo>
+ <title>systemd.index</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart at poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>systemd.index</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>systemd.index</refname>
+ <refpurpose>List all manpages from the systemd project</refpurpose>
+ </refnamediv>
+</refentry>
+'''
+
+SUMMARY = '''\
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ </para>
+
+ <para id='counts' />
+ </refsect1>
+'''
+
+COUNTS = '\
+This index contains {count} entries, referring to {pages} individual manual pages.'
+
+def make_index(pages):
+ index = collections.defaultdict(list)
+ for p in pages:
+ t = tree.parse(p)
section = t.find('./refmeta/manvolnum').text
+ refname = t.find('./refnamediv/refname').text
purpose = ' '.join(t.find('./refnamediv/refpurpose').text.split())
for f in t.findall('./refnamediv/refname'):
- index[f.text] = (p, section, purpose)
+ infos = (f.text, section, purpose, refname)
+ index[f.text[0].upper()].append(infos)
+ return index
-html = Element('html')
+def add_letter(template, letter, pages):
+ refsect1 = tree.SubElement(template, 'refsect1')
+ title = tree.SubElement(refsect1, 'title')
+ title.text = letter
+ para = tree.SubElement(refsect1, 'para')
+ for info in sorted(pages, key=lambda info: str.lower(info[0])):
+ refname, section, purpose, realname = info
-head = SubElement(html, 'head')
-title = SubElement(head, 'title')
-title.text = 'Manual Page Index'
+ b = tree.SubElement(para, 'citerefentry')
+ c = tree.SubElement(b, 'refentrytitle')
+ c.text = refname
+ d = tree.SubElement(b, 'manvolnum')
+ d.text = section
-body = SubElement(html, 'body')
-h1 = SubElement(body, 'h1')
-h1.text = 'Manual Page Index'
+ b.tail = ' â ' + purpose # + ' (' + p + ')'
-letter = None
-for n in sorted(index.keys(), key = str.lower):
- path, section, purpose = index[n]
+ tree.SubElement(para, 'sbr')
- if path.endswith('.xml'):
- path = path[:-4] + ".html"
+def add_summary(template, indexpages):
+ count = 0
+ pages = set()
+ for group in indexpages:
+ count += len(group)
+ for info in group:
+ refname, section, purpose, realname = info
+ pages.add((realname, section))
- c = path.rfind('/')
- if c >= 0:
- path = path[c+1:]
+ refsect1 = tree.fromstring(SUMMARY)
+ template.append(refsect1)
- if letter is None or n[0].upper() != letter:
- letter = n[0].upper()
+ para = template.find(".//para[@id='counts']")
+ para.text = COUNTS.format(count=count, pages=len(pages))
- h2 = SubElement(body, 'h2')
- h2.text = letter
+def make_page(xml_files):
+ template = tree.fromstring(TEMPLATE)
+ index = make_index(xml_files)
- ul = SubElement(body, 'ul')
- ul.set('style', 'list-style-type:none')
+ for letter in sorted(index):
+ add_letter(template, letter, index[letter])
- li = SubElement(ul, 'li')
+ add_summary(template, index.values())
- a = SubElement(li, 'a')
- a.set('href', path)
- a.text = n + '(' + section + ')'
- a.tail = ' -- '
+ return template
- i = SubElement(li, 'i')
- i.text = purpose
-
-hr = SubElement(body, 'hr')
-
-p = SubElement(body, 'p')
-p.text = "This index contains %s entries, referring to %i individual manual pages." % (len(index), len(argv)-1)
-
-if hasattr(stdout, "buffer"):
- stdout = stdout.buffer
-prettify(html)
-stdout.write(tostring(html))
+if __name__ == '__main__':
+ tree.dump(make_page(sys.argv[1:]))
diff --git a/man/.gitignore b/man/.gitignore
index e97cda7..9c5a7db 100644
--- a/man/.gitignore
+++ b/man/.gitignore
@@ -1,2 +1,3 @@
/systemd.directives.xml
+/systemd.index.xml
/*.[13578]
commit 9cc2c8b763fb4b9ddda95756a727a438a0d2a012
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 22:08:33 2013 -0500
man: add links to directive index to see-alsos
systemd.directives(5) is renamed to systemd.directives(7).
Section 7 is "Miscellaneous".
diff --git a/Makefile.am b/Makefile.am
index f02e953..ed6c307 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -693,7 +693,7 @@ man/index.html: make-man-index.py $(XML_FILES)
$(AM_V_GEN)$(PYTHON) $^ > $@
MANPAGES += \
- man/systemd.directives.5
+ man/systemd.directives.7
EXTRA_DIST += \
man/index.html
diff --git a/TODO b/TODO
index b4e4461..7eeca3d 100644
--- a/TODO
+++ b/TODO
@@ -23,8 +23,6 @@ Features:
nothing. "systemctl enable" does nothing, and gives a bad message
about it. Should fix both to print nice actionable messages.
-* man: link up systemd.directives better, so that people actually know about it
-
* fstab: add new mount option x-systemd-after=/foobar/waldo to allow manual dependencies to other mount points
https://bugzilla.redhat.com/show_bug.cgi?id=812826
diff --git a/make-directive-index.py b/make-directive-index.py
index e94f4c5..48d830e 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -40,7 +40,7 @@ TEMPLATE = '''\
<refmeta>
<refentrytitle>systemd.directives</refentrytitle>
- <manvolnum>5</manvolnum>
+ <manvolnum>7</manvolnum>
</refmeta>
<refnamediv>
diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
index f8fcfe0..d2b0963 100644
--- a/man/bootchart.conf.xml
+++ b/man/bootchart.conf.xml
@@ -151,7 +151,8 @@
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.automount.xml b/man/systemd.automount.xml
index fe559e1..7575835 100644
--- a/man/systemd.automount.xml
+++ b/man/systemd.automount.xml
@@ -160,7 +160,8 @@
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>automount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.conf.xml b/man/systemd.conf.xml
index da3c7f7..956db2c 100644
--- a/man/systemd.conf.xml
+++ b/man/systemd.conf.xml
@@ -290,7 +290,8 @@
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
index 141d72e..4c4bb7c 100644
--- a/man/systemd.device.xml
+++ b/man/systemd.device.xml
@@ -161,7 +161,8 @@
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 302ac43..92f59bd 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -1149,7 +1149,8 @@
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml
index 76a436d..13af4fd 100644
--- a/man/systemd.journal-fields.xml
+++ b/man/systemd.journal-fields.xml
@@ -443,7 +443,8 @@
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.kill.xml b/man/systemd.kill.xml
index 3fff2f5..1bff7b8 100644
--- a/man/systemd.kill.xml
+++ b/man/systemd.kill.xml
@@ -163,7 +163,8 @@
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index d194083..2dc095e 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -290,7 +290,8 @@
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.path.xml b/man/systemd.path.xml
index a27a97b..70a89b7 100644
--- a/man/systemd.path.xml
+++ b/man/systemd.path.xml
@@ -213,7 +213,8 @@
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>inotify</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>inotify</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 598e863..63e5b16 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -922,7 +922,8 @@
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.snapshot.xml b/man/systemd.snapshot.xml
index b432682..f7688e9 100644
--- a/man/systemd.snapshot.xml
+++ b/man/systemd.snapshot.xml
@@ -80,7 +80,8 @@
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 4b1fcc8..88cdaca 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -678,7 +678,8 @@
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index a932143..dae9d59 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -206,7 +206,8 @@
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.target.xml b/man/systemd.target.xml
index d1f4d22..efbad15 100644
--- a/man/systemd.target.xml
+++ b/man/systemd.target.xml
@@ -101,7 +101,8 @@
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.time.xml b/man/systemd.time.xml
index 4f80a30..db5d01b 100644
--- a/man/systemd.time.xml
+++ b/man/systemd.time.xml
@@ -284,7 +284,8 @@ Wed-Sat,Tue 12-10-15 1:2:3 â Tue-Sat 2012-10-15 01:02:03
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
index 5cc543e..e08e200 100644
--- a/man/systemd.timer.xml
+++ b/man/systemd.timer.xml
@@ -199,7 +199,8 @@
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index bba0f5d..d43f288 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -1123,7 +1123,8 @@
<citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/systemd.xml b/man/systemd.xml
index 55ba087..962ed56 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -1265,7 +1265,8 @@
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
commit 08177c85efd52c2c2ab00991791649ad8cf61297
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 21:58:22 2013 -0500
make-directive-index: link to systemd options
diff --git a/Makefile.am b/Makefile.am
index 05dcc79..f02e953 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -699,6 +699,7 @@ EXTRA_DIST += \
man/index.html
XML_DIRECTIVE_FILES = \
+ man/systemd.xml \
man/systemd.unit.xml \
man/systemd.service.xml \
man/systemd.socket.xml \
diff --git a/make-directive-index.py b/make-directive-index.py
index 3bf672e..e94f4c5 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -67,6 +67,23 @@ TEMPLATE = '''\
</refsect1>
<refsect1>
+ <title>Options on the kernel command line</title>
+
+ <para>Kernel boot options for configuring the behaviour of the
+ systemd process.</para>
+
+ <variablelist id='kernel-commandline-directives' />
+ </refsect1>
+
+ <refsect1>
+ <title>Environment variables</title>
+
+ <para>Environment variables understood by the systemd process.</para>
+
+ <variablelist id='environment-variables' />
+ </refsect1>
+
+ <refsect1>
<title>UDEV directives</title>
<para>Directives for configuring systemd units through the
diff --git a/man/systemd.xml b/man/systemd.xml
index 7b3d265..55ba087 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -877,7 +877,7 @@
<refsect1>
<title>Environment</title>
- <variablelist>
+ <variablelist class='environment-variables'>
<varlistentry>
<term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
<listitem><para>systemd reads the
@@ -987,7 +987,7 @@
<filename>/proc/cmdline</filename>
instead.</para></footnote>:</para>
- <variablelist>
+ <variablelist class='kernel-commandline-directives'>
<varlistentry>
<term><varname>systemd.unit=</varname></term>
<term><varname>rd.systemd.unit=</varname></term>
commit 0acfdd61edb96585c6438698bcc21e366acd4291
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 21:34:19 2013 -0500
make-directive-index: count how many directives and pages are shown
diff --git a/make-directive-index.py b/make-directive-index.py
index 51d28c4..3bf672e 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -92,9 +92,19 @@ TEMPLATE = '''\
<variablelist id='bootchart-directives' />
</refsect1>
+
+ <refsect1>
+ <title>Colophon</title>
+ <para id='colophon' />
+ </refsect1>
</refentry>
'''
+COLOPHON = '''\
+This index contains {count} entries in {sections} sections,
+referring to {pages} individual manual pages.
+'''
+
def _extract_directives(directive_groups, page):
t = tree.parse(page)
section = t.find('./refmeta/manvolnum').text
@@ -125,6 +135,19 @@ def _make_section(template, name, directives):
d.text = manvolume
entry.tail = '\n\n'
+def _make_colophon(template, groups):
+ count = 0
+ pages = set()
+ for group in groups:
+ count += len(group)
+ for pagelist in group.values():
+ pages |= set(pagelist)
+
+ para = template.find(".//para[@id='colophon']")
+ para.text = COLOPHON.format(count=count,
+ sections=len(groups),
+ pages=len(pages))
+
def _make_page(template, directive_groups):
"""Create an XML tree from directive_groups.
@@ -137,6 +160,8 @@ def _make_page(template, directive_groups):
for name, directives in directive_groups.items():
_make_section(template, name, directives)
+ _make_colophon(template, directive_groups.values())
+
return template
def make_page(xml_files):
commit eeb019b5b5db785feb0666f3238b1240e7f3e42e
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 21:02:49 2013 -0500
make-directive-index: remove duplicated list of sections
diff --git a/make-directive-index.py b/make-directive-index.py
index b35735e..51d28c4 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -106,8 +106,8 @@ def _extract_directives(directive_groups, page):
text = ''.join(varname.text.partition('=')[:2])
stor[text].append((pagename, section))
-def _make_section(refentry, name, directives):
- varlist = refentry.find(".//*[@id='{}']".format(name))
+def _make_section(template, name, directives):
+ varlist = template.find(".//*[@id='{}']".format(name))
for varname, manpages in sorted(directives.items()):
entry = tree.SubElement(varlist, 'varlistentry')
a = tree.SubElement(tree.SubElement(entry, 'term'), 'varname')
@@ -125,7 +125,7 @@ def _make_section(refentry, name, directives):
d.text = manvolume
entry.tail = '\n\n'
-def _make_page(directive_groups):
+def _make_page(template, directive_groups):
"""Create an XML tree from directive_groups.
directive_groups = {
@@ -134,26 +134,21 @@ def _make_page(directive_groups):
...
}
"""
- refentry = tree.fromstring(TEMPLATE)
-
for name, directives in directive_groups.items():
- _make_section(refentry, name, directives)
+ _make_section(template, name, directives)
- return refentry
+ return template
def make_page(xml_files):
"Extract directives from xml_files and return XML index tree."
+ template = tree.fromstring(TEMPLATE)
+ names = [vl.get('id') for vl in template.iterfind('.//variablelist')]
directive_groups = {name:collections.defaultdict(list)
- for name in ['unit-directives',
- 'udev-directives',
- 'systemd-directives',
- 'journal-directives',
- 'bootchart-directives',
- ]}
+ for name in names}
for page in xml_files:
_extract_directives(directive_groups, page)
- return _make_page(directive_groups)
+ return _make_page(template, directive_groups)
if __name__ == '__main__':
tree.dump(make_page(sys.argv[1:]))
commit 4a431c9ab1475b38868c9e240a5615739a3d6458
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Mon Jan 14 20:18:36 2013 -0500
man: add bootchart.conf to directives index
diff --git a/Makefile.am b/Makefile.am
index e10e421..05dcc79 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -714,7 +714,8 @@ XML_DIRECTIVE_FILES = \
man/systemd.device.xml \
man/systemd.conf.xml \
man/systemd.journal-fields.xml \
- man/systemd.time.xml
+ man/systemd.time.xml \
+ man/bootchart.conf.xml
man/systemd.directives.xml: make-directive-index.py $(XML_DIRECTIVE_FILES)
$(AM_V_at)$(MKDIR_P) $(dir $@)
diff --git a/make-directive-index.py b/make-directive-index.py
index eaf7019..b35735e 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -83,6 +83,15 @@ TEMPLATE = '''\
<variablelist id='journal-directives' />
</refsect1>
+
+ <refsect1>
+ <title>bootchart.conf directives</title>
+
+ <para>Directives for configuring the behaviour of the
+ systemd-bootchart process.</para>
+
+ <variablelist id='bootchart-directives' />
+ </refsect1>
</refentry>
'''
@@ -139,6 +148,7 @@ def make_page(xml_files):
'udev-directives',
'systemd-directives',
'journal-directives',
+ 'bootchart-directives',
]}
for page in xml_files:
_extract_directives(directive_groups, page)
More information about the systemd-commits
mailing list