<div dir="ltr">Hello,<div><br></div><div>I wanted to create a single snap package for KStars (<a href="http://edu.kde.org/kstars">http://edu.kde.org/kstars</a>) 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.</div><div><br></div><div>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.</div><div><br></div><div>Thus far, I ran into the follow issues:</div><div><br></div><div><div>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?</div><div><br></div><div>2. Cannot play audio notifications: org.kde.knotifications: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification</div><div><br></div><div>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.</div><div><br></div><div>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</div><div><br></div><div>5. dbus calls fail in strict confinement mode.</div><div><br></div><div>6. Keep getting this message:</div><div><br></div><div><div>XmbTextListToTextProperty result code -2</div><div>XmbTextListToTextProperty result code -2</div><div>XmbTextListToTextProperty result code -2</div><div>XmbTextListToTextProperty result code -2</div></div><div><br></div><div>7. Other apparmor problems (see log below)</div><div><br></div><div>Here is a link to the files:</div><div><br></div><div>1. snapcraft.yaml: <a href="http://www.indilib.org/jdownloads/snap/snapcraft.yaml">http://www.indilib.org/jdownloads/snap/snapcraft.yaml</a></div><div>2. qt5-lunch: <a href="http://www.indilib.org/jdownloads/snap/qt5-lunch">http://www.indilib.org/jdownloads/snap/qt5-lunch</a></div><div>3. AppArmor log: <a href="http://www.indilib.org/jdownloads/snap/apparmor.txt">http://www.indilib.org/jdownloads/snap/apparmor.txt</a></div><div><br></div><div><br></div><div>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:</div><div><br></div><div><div>= AppArmor =</div><div>Time: Jul  2 20:30:33</div><div>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</div><div>File: /snap/kstars/x5/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 (read)</div><div>Suggestion:</div><div>* adjust program to read necessary files from $SNAP, $SNAP_DATA or $SNAP_USER_DATA</div></div><div><br></div><div>Again, not sure how to adjust program to read from dependent library.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best Regards,<br>Jasem Mutlaq<br></div><div><br></div></div></div>
</div></div>