From 6f073ae0864c73f38e34ae4b00d2d7f509cfe0f7 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sun, 19 Feb 2023 22:21:29 +0100 Subject: [PATCH 1/9] Bump Golang to 1.20 --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ab4d9f..52b4576 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Shipped version:** 0.11.1~ynh1 +**Shipped version:** 0.11.1~ynh2 ## Disclaimers / important information :warning: The upstream app is still in beta. Tread carefully. diff --git a/README_fr.md b/README_fr.md index 2ccec26..8bfad16 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Version incluse :** 0.11.1~ynh1 +**Version incluse :** 0.11.1~ynh2 ## Avertissements / informations importantes :warning: The upstream app is still in beta. Tread carefully. diff --git a/manifest.json b/manifest.json index 237a0d1..bda3f27 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix homeserver of second generation", "fr": "Serveur Matrix de seconde génération" }, - "version": "0.11.1~ynh1", + "version": "0.11.1~ynh2", "url": "https://matrix.org/", "upstream": { "license": "Apache-2.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index a8f18f8..00211e0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app (must be on a single line) pkg_dependencies="postgresql postgresql-contrib" -GO_VERSION="1.18" +GO_VERSION="1.20" psql_version=$PSQL_VERSION #================================================= From a57df2c7c293ea6d36675a9eb21b8eb3790e848f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 24 Feb 2023 00:29:33 +0100 Subject: [PATCH 2/9] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fb72ba0..a56d7cb 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From f5442de7c9f9ed850b7c1283d95f260062a6ce40 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Tue, 4 Apr 2023 14:22:19 +0200 Subject: [PATCH 3/9] Upgrade to v0.12 --- conf/app.src | 4 ++-- conf/systemd.service | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index f2c7c0d..e2c182d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://api.github.com/repos/matrix-org/dendrite/tarball/v0.11.1 -SOURCE_SUM=caf5df07a1dce5dbaa3133c939a8622893529d2f5dfd6b2a14ec97f7a4ec00f4 +SOURCE_URL=https://api.github.com/repos/matrix-org/dendrite/tarball/v0.12.0 +SOURCE_SUM=a50fba39dbbfe4de58674e448e7d1149359759f526bd366c3976547d9744953c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index c9ab58e..b8a6b41 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/bin/dendrite-monolith-server --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dendrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__ __REALLY_ENABLE_OPEN_REGISTRATION__ +ExecStart=__FINALPATH__/bin/dendrite --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dendrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__ __REALLY_ENABLE_OPEN_REGISTRATION__ StandardOutput=journal StandardError=inherit LimitNOFILE=65535 diff --git a/scripts/install b/scripts/install index c5e3d25..fc0b274 100644 --- a/scripts/install +++ b/scripts/install @@ -146,7 +146,7 @@ pushd "$final_path/build" ynh_use_go export GOPATH="$final_path/build/go" export GOCACHE="$final_path/build/.cache" - CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite-monolith-server > /dev/null 2>&1 + CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite > /dev/null 2>&1 CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/create-account > /dev/null 2>&1 CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/generate-keys > /dev/null 2>&1 popd diff --git a/scripts/upgrade b/scripts/upgrade index 4715f07..022cbf0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -168,7 +168,7 @@ then ynh_use_go export GOPATH="$final_path/build/go" export GOCACHE="$final_path/build/.cache" - CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite-monolith-server > /dev/null 2>&1 + CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/dendrite > /dev/null 2>&1 CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/create-account > /dev/null 2>&1 CGO_ENABLED=1 go build -trimpath -v -o "$final_path/bin/" ./cmd/generate-keys > /dev/null 2>&1 popd From 81e2d3d23150ae50142cda5ab2738322477bfc97 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Mar 2023 06:25:21 +0000 Subject: [PATCH 4/9] Upgrade to v0.12.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index bda3f27..e36662b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix homeserver of second generation", "fr": "Serveur Matrix de seconde génération" }, - "version": "0.11.1~ynh2", + "version": "0.12.0~ynh1", "url": "https://matrix.org/", "upstream": { "license": "Apache-2.0", From 60a63bf2b29ea45b5c800a6167b7279790eddb08 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Mar 2023 06:25:27 +0000 Subject: [PATCH 5/9] 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 52b4576..cbe74fa 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Shipped version:** 0.11.1~ynh2 +**Shipped version:** 0.12.0~ynh1 ## Disclaimers / important information :warning: The upstream app is still in beta. Tread carefully. diff --git a/README_fr.md b/README_fr.md index 8bfad16..f2b43c3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Version incluse :** 0.11.1~ynh2 +**Version incluse :** 0.12.0~ynh1 ## Avertissements / informations importantes :warning: The upstream app is still in beta. Tread carefully. From 342635eafad1021764ebee98732d326c05cb2b30 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Tue, 4 Apr 2023 22:31:44 +0200 Subject: [PATCH 6/9] Properly monitor system start/stop. --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/change_url | 4 ++-- scripts/config | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cbe74fa..02e26dd 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Shipped version:** 0.12.0~ynh1 +**Shipped version:** 0.12.0~ynh2 ## Disclaimers / important information :warning: The upstream app is still in beta. Tread carefully. diff --git a/README_fr.md b/README_fr.md index f2b43c3..3ce1f66 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Version incluse :** 0.12.0~ynh1 +**Version incluse :** 0.12.0~ynh2 ## Avertissements / informations importantes :warning: The upstream app is still in beta. Tread carefully. diff --git a/manifest.json b/manifest.json index e36662b..2889e14 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix homeserver of second generation", "fr": "Serveur Matrix de seconde génération" }, - "version": "0.12.0~ynh1", + "version": "0.12.0~ynh2", "url": "https://matrix.org/", "upstream": { "license": "Apache-2.0", diff --git a/scripts/change_url b/scripts/change_url index 334bd88..cbd458f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -89,7 +89,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -138,7 +138,7 @@ ynh_add_systemd_config ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/config b/scripts/config index 2ea3ea5..fac0561 100644 --- a/scripts/config +++ b/scripts/config @@ -46,7 +46,7 @@ ynh_app_config_apply() { ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/dendrite.yaml" ynh_add_systemd_config - ynh_systemd_action --service_name=$app --action="restart" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log" + ynh_systemd_action --service_name=$app --action="restart" --line_match="Cleaning old notifications" --log_path="systemd" ynh_app_setting_set --app=$app --key=registration --value=$registration fi diff --git a/scripts/install b/scripts/install index fc0b274..caeac53 100644 --- a/scripts/install +++ b/scripts/install @@ -214,7 +214,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index d0196f8..298c2aa 100644 --- a/scripts/restore +++ b/scripts/restore @@ -139,7 +139,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 022cbf0..a87957e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,7 +56,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -222,7 +222,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # RELOAD NGINX From a11df671afde3a38677e974893971ff612b118f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:29:03 +0200 Subject: [PATCH 7/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 2889e14..e36662b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix homeserver of second generation", "fr": "Serveur Matrix de seconde génération" }, - "version": "0.12.0~ynh2", + "version": "0.12.0~ynh1", "url": "https://matrix.org/", "upstream": { "license": "Apache-2.0", From a6f138f5bbff3bf4952fe448385c9517dde6c2eb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 6 Apr 2023 09:29:08 +0000 Subject: [PATCH 8/9] 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 02e26dd..cbe74fa 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Shipped version:** 0.12.0~ynh2 +**Shipped version:** 0.12.0~ynh1 ## Disclaimers / important information :warning: The upstream app is still in beta. Tread carefully. diff --git a/README_fr.md b/README_fr.md index 3ce1f66..f2b43c3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Dendrite is a second-generation Matrix homeserver written in Go. It intends to p - Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. -**Version incluse :** 0.12.0~ynh2 +**Version incluse :** 0.12.0~ynh1 ## Avertissements / informations importantes :warning: The upstream app is still in beta. Tread carefully. From f92287fe998113b0c6b260f0875de0fa736c239f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:43:01 +0200 Subject: [PATCH 9/9] Rename log file --- 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 caeac53..1d6c471 100644 --- a/scripts/install +++ b/scripts/install @@ -206,7 +206,7 @@ ynh_replace_string --match_string="/var/log/$app/*.log" --replace_string="/var/l #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$tls_port" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$tls_port" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 298c2aa..55b83f7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -132,7 +132,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$tls_port" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$tls_port" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index a87957e..1e26174 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -215,7 +215,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$tls_port" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$tls_port" #================================================= # START SYSTEMD SERVICE