Commit 83d9f436 authored by Iustin Pop's avatar Iustin Pop

Workaround man page output for long PREFIX dirs

A long PREFIX variable (to configure) will result in very long
LOCALSTATEDIR, which when concatenated with lib/ganeti/ (and even more
items under it) will go over the 80 char line length we enforce in the
man checker.

To workaround this, we change two things:

- use a specific REPLACE_VARS_MAN which adds breaking points after each
  slash in paths
- replace some <filename> entries with <literallayout> so that docbook
  generates a non-fill block around them (only a few cases need this
  after the breaking points are added

Note that with normal prefixes (e.g. / or /usr/local) this won't happen.

The patch also fixes a wording in the watcher man page.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent dd713605
......@@ -16,6 +16,7 @@ RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
CHECK_MAN = $(top_srcdir)/autotools/check-man
REPLACE_VARS_SED = autotools/replace_vars.sed
REPLACE_VARS_MAN = autotools/replace_vars.man
hypervisordir = $(pkgpythondir)/hypervisor
httpdir = $(pkgpythondir)/http
......@@ -57,7 +58,8 @@ maintainer-clean-local:
rm -rf doc/api doc/html
CLEANFILES = \
autotools/replace_vars.sed \
$(REPLACE_VARS_SED) \
$(REPLACE_VARS_MAN) \
daemons/daemon-util \
daemons/ganeti-cleaner \
devel/upload \
......@@ -402,12 +404,12 @@ man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
{ echo 'docbook2html' not found during configure; exit 1; }
$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
man/%.7: man/%.7.in $(REPLACE_VARS_MAN)
sed -f $(REPLACE_VARS_MAN) < $< > $@
$(CHECK_MAN) $@
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
man/%.8: man/%.8.in $(REPLACE_VARS_MAN)
sed -f $(REPLACE_VARS_MAN) < $< > $@
$(CHECK_MAN) $@
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
......@@ -472,6 +474,9 @@ $(REPLACE_VARS_SED): Makefile
echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \
} > $@
$(REPLACE_VARS_MAN): $(REPLACE_VARS_SED)
sed -e 's^/^\0\\\\:^g' < $^ >$@
# We need to create symlinks because "make distcheck" will not install Python
# files when building.
stamp-srclinks: Makefile stamp-directories
......
......@@ -49,11 +49,12 @@
</para>
<para>
<command>&dhpackage;</command> automatically removes all files older than
21 days from
<filename>@LOCALSTATEDIR@/lib/ganeti/queue/archive</filename>.
<command>&dhpackage;</command> automatically removes all files
older than 21 days from the archive located at:
</para>
<literallayout>@LOCALSTATEDIR@/lib/ganeti/queue/archive</literallayout>
</refsect1>
&footer;
......
......@@ -66,17 +66,21 @@
<para>
The watcher does synchronous queries but will submit jobs for
executing the changes. Due to locking, it could be that the jobs
execute much later than the watcher executes them.
execute much later than the watcher schedules them.
</para>
<para>The command has a state file located at</para>
<literallayout>@LOCALSTATEDIR@/lib/ganeti/watcher.data</literallayout>
<para>and a log file at</para>
<literallayout>@LOCALSTATEDIR@/log/ganeti/watcher.log</literallayout>
<para>
The command has a state file located at
<filename>@LOCALSTATEDIR@/lib/ganeti/watcher.data</filename> and a log
file at
<filename>@LOCALSTATEDIR@/log/ganeti/watcher.log</filename>. Removal of
either file will not affect correct operation; the removal of
the state file will just cause the restart counters for the
instances to reset to zero.
Removal of either file will not affect correct operation; the
removal of the state file will just cause the restart counters
for the instances to reset to zero.
</para>
</refsect1>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment