From ab41b45af782abdd0d981a4f56b25df4c736a3f4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 22 Nov 2021 06:11:24 +0000 Subject: [PATCH 1/6] Upgrade to 2021.11.22 --- conf/app_api-gateway.src | 4 ++-- conf/app_auth.src | 4 ++-- conf/app_syncing-server-js.src | 4 ++-- manifest.json | 2 +- scripts/_common.sh | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/app_api-gateway.src b/conf/app_api-gateway.src index 6459069..5449c98 100644 --- a/conf/app_api-gateway.src +++ b/conf/app_api-gateway.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/standardnotes/api-gateway/archive/1.26.1.tar.gz -SOURCE_SUM=3fe3ea593dc1feca708c35786bf140f8445d964a4503145d0aa268bf0091a337 +SOURCE_URL=https://github.com/standardnotes/api-gateway/archive/1.27.0.tar.gz +SOURCE_SUM=841e34d55f63c9ed7acfed60e5121248b2a5590eeadc65ab8a268306acf86366 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app_auth.src b/conf/app_auth.src index 9a7af15..dcd860d 100644 --- a/conf/app_auth.src +++ b/conf/app_auth.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/standardnotes/auth/archive/1.24.2.tar.gz -SOURCE_SUM=8a38eb876a2b8c4b65309c7dd94df71817d8267e86377618a76964561ed7a45c +SOURCE_URL=https://github.com/standardnotes/auth/archive/1.29.0.tar.gz +SOURCE_SUM=3968d20f309292f8d0cc92f9eb648199945345789812ccce5594ade1267f24bf SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app_syncing-server-js.src b/conf/app_syncing-server-js.src index a155f02..6af3de6 100644 --- a/conf/app_syncing-server-js.src +++ b/conf/app_syncing-server-js.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/standardnotes/syncing-server-js/archive/1.42.7.tar.gz -SOURCE_SUM=b9a3b457a4c46b39101a278ee71f3714b90c56d598dec6605d8a33e41a6862de +SOURCE_URL=https://github.com/standardnotes/syncing-server-js/archive/1.42.9.tar.gz +SOURCE_SUM=709630a56e54abe6c356e1fb745def9ddefab255486f4bc3cb0473a73fe4ea90 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index dfdaf2a..38aeaff 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "The Standard Notes syncing server. An end-to-end encrypted note-taking app." }, - "version": "2021.11.08~ynh1", + "version": "2021.11.22~ynh1", "url": "https://github.com/standardnotes/standalone", "upstream": { "license": "AGPL-3.0-or-later", diff --git a/scripts/_common.sh b/scripts/_common.sh index fe7d3a7..589471e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,9 +6,9 @@ RUBY_VERSION="2.7.3" NODEJS_VERSION="15.11.0" -syncing_server_js_version="1.42.7" -auth_version="1.24.2" -api_gateway_version="1.26.1" +syncing_server_js_version="1.42.9" +auth_version="1.29.0" +api_gateway_version="1.27.0" extensions_version="2021.08.27" swap_needed=2048 From 3b495088bccdd531b7b38b2671f9a1710b6b5421 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 22 Nov 2021 06:11:30 +0000 Subject: [PATCH 2/6] 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 f741cc8..5bc3070 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in The Standard Notes syncing server. An end-to-end encrypted note-taking app. -**Shipped version:** 2021.11.08~ynh1 +**Shipped version:** 2021.11.22~ynh1 **Demo:** https://standardnotes.org/demo diff --git a/README_fr.md b/README_fr.md index aac7761..7c6035f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour -**Version incluse :** 2021.11.08~ynh1 +**Version incluse :** 2021.11.22~ynh1 **Démo :** https://standardnotes.org/demo From 5680fa183725ed55001c2c49f485ece0d0cdf936 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Tue, 23 Nov 2021 21:09:20 +0100 Subject: [PATCH 3/6] Update: Update to nodejs 16 --- scripts/_common.sh | 2 +- scripts/upgrade | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 589471e..30b5a4a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= RUBY_VERSION="2.7.3" -NODEJS_VERSION="15.11.0" +NODEJS_VERSION="16" syncing_server_js_version="1.42.9" auth_version="1.29.0" diff --git a/scripts/upgrade b/scripts/upgrade index dbc3ad9..6f19bd1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -275,6 +275,12 @@ if [ -e "$final_path/live/auth-worker" ]; then ynh_secure_remove --file="$final_path/live/auth-worker" fi +# Remove nodejs if current version is lower than 2021.11.22 +if ynh_compare_current_package_version --comparison lt --version 2021.11.22~ynh1 +then + ynh_remove_nodejs +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -386,7 +392,6 @@ ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - #================================================= # SPECIFIC UPGRADE #================================================= From 32849232374ae5ac6066d58e49c8fc44ace780aa Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Tue, 23 Nov 2021 21:11:51 +0100 Subject: [PATCH 4/6] Fix: remove unnecessary http->https redirect in nginx.conf --- conf/nginx.conf | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1a16b2f..c7ab8fc 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,4 @@ location __PATH__/ { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_pass http://127.0.0.1:__PORT_API_GATEWAY__/; proxy_http_version 1.1; proxy_set_header Host $http_host; @@ -24,10 +20,6 @@ location = __PATH__/help { location __PATH__/help/ { alias __FINAL_PATH_WWW__/help/; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } @@ -44,10 +36,6 @@ location = __PATH__/extensions/ { location __PATH__/extensions/ { alias __FINAL_PATH_EXTENSIONS__/; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - if ($request_method = 'OPTIONS') { more_set_headers 'Access-Control-Allow-Origin: $http_origin'; more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, HEAD'; From 1132aac73d14dcc90e498ea5408e6d7cab418bb2 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Tue, 23 Nov 2021 21:14:39 +0100 Subject: [PATCH 5/6] Fix: install problem. Service line-match has changed --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 349068d..3760472 100755 --- a/scripts/install +++ b/scripts/install @@ -325,7 +325,7 @@ ynh_systemd_action \ --service_name="$app-api-gateway" \ --action="start" \ --log_path="/var/log/$app/api-gateway.log" \ - --line_match='{"message":"Server started on port '$port_api_gateway'","level":"info"}' + --line_match='{"level":"info","message":"Server started on port '$port_api_gateway'"}' #================================================= # SETUP FAIL2BAN diff --git a/scripts/restore b/scripts/restore index ddeb598..83db97f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -226,7 +226,7 @@ ynh_systemd_action \ --service_name="$app-api-gateway" \ --action="start" \ --log_path="/var/log/$app/api-gateway.log" \ - --line_match='{"message":"Server started on port '$port_api_gateway'","level":"info"}' + --line_match='{"level":"info","message":"Server started on port '$port_api_gateway'"}' #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 6f19bd1..1ca61fc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -552,7 +552,7 @@ ynh_systemd_action \ --service_name="$app-api-gateway" \ --action="start" \ --log_path="/var/log/$app/api-gateway.log" \ - --line_match='{"message":"Server started on port '$port_api_gateway'","level":"info"}' + --line_match='{"level":"info","message":"Server started on port '$port_api_gateway'"}' #================================================= # SETUP FAIL2BAN From 108c097b32b0324748f8408a74249647cf40a4db Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Fri, 26 Nov 2021 20:51:16 +0100 Subject: [PATCH 6/6] Fix: upgrade nodejs --- scripts/upgrade | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1ca61fc..7bbc320 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,6 +57,7 @@ config_auth_worker="$final_path/live/auth-worker.env" config_api_gateway="$final_path/live/api-gateway.env" standalone=$(ynh_app_setting_get --app=$app --key=standalone) +nodejs_version_installed=$(ynh_app_setting_get --app=$app --key=nodejs_version) #================================================= # CHECK VERSION @@ -275,12 +276,6 @@ if [ -e "$final_path/live/auth-worker" ]; then ynh_secure_remove --file="$final_path/live/auth-worker" fi -# Remove nodejs if current version is lower than 2021.11.22 -if ynh_compare_current_package_version --comparison lt --version 2021.11.22~ynh1 -then - ynh_remove_nodejs -fi - #================================================= # CREATE DEDICATED USER #================================================= @@ -388,6 +383,12 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=1 +# Remove old nodejs version +if [[ "$nodejs_version_installed" < "$NODEJS_VERSION" && -n "$nodejs_version_installed" ]] +then + ynh_remove_nodejs +fi + ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"