Problems creating snap package for KStars

Jasem Mutlaq mutlaqja at ikarustech.com
Sat Jul 2 18:40:58 UTC 2016


Hello,

I wanted to create a single snap package for KStars (
http://edu.kde.org/kstars) including all dependencies. I started off from
Krita's snapcraft.yaml file and customized it to fit KStars. However, since
KStars leverages several KDE components (KNewStuff, kinit, kded5..etc) and
also includes INDI server, drivers, and tools which communicate with
devices for control and data acquisition, it is quite complex compared to
other snaps I've seen so far.

At first, I ran it in strict confinement mode and used all the plugs
necessary for it to work, but ran into several issues and used it in
devmode since. The snap is created on my primary machine (64bit Kubuntu
16.04), and all testing is done on a fresh Ubuntu Mate 16.04 Virtual
Machine.

Thus far, I ran into the follow issues:

1. Cannot read from usr/share/indi. It keeps referring to $SNAP_DATA and
$SNAP_USER_DATA but INDI is a 3rd party program that installs its data
files to /usr/share/data, so how do I deal with that exactly? Where is
$SNAP_DATA located with respect the root FS?

2. Cannot play audio notifications: org.kde.knotifications: Audio
notification requested, but sound file from notifyrc file was not found,
aborting audio notification

3. Breeze icons installed but not loaded up. As indicated in the YAML file,
the breeze icon theme is installed, but it is not loading up. Tried
modifying qt5-launch file (export QT_QPA_PLATFORMTHEME=kde) tried changing
QT_SELECT (snappy-qt5 vs qt5) but the icons never load up.

4. Download New Data (KNewStuff3) loads up providers, show download list,
and when selecting a component to download, it downloads it but fails to
install any file. In strict confinement mode, it fails to load the
providers.xml file

5. dbus calls fail in strict confinement mode.

6. Keep getting this message:

XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2

7. Other apparmor problems (see log below)

Here is a link to the files:

1. snapcraft.yaml: http://www.indilib.org/jdownloads/snap/snapcraft.yaml
2. qt5-lunch: http://www.indilib.org/jdownloads/snap/qt5-lunch
3. AppArmor log: http://www.indilib.org/jdownloads/snap/apparmor.txt


As you can see from the AppArmor log, there are a lot of calls been made
among all the various components, libraries, file system..etc. Even when an
executable like indi_simulator_ccd is accessing a dependent library, it
says:

= AppArmor =
Time: Jul  2 20:30:33
Log: apparmor="ALLOWED" operation="open"
profile="snap.kstars.kstars//null-/snap/kstars/x2/usr/bin/indiserver//null-/snap/kstars/x5/usr/bin/indi_simulator_ccd"
name="/snap/kstars/x5/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2" pid=4015
comm="indi_simulator_" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /snap/kstars/x5/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 (read)
Suggestion:
* adjust program to read necessary files from $SNAP, $SNAP_DATA or
$SNAP_USER_DATA

Again, not sure how to adjust program to read from dependent library.

-- 
Best Regards,
Jasem Mutlaq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160702/ab9afde7/attachment.html>


More information about the Snapcraft mailing list