From fea608269a9b1dd880cc12f898c9a320bc74a7c1 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 14 Jun 2020 20:39:32 -0600 Subject: [PATCH 1/5] Bump to core20 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index da3e74d3e7..5e817dfd0f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: nvim -base: core18 +base: core20 adopt-info: nvim summary: Vim-fork focused on extensibility and agility. description: | From 7c4267e42c17eda9a0737a88b1bf70bb7573a0d9 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 14 Jun 2020 20:40:37 -0600 Subject: [PATCH 2/5] Add missing dependencies for Launchpad builds --- snap/snapcraft.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5e817dfd0f..68e69fd20b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -52,11 +52,13 @@ parts: - autoconf - automake - cmake + - gawk - g++ - git - gettext - pkg-config - unzip + - wget prime: - -usr/share/man From 8735105af819881e852301553f36bc07ca729750 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 14 Jun 2020 20:41:40 -0600 Subject: [PATCH 3/5] Snapcraft: Build with Debug Info --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 68e69fd20b..974efc334c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -37,7 +37,7 @@ parts: snapcraftctl set-version "${version_prefix}-${git_described}" plugin: make make-parameters: - - CMAKE_BUILD_TYPE=Release + - CMAKE_BUILD_TYPE=RelWithDebInfo - CMAKE_INSTALL_PREFIX=/usr override-build: | snapcraftctl build From 9c65017c3bfaecf51df5e746074d7ded9f942f05 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 14 Jun 2020 20:42:21 -0600 Subject: [PATCH 4/5] Snapcraft: Use lua instead of luajit for arm64 --- snap/snapcraft.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 974efc334c..7d1e7bdbb0 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -39,6 +39,8 @@ parts: make-parameters: - CMAKE_BUILD_TYPE=RelWithDebInfo - CMAKE_INSTALL_PREFIX=/usr + - CMAKE_FLAGS=-DPREFER_LUA=ON + - DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF" override-build: | snapcraftctl build # Fix Desktop file From 65b2fce78765649c64e7b7e0efbc99214fae0805 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 30 Aug 2020 17:13:41 +0000 Subject: [PATCH 5/5] snap: don't run snapcraft under sudo Snapcraft 4.0 complains about running LXD builds under sudo. So instead add the CI user to the "lxd" group and use sg to switch to that membership. Resolves: #12712 --- .travis.yml | 2 ++ ci/snap/install.sh | 1 + ci/snap/script.sh | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b920f70f45..34ff492bb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -193,6 +193,7 @@ jobs: - LANG: C.UTF-8 - SNAPCRAFT_ENABLE_SILENT_REPORT: y - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y + - SNAPCRAFT_BUILD_ENVIRONMENT: lxd addons: snaps: - name: snapcraft @@ -221,6 +222,7 @@ jobs: - LANG: C.UTF-8 - SNAPCRAFT_ENABLE_SILENT_REPORT: y - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y + - SNAPCRAFT_BUILD_ENVIRONMENT: lxd fast_finish: true before_install: ci/before_install.sh diff --git a/ci/snap/install.sh b/ci/snap/install.sh index 23e0bc5eb8..0ceb6f0422 100755 --- a/ci/snap/install.sh +++ b/ci/snap/install.sh @@ -4,6 +4,7 @@ set -e set -o pipefail sudo apt update +sudo usermod -aG lxd $USER sudo /snap/bin/lxd.migrate -yes sudo /snap/bin/lxd waitready sudo /snap/bin/lxd init --auto diff --git a/ci/snap/script.sh b/ci/snap/script.sh index 647cda4874..f0d45fea00 100755 --- a/ci/snap/script.sh +++ b/ci/snap/script.sh @@ -4,5 +4,5 @@ set -e set -o pipefail mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache" -sudo snapcraft --use-lxd +sg lxd -c snapcraft