APC Australia

Anatomy of a Flatpak

-

Installing a Flatpak will create a file structure for the program and its runtimes, as well as some metadata. The basic structure of this consists of four top-level directorie­s in either $HOME/.local/share/flatpak or /var/lib/flatpak, depending on whether it was a system or user install.

The first of these is repo, which contains informatio­n about installed applicatio­ns, remotes, and other metadata. The app directory is where the applicatio­ns themselves live. Each program has a sub-directory named with its three-part identifier (for example, org.gnome.GEdit). There are further sub-directorie­s that are set aside for architectu­re (such as x86_64), version numbers, and their associated checksums.

Runtimes are managed in the same way, but are kept separately in the runtime directory. This is because they can be shared across more than one applicatio­n. The final directory is exports, containing items related to the Flatpak programs yet sits outside the sandbox. These include things like the applicatio­n icon and .desktop file (which will appear in your desktop’s applicatio­n menu), and system references such as connection­s to the windowing system. The exports directory contains links to things inside the Flatpak, and is one of the carefully controlled touchpoint­s between the host system and Flatpak’s sandbox.

The following shows the export of the tree command run following a LibreOffic­e Flatpak installati­on: $ aaron@acp-demon:/var/lib/flatpak$ tree -L 2 app org.libreoffic­e.LibreOffic­e appstream

flathub exports bin share repo config extensions flathub.trustedkey­s.gpg objects refs state tmp runtime org.freedeskto­p.Platform org.freedeskto­p.Platform.ffmpeg org.freedeskto­p.Platform.Locale org.libreoffic­e.LibreOffic­e.Locale

Newspapers in English

Newspapers from Australia