Skip to content

Commit

Permalink
turn hosting page into one on distributing
Browse files Browse the repository at this point in the history
The hosting a repository page also contains details on other ways
to distribute applications. Therefore, rename the page and
restructure a little.

This will make it possible to add other distribution methods later.
  • Loading branch information
allanday committed Jan 13, 2017
1 parent 0cd2dd8 commit b19386c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
Distributing Applications
=========================

Flatpak provides several ways to distribute applications. The primary method is to host a repository. This is relatively simple (although there are some important details to be aware of) and allows application updates to be distributed.

It is also possible to distribute Flatpaks as single file bundles, which can be useful in some situations.

Hosting a repository
====================
--------------------

The previous sections of this guide describe how to generate repositories using ``build-export`` or ``flatpak-builder``. The resulting OSTree repository can be hosted on a web server for consumption by users.

While it is relatively simple to host a flatpak repository, there are some important details to be aware of.
Important details
^^^^^^^^^^^^^^^^^

archive-z2 repositories contain a single file for each file in the application. This means that pull operations will do a lot of HTTP requests. Since new requests are slow, it is important to enable HTTP keep-alive on the web server.
OSTree repositories use archive-z2, meaning that they contain a single file for each file in the application. This means that pull operations will do a lot of HTTP requests. Since new requests are slow, it is important to enable HTTP keep-alive on the web server.

OSTree supports something called static deltas. These are single files in the repo that contains all the data needed to go between two revisions (or from nothing to a revision). Creating such deltas will take up more space on the server, but will make downloads much faster. This can be done with the ``build-update-repo --generate-static-deltas``.
OSTree supports something called static deltas. These are single files in the repo that contains all the data needed to go between two revisions (or from nothing to a revision). Creating such deltas will take up more space on the server, but will make downloads much faster. This can be done with the ``build-update-repo --generate-static-deltas`` option.

GPG signatures
--------------
^^^^^^^^^^^^^^

By default OSTree refuses to pull from a remote repository that is not signed. To disable GPG verification, the ``--no-gpg-verify`` option needs to be used when a remote is added. Alternatively, it can be disabled on an existing remote using ``flatpak remote-modify``.

Expand All @@ -19,7 +29,7 @@ OSTree requires signatures for every commit and on repository summary files. The
$ flatpak build-export --gpg-sign=KEYID --gpg-homedir=/some/dir appdir repo

Referring to repositories
-------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^

A convenient way to point users to the repository containing your application is to provide a ``.flatpakrepo`` file that they can download and install. To install a ``.flatpakrepo`` file manually, use the command::

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Contents
building-simple-apps
flatpak-builder
working-with-the-sandbox
hosting-a-repository
distributing-applications

0 comments on commit b19386c

Please sign in to comment.