From b9c0d88a2bb21dfc35e1ed9378f2d175b19c671f Mon Sep 17 00:00:00 2001 From: Dilyn Corner Date: Tue, 8 Oct 2024 16:20:12 -0400 Subject: [PATCH 1/3] snapcraft.yaml: bump node version to support globalThis Signed-off-by: Dilyn Corner --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 65b2ab261..c5db9a09a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -28,7 +28,7 @@ parts: source: https://github.com/WebThingsIO/gateway.git after: [ python-deps ] npm-include-node: true - npm-node-version: 10.24.1 + npm-node-version: 12.22.1 build-environment: - npm_config_unsafe_perm: "true" - NODE_ENV: "dev" From 5a8041812b6fb9b5b5124f21ede6b1e2ea92dc73 Mon Sep 17 00:00:00 2001 From: Dilyn Corner Date: Tue, 8 Oct 2024 16:20:53 -0400 Subject: [PATCH 2/3] snapcraft.yaml: switch autoconf to automake automake requires autoconf, and most systems using autotools require both Signed-off-by: Dilyn Corner --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c5db9a09a..cd42cc14d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -34,7 +34,7 @@ parts: - NODE_ENV: "dev" - CPPFLAGS: "$CPPFLAGS -DPNG_ARM_NEON_OPT=0" build-packages: - - autoconf + - automake - build-essential - libbluetooth-dev - libboost-python-dev From 29263338465c46262e3c11f3b922f4ad1f46d7be Mon Sep 17 00:00:00 2001 From: Dilyn Corner Date: Tue, 8 Oct 2024 16:21:25 -0400 Subject: [PATCH 3/3] snapcraft.yaml: identical files should not fail cp cp will bail just in case source=dest, and in that case we do not care if dest is overwritten. Signed-off-by: Dilyn Corner --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index cd42cc14d..ffaa37e05 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -48,7 +48,7 @@ parts: craftctl default npm install --only-dev npm run-script build - cp -av build $CRAFT_PART_INSTALL/lib/node_modules/webthings-gateway/ + cp -avf build $CRAFT_PART_INSTALL/lib/node_modules/webthings-gateway/ # fix wrongly hardcoded /usr/bin/python interpreter in pagekite if [ -e $CRAFT_PART_INSTALL/lib/node_modules/webthings-gateway/pagekite.py ]; then sed -i 's;#!.*;#! /usr/bin/env python3;' \