runtimes, app bundles, etc

Matthias Clasen mclasen at redhat.com
Tue Jan 13 15:17:31 UTC 2015


I've promised that I would give some status update on the work that Alex
is doing on sandboxed apps and app bundles. I can't really do a much
better job than Alex himself, so I'll just summarize the highlights and
point at the wiki page that we've set up. 

---

The high-level goals of this effort are to provide infrastructure that
allows build and distribute applications independently of the base
system, and to run applications in a well-defined environment that is
isolated from the host system. 

The work that Alex has been doing revolves around the concepts of
runtimes, app bundles and sdks.

A runtime provides a well-defined environment that an app can run in.
Examples would be "GNOME 3.14" or "KDE 5.6". A runtime can be thought of
as a /usr with fixed contents. When a bundled app gets run, the runtime
it needs gets mounted at /usr.

An app bundle contains a metadata file that describes the application,
what runtime it needs, and various other things. The other parts of the
app bundles are the actual application files, which get mounted
under /self when the app is run, and a list of exported files - these
typically are things that the host environment needs to know about the
application: a desktop file, icon, d-bus service file, and so on. This
implies that there is still an install step for these app bundles: the
exported files get copied into a well-known place where the host system
can find them.

Both runtimes and app bundles can be installed per-user and system-wide.
With the way things are currently set up, per-user installations end up
in $HOME/.local/share/xdg-app/ and system-wide installations
in /usr/share/xdg-app.

An sdk is basically the 'devel' parts of a runtime, split off. E.g.
there is a "GNOME 3.14" sdk that corresponds to this runtime. Building
an app bundle is done by installing the sdk, and then building the app
against it, with --prefix=/self.

The current implementation uses ostree to distribute both runtimes and
applications as well as updates, but that does not have to be the only
distribution mechanism. I expect that we will ship a 'reference runtime'
for GNOME upstream, but Fedora and other distros could very well provide
their own implementation of this. Bundled applications can coexist just
fine with 'traditional' apps, and it is also conceivable to ship app
bundles wrapped in packages.

Not all pieces of this outline are fully developed yet, but Alex has
written an xdg-app tool, which can install and update runtimes, sdks and
applications, and has initial support for building applications. The Sdk
also supports using (s)rpms as building blocks for application bundles -
it ships with a preconfigured rpmbuild and rpmdb.

The repositories we have contain runtimes for GNOME 3.14 and 3.16, as
well as a number of example apps:
gedit
gnome-builder
glxgears (demonstrating working GL in bundles)
paplay (demonstrating working audio in bundles)

---

For further details, and for pointers to code you can run on your
system, see https://wiki.gnome.org/Projects/SandboxedApps


Matthias



More information about the desktop mailing list