Issues building KDE Plasma applications snaps for NXOS

Hello!

I’m a developer of NXOS [http://nxos.org], which is a GNU/Linux distribution that aims to be a fully snap based. Currently we are attempting to pack some of the KDE Plasma applications as snaps in order to make them available from our “software center” (a front end of your snapstore). But we are having serious issues with the connections between our snaps and the kf5-frameworks snap. We already get in touch with the kf5-frameworks snaps and he comment us that the problem might be a restriction imposed by Snapd at the time of connecting the two snaps.

Would you please assist us in this issue ?

Thanks

i fear you need to give some more detailed information than “issues with the connections between our snaps and the kf5-frameworks” … what doesnt work exactly, do you see any errors when running the apps, are there any DENIED messages in your syslog/journal etc.

Hello Ogra, My bad! Here are the details: I’m traying to build a snap for Konversation using this snapcraft.yaml https://pastebin.com/GRefdQZr. It’s being created properly, then:

snap install kde-frameworks-5 snap connect konversation:kde-frameworks-5-plug kde-frameworks-5:kde-frameworks-5-slot

but the connection es not being created. this is what my logs says,

[23622.849120] audit: type=1400 audit(1498088831.086:52): apparmor=“DENIED” operation=“open” profile=“snap.konversation.konversation” name=“/usr/share/locale/” pid=15819 comm=“konversation” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0 [23883.651588] audit: type=1400 audit(1498089090.734:53): apparmor=“STATUS” operation=“profile_replace” profile=“unconfined” name=“snap.konversation.konversation” pid=15883 comm="apparmor_parser

apparently apparmor is denying the connection or something alike.

What I have tried? I mounted the snap in test mode and after that mounted the kf5 snap inside “prime/kde” (where i suposed it should be). And it worked !

That’s why I suspect that it’s something related to snap.

Cheers

your snap tries to access /usr/share/locale/ which is denied … i fear you have to teach it to not do that.

if your app respects locale standards [1] you should be able to set LOCPATH and I18NPATH in the environment (from a wrapper script around “kf5-launch konversation”) to point to a dir the app can actually access (looking at your yaml i assume thats $SNAP/kf5/usr/share/locale )
are locales usually shipped in kde-frameworks-5 ? if so, make sure they are accessible in the shared directory and point the above variables to the right places.

under [2] is also a more detailed description of the content interface.

[1] http://manpages.ubuntu.com/manpages/zesty/man1/locale.1.html
[2] The content interface