Man page improvements

Closes #3311.
This commit is contained in:
Roger A. Light 2025-07-31 15:13:51 +01:00
parent 0e2bd89fe0
commit c48a4122f4
16 changed files with 257 additions and 57 deletions

7
.gitignore vendored
View file

@ -83,10 +83,11 @@ lib/cpp/libmosquittopp.a
lib/libmosquitto.so*
lib/libmosquitto.a
man/mosquitto.8
man/mosquitto-tls.7
man/mosquitto.conf.5
man/libmosquitto.3
man/mosquitto-tls.7
man/mosquitto.7
man/mosquitto.8
man/mosquitto.conf.5
man/mosquitto_ctrl.1
man/mosquitto_ctrl_dynsec.1
man/mosquitto_ctrl_shell.1

View file

@ -6,4 +6,6 @@ user roger
topic foo/bar
# This affects all clients.
# Note that this is the only topic it is possible to grant access to writing to
# the $SYS tree. All other topics are always denied.
pattern write $SYS/broker/connection/%c/state

View file

@ -13,19 +13,20 @@ if(XSLTPROC AND NOT WIN32)
add_custom_target(${page} ALL DEPENDS ${PROJECT_SOURCE_DIR}/man/${page})
endfunction()
compile_manpage("libmosquitto.3")
compile_manpage("mosquitto-tls.7")
compile_manpage("mosquitto.7")
compile_manpage("mosquitto.8")
compile_manpage("mosquitto.conf.5")
compile_manpage("mosquitto_ctrl.1")
compile_manpage("mosquitto_ctrl_dynsec.1")
compile_manpage("mosquitto_ctrl_shell.1")
compile_manpage("mosquitto_passwd.1")
compile_manpage("mosquitto_pub.1")
compile_manpage("mosquitto_sub.1")
compile_manpage("mosquitto_rr.1")
compile_manpage("mosquitto_signal.1")
compile_manpage("libmosquitto.3")
compile_manpage("mosquitto.conf.5")
compile_manpage("mosquitto-tls.7")
compile_manpage("mosquitto_sub.1")
compile_manpage("mqtt.7")
compile_manpage("mosquitto.8")
install(FILES
mosquitto_ctrl.1
@ -41,7 +42,12 @@ if(XSLTPROC AND NOT WIN32)
install(FILES libmosquitto.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 OPTIONAL)
install(FILES mosquitto.conf.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5 OPTIONAL)
install(FILES mosquitto-tls.7 mqtt.7 DESTINATION ${CMAKE_INSTALL_MANDIR}/man7 OPTIONAL)
install(FILES
mosquitto-tls.7
mosquitto.7
mqtt.7
DESTINATION ${CMAKE_INSTALL_MANDIR}/man7 OPTIONAL
)
install(FILES mosquitto.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 OPTIONAL)
elseif(WIN32)

View file

@ -6,6 +6,7 @@ include ${R}/config.mk
MANPAGES = \
libmosquitto.3 \
mosquitto-tls.7 \
mosquitto.7 \
mosquitto.8 \
mosquitto.conf.5 \
mosquitto_ctrl.1 \
@ -29,39 +30,41 @@ reallyclean : clean
dist : ${MANPAGES}
install :
$(INSTALL) -d "${DESTDIR}$(mandir)/man8"
$(INSTALL) -m 644 mosquitto.8 "${DESTDIR}${mandir}/man8/mosquitto.8"
$(INSTALL) -d "${DESTDIR}$(mandir)/man5"
$(INSTALL) -m 644 mosquitto.conf.5 "${DESTDIR}${mandir}/man5/mosquitto.conf.5"
$(INSTALL) -d "${DESTDIR}$(mandir)/man1"
$(INSTALL) -m 644 mosquitto_ctrl.1 "${DESTDIR}${mandir}/man1/mosquitto_ctrl.1"
$(INSTALL) -m 644 mosquitto_ctrl_dynsec.1 "${DESTDIR}${mandir}/man1/mosquitto_ctrl_dynsec.1"
$(INSTALL) -m 644 mosquitto_ctrl_shell.1 "${DESTDIR}${mandir}/man1/mosquitto_ctrl_shell.1"
$(INSTALL) -m 644 mosquitto_passwd.1 "${DESTDIR}${mandir}/man1/mosquitto_passwd.1"
$(INSTALL) -m 644 mosquitto_pub.1 "${DESTDIR}${mandir}/man1/mosquitto_pub.1"
$(INSTALL) -m 644 mosquitto_sub.1 "${DESTDIR}${mandir}/man1/mosquitto_sub.1"
$(INSTALL) -m 644 mosquitto_rr.1 "${DESTDIR}${mandir}/man1/mosquitto_rr.1"
$(INSTALL) -m 644 mosquitto_signal.1 "${DESTDIR}${mandir}/man1/mosquitto_signal.1"
$(INSTALL) -d "${DESTDIR}$(mandir)/man7"
$(INSTALL) -m 644 mqtt.7 "${DESTDIR}${mandir}/man7/mqtt.7"
$(INSTALL) -m 644 mosquitto-tls.7 "${DESTDIR}${mandir}/man7/mosquitto-tls.7"
$(INSTALL) -m 644 mosquitto_sub.1 "${DESTDIR}${mandir}/man1/mosquitto_sub.1"
$(INSTALL) -d "${DESTDIR}$(mandir)/man3"
$(INSTALL) -m 644 libmosquitto.3 "${DESTDIR}${mandir}/man3/libmosquitto.3"
$(INSTALL) -d "${DESTDIR}$(mandir)/man5"
$(INSTALL) -m 644 mosquitto.conf.5 "${DESTDIR}${mandir}/man5/mosquitto.conf.5"
$(INSTALL) -d "${DESTDIR}$(mandir)/man7"
$(INSTALL) -m 644 mosquitto.7 "${DESTDIR}${mandir}/man7/mosquitto.7"
$(INSTALL) -m 644 mosquitto-tls.7 "${DESTDIR}${mandir}/man7/mosquitto-tls.7"
$(INSTALL) -m 644 mqtt.7 "${DESTDIR}${mandir}/man7/mqtt.7"
$(INSTALL) -d "${DESTDIR}$(mandir)/man8"
$(INSTALL) -m 644 mosquitto.8 "${DESTDIR}${mandir}/man8/mosquitto.8"
uninstall :
-rm -f "${DESTDIR}${mandir}/man8/mosquitto.8"
-rm -f "${DESTDIR}${mandir}/man5/mosquitto.conf.5"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_ctrl.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_ctrl_dynsec.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_ctrl_shell.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_passwd.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_pub.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_sub.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_rr.1"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_signal.1"
-rm -f "${DESTDIR}${mandir}/man7/mqtt.7"
-rm -f "${DESTDIR}${mandir}/man7/mosquitto-tls.7"
-rm -f "${DESTDIR}${mandir}/man1/mosquitto_sub.1"
-rm -f "${DESTDIR}${mandir}/man3/libmosquitto.3"
-rm -f "${DESTDIR}${mandir}/man5/mosquitto.conf.5"
-rm -f "${DESTDIR}${mandir}/man7/mosquitto-tls.7"
-rm -f "${DESTDIR}${mandir}/man7/mosquitto.7"
-rm -f "${DESTDIR}${mandir}/man7/mqtt.7"
-rm -f "${DESTDIR}${mandir}/man8/mosquitto.8"
% : %.xml %.meta manpage.xsl
$(XSLTPROC) --xinclude $<
@ -74,6 +77,7 @@ html : *.xml
done
potgen :
xml2po -o po/mosquitto/mosquitto.7.pot mosquitto.7.xml
xml2po -o po/mosquitto/mosquitto.8.pot mosquitto.8.xml
xml2po -o po/mosquitto.conf/mosquitto.conf.5.pot mosquitto.conf.5.xml
xml2po -o po/mosquitto_ctrl/mosquitto_ctrl.1.pot mosquitto_ctrl.1.xml

5
man/mosquitto.7.meta Normal file
View file

@ -0,0 +1,5 @@
.. title: Mosquitto man page
.. slug: mosquitto-7
.. category: man
.. type: man
.. pretty_url: False

161
man/mosquitto.7.xml Normal file
View file

@ -0,0 +1,161 @@
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="manpage.xsl"?>
<refentry xml:id="mosquitto" xmlns:xlink="http://www.w3.org/1999/xlink">
<refmeta>
<refentrytitle>mosquitto</refentrytitle>
<manvolnum>7</manvolnum>
<refmiscinfo class="source">Mosquitto Project</refmiscinfo>
<refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
</refmeta>
<refnamediv>
<refname>mosquitto</refname>
<refpurpose>Project overview</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
The mosquitto project contains MQTT related programs, and comprises
the mosquitto broker and applications, command line clients, and a
client library for implementing custom MQTT clients. A brief description
of some MQTT features is available at
<citerefentry><refentrytitle><link xlink:href="mqtt-7.html">mqtt</link></refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
<para>
Mosquitto is an
<link xlink:href="https://projects.eclipse.org/projects/iot.mosquitto">Eclipse Foundation project</link>,
part of the <link xlink:href="https://iot.eclipse.org/">IoT top level project</link>.
</para>
<para>
The project home page is at
<link xlink:href="https://mosquitto.org/">mosquitto.org</link>,
the github project is at
<link xlink:href="https://github.com/eclipse-mosquitto/mosquitto/">github.com/eclipse-mosquitto/mosquitto</link>,
and the project provides a public MQTT test broker available at
<link xlink:href="https://test.mosquitto.org/">test.mosquitto.org</link>.
</para>
<para>
Development is driven by <link xlink:href="https://cedalo.com/">Cedalo</link>,
who also provide professional support and enterprise features for mosquitto.
</para>
</refsect1>
<!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/all-man-pages.xml" />-->
<refsect1>
<title>Mosquitto Broker</title>
<para>
The mosquitto broker is the core of the project. Details on starting the broker, MQTT support, and feature descriptions can be found in
<citerefentry><refentrytitle><link xlink:href="mosquitto-8.html">mosquitto</link></refentrytitle><manvolnum>8</manvolnum></citerefentry>. A full description of the configuration file format can be found in <citerefentry><refentrytitle><link xlink:href="mosquitto-conf-5.html">mosquitto.conf</link></refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
</refsect1>
<refsect1>
<title>Mosquitto Broker Applications</title>
<para>
These command line applications directly support the running of the
mosquitto broker.
</para>
<refsect2>
<title>mosquitto_ctrl</title>
<para>
This can be used to interact with the broker MQTT APIs when the
broker is running. It can run in batch mode, where all arguments
are provided on the command line, or in an interactive shell
mode.
</para>
<para>
The batch mode is described in
<citerefentry><refentrytitle><link xlink:href="mosquitto_ctrl-1.html">mosquitto_ctrl</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>,
with the Dynamic Security module described in
<citerefentry><refentrytitle><link xlink:href="mosquitto_ctrl_dynsec-1.html">mosquitto_ctrl_dynsec</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
<refsect2>
<title>mosquitto_passwd</title>
<para>
This tool is used to generate and modify password files that can
be used with the <option>mosquitto_password_file</option> plugin
or <option>password_file</option> configuration option. It is
described in
<citerefentry><refentrytitle><link xlink:href="mosquitto_passwd-1.html">mosquitto_passwd</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
<refsect2>
<title>mosquitto_signal</title>
<para>
This tool is used to send signals to the broker. On POSIX systems it
performs the same task as the <command>kill</command> command, but
with named signals. On Windows it is the only method of sending
signals to the broker. It is described in
<citerefentry><refentrytitle><link xlink:href="mosquitto_signal-1.html">mosquitto_signal</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Mosquitto MQTT Command Line Clients</title>
<para>
These command line tools act as MQTT clients and can be useful for
testing and automation of tasks related to any MQTT broker.
</para>
<refsect2>
<title>mosquitto_pub</title>
<para>
This client can publish messages to a broker. It supports sending
simple messages from the command line, reading from stdin, and
sending files. It is described at
<citerefentry><refentrytitle><link xlink:href="mosquitto_pub-1.html">mosquitto_pub</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
<refsect2>
<title>mosquitto_rr</title>
<para>
This client operates in a request/response style by sending a
single message to a broker and waiting for a response on another
topic. Request/response support is an MQTT v5.0 feature, but it
is not required most cases for this client. It is described at
<citerefentry><refentrytitle><link xlink:href="mosquitto_rr-1.html">mosquitto_rr</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
<refsect2>
<title>mosquitto_sub</title>
<para>
This client subscribes to topics on the broker and prints
messages that it receives. It has a wide variety of output
options. It is described at
<citerefentry><refentrytitle><link xlink:href="mosquitto_sub-1.html">mosquitto_sub</link></refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Mosquitto Client Library</title>
<para>
The Mosquitto client library is described at
<citerefentry><refentrytitle><link xlink:href="libmosquitto-3.html">libmosquitto</link></refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
</refsect1>
<refsect1>
<title>Author</title>
<para>Roger Light <email>roger@atchoo.org</email></para>
</refsect1>
</refentry>

View file

@ -6,7 +6,7 @@
<refentrytitle>mosquitto</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class="source">Mosquitto Project</refmiscinfo>
<refmiscinfo class="manual">System management commands</refmiscinfo>
<refmiscinfo class="manual">Mosquitto</refmiscinfo>
</refmeta>
<refnamediv>
@ -32,6 +32,11 @@
<refsect1>
<title>Description</title>
<para><command>mosquitto</command> is a broker for the MQTT protocol version 5.0/3.1.1/3.1.</para>
<para>
It is part of the overall mosquitto project. See
<citerefentry><refentrytitle><link xlink:href="mosquitto-7.html">mosquitto</link></refentrytitle><manvolnum>7</manvolnum></citerefentry>
for an overview of all man pages.
</para>
</refsect1>
<refsect1>
@ -934,7 +939,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>
@ -958,12 +963,6 @@
<manvolnum>5</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle><link xlink:href="https://linux.die.net/man/5/hosts_access">hosts_access</link></refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle><link xlink:href="mosquitto_ctrl-1.html">mosquitto_ctrl</link></refentrytitle>

View file

@ -180,6 +180,14 @@
<varlistentry>
<term><option>acl_file</option> <replaceable>file path</replaceable></term>
<listitem>
<para>
<emphasis>Note:</emphasis> It is suggested that you use the
<option>mosquitto_acl_file</option> plugin instead of this
option. Using plugins for authentication and authorisation
allows greater control of what listeners they are applied to,
without the need for the deprecated
<option>per_listener_settings</option> option.
</para>
<para>Set the path to an access control list file. If
defined, the contents of the file are used to control
client access to topics on the broker.</para>
@ -216,7 +224,7 @@
keyword.</para>
<para><code>pattern [read|write|readwrite|deny] &lt;topic&gt;</code></para>
<para>The patterns available for substition are:</para>
<para>The patterns available for substitution are:</para>
<itemizedlist mark="circle">
<listitem><para>%c to match the client id of the client</para></listitem>
<listitem><para>%u to match the username of the client</para></listitem>
@ -241,6 +249,11 @@
<replaceable>false</replaceable>, this option applies
to all listeners.</para>
<para>
Note: In general it is not possible to grant write
access to topics in the $SYS topic tree. The exception
is <replaceable>$SYS/broker/connection/+/state</replaceable>.
</para>
<para>Reloaded on reload signal. The currently loaded ACLs
will be freed and reloaded. Existing subscriptions will
be affected after the reload.</para>
@ -890,6 +903,15 @@ log_timestamp_format %Y-%m-%dT%H:%M:%S
<varlistentry>
<term><option>password_file</option> <replaceable>file path</replaceable></term>
<listitem>
<para>
<emphasis>Note:</emphasis> It is suggested that you use the
<option>mosquitto_password_file</option> plugin instead of this
option. Using plugins for authentication and authorisation
allows greater control of what listeners they are applied to,
without the need for the deprecated
<option>per_listener_settings</option> option.
</para>
<para>Set the path to a password file. If defined, the
contents of the file are used to control client access
to the broker. The file can be created using the
@ -2728,7 +2750,7 @@ topic clients/total in 0 test/mosquitto/org/ $SYS/broker/
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -644,7 +644,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -50,7 +50,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -372,7 +372,7 @@ OK</programlisting>
<title>Bugs</title>
<para>
<command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/>
</para>
</refsect1>

View file

@ -217,7 +217,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -935,7 +935,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -1051,7 +1051,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -166,7 +166,7 @@
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>

View file

@ -1355,7 +1355,7 @@ mosquitto_sub -t 'bbc/#' -T bbc/bbc1 --remove-retained</programlisting>
<refsect1>
<title>Bugs</title>
<para><command>mosquitto</command> bug information can be found at
<ulink url="https://github.com/eclipse/mosquitto/issues"/></para>
<ulink url="https://github.com/eclipse-mosquitto/mosquitto/issues"/></para>
</refsect1>
<refsect1>