See below On Wed, Feb 17, 2010 at 4:46 PM, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote: > On Wed, 17 Feb 2010 11:16:43 +1100 > ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote: ... >> --- >> doc/Makefile | 17 ++++++- >> doc/htmlpages/tgtd.8.html | 40 +++++++++++++++ >> doc/manpages/tgtd.8 | 81 +++++++++++++++++++++++++++++ > > Do we need to add tgtd.8.html and tgtd.8? I thought that xsltproc > generates them from tgtd.8.xml? They are needed for the case when the user does not have xsltproc installed and configured. So for those users, they can still "make" and "make install" and these files are installed. These users just get the pregenerated ones that came from the git tree instead of updating/creating these files. Otherwise these users wouldn't get the docs, and forcing them to install xsltproc would be "rude". This way you only need to install xsltproc if you want to update and rebuild the docs. ... >> +manpages/tgtd.8: tgtd.8.xml >> + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< >> + >> +htmlpages/tgtd.8.html: tgtd.8.xml >> + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > > It means that it tries to connect to docbook.sf.net? If so, can we use > the local files instead? Good point. I have updated the makefile to use the local files. Attached is a new patch. regards ronnei sahlberg
Attachment:
0001-Add-documentation-about-the-tgtd-daemon-in-XSLT-form.patch.gz
Description: GNU Zip compressed data
From bb8b4965523a09ad3c64c490403b63ba80264781 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> Date: Wed, 17 Feb 2010 17:12:39 +1100 Subject: [PATCH] Add documentation about the tgtd daemon in XSLT format. If xsltproc is available, use this tool to compile this XSLT file into both manpage and html formats Add a directory doc/htmlpages to store html versions of manpages. These could also go to /usr/share/doc/tgt ? Check in both generated file, man and html, so that they are still available also for users that dont have xsltproc and thus can not build these documents. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> --- doc/Makefile | 17 ++++++- doc/htmlpages/tgtd.8.html | 40 +++++++++++++++ doc/manpages/tgtd.8 | 81 ++++++++++++++++++++++++++++++ doc/tgtd.8.xml | 122 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 259 insertions(+), 1 deletions(-) create mode 100644 doc/htmlpages/tgtd.8.html create mode 100644 doc/manpages/tgtd.8 create mode 100644 doc/tgtd.8.xml diff --git a/doc/Makefile b/doc/Makefile index f7cdfd3..2efbdfd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,10 +2,15 @@ mandir ?= $(PREFIX)/share/man docdir ?= $(PREFIX)/share/doc/tgt MANPAGES = manpages/tgtadm.8 manpages/tgt-admin.8 \ - manpages/tgt-setup-lun.8 + manpages/tgt-setup-lun.8 manpages/tgtd.8 + DOCS = README.fcoe README.ibmvstgt README.iscsi README.iser \ README.lu_configuration README.mmc tmf.txt +XSLTPROC = /usr/bin/xsltproc +XMLMAN = manpages/tgtd.8 +XMLHTML = htmlpages/tgtd.8.html + .PHONY:all all: @@ -19,3 +24,13 @@ install: $(MANPAGES) $(DOCS) .PHONY: clean clean: +manpages/tgtd.8: tgtd.8.xml + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl $< + +htmlpages/tgtd.8.html: tgtd.8.xml + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $< + +xmlman: $(XMLMAN) + +xmlhtml: $(XMLHTML) + diff --git a/doc/htmlpages/tgtd.8.html b/doc/htmlpages/tgtd.8.html new file mode 100644 index 0000000..f20c583 --- /dev/null +++ b/doc/htmlpages/tgtd.8.html @@ -0,0 +1,40 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>tgtd</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="tgtd.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tgtd — The SCSI Target Daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">tgtd</code> </p></div><div class="cmdsynopsis"><p><code class="command">tgtd</code> [-d --debug <INTEGER>] [-f --foregound] [-h --help] [--iscsi <...>]</p></div></div><div class="refsect1" lang="en"><a name="id2475832"></a><h2>DESCRIPTION</h2><p> + Tgtd is a SCSI Target daemon. It can be used to provide iSCSI target + service to a network. + </p></div><div class="refsect1" lang="en"><a name="id2475842"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-d --debug <INTEGER></span></dt><dd><p> + Set to non-zero value to activate additional debugging messages to + be logged. + </p></dd><dt><span class="term">-f --foreground</span></dt><dd><p> + Run the daemon in the foreground. + </p></dd><dt><span class="term">-h --help</span></dt><dd><p> + Print help text to the screen. + </p></dd><dt><span class="term">--iscsi <...></span></dt><dd><p> + ISCSI specific options. + See the ISCSI section below for options specific to this frontend. + </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2475909"></a><h2>ISCSI options</h2><p> + These parameters apply only to the iSCSI frontend. + </p><div class="refsect2" lang="en"><a name="id2475918"></a><h3>portal=<ip-address[:port]></h3><p> + This option is used to bind tgtd to a specific ip-address/portal and/or + port. By default tgtd will bind to port 3260 on the wildcard address. + </p><p> + Example: to bind tgtd to a specific address and port + </p><pre class="screen"> + tgtd --iscsi portal=192.0.2.1:3260 + </pre><p> + </p></div></div><div class="refsect1" lang="en"><a name="id2475942"></a><h2>SEE ALSO</h2><p> + tgtadm(8), tgt-admin(8), tgt-setup-lun(8). + <a class="ulink" href="http://stgt.sourceforge.net/" target="_top">http://stgt.sourceforge.net/</a> + </p></div><div class="refsect1" lang="en"><a name="id2475957"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br> +This program is free software; you can redistribute it and/or modify<br> +it under the terms of the GNU General Public License as published by<br> +the Free Software Foundation; either version 2 of the License, or (at<br> +your option) any later version.<br> +<br> +This program is distributed in the hope that it will be useful, but<br> +WITHOUT ANY WARRANTY; without even the implied warranty of<br> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br> +General Public License for more details.<br> +<br> +You should have received a copy of the GNU General Public License<br> +along with this program; if not, see http://www.gnu.org/licenses/.<br> +</p></div></div></div></body></html> diff --git a/doc/manpages/tgtd.8 b/doc/manpages/tgtd.8 new file mode 100644 index 0000000..a7100bc --- /dev/null +++ b/doc/manpages/tgtd.8 @@ -0,0 +1,81 @@ +.\" Title: tgtd +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> +.\" Date: 02/17/2010 +.\" Manual: +.\" Source: +.\" +.TH "TGTD" "8" "02/17/2010" "" "" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +tgtd - The SCSI Target Daemon +.SH "SYNOPSIS" +.HP 5 +\fBtgtd\fR +.HP 5 +\fBtgtd\fR [\-d\ \-\-debug\ <INTEGER>] [\-f\ \-\-foregound] [\-h\ \-\-help] [\-\-iscsi\ <\.\.\.>] +.SH "DESCRIPTION" +.PP +Tgtd is a SCSI Target daemon\. It can be used to provide iSCSI target service to a network\. +.SH "OPTIONS" +.PP +\-d \-\-debug <INTEGER> +.RS 4 +Set to non\-zero value to activate additional debugging messages to be logged\. +.RE +.PP +\-f \-\-foreground +.RS 4 +Run the daemon in the foreground\. +.RE +.PP +\-h \-\-help +.RS 4 +Print help text to the screen\. +.RE +.PP +\-\-iscsi <\.\.\.> +.RS 4 +ISCSI specific options\. See the ISCSI section below for options specific to this frontend\. +.RE +.SH "ISCSI OPTIONS" +.PP +These parameters apply only to the iSCSI frontend\. +.SS "portal=<ip\-address[:port]>" +.PP +This option is used to bind tgtd to a specific ip\-address/portal and/or port\. By default tgtd will bind to port 3260 on the wildcard address\. +.PP +Example: to bind tgtd to a specific address and port +.sp +.RS 4 +.nf + tgtd \-\-iscsi portal=192\.0\.2\.1:3260 + +.fi +.RE +.sp +.SH "SEE ALSO" +.PP +tgtadm(8), tgt\-admin(8), tgt\-setup\-lun(8)\. +\fI\%http://stgt.sourceforge.net/\fR +.SH "COPYRIGHT/LICENSE" +.sp +.RS 4 +.nf +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version\. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the GNU +General Public License for more details\. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www\.gnu\.org/licenses/\. +.fi +.RE diff --git a/doc/tgtd.8.xml b/doc/tgtd.8.xml new file mode 100644 index 0000000..c88a888 --- /dev/null +++ b/doc/tgtd.8.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<refentry id="tgtd.8"> + +<refmeta> + <refentrytitle>tgtd</refentrytitle> + <manvolnum>8</manvolnum> +</refmeta> + + +<refnamediv> + <refname>tgtd</refname> + <refpurpose>The SCSI Target Daemon</refpurpose> +</refnamediv> + +<refsynopsisdiv> + <cmdsynopsis> + <command>tgtd</command> + </cmdsynopsis> + + <cmdsynopsis> + <command>tgtd</command> + <arg choice="opt">-d --debug <INTEGER></arg> + <arg choice="opt">-f --foregound</arg> + <arg choice="opt">-h --help</arg> + <arg choice="opt">--iscsi <...></arg> + </cmdsynopsis> + +</refsynopsisdiv> + + <refsect1><title>DESCRIPTION</title> + <para> + Tgtd is a SCSI Target daemon. It can be used to provide iSCSI target + service to a network. + </para> + </refsect1> + + + <refsect1> + <title>OPTIONS</title> + + <variablelist> + <varlistentry><term>-d --debug <INTEGER></term> + <listitem> + <para> + Set to non-zero value to activate additional debugging messages to + be logged. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-f --foreground</term> + <listitem> + <para> + Run the daemon in the foreground. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-h --help</term> + <listitem> + <para> + Print help text to the screen. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--iscsi <...></term> + <listitem> + <para> + ISCSI specific options. + See the ISCSI section below for options specific to this frontend. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + + <refsect1><title>ISCSI options</title> + <para> + These parameters apply only to the iSCSI frontend. + </para> + + <refsect2><title>portal=<ip-address[:port]></title> + <para> + This option is used to bind tgtd to a specific ip-address/portal and/or + port. By default tgtd will bind to port 3260 on the wildcard address. + </para> + <para> + Example: to bind tgtd to a specific address and port + <screen format="linespecific"> + tgtd --iscsi portal=192.0.2.1:3260 + </screen> + </para> + </refsect2> + </refsect1> + + + <refsect1><title>SEE ALSO</title> + <para> + tgtadm(8), tgt-admin(8), tgt-setup-lun(8). + <ulink url="http://stgt.sourceforge.net/"/> + </para> + </refsect1> + + <refsect1><title>COPYRIGHT/LICENSE</title> +<literallayout> +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +</literallayout> + </refsect1> +</refentry> -- 1.5.4.3