From cef4c1a0bc6889e383cebecf757c854325ff2b1f 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: Tue, 16 Apr 2019 17:48:34 +0800 Subject: [PATCH 1/4] snap: Flip `grade` property to stable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows the snap to be promoted to the `candidate` and the `stable` release channels 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 9c50293..a3c41d1 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -23,7 +23,7 @@ description: | # snap connect shellcheck:removable-media version: git -grade: devel +grade: stable confinement: strict apps: From 67dbbcbd89bb5f58eaf0e01605fcc3e299361730 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: Tue, 16 Apr 2019 17:53:01 +0800 Subject: [PATCH 2/4] snap: Drop unneeded trailing slash in the `source` property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 a3c41d1..83ae66d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -34,7 +34,7 @@ apps: parts: shellcheck: plugin: dump - source: ./ + source: . build-packages: - cabal-install - squid3 From 10955a143c81dae6cf7f82cd6dc21a3b9479b30b 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: Tue, 16 Apr 2019 18:10:49 +0800 Subject: [PATCH 3/4] snap: Replace deprecated build and install keyword MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These keywords has been obsoleted in Snapcraft 3. Refer-to: The 'build' keyword has been replaced by 'override-build' Refer-to: The 'install' keyword has been replaced by 'override-build' Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 83ae66d..73d0eeb 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -38,7 +38,7 @@ parts: build-packages: - cabal-install - squid3 - build: | + override-build: | # See comments in .snapsquid.conf [ "$http_proxy" ] && { squid3 -f .snapsquid.conf @@ -48,6 +48,6 @@ parts: cabal sandbox init cabal update || cat /var/log/squid/* cabal install -j - install: | + install -d $SNAPCRAFT_PART_INSTALL/usr/bin install .cabal-sandbox/bin/shellcheck $SNAPCRAFT_PART_INSTALL/usr/bin From 025c380b8410459f72d806420d408d8f4f9cd956 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: Tue, 16 Apr 2019 19:59:29 +0800 Subject: [PATCH 4/4] snap: Migrate to core18 base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch migrates the snap to core18 base, which should make the cabal build work again. Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 73d0eeb..8365b13 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -23,6 +23,7 @@ description: | # snap connect shellcheck:removable-media version: git +base: core18 grade: stable confinement: strict @@ -37,7 +38,7 @@ parts: source: . build-packages: - cabal-install - - squid3 + - squid override-build: | # See comments in .snapsquid.conf [ "$http_proxy" ] && {