My second snap ;-)
Didier Roche
didrocks at ubuntu.com
Tue Oct 4 06:10:43 UTC 2016
Le 03/10/2016 à 20:51, Robert Park a écrit :
> On Sun, Oct 2, 2016 at 11:20 PM, Didier Roche <didrocks at ubuntu.com> wrote:
>> Le 02/10/2016 à 20:48, Robert Park a écrit :
>>> Is there a plug to just read /etc? or a sensible way to set all those
>>> env vars to /dev/null or something?
>> Hey Robert,
>>
>> There is no plug to read from /etc on purpose. The goal is your snap to
>> be relocatable and not relying on anything system-wide, so that it can
>> run in different context. That's why you need to find a way to embedded
>> this file and looking for local assets.
>
> But aren't snaps running inside chroots? Why does "/etc" refer to the
> system /etc instead of the /etc inside the snap chroot? Am I
> understanding correctly that snaps bindmount the system /etc into the
> snap chroot and then don't provide any permission to read anything in
> there?
>
> I think it would be nice if "/etc" was just inside my snap chroot and
> my snap thus had total ownership of the entire dir.
/etc refers to the one from the ubuntu-core snap + some bindmounts from
systems. However, they are not an overlay for your snap and shared with
the system.
One of the premise concept of snaps is that your application needs to be
relocatable, meaning you can take your whole $SNAP directory, move it on
another system, and it will still work, you don't have external
dependency on the system, being files in directory outside of your snaps
(minus interfaces required files, ofc).
More information about the Snapcraft
mailing list