summaryrefslogtreecommitdiffstats
path: root/snap/snapcraft.yaml
diff options
context:
space:
mode:
author林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>2019-04-10 17:35:42 +0800
committer林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>2019-04-10 17:35:42 +0800
commit2249251895a09827bf271c9d5f01e187659762dc (patch)
tree9bcb575e5972ba5f250168041f28826aa3c1ae5f /snap/snapcraft.yaml
parentf9ae1eb7dcade254526de6ada7c19e5634f52520 (diff)
snap: Support canonical config paths, fixes #1403
This patch supports canonical config paths by the help of the `personal-files` and the `system-files` security confinement interfaces. Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
Diffstat (limited to 'snap/snapcraft.yaml')
-rw-r--r--snap/snapcraft.yaml19
1 files changed, 18 insertions, 1 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index eb2f5ee1..4cb8a959 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -12,7 +12,9 @@ confinement: strict
apps:
glances:
- command: bin/glances
+ command: >
+ bin/glances-launch
+ $SNAP/bin/glances
plugs:
- network
- system-observe
@@ -27,6 +29,16 @@ apps:
LANG: C.UTF-8
LC_ALL: C.UTF-8
+plugs:
+ home-glances-config:
+ interface: personal-files
+ read:
+ - $HOME/.config/glances/glances.conf
+ etc-glances-config:
+ interface: system-files
+ read:
+ - /etc/glances/glances.conf
+
parts:
glances:
plugin: python
@@ -50,3 +62,8 @@ parts:
source: https://github.com/docker/docker-py.git
source-tag: '3.7.0'
source-depth: 1
+ launchers:
+ source: snap/local/launchers
+ plugin: dump
+ organize:
+ '*': bin/