where should I put my config file?

Alexander Larsson alexl at redhat.com
Tue Aug 7 14:00:45 UTC 2018


On Tue, Aug 7, 2018 at 12:03 PM Goffi <goffi at goffi.org> wrote:
>
> Le mardi 7 août 2018, 11:51:48 CEST Alexander Larsson a écrit :
> > Creating a runtime is basically like creating your own distribution.
> > It is not a good idea to maintain a distribution just so you can read
> > a config file.
> >
> > Please please please, unless you have the real manpower/interest in
> > doing it correctly, never ever create your own runtime.
> >
> > If all you need to do is read a config file that can never change,
> > just put it in /app/etc/.
>
> Hello,
>
> no it's not just for a config file of course. It's because I have a backend and many frontends (each one in a different flatpak), and all the frontends need to access some backend modules (it's Python), its dependencies and media files. Runtime allow to have a common base, and to not duplicate module and media files for each package.
>
> My runtime is just the Freedesktop one with my additional modules, and I'll have to maintain the modules up to date in any case, it doesn't looks like that much work (regarding that I can automatize modules update), am I missing something? You can check my manifests at https://repos.goffi.org/sat_docs/file/tip/flatpak the runtime is at https://repos.goffi.org/sat_docs/file/tip/flatpak/org.salutatoi.Sdk.json .

Flatpak is a bundling system, the main idea is that apps ship what
they need, and the split into runtimes is not to avoid duplication,
but to share the workload of maintaining the base.
If the shared thing is only some python modules, your runtimes are not
using less space than if you just put those in each app anyway. Due to
the way flatpak uses ostree those files will all be de-duplicated
automatically anyway.

The problem with doing your own runtime, even if its based on another
one, is that you suddenly have to keep up-to-date with the base. Say
we do a security or bugfix update, suddenly all the diverged runtimes
will not get that fix. Furthermore, once you've diverged you're not
sharing space with the new runtime build, so the on-disk size grows.

If the building is painful i would recommend you to look at "base
apps". Its the same idea as with the "base runtimes", but you build
one app and then you start from that multiple times and build
"derived" apps.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                Red Hat, Inc
       alexl at redhat.com         alexander.larsson at gmail.com


More information about the Flatpak mailing list