[libvirt] [PATCH] virsh: Fix POD syntax

The first two hunks fix "Unterminated I<...> sequence" error and the last one fixes "’=item’ outside of any ’=over’" error. --- tools/virsh.pod | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 61822bb..07d6a67 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -737,7 +737,7 @@ I<bandwidth> specifies copying bandwidth limit in MiB/s, although for qemu, it may be non-zero only for an online domain. =item B<blockcopy> I<domain> I<path> I<dest> [I<bandwidth>] [I<--shallow>] -[I<--reuse-external>] [I<--raw>] [I<--wait> [I<--verbose] +[I<--reuse-external>] [I<--raw>] [I<--wait> [I<--verbose>] [{I<--pivot> | I<--finish>}] [I<--timeout> B<seconds>] [I<--async>]] Copy a disk backing image chain to I<dest>. By default, this command @@ -778,7 +778,7 @@ I<path> specifies fully-qualified path of the disk. I<bandwidth> specifies copying bandwidth limit in MiB/s. =item B<blockpull> I<domain> I<path> [I<bandwidth>] [I<base>] -[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async]] +[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async>]] Populate a disk from its backing image chain. By default, this command flattens the entire chain; but if I<base> is specified, containing the @@ -2943,8 +2943,6 @@ and the monitor uses QMP, then the output will be pretty-printed. If more than one argument is provided for I<command>, they are concatenated with a space in between before passing the single command to the monitor. -=back - =item B<qemu-agent-command> I<domain> [I<--timeout> I<seconds> | I<--async> | I<--block>] I<command>... Send an arbitrary guest agent command I<command> to domain I<domain> through -- 1.7.12.4

On Fri, Oct 26, 2012 at 12:34:50 +0200, Peter Krempa wrote:
On 10/26/12 12:27, Jiri Denemark wrote:
The first two hunks fix "Unterminated I<...> sequence" error and the last one fixes "’=item’ outside of any ’=over’" error. --- tools/virsh.pod | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
ACK.
Pushed, thanks. Jirka

Patch 61299a1 fixed a long-standing pod error in the man page. But we should be preventing these up front. * tools/Makefile.am (virt-xml-validate.1, virt-pki-validate.1) (virt-host-validate.1, virt-sanlock-cleanup.8, virsh.1): Reject pod conversion errors. * daemon/Makefile.am ($(srcdir)/libvirtd.8.in): Likewise. --- I tested that with this patch but not Jirka's cleanup, 'make' failed; with both patches, make succeeds and there are no buggy man pages. daemon/Makefile.am | 3 ++- tools/Makefile.am | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 1643f38..40012ec 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -384,7 +384,8 @@ POD2MAN = pod2man -c "Virtualization Support" \ -r "$(PACKAGE)-$(VERSION)" -s 8 $(srcdir)/libvirtd.8.in: libvirtd.pod.in - $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ + $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi # This is needed for clients too, so can't wrap in # the WITH_LIBVIRTD conditional diff --git a/tools/Makefile.am b/tools/Makefile.am index 0d7822d..8e7e464 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,17 +61,20 @@ virt-xml-validate: virt-xml-validate.in Makefile || (rm $@ && exit 1) && chmod +x $@ virt-xml-validate.1: virt-xml-validate.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi virt-pki-validate: virt-pki-validate.in Makefile $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' < $< > $@ \ || (rm $@ && exit 1) && chmod +x $@ virt-pki-validate.1: virt-pki-validate.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi virt-host-validate.1: virt-host-validate.c - $(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' \ @@ -79,7 +82,8 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile || (rm $@ && exit 1) && chmod +x $@ virt-sanlock-cleanup.8: virt-sanlock-cleanup.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $(srcdir)/$@ ; then exit 1; fi virt_host_validate_SOURCES = \ virt-host-validate.c \ @@ -162,7 +166,8 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc endif virsh.1: virsh.pod - $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $(srcdir)/$@ ; then exit 1; fi install-data-local: install-init install-systemd -- 1.7.11.7

