man: Add man page for find-remotes
authorMatthew Leeds <matthew.leeds@endlessm.com>
Thu, 11 Jan 2018 22:04:08 +0000 (14:04 -0800)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 15 Jan 2018 19:26:43 +0000 (19:26 +0000)
Closes: #1410
Approved by: pwithnall

Makefile-man.am
man/ostree-find-remotes.xml [new file with mode: 0644]
man/ostree.xml
src/ostree/ot-builtin-find-remotes.c

index b388152602deadd191b3add9fa7eabbc37918e33..c37272a6a91793a545005dcfac39b12198633fff 100644 (file)
@@ -41,6 +41,10 @@ if BUILDOPT_FUSE
 man1_files += rofiles-fuse.1
 endif
 
+if ENABLE_EXPERIMENTAL_API
+man1_files += ostree-find-remotes.1
+endif
+
 man5_files = ostree.repo.5 ostree.repo-config.5
 
 man1_MANS = $(addprefix man/,$(man1_files))
diff --git a/man/ostree-find-remotes.xml b/man/ostree-find-remotes.xml
new file mode 100644 (file)
index 0000000..ed13732
--- /dev/null
@@ -0,0 +1,131 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+Copyright 2018 Matthew Leeds <matthew.leeds@endlessm.com>
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+-->
+
+<refentry id="ostree">
+
+    <refentryinfo>
+        <title>ostree find-remotes</title>
+        <productname>OSTree</productname>
+
+        <authorgroup>
+            <author>
+                <contrib>Developer</contrib>
+                <firstname>Matthew</firstname>
+                <surname>Leeds</surname>
+                <email>matthew.leeds@endlessm.com</email>
+            </author>
+        </authorgroup>
+    </refentryinfo>
+
+    <refmeta>
+        <refentrytitle>ostree find-remotes</refentrytitle>
+        <manvolnum>1</manvolnum>
+    </refmeta>
+
+    <refnamediv>
+        <refname>ostree-find-remotes</refname>
+        <refpurpose>Find remotes to serve the given refs</refpurpose>
+    </refnamediv>
+
+    <refsynopsisdiv>
+            <cmdsynopsis>
+                <command>ostree find-remotes</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COLLECTION-ID</arg> <arg choice="req">REF</arg> <arg choice="opt" rep="repeat">COLLECTION-ID REF</arg>
+            </cmdsynopsis>
+    </refsynopsisdiv>
+
+    <refsect1>
+        <title>Description</title>
+
+        <!-- FIXME: Reword this when no longer in experimental -->
+        <para>
+            OSTree has the ability do pulls not just from configured remote
+            servers but also from peer computers on the LAN and from mounted
+            filesystems such as USB drives. Currently this requires compiling
+            OSTree with experimental API enabled, and it requires the use of
+            collection IDs and GPG verification.
+        </para>
+        <para>
+            The <command>find-remotes</command> command searches for remotes
+            which claim to provide one or more of the given COLLECTION-ID REF
+            pairs and prints information about them, with remotes sorted by
+            latency (Mounts > LAN > Internet). By default, OSTree searches for
+            remotes in configuration files, on mounted filesystems (in a
+            well-known location), and on the LAN using Avahi. Searching for LAN
+            remotes requires OSTree to have been compiled with Avahi support,
+            and it requires an Avahi daemon to be running. You can override the
+            default set of finders (sources for remotes) using the
+            <option>--finders</option> option documented below.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Options</title>
+
+        <variablelist>
+            <varlistentry>
+                <term><option>--disable-fsync</option></term>
+
+                <listitem><para>
+                  Do not invoke fsync().
+                </para>
+                </listitem>
+            </varlistentry>
+
+            <varlistentry>
+                <term><option>--finders</option>=FINDERS</term>
+
+                <listitem><para>
+                  Use the specified comma separated list of finders rather than
+                  the default set. Possible values: <literal>config</literal>,
+                  <literal>lan</literal>, and <literal>mount</literal> (or any
+                  combination thereof).
+                </para></listitem>
+            </varlistentry>
+
+            <varlistentry>
+                <term><option>--pull</option></term>
+
+                <listitem><para>
+                  Pull the most recent commit found for each ref.
+                </para></listitem>
+            </varlistentry>
+
+        </variablelist>
+    </refsect1>
+
+    <refsect1>
+        <title>Example</title>
+        <para><command>$ ostree find-remotes --finders=mount,lan com.exampleos.Os exampleos/x86_64/standard</command></para>
+<programlisting>
+Result 0: http://10.0.64.202:43381/0
+ - Finder: OstreeRepoFinderAvahi
+ - Keyring: exampleos.trustedkeys.gpg
+ - Priority: 60
+ - Summary last modified: 2018-01-12T19:00:28Z
+ - Refs:
+    - (com.exampleos.Os, exampleos/x86_64/standard) = c91acd964b3fda561b87bfb7f7c80e36220d76b567f0ce90c0e60742ef33c360
+
+1/1 refs were found.
+</programlisting>
+    </refsect1>
+</refentry>
index 940d81d7d0f09f9a62a83a8c1cbf3ba9140ad611..05b02c5df5a91c2f820a78f2e243e62af3065be2 100644 (file)
@@ -290,6 +290,15 @@ Boston, MA 02111-1307, USA.
                 </para></listitem>
             </varlistentry>
 
+            <!-- FIXME: Uncomment this when it's no longer experimental
+            <varlistentry>
+                <term><citerefentry><refentrytitle>ostree-find-remotes</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
+
+                <listitem><para>
+                    &nbsp;Find remotes to serve the given refs.
+                </para></listitem>
+            </varlistentry>-->
+
             <varlistentry>
                 <term><citerefentry><refentrytitle>ostree-fsck</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
 
index b99f6e6a6fb57d0e8ad4f5fe2e7628ada6a84d90..3df84a4f0008dbe6942e9072bf6a7d30bb654ba6 100644 (file)
@@ -164,7 +164,6 @@ validate_finders_list (char           **finders,
   return TRUE;
 }
 
-/* TODO: Add a man page. */
 gboolean
 ostree_builtin_find_remotes (int            argc,
                              char         **argv,