<div dir="ltr"><div>I already started this:<br><br><a href="https://github.com/snappy-packages/applications-kstars">https://github.com/snappy-packages/applications-kstars</a><br><br></div>Scarlett<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 4, 2016 at 2:24 AM, Pawel Stolowski <span dir="ltr"><<a href="mailto:pawel.stolowski@canonical.com" target="_blank">pawel.stolowski@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Didier,<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thus far, I ran into the follow issues:<br>
<br>
1. Cannot read from usr/share/indi. It keeps referring to $SNAP_DATA<br>
and $SNAP_USER_DATA but INDI is a 3rd party program that installs its<br>
data files to /usr/share/data, so how do I deal with that exactly?<br>
Where is $SNAP_DATA located with respect the root FS?<br>
</blockquote>
Most of the apps have either some runtime env variable or some package<br>
build configuration (like --prefix or --datadir). One of the issue we<br>
are discussing with upstream is that there is nothing that ensure you<br>
those paths will stay the same. Gustavo (CCed here) mentioned maybe some<br>
declarative open() redirection in libc would be in order.<br>
<br>
</blockquote>
<br></span>
That's a very interesting point and something I've asked myself too while battling with similar issues (which I still haven't solved; the app I'm working on uses hardcoded /usr/share/... paths too; if only patching was streamlined in snapcraft, that would at least help in some cases).<br>
I think it's not just open(), but access(), *stat(), opendir()... And I think it will get tricky. And then it only helps with apps using libc (ok, probably a majority is libc-based). Isn't this something that chroot() solves (which of course affects all the plugs etc)?<br>
<br>
Cheers,<br>
Pawel<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
-- <br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.ubuntu.com" target="_blank">Snapcraft@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/snapcraft</a><br>
</div></div></blockquote></div><br></div>