diff --git a/Makefile.am b/Makefile.am index 1d3882bf..1b600468 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,9 @@ NULL = +if BUILD_DOCUMENTATION +SUBDIRS = doc +endif + AM_CPPFLAGS = \ -DXDG_APP_BASEDIR=\"$(datadir)/xdg-app\" \ -DHELPER=\"$(bindir)/xdg-app-helper\" \ diff --git a/configure.ac b/configure.ac index b22bb898..68008c03 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,19 @@ AC_ARG_ENABLE(sudo, [SUDO_BIN="sudo"], [SUDO_BIN=""]) AC_SUBST([SUDO_BIN]) +AC_ARG_ENABLE(documentation, + AC_HELP_STRING([--enable-documentation], [Build documentation]),, + enable_documentation=yes) +if test x$enable_documentation = xyes; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test x$XSLTPROC = x; then + AC_MSG_ERROR([xsltproc is required to build documentation]) + fi +fi +AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes) + AC_CONFIG_FILES([ Makefile +doc/Makefile ]) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..43a7b6c6 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,31 @@ +NULL = + +XSLTPROC_FLAGS = \ + --nonet \ + --stringparam man.output.quietly 1 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.th.extra1.suppress 1 \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 \ + $(NULL) + +.xml.1: + $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + +man_MANS = \ + xdg-app.1 \ + xdg-app-add-repo.1 \ + xdg-app-install-runtime.1 \ + xdg-app-update-runtime.1 \ + xdg-app-install-app.1 \ + xdg-app-update-app.1 \ + xdg-app-run.1 \ + xdg-app-build-init.1 \ + xdg-app-build.1 \ + $(NULL) + +xml_files = $(man_MANS:.1=.xml) + +EXTRA_DIST = $(xml_files) + +DISTCLEANFILES = $(man_MANS) diff --git a/doc/xdg-app-add-repo.xml b/doc/xdg-app-add-repo.xml new file mode 100644 index 00000000..5306fd1a --- /dev/null +++ b/doc/xdg-app-add-repo.xml @@ -0,0 +1,136 @@ + + + + + + + dxg-app add-remo + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app add-repo + 1 + + + + xdg-app-add-repo + Add a remote repository + + + + + xdg-app add-repo + OPTION + NAME + URL + + + + + Description + + + Adds a remote repository configuration. NAME + is the name for the new remote, and URL is + the location for the repository. + + + xdg-app can operate in system-wide or per-user mode. The system-wide + repository is located in $prefix/share/xdg-app/repo, + and the per-user repository is in $HOME/.local/share/xdg-app/repo. + + + xdg-app uses OSTree, and the repositories it uses are OSTree repositories + that can be manipulated with the ostree utility. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Work on the per-user configuration instead of the system-wide + configuration. + + + + + + + + Disable GPG verification for the added remote.. + + + + + + + + Do nothing if the provided remote already exists. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app --user add-repo --no-gpg-verify test-repo https://people.gnome.org/~alexl/gnome-sdk/repo/ + + + + + See also + + + ostree1 + ostree.repo5 + + + + diff --git a/doc/xdg-app-build-init.xml b/doc/xdg-app-build-init.xml new file mode 100644 index 00000000..ed4e2684 --- /dev/null +++ b/doc/xdg-app-build-init.xml @@ -0,0 +1,132 @@ + + + + + + + dxg-app build-init + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app build-init + 1 + + + + xdg-app-build-init + Initialize a build directory + + + + + xdg-app build-init + OPTION + DIRECTORY + SDK + RUNTIME + BRANCH + + + + + Description + + + Initializes a directory for building an application. + DIRECTORY is the name of the directory. + SDK and RUNTIME + specify the sdk and runtime that the application should be built + against and run in. + + + The result of this command is that a metadata + is created inside the given directory. Additionally, empty + files and var subdirectories + are created. + + + It is an error to run build-init on a directory that has already + been initialized as a build directory. + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + The architecture to use. + + + + + + + + + The application name. + + + + + + + + + Initialize var from the named runtime. + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app build-init /build/my-app org.gnome.Sdk org.gnome.Platform 3.16 + + + + + diff --git a/doc/xdg-app-build.xml b/doc/xdg-app-build.xml new file mode 100644 index 00000000..878948d1 --- /dev/null +++ b/doc/xdg-app-build.xml @@ -0,0 +1,84 @@ + + + + + + + dxg-app build + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app build + 1 + + + + xdg-app-build + Build in a directory + + + + + xdg-app build + OPTION + DIRECTORY + COMMAND ARG + + + + + Description + + + Runs a build command in a directory. DIRECTORY + must have been initialized with xdg-app build-init. + + + The sdk that is specfied in the metadata for the + directory is mounted at /usr and the + files and var subdirectories + are mounted at /self and /var, + respectively. They are writable, and their contents are preserved between + build commands, to allow accumulating build artifacts there. + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Examples + + + $ xdg-app build /build/my-app rpmbuild my-app.src.rpm + + + + + diff --git a/doc/xdg-app-install-app.xml b/doc/xdg-app-install-app.xml new file mode 100644 index 00000000..9d90c951 --- /dev/null +++ b/doc/xdg-app-install-app.xml @@ -0,0 +1,123 @@ + + + + + + + dxg-app install-app + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app install-app + 1 + + + + xdg-app-install-app + Install an application + + + + + xdg-app install-app + OPTION + REPOSITORY + APP + BRANCH + + + + + Description + + + Installs an application. REPOSITORY must + name an existing remote. APP is the + name of the application to install. Optionally, + BRANCH can be specified to install a specific + branch. Note that xdg-app allows to have multiple branches of an + application installed at the same time. + + + xdg-app can operate in system-wide or per-user mode. The system-wide + applications are located in $prefix/share/xdg-app/app, + and the per-user runtimes are in $HOME/.local/share/xdg-app/app. + + + xdg-app uses OSTree, and installed applications are OSTree checkouts. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Work on the per-user configuration instead of the system-wide + configuration. + + + + + + + + The architecture to install for. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app --user install-app test-repo org.gnome.GEdit + + + + + diff --git a/doc/xdg-app-install-runtime.xml b/doc/xdg-app-install-runtime.xml new file mode 100644 index 00000000..a1428b58 --- /dev/null +++ b/doc/xdg-app-install-runtime.xml @@ -0,0 +1,123 @@ + + + + + + + dxg-app install-runtime + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app install-runtime + 1 + + + + xdg-app-install-runtime + Install a runtime + + + + + xdg-app install-runtime + OPTION + REPOSITORY + RUNTIME + BRANCH + + + + + Description + + + Installs a runtime. REPOSITORY must + name an existing remote. RUNTIME is the + name of the runtime to install. Optionally, + BRANCH can be specified to install a specific + branch. Note that xdg-app allows having multiple branches of a runtime + installed and used at the same time. + + + xdg-app can operate in system-wide or per-user mode. The system-wide + runtimes are located in $prefix/share/xdg-app/runtime, + and the per-user runtimes are in $HOME/.local/share/xdg-app/runtinme. + + + xdg-app uses OSTree, and installed runtimes are OSTree checkouts. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Work on the per-user configuration instead of the system-wide + configuration. + + + + + + + + The architecture to install for. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app --user install-runtime test-repo org.gnome.Platform 3.14 + + + + + diff --git a/doc/xdg-app-run.xml b/doc/xdg-app-run.xml new file mode 100644 index 00000000..6ef7890e --- /dev/null +++ b/doc/xdg-app-run.xml @@ -0,0 +1,83 @@ + + + + + + + dxg-app run + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app run + 1 + + + + xdg-app-run + Run an application + + + + + xdg-app run + OPTION + APP + ARG + + + + + Description + + + Runs an application in a sandboxed environment. APP must + name an installed application. + + + xdg-app creates a sandboxed environment for the application to run in + by mounting the right runtime at /usr and a writable + directory at /var, whose content is preserved between + application runs. The application itself is mounted at /self. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Examples + + + $ xdg-app run org.gnome.GEdit + + + + + diff --git a/doc/xdg-app-update-app.xml b/doc/xdg-app-update-app.xml new file mode 100644 index 00000000..eab26cb5 --- /dev/null +++ b/doc/xdg-app-update-app.xml @@ -0,0 +1,112 @@ + + + + + + + dxg-app update-app + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app update-app + 1 + + + + xdg-app-update-app + Update a runtime + + + + + xdg-app update-app + OPTION + APP + BRANCH + + + + + Description + + + Updates an application. APP is the + name of an installed application. Optionally, + BRANCH can be specified to update a + specific branch. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Work on the per-user configuration instead of the system-wide + configuration. + + + + + + + + The architecture to update for. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app --user update-app org.gnome.GEdit + + + + + diff --git a/doc/xdg-app-update-runtime.xml b/doc/xdg-app-update-runtime.xml new file mode 100644 index 00000000..189ef0d0 --- /dev/null +++ b/doc/xdg-app-update-runtime.xml @@ -0,0 +1,119 @@ + + + + + + + dxg-app update-runtime + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app update-runtime + 1 + + + + xdg-app-update-runtime + Update a runtime + + + + + xdg-app update-runtime + OPTION + RUNTIME + BRANCH + + + + + Description + + + Updates a runtime. RUNTIME is the + name of an installed runtime. Optionally, + BRANCH can be specified to update a + specific branch. + + + Note that updating a runtime is different from installing + a newer branch, and runtime updates are expected to keep + strict compatibility, so that applications can be guaranteed + to keep running against an updated version of the runtime + they were built against. + + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + Work on the per-user configuration instead of the system-wide + configuration. + + + + + + + + The architecture to update for. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Examples + + + $ xdg-app --user update-runtime org.gnome.Platform + + + + + diff --git a/doc/xdg-app.xml b/doc/xdg-app.xml new file mode 100644 index 00000000..e42c89e9 --- /dev/null +++ b/doc/xdg-app.xml @@ -0,0 +1,150 @@ + + + + + + + dxg-app + xdg-app + + + + Developer + Alexander + Larsson + alexl@redhat.com + + + + + + xdg-app + 1 + + + + xdg-app + Build, install and run applications and runtimes + + + + + xdg-app + OPTION + COMMAND + + + + + Description + + + xdg-app is a tool for managing applications and the runtimes + the use. In the xdg-app model, applications can be built and + distributed independently from the host system the are used + on, and they are isolated from the host system ('sandboxed') + to some degree, at runtime. + + + + + Options + + The following options are understood: + + + + + + + + Show help options and exit. + + + + + + + + + Print debug information during command processing. + + + + + + + + Print version information and exit. + + + + + + + Commands + + The following commands are available: + + + + xdg-app-add-repo1 + + + Add a remote repository. + + + + xdg-app-install-runtime1 + + + Install a runtime. + + + + xdg-app-update-runtime1 + + + Update a runtime. + + + + xdg-app-install-app1 + + + Install an application. + + + + xdg-app-update-app1 + + + Update an application. + + + + xdg-app-run1 + + + Run an application. + + + + build-init1 + + + Initialize a build directory. + + + + build1 + + + Run a build command in a build directory. + + + + + +