diff --git a/Makefile-ostree.am b/Makefile-ostree.am
index 05498101..8c8f8a2f 100644
--- a/Makefile-ostree.am
+++ b/Makefile-ostree.am
@@ -54,3 +54,5 @@ ostree_pull_SOURCES = src/ostree/ot-main.h \
ostree_pull_CFLAGS = $(ostree_bin_shared_cflags) $(OT_DEP_SOUP_CFLAGS)
ostree_pull_LDADD = $(ostree_bin_shared_ldadd) $(OT_DEP_SOUP_LIBS)
endif
+
+MANPAGES += doc/ostree.1
diff --git a/Makefile.am b/Makefile.am
index 755e7f5f..88693896 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
NULL =
BUILT_SOURCES =
+MANPAGES =
CLEANFILES =
EXTRA_DIST =
bin_PROGRAMS =
@@ -37,3 +38,43 @@ include Makefile-libostree.am
include Makefile-ostree.am
include Makefile-ostbuild.am
include Makefile-triggers.am
+
+# Docbook generation copied from systemd/Makefile.am
+#
+# Copyright 2010 Lennart Poettering
+#
+# systemd 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.
+#
+# systemd 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 systemd; If not, see .
+
+XML_FILES = \
+ ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
+EXTRA_DIST += $(XML_FILES)
+
+if HAVE_XSLTPROC
+
+dist_man_MANS = $(MANPAGES)
+
+XSLTPROC_FLAGS = \
+ --nonet \
+ --param funcsynopsis.style "'ansi'"
+
+XSLTPROC_PROCESS_MAN = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+doc/%.1: doc/%.xml
+ $(XSLTPROC_PROCESS_MAN)
+
+endif
+
+
diff --git a/configure.ac b/configure.ac
index b47e1055..b9f1ed70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,9 @@ AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
AM_PATH_PYTHON([2.7])
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
+
AC_CONFIG_FILES([
Makefile
])
diff --git a/doc/ostree.xml b/doc/ostree.xml
new file mode 100644
index 00000000..c7852292
--- /dev/null
+++ b/doc/ostree.xml
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+ ostree
+ OSTree
+
+
+
+ Developer
+ Colin
+ Walters
+ walters@verbum.org
+
+
+
+
+
+ ostree
+ 1
+
+
+
+ ostree
+ Operating system build, deployment, and development tool
+
+
+
+
+ ostree --repo=REPOCOMMANDOPTIONS
+
+
+
+
+ Description
+
+ OSTree is a system for building, deploying, and
+ developing Linux-based operating systems. For many
+ cases, it can fill the role of "package managers" such
+ as RPM and .deb.
+ At its heart, OSTree is very similar to git -
+ but it is designed explicitly for managing files like
+ ELF binaries. Unlike a typical version control
+ system, OSTree is capable of tracking file UID and
+ GIDs, as well as all extended attributes such as ACLs
+ and SELinux security contexts. You should think of
+ OSTree as a flexible but specialized userspace
+ filesystem.
+
+
+
+ Options
+
+ The following options are understood:
+
+
+
+
+
+ For most commands,
+ when run as non-root, repository is
+ required. If
+ ostree is run as
+ root, it is assumed operations will be
+ performed on the
+ /sysroot/ostree/repo
+ repository.
+
+
+
+
+
+ The following commands are understood:
+
+
+
+ checkout
+
+ Extract a given branch into the filesystem.
+
+
+ checksum
+
+ Compute the OSTree checksum of the given files.
+
+
+ diff
+
+ Concisely list differences between the given branch revisions,
+ without checking them out into the filesystem.
+
+
+ init
+
+ Initialize a repository.
+
+
+
+ commit
+
+ Given one or more
+ trees (from the local filesystem, a
+ tarball, or a specified revision for
+ example), create a new commit using those contents.
+
+
+
+ compose
+
+ A specialized type of
+ commit, intended for merging together
+ many separate filesystem trees such as
+ build artifacts.
+
+
+ local-clone
+
+ Efficiently copy
+ objects and references from one local
+ repository into another.
+
+
+
+ log
+
+ Show revision log.
+
+
+ ls
+
+ List the contents of a given commit.
+
+
+ fsck
+
+ Check a repository for consistency.
+
+
+ remote
+
+ Manipulate remote archive configuration.
+
+
+ rev-parse
+
+ Show the SHA256 corresponding to a given rev.
+
+
+ run-triggers
+
+ Regenerate cache files in the given operating system tree.
+
+
+
+ show
+
+ Given an OSTree SHA256 checksum, display its contents.
+
+
+
+
+
+
+ Exit status
+
+ On success 0 is returned, a non-zero failure
+ code otherwise.
+
+
+
+ Environment
+
+
+
+ $PAGER
+ ostree respects the traditional pager envrionment variable.
+
+
+
+
+
+ See Also
+
+ ostbuild1
+
+
+
+