Accessing the bundled file system

Alexander Larsson alexl at redhat.com
Fri Mar 24 11:43:36 UTC 2017


On Mon, 2017-03-20 at 14:48 +0100, Aleix Pol wrote:
> Hi,
> I've been looking into what Flatpak support in KDevelop would look
> like.
> 
> I haven't seen any documentation on how file system access is
> envisioned. I might have missed the documentation, though.
> 
> So the idea is that the IDE should parse our source code using the
> runtime's includes (i.e. /usr/include/stdlib.h in the bundle rather
> than the host's). For docker, I've found they suggest using nsenter.
> Would it be possible to use that for flatpak runtimes? Or is there
> something ad-hoc planned?

We have "flatpak enter" which uses nsenter, but due to technical
reasons you have to use sudo to use it, so its not recommended to rely
on this.

So, i guess there are two alternatives for a IDE. Either you build the
IDE against the SDK as runtime and use the compiler that ships with the
SDK, which should then be readily available. The other alternative is
that the IDE spawns building in another flatpak sandbox against the
selected SDK (whereas the IDE would run against a platform, not a sdk).

In the later case you have to rewrite /usr into the prefix of the SDK
you're currently building against. There is no need to nsenter to get
these files though. If the app has host filesystem access it should be
able to see the runtime files directly in e.g.
/var/lib/flatpak/runtime/.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a sword-wielding zombie dwarf She's a strong-willed red-headed 
magician's assistant descended from a line of powerful witches. They 
fight crime! 



More information about the xdg-app mailing list