On 19 October 2016 at 12:50, Matthew Miller <mattdm(a)fedoraproject.org> wrote:
apps are built expecting the runtime at /usr as normal,
but are installed into a tree at /app.
Alex isn't on this list (cc'd) but this is what he said to me on IRC:
Its unclear exactly how this would work for a non-trivial application.
If you need any dependencies, then those will either be in /usr, which
is fine for a regular rpm, but then what is the point of the whole
exercise. However, if you want to put it in a container with a limited
/usr (such as with flatpak or atomic workstation) then you need all
the additional dependencies built in that same prefix too. Or
alternatively, each in its own prefix plus a rats nest of environment
variables so they all find each other.
Additionally, having an app in a separate prefix means it doesn't
integrate well with the system. For instance, gnome-shell will not
find the icon and desktop files in /opt/app/org.gnome.gedit/share/. In
order to handle this flatpak has the "export" system that manages a
separate combined directory of such files. You'd need something
similar for this to work outside flatpak.
And for flatpak, using /app rather than /opt is actually an important
decision, because we often need to export the real host filesystem to
an app, and if the app is in /opt then exposing the host /opt to the
application becomes very tricky.
Basically, I think this approach isn't really useful for flatpak, nor
do I see it as useful for regular rpms.