On 10/26/2012 06:06 PM, Eric Blake wrote:
Patch 61299a1 fixed a long-standing pod error in the man page. But we should be preventing these up front.
* tools/Makefile.am (virt-xml-validate.1, virt-pki-validate.1) (virt-host-validate.1, virt-sanlock-cleanup.8, virsh.1): Reject pod conversion errors. * daemon/Makefile.am ($(srcdir)/libvirtd.8.in): Likewise. ---
I tested that with this patch but not Jirka's cleanup, 'make' failed; with both patches, make succeeds and there are no buggy man pages.
daemon/Makefile.am | 3 ++- tools/Makefile.am | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 1643f38..40012ec 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -384,7 +384,8 @@ POD2MAN = pod2man -c "Virtualization Support" \ -r "$(PACKAGE)-$(VERSION)" -s 8
$(srcdir)/libvirtd.8.in: libvirtd.pod.in - $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ + $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
At first I've mistaken $< for $@, but your version is correct. But if I may have a suggestion, I'd do 'then rm $@; exit', so it fails also when you re-run make again.
# This is needed for clients too, so can't wrap in # the WITH_LIBVIRTD conditional diff --git a/tools/Makefile.am b/tools/Makefile.am index 0d7822d..8e7e464 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,17 +61,20 @@ virt-xml-validate: virt-xml-validate.in Makefile || (rm $@ && exit 1) && chmod +x $@
virt-xml-validate.1: virt-xml-validate.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
s_$@_$(srcdir)/$@_
virt-pki-validate: virt-pki-validate.in Makefile $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' < $< > $@ \ || (rm $@ && exit 1) && chmod +x $@
virt-pki-validate.1: virt-pki-validate.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
s_$@_$(srcdir)/$@_
virt-host-validate.1: virt-host-validate.c - $(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
s_$@_$(srcdir)/$@_
virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' \ @@ -79,7 +82,8 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile || (rm $@ && exit 1) && chmod +x $@
virt-sanlock-cleanup.8: virt-sanlock-cleanup.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $(srcdir)/$@ ; then exit 1; fi
virt_host_validate_SOURCES = \ virt-host-validate.c \ @@ -162,7 +166,8 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc endif
virsh.1: virsh.pod - $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $(srcdir)/$@ ; then exit 1; fi
install-data-local: install-init install-systemd
ACK with those fixes (both with or without the "rm" added). Martin

On 10/26/2012 11:36 AM, Martin Kletzander wrote:
On 10/26/2012 06:06 PM, Eric Blake wrote:
Patch 61299a1 fixed a long-standing pod error in the man page. But we should be preventing these up front.
* tools/Makefile.am (virt-xml-validate.1, virt-pki-validate.1) (virt-host-validate.1, virt-sanlock-cleanup.8, virsh.1): Reject pod conversion errors. * daemon/Makefile.am ($(srcdir)/libvirtd.8.in): Likewise. ---
I tested that with this patch but not Jirka's cleanup, 'make' failed; with both patches, make succeeds and there are no buggy man pages.
$(srcdir)/libvirtd.8.in: libvirtd.pod.in - $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ + $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
At first I've mistaken $< for $@, but your version is correct. But if I may have a suggestion, I'd do 'then rm $@; exit', so it fails also when you re-run make again.
Good call.
virt-xml-validate.1: virt-xml-validate.in - $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ + $(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ \ + && if grep 'POD ERROR' $@ ; then exit 1; fi
s_$@_$(srcdir)/$@_
Bah - copy-and-paste bit me, and I only tested the bug in virsh.pod so I didn't spot it. Then again, that's why we do reviews :)
ACK with those fixes (both with or without the "rm" added).
Fixing to add the rm, and then I'll push. Thanks again! -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (4)
-
Eric Blake
-
Jiri Denemark
-
Martin Kletzander
-
Peter Krempa