8 Commits

Author SHA1 Message Date
Samuele Pedroni
46843da3bc cleanup most test snaps icons, they were anyway in the wrong place 2019-11-25 14:11:29 +01:00
Kyle Fazzari
b31036dcbb snap: support hook environment
Currently, snapd supports the `environment` keyword in the root of the
`snap.yaml`, as well as nested under individual `apps`. However, it does
not support them under individual `hooks`. Add support for this, which
lays more of the groundwork necessary for the snapcraft CLI to get rid
of its wrappers.

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2018-07-11 15:09:24 -07:00
Alberto Donato
63b693b53c fix shell errors from shellcheck
Signed-off-by: Alberto Donato <alberto.donato@gmail.com>
2017-10-12 15:15:55 +02:00
Pawel Stolowski
8a6fa0fa29 hooks: substitute env vars when executing hooks (#3918)
* Substitute environment variables when executing hooks.

* Use build helper.

* Moved the test to snap-run-hook.
2017-09-20 09:04:39 +02:00
Kyle Fazzari
d2d11c1deb many: rename apply-config hook to configure (#2016) 2016-09-28 04:35:45 -03:00
Kyle Fazzari
c4af5d3935 tests: test snap run --hook using in-tree snap-exec.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
2016-08-15 16:07:54 -07:00
Kyle Fazzari
24c904162d cmd,interfaces,snap: implement hook whitelist.
Currently snapd will happily load any hooks provided by the snap. Only
certain hooks will ever be called by snapd itself, but this means that
arbitrary hooks could be called via `snap run`, which may not be desired
behavior. This commit implements a whitelist of supported hooks that
will be loaded-- every other hook will be ignored.

Updates: #1586465

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
2016-06-28 17:16:34 +00:00
Kyle Fazzari
98a20be316 tests: move fixtures/snaps into lib/snaps.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
2016-06-21 18:29:24 +00:00