From 86867c2f95b1404c315c22b327896ac7da627d2c Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Wed, 20 Nov 2019 15:28:18 -0700 Subject: snap: fix/update snap builds * rename to nvim * bump base to core18 * fix versioning, match binary * set prefix to /usr --- snap/snapcraft.yaml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 81ffb9adf3..e85c269f6b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,6 @@ -name: neovim -version: git +name: nvim +base: core18 +adopt-info: nvim summary: Vim-fork focused on extensibility and agility. description: | Neovim is a project that seeks to aggressively refactor Vim in order to: @@ -9,22 +10,33 @@ description: | Enable the implementation of new/modern user interfaces without any modifications to the core source Improve extensibility with a new plugin architecture For lots more details, see the wiki! + +grade: stable # must be 'stable' to release into candidate/stable channels confinement: classic apps: - neovim: - command: usr/local/bin/nvim - plugs: [network, network-bind, x11] + nvim: + command: usr/bin/nvim environment: HOME: /home/$USER - VIM: $SNAP/usr/local/share/nvim/runtime + VIM: $SNAP/usr/share/nvim/runtime parts: - neovim: + nvim: source: . + override-pull: | + snapcraftctl pull + major="$(awk '/NVIM_VERSION_MAJOR/{gsub(")","",$2); print $2}' CMakeLists.txt)" + minor="$(awk '/NVIM_VERSION_MINOR/{gsub(")","",$2); print $2}' CMakeLists.txt)" + patch="$(awk '/NVIM_VERSION_PATCH/{gsub(")","",$2); print $2}' CMakeLists.txt)" + version_prefix="v$major.$minor.$patch" + git_described="$(git describe --first-parent --dirty 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')" + git_described="${git_described:-$(git describe --first-parent --tags --always --dirty)}" + snapcraftctl set-version "${version_prefix}-${git_described}" plugin: make make-parameters: - CMAKE_BUILD_TYPE=Release + - CMAKE_INSTALL_PREFIX=/usr build-packages: - ninja-build - libtool @@ -33,9 +45,10 @@ parts: - automake - cmake - g++ + - git + - gettext - pkg-config - unzip - snap: - - usr/local/bin - - usr/local/share/nvim - - -usr/local/share/man + prime: + - -usr/share/man + -- cgit From e160c9b3bed69b327551575f4a010f9531498728 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Thu, 21 Nov 2019 13:26:11 -0700 Subject: snap: add desktop file, icon --- snap/snapcraft.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e85c269f6b..da3e74d3e7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -19,7 +19,9 @@ apps: command: usr/bin/nvim environment: HOME: /home/$USER - VIM: $SNAP/usr/share/nvim/runtime + VIM: $SNAP/usr/share/nvim + VIMRUNTIME: $SNAP/usr/share/nvim/runtime + desktop: usr/share/applications/nvim.desktop parts: nvim: @@ -37,6 +39,12 @@ parts: make-parameters: - CMAKE_BUILD_TYPE=Release - CMAKE_INSTALL_PREFIX=/usr + override-build: | + snapcraftctl build + # Fix Desktop file + sed -i 's|^Exec=nvim|Exec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop + sed -i 's|^TryExec=nvim|TryExec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop + sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/pixmaps/nvim.png|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop build-packages: - ninja-build - libtool -- cgit From 1f684cf80a0026848f5d64794dfca05654a9f66a Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Fri, 29 Nov 2019 11:07:02 -0700 Subject: snap: declare "devmode" instead of "classic" #11482 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index da3e74d3e7..218fdcf649 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,7 +12,7 @@ description: | For lots more details, see the wiki! grade: stable # must be 'stable' to release into candidate/stable channels -confinement: classic +confinement: devmode apps: nvim: -- cgit From 49849745f171bf512e722172225ecf4d201ace25 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 30 Nov 2019 14:36:56 -0800 Subject: snap: disable job until we are approved We are waiting for snapcraft.io to review/approve us for "classic" mode. reverts 1f684cf80a0026848f5d64794dfca05654a9f66a ref #11482 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 218fdcf649..da3e74d3e7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,7 +12,7 @@ description: | For lots more details, see the wiki! grade: stable # must be 'stable' to release into candidate/stable channels -confinement: devmode +confinement: classic apps: nvim: -- cgit From bc879dd1f163b8eac3955baee5ed5792d906e98c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 12 Dec 2019 00:44:16 -0800 Subject: snap: allow job failure This thing still fails with "need manual review" error. Try devmode (again)--since we got approved once, maybe it works now? ref 49849745f171 ref d9ab83d057e1 ref #11482 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index da3e74d3e7..218fdcf649 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,7 +12,7 @@ description: | For lots more details, see the wiki! grade: stable # must be 'stable' to release into candidate/stable channels -confinement: classic +confinement: devmode apps: nvim: -- cgit From d6593d850a9a628f4d2ecca85da6f3eda9b3abfa Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Sun, 22 Dec 2019 23:04:14 -0700 Subject: snap: set "strict" confinement #11596 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 218fdcf649..d0cbc27b3f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,7 +12,7 @@ description: | For lots more details, see the wiki! grade: stable # must be 'stable' to release into candidate/stable channels -confinement: devmode +confinement: strict apps: nvim: -- cgit From 53fe877a97dbe5e5b5291fd1361123fc1b1da054 Mon Sep 17 00:00:00 2001 From: Carlos Hernandez Date: Mon, 23 Dec 2019 22:43:25 -0700 Subject: snap: set "classic" confinement #11601 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'snap') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d0cbc27b3f..da3e74d3e7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,7 +12,7 @@ description: | For lots more details, see the wiki! grade: stable # must be 'stable' to release into candidate/stable channels -confinement: strict +confinement: classic apps: nvim: -- cgit