Skip to contentSkip to conversation

add man pages to xen

PATCH In review Sean Dague 2 participants 2 messages Aug 1, 2005 – Aug 2, 2005

lore
Share & tools
lore

Sean Dague

author
#0 lore raw

PATCH 1/1 add man pages to xen

The following patch adds the beginnings of man pages to xen, specifically the xmdomain.cfg.5 man page, and a very small stub for xm.1, plus the build elements required. This is done using the pod (plain old text) markup and converting to man format with pod2man. If people like this, expect more work in the future to fill out these man pages as well as others.

Diffstat output:

 Makefile               |   26 ++++++++++++++
 man/xm.pod.1           |    5 ++
 man/xmdomain.cfg.pod.5 |   87 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+)
docs/Makefile +21 -0
diff -urN xen-unstable.hg/docs/Makefile xen-unstable.sean/docs/Makefile
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+VERSION		= xen-unstable
 INSTALL		= install
 INSTALL_DIR	= $(INSTALL) -d -m0755
 
@@ -8,9 +9,15 @@
 LATEX		:= latex
 FIG2DEV		:= fig2dev
 LATEX2HTML	:= latex2html
+POD2MAN		:= pod2man
 
 pkgdocdir	:= /usr/share/doc/xen
+mandir		:= /usr/share/man
 
+DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
+DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
+DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
+DOC_MAN5	:= $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
 DOC_TEX		:= $(wildcard src/*.tex)
 DOC_PS		:= $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
 DOC_PDF		:= $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
@@ -30,16 +37,35 @@
 	@if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
 	$(MAKE) $(DOC_HTML); fi
 
+man-pages:
+	@if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
+	$(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
+
+man1/%.1: man/%.pod.1 Makefile
+	$(INSTALL_DIR) $(@D)
+	$(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man1.//'| \
+       		sed 's/.1//'` -s 1 -c "Xen" $< $@
+
+man5/%.5: man/%.pod.5 Makefile
+	$(INSTALL_DIR) $(@D)
+	$(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
+		sed 's/.5//'` -s 5 -c "Xen" $< $@
+
 clean:
 	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
 	rm -rf *.ilg *.log *.ind *.toc *.bak core
	rm -rf $(GFX) ps pdf html

+ rm -rf man5
+ rm -rf man1

install: all
rm -rf $(DESTDIR)$(pkgdocdir) $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
cp -dR ps $(DESTDIR)$(pkgdocdir)
cp -dR pdf $(DESTDIR)$(pkgdocdir)
+ $(INSTALL_DIR) $(DESTDIR)$(mandir)
+ cp -dR man1 $(DESTDIR)$(mandir)
+ cp -dR man5 $(DESTDIR)$(mandir)
[ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)

pdf/%.pdf: ps/%.ps

docs/man/xmdomain.cfg.pod.5 +87 -0

87 lines not on this page · raw message

docs/man/xm.pod.1 +5 -0
diff -urN xen-unstable.hg/docs/man/xm.pod.1 xen-unstable.sean/docs/man/xm.pod.1
@@ -0,0 +1,5 @@
+=head1 NAME
+
+xm - Xen management user interface
+
+

-Sean

Signature · 9 lines
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines

The following patch adds the beginnings of man pages to xen, specifically the xmdomain.cfg.5 man page, and a very small stub for xm.1, plus the build elements required. This is done using the pod (plain old text) markup and converting to man format with pod2man. If people like this, expect more work in the future to fill out these man pages as well as others.

I do like the idea of getting some manpages in.

The only danger is that of inconsistent documentation. Hopefully the docs will stay consistent with each other and with the tools themselves :-) The user manual is getting some attention, I believe, so that should help.

That said, it might be nice if we could somehow unify the command / config option help that's present in main.py and create.py of the xm package to either be generated from the docs or vice versa. Don't want to overcomplicate the build process but it'd be unfortunate to duplicate all this stuff.

docs/man/xmdomain.cfg.pod.5 line 19

Quoted 3 lines
docs/man/xmdomain.cfg.pod.5 +3 -0
+Domain configuration files live in /etc/xen by default, though the
+full path to the config file must be specified in the I<xm create>
+command, so they can exist anywhere in the filesystem.

Minor point: I think if you don't use -f, the default search path is in /etc/xen.

Personally, I'd also suggest that we actually patch the relevant files in the tools with a prominent warning reminding people what docs they should update when they touch those files (just as we put a big warning telling people to change the XC interface version when updating dom0_ops.c).

Cheers,
Mark