hi, after we recently added a config hook [1] to the core snap it is now possible to disable ssh if you require [2] ...
there is a long standing request to do the same for syslog for systems running from SD card, which is why i looked into trying to extend the existing configure script for this, which made me notice some issue... when you call "snap set core foo=bar", there is no indication at all for the script which variable changes a value, neither in the shell environment nor in the argument list. the only way to get your value is to call snapctl for every existing variable [3]. since you dont know what specific variable was requested to change the only way to reliably write it is to write *all* existing variables ... now, if you package something with a more complex config that you want completely handled via snap config this gets ugly very fast... imagine something like postfix with can potentially have 100s of config options. instead of atomically changing a single option you will regenerate the full config from scratch. this takes a lot longer, bringing the risk of a completely broken config in case of a power loss, beyond resulting an an awful config hook script with a large block of "snapctl get" calls at the top. can we extend the config hook implementation minimally so a "snap set core foo=bar" would at least have something like "SNAP_OPTION=foo" in the environment that the generating script or binary could read to avoid the unnecessary processing or would that break some design concept ? ciao oli [1] http://bazaar.launchpad.net/~snappy-dev/core-snap/trunk/view/head:/ hooks/configure [2] https://github.com/CanonicalLtd/ubuntu-core-docs/blob/master/en/ref erence/core-configuration.md [3] https://github.com/snapcore/snapd/wiki/hooks
signature.asc
Description: This is a digitally signed message part
-- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft