From cd096cc8a8f77d3cb44c58f18aec46422c746c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Fri, 25 Jan 2019 16:50:08 +0800 Subject: [PATCH 1/4] Fix locale error due to missing compiled data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch hardcoded the locale variables to use the `C.UTF-8` locale which is the only locale that is available in the Ubuntu Core. Additional information: * The gettext-launch remote part - doc - snapcraft.io https://forum.snapcraft.io/t/the-gettext-launch-remote-part/9111 * The locales-launch remote part - doc - snapcraft.io https://forum.snapcraft.io/t/the-locales-launch-remote-part/8729 * Python cannot determine the locale used when inside a snap - snapcraft - snapcraft.io https://forum.snapcraft.io/t/python-cannot-determine-the-locale-used-when-inside-a-snap/9492 Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 22d78b13..b1f26a3a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -24,6 +24,9 @@ apps: - upower-observe - system-files - home + environment: + LANG: C.UTF-8 + LC_ALL: C.UTF-8 plugs: system-files: From 665626e44bf289f0e38499a5dc27fb14ebc3492f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Fri, 25 Jan 2019 16:54:34 +0800 Subject: [PATCH 2/4] Use local source tree for glances part MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids the additional time to clone the already existing repository Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b1f26a3a..fc4cb836 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -35,7 +35,7 @@ plugs: parts: glances: plugin: python - source: https://github.com/nicolargo/glances.git + source: . bottle: plugin: python source: https://github.com/bottlepy/bottle.git From 988c9a76137b14d0022866b8a70663378cbdf6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Fri, 25 Jan 2019 16:55:41 +0800 Subject: [PATCH 3/4] Switch to automatic git versioning for snap version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Snapcraft supports `git describe` style snap version string generation this patch exploits it. Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fc4cb836..e34cd62f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: glances -version: '3.1.0' +version: git summary: Glances an Eye on your system. A top/htop alternative. description: | Glances is a cross-platform monitoring tool which aims to present From 7a8330aa07e1912eec5c7d41629954375dd54730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Sat, 26 Jan 2019 02:52:31 +0800 Subject: [PATCH 4/4] ReReRevert Permission denied: '/etc/glances/glances.conf' #1403 The snapd version that supports the interface hasn't released to the stable channel yet, and the Snap Store autoconnection isn't granted, hold back the patch until both conditions are met. This reverts commit c904a8a and (parts of) 108dc7b. --- snap/snapcraft.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e34cd62f..f137c1a5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -22,16 +22,11 @@ apps: - network-observe - physical-memory-observe - upower-observe - - system-files - home environment: LANG: C.UTF-8 LC_ALL: C.UTF-8 -plugs: - system-files: - read: [ /etc/glances/glances.conf ] - parts: glances: plugin: python