diff --git a/Makefile-man.am b/Makefile-man.am
index 4d99cde1..342af520 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -45,7 +45,7 @@ man1_files += rofiles-fuse.1
endif
if ENABLE_EXPERIMENTAL_API
-man1_files += ostree-find-remotes.1
+man1_files += ostree-find-remotes.1 ostree-create-usb.1
endif
man5_files = ostree.repo.5 ostree.repo-config.5
diff --git a/man/ostree-create-usb.xml b/man/ostree-create-usb.xml
new file mode 100644
index 00000000..d250d915
--- /dev/null
+++ b/man/ostree-create-usb.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ ostree create-usb
+ OSTree
+
+
+
+ Developer
+ Matthew
+ Leeds
+ matthew.leeds@endlessm.com
+
+
+
+
+
+ ostree create-usb
+ 1
+
+
+
+ ostree-create-usb
+ Put the given refs on an external drive for P2P distribution.
+
+
+
+
+ ostree create-usbOPTIONSMOUNT-PATHCOLLECTION-ID REFCOLLECTION-ID REF
+
+
+
+
+ Description
+
+
+ This command creates a repository in MOUNT-PATH and pulls the given
+ REF(s) into it so they can be found and pulled from (perhaps by another computer that's offline).
+ See
+ ostree-find-remotes1
+ for more information on P2P distribution.
+
+
+ In order for ostree to pull refs from a mounted filesystem (such as
+ a USB drive) the repo must be in a standard location. Specifically,
+ subdirectories of .ostree/repos.d are checked,
+ then .ostree/repo, ostree/repo,
+ and var/lib/flatpak/repo are checked. By default
+ ostree create-usb uses .ostree/repo,
+ but if you specify another location using
+ a symbolic link will be created for you in .ostree/repos.d.
+
+
+ This command will regenerate the summary file
+ in the destination repo so that it stays accurate, so you shouldn't
+ try to use summary signatures in the destination repo. This
+ shouldn't be a concern because clients that support pulling from
+ USB mounts use signed per-repo and per-commit metadata instead of
+ summary signatures.
+
+
+ This command relies on the summary file in the source repo, so you
+ may want to run ostree summary -u before running
+ this command.
+
+
+
+
+ Options
+
+
+
+
+
+
+ Do not invoke fsync().
+
+
+
+
+
+ =DEST
+
+
+ Create the repository in DEST under MOUNT-PATH, rather than
+ the default location.
+
+
+
+
+
+
+
+ Example
+ ostree --repo=/var/lib/flatpak/repo create-usb /run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be com.exampleos.Apps app/org.kde.Khangman/x86_64/stable com.exampleos.Apps ostree-metadata com.exampleos.Apps appstream/x86_64
+
+
+5 metadata, 213 content objects imported; 1 KiB transferred in 1 seconds Copied 3/3 refs successfully from ‘/var/lib/flatpak/repo’ to ‘.ostree/repo’ repository in ‘/run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be’.
+
+
+
+
diff --git a/man/ostree-find-remotes.xml b/man/ostree-find-remotes.xml
index f0208b7c..15f5a516 100644
--- a/man/ostree-find-remotes.xml
+++ b/man/ostree-find-remotes.xml
@@ -78,6 +78,12 @@ Boston, MA 02111-1307, USA.
default set of finders (sources for remotes) using the
option documented below.
+
+ The create-usb command is the recommended way to
+ put refs on a USB such that find-remotes will
+ discover them. See
+ ostree-create-usb1.
+
diff --git a/man/ostree.xml b/man/ostree.xml
index 06076c45..8a79cd04 100644
--- a/man/ostree.xml
+++ b/man/ostree.xml
@@ -283,6 +283,15 @@ Boston, MA 02111-1307, USA.
+
+
ostree-diff1
diff --git a/src/libostree/ostree-repo-finder-mount.c b/src/libostree/ostree-repo-finder-mount.c
index 7339fe52..09e85035 100644
--- a/src/libostree/ostree-repo-finder-mount.c
+++ b/src/libostree/ostree-repo-finder-mount.c
@@ -434,7 +434,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_array_sort (repos_refs, repo_and_refs_compare);
/* Also check the well-known special-case directories in the mount.
- * Add them after sorting, so they’re always last. */
+ * Add them after sorting, so they’re always last.
+ * NOTE: If you change these, update the man page. */
const gchar * const well_known_repos[] =
{
".ostree/repo",
diff --git a/src/ostree/ot-builtin-create-usb.c b/src/ostree/ot-builtin-create-usb.c
index 07a214c6..57feeaa1 100644
--- a/src/ostree/ot-builtin-create-usb.c
+++ b/src/ostree/ot-builtin-create-usb.c
@@ -41,7 +41,6 @@ static GOptionEntry options[] =
{ NULL }
};
-/* TODO: Add a man page. */
gboolean
ostree_builtin_create_usb (int argc,
char **argv,