Fixing snap package that was broken in the 1.2.0 update:

- Fix path to launch.sh - it's in the utils/ directory, not the top-level
- Version should be '1.2.0', previously it was some variable which looks like it comes from an external build program (this results in the snap being unable to build)
- Source of the novnc part has been fixed to reference the correct release file on github, not a 'build' directory on local machine (not present in the novnc sources)
- Websockify is now built direct from the 0.9.0 release on github. It appears that the version previously used (from the websockify package on Ubuntu) is too old to support 1.2.0 release of novnc (errors: "code 400, message Client must support 'binary' or 'base64' protocol")
- paths to launch.sh and svc_wrapper.sh have been corrected to where they actually are in the novnc sourc from github
This commit is contained in:
Tim Edwards 2020-07-15 08:17:08 +02:00
parent 9142f8f0f7
commit eb23e22b89
2 changed files with 11 additions and 7 deletions

View File

@ -24,6 +24,6 @@ snapctl get services | jq -c '.[]' | while read service; do # for each service t
echo "novnc: not starting service ${service} with listen_port ${listen_port} and vnc_host_port ${vnc_host_port}" echo "novnc: not starting service ${service} with listen_port ${listen_port} and vnc_host_port ${vnc_host_port}"
else else
# start (and fork with '&') the service using the specified listen port and VNC host:port # start (and fork with '&') the service using the specified listen port and VNC host:port
$SNAP/launch.sh --listen $listen_port --vnc $vnc_host_port & $SNAP/utils/launch.sh --listen $listen_port --vnc $vnc_host_port &
fi fi
done done

View File

@ -1,6 +1,6 @@
name: novnc name: novnc
base: core18 # the base snap is the execution environment for this snap base: core18 # the base snap is the execution environment for this snap
version: '@VERSION@' version: 1.2.0
summary: Open Source VNC client using HTML5 (WebSockets, Canvas) summary: Open Source VNC client using HTML5 (WebSockets, Canvas)
description: | description: |
Open Source VNC client using HTML5 (WebSockets, Canvas). Open Source VNC client using HTML5 (WebSockets, Canvas).
@ -13,13 +13,17 @@ confinement: strict
parts: parts:
novnc: novnc:
source: build/ source: https://github.com/novnc/noVNC/archive/v1.2.0.tar.gz
plugin: dump plugin: dump
stage-packages: stage-packages:
- websockify
- bash - bash
- jq - jq
- python-numpy - python3-numpy
websockify:
source: https://github.com/novnc/websockify/archive/v0.9.0.tar.gz
plugin: python
stage-packages:
- python3-numpy - python3-numpy
hooks: hooks:
@ -28,9 +32,9 @@ hooks:
apps: apps:
novnc: novnc:
command: ./launch.sh command: utils/launch.sh
plugs: [network, network-bind] plugs: [network, network-bind]
novncsvc: novncsvc:
command: ./svc_wrapper.sh command: snap/local/svc_wrapper.sh
daemon: forking daemon: forking
plugs: [network, network-bind] plugs: [network, network-bind]