Where to place config files, and nested config files

Christian Ehrhardt christian.ehrhardt at canonical.com
Wed Aug 10 07:25:05 UTC 2016

On Wed, Aug 10, 2016 at 8:06 AM, Didier Roche <didrocks at ubuntu.com> wrote:

> > b) use a simple template system and dynamically generate the config
> > file with SNAP_DATA as the prefix before starting the service. I would
> > have something like this in the template file:
> >
> >     acl allowed_networks src
> > "@PREFIX@/etc/squid-deb-proxy/allowed-networks-src.acl"
> >
> > And generate the actual config file replacing @PREFIX@ with the
> > contents of SNAP_DATA before starting the service. Is this overkill,
> > or the most elegant solution?
> >
> >
> > c) something else I'm missing? I'm very much starting my journey here :)
> b) is the most elegant solution IMHO, it will always point to the right
> directory, at runtime. That makes as well upstream config relocatable,
> which is a net benefit for everyone :)

Hi Andreas,
I agree to all that was said.
But spinning further your snaps life with that config, you might start
wondering when/how to make these files available at e.g. SNAP_DATA, please
feel fee to chime in on https://bugs.launchpad.net/snapcraft/+bug/1611287
for that.
And as soon as squid_deb_proxy or others give you headache about upgrading
with format changes (your template now differs from the conf that the user
modified :-/) you can take a look at the discussion for

Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160810/a290eff2/attachment.html>

More information about the Snapcraft mailing list