From 19f812c050037b5038b979efc9541c688968ffae Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 6 Feb 2024 21:33:38 +0100 Subject: [PATCH 01/10] Upgrade to v3.1.4 Changelog: https://github.com/node-red/node-red/releases/tag/3.1.4 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 78cdc82..f328a82 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Node-RED" description.en = "Flow-based programming for the Internet of Things" description.fr = "Programmation par flux de données pour l'Internet des objets" -version = "3.0.2~ynh4" +version = "3.1.4~ynh1" maintainers = ["tituspijean"] @@ -48,8 +48,8 @@ ram.runtime = "70M" [resources] [resources.sources.main] - url = "https://github.com/node-red/node-red/releases/download/3.0.2/node-red-3.0.2.zip" - sha256 = "6c452646648f9e86622148eff2208fb45d2311b5339481f86b445e9e2fa215c5" + url = "https://github.com/node-red/node-red/archive/refs/tags/3.1.4.tar.gz" + sha256 = "2691084e08c8c4752a054499d849052495b0c011f0800ad20548e80db46cd999" autoupdate.strategy = "latest_github_release" From 79e3411bb5d9f2ada06bf153a3ca85fa15af6547 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 6 Feb 2024 20:33:38 +0000 Subject: [PATCH 02/10] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94b75f1..b5bef3e 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ logging: { // replace the default logging option ...defaultSettings.logging, // You can check the default settings Yunohost generates at `__INSTALL_DIR__/data/settings.js` and find the documentation for configuring Node-RED here: -**Shipped version:** 3.0.2~ynh4 +**Shipped version:** 3.1.4~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 9b47ed1..a12b112 100644 --- a/README_fr.md +++ b/README_fr.md @@ -49,7 +49,7 @@ module.exports = (defaultSettings) => ({ Vous pouvez consulter les paramètres par défaut générez par Yunohost dans `__INSTALL_DIR__/data/settings.js` et trouver la documentation pour configurer Node-RED ici: -**Version incluse :** 3.0.2~ynh4 +**Version incluse :** 3.1.4~ynh1 ## Captures d’écran From 92c3c08b2e2945a3e8432fbc35502b3190017c81 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 22 Feb 2024 23:43:39 +0100 Subject: [PATCH 03/10] fix source file and autoupdater --- manifest.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index f328a82..e619dff 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,10 +48,11 @@ ram.runtime = "70M" [resources] [resources.sources.main] - url = "https://github.com/node-red/node-red/archive/refs/tags/3.1.4.tar.gz" - sha256 = "2691084e08c8c4752a054499d849052495b0c011f0800ad20548e80db46cd999" + url = "https://github.com/node-red/node-red/releases/download/3.1.4/node-red-3.1.4.zip" + sha256 = "441c17d5a5bf6e19e2ea9eec3bc1e9af572230c47eee518c2dbb2e7374137f06" autoupdate.strategy = "latest_github_release" + autoupdate.asset = "node-red-.*zip" [resources.system_user] From 8725bcd8d81b844b656f410402eb51595cd51061 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 22 Feb 2024 22:43:42 +0000 Subject: [PATCH 04/10] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b5bef3e..dc9e803 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -73,4 +73,4 @@ or sudo yunohost app upgrade nodered -u https://github.com/YunoHost-Apps/nodered_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index a12b112..eabc46c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From 145df8805294ec86705dfc42df67aa6ac9e20664 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 24 Feb 2024 01:36:35 +0100 Subject: [PATCH 05/10] Upgrade nodejs dependency (#88) * Upgrade nodejs to version 20 * Bump version --- manifest.toml | 2 +- scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index e619dff..21c9045 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Node-RED" description.en = "Flow-based programming for the Internet of Things" description.fr = "Programmation par flux de données pour l'Internet des objets" -version = "3.1.4~ynh1" +version = "3.1.4~ynh2" maintainers = ["tituspijean"] diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..44277c5 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=20 #================================================= # PERSONAL HELPERS From 5517a32f3e92c6a1063493ed0c98c0f287c61742 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 24 Feb 2024 00:36:39 +0000 Subject: [PATCH 06/10] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc9e803..8fd166a 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ logging: { // replace the default logging option ...defaultSettings.logging, // You can check the default settings Yunohost generates at `__INSTALL_DIR__/data/settings.js` and find the documentation for configuring Node-RED here: -**Shipped version:** 3.1.4~ynh1 +**Shipped version:** 3.1.4~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index eabc46c..7a150ef 100644 --- a/README_fr.md +++ b/README_fr.md @@ -49,7 +49,7 @@ module.exports = (defaultSettings) => ({ Vous pouvez consulter les paramètres par défaut générez par Yunohost dans `__INSTALL_DIR__/data/settings.js` et trouver la documentation pour configurer Node-RED ici: -**Version incluse :** 3.1.4~ynh1 +**Version incluse :** 3.1.4~ynh2 ## Captures d’écran From 4814515e9d4604fc59c56fb0f3692c26864ec95c Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 24 Feb 2024 01:45:02 +0100 Subject: [PATCH 07/10] smol shellcheck fixes --- scripts/change_url | 2 +- scripts/restore | 2 +- scripts/upgrade | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 45029e7..ef11966 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/restore b/scripts/restore index 93e81a7..58545e4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -26,7 +26,7 @@ ynh_restore_file --origin_path="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app: "$install_dir" +chown -R "$app:" "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS diff --git a/scripts/upgrade b/scripts/upgrade index f11b86c..3febcdd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" +ynh_systemd_action --service_name="$app" --action="stop" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -44,7 +44,7 @@ fi # In older versions of the package, the port serving the webui was opened to anyone, # allowing direct access to Node-RED... let's close it. if yunohost firewall list | grep -q "\- $port$"; then - ynh_exec_warn_less yunohost firewall disallow TCP $port + ynh_exec_warn_less yunohost firewall disallow TCP "$port" fi #================================================= @@ -117,7 +117,7 @@ yunohost service add "$app" --description="Low-code programming for event-driven #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name="$app" --action="start" #================================================= # END OF SCRIPT From 4b578cef9fc3d98d19158c17ceeec929777d0c3a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 24 Feb 2024 01:45:31 +0100 Subject: [PATCH 08/10] add CI update test: from 3.1.4~ynh1 (update nodejs 16 to 20) --- tests.toml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests.toml b/tests.toml index 724c9b5..0494aee 100644 --- a/tests.toml +++ b/tests.toml @@ -4,10 +4,13 @@ test_format = 1.0 [default] - # ------------------------ - # ------------------------------- - # Commits to test upgrade from - # ------------------------------- +# ------------------------ +# ------------------------------- +# Commits to test upgrade from +# ------------------------------- [default.test_upgrade_from.3dae97a7] name = "3.0.2~ynh2" + + [default.test_upgrade_from.ca5545af] + name = "3.1.4~ynh1 (update nodejs 16 to 20)" From 8d96e1a2bb515d12cadc778b8e1c3c502a9173b9 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 24 Feb 2024 01:46:20 +0100 Subject: [PATCH 09/10] remove useless comment --- tests.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests.toml b/tests.toml index 0494aee..c97f408 100644 --- a/tests.toml +++ b/tests.toml @@ -4,7 +4,6 @@ test_format = 1.0 [default] -# ------------------------ # ------------------------------- # Commits to test upgrade from # ------------------------------- From 456a26be3800004358fcc64f3f84d367350c9e38 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 24 Feb 2024 01:50:48 +0100 Subject: [PATCH 10/10] Enable websockets (see: https://github.com/YunoHost-Apps/nodered_ynh/issues/78 ) --- conf/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9ac97f6..02d4d9e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,6 +11,9 @@ location ^~ __PATH__/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; + # Enable websockets (see: https://github.com/YunoHost-Apps/nodered_ynh/issues/78 ) + more_set_headers "Content-Security-Policy : upgrade-insecure-requests; default-src https: data: blob: ; connect-src 'self' wss://$host; object-src https: data: 'unsafe-inline'; style-src https: data: 'unsafe-inline' ; script-src https: data: 'unsafe-inline' 'unsafe-eval'; worker-src 'self' blob:;"; + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; }