From a2c135f6b4d5fc54d98a64da9f951a4b8384dd3e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 1 May 2021 23:48:56 +0200 Subject: [PATCH 01/19] Fix systemd service --- conf/systemd.service | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 932c82a..bd45aa6 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ Environment="PATH=__ENV_PATH__" -ExecStart=__FINALPATH__/./bin/dendrite-monolith-server --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dentrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__ >> /var/log/__APP__/__APP__.log 2>&1 +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__ >> /var/log/__APP__/__APP__.log 2>&1 [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index 8fb8bef..a969563 100644 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,7 @@ ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/den ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port domain" +ynh_add_systemd_config --others_var="port tls_port domain env_path" #================================================= # STORE THE CONFIG FILE CHECKSUM diff --git a/scripts/upgrade b/scripts/upgrade index 56d7958..0db881f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,7 +125,7 @@ popd || ynh_die ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port domain" +ynh_add_systemd_config --others_var="port tls_port domain env_path" #================================================= # MODIFY A CONFIG FILE From a69ce981faa50fd7502279753a491c887d750a3a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 2 May 2021 00:06:14 +0200 Subject: [PATCH 02/19] Dentrite -> dendrite Not the last time I will make this typo --- scripts/install | 4 ++-- scripts/upgrade | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index a969563..fbde67b 100644 --- a/scripts/install +++ b/scripts/install @@ -156,7 +156,7 @@ then fi # Copy and modify the config file -ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/dentrite.yaml" +ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/dendrite.yaml" #================================================= # SETUP SYSTEMD @@ -171,7 +171,7 @@ ynh_add_systemd_config --others_var="port tls_port domain env_path" #================================================= # Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/dentrite.yaml" +ynh_store_file_checksum --file="$final_path/dendrite.yaml" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 0db881f..2680ae2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,7 +60,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="Stopped Dentrite Matrix homeserver" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped Dendrite Matrix homeserver" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From c7bc584b5647e77330dabe142cae6ef77f49b430 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 2 May 2021 15:14:08 +0200 Subject: [PATCH 03/19] Update install --- scripts/install | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/install b/scripts/install index fbde67b..601ab57 100644 --- a/scripts/install +++ b/scripts/install @@ -166,13 +166,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config --others_var="port tls_port domain env_path" -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/dendrite.yaml" - #================================================= # GENERIC FINALIZATION #================================================= From 958c8abc197de653766bf8a3aa179d52531eebbc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Jul 2021 21:00:09 +0200 Subject: [PATCH 04/19] O.4.1 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index f4912ed..50ecd68 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/matrix-org/dendrite/archive/v0.3.11.zip -SOURCE_SUM=70db3719fdc841c45a702c752e4527a10367fed254c9ab8cd9ea80ec7f8cf196 +SOURCE_URL=https://github.com/matrix-org/dendrite/archive/v0.4.1.zip +SOURCE_SUM=458ef5652003280eb3acb6e7e6f59a6d99a741f6cdd26591612767443dd76451 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 106147b..4f5f63f 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.3.11~ynh1", + "version": "0.4.1~ynh1", "url": "https://matrix.org/", "license": "Apache-2.0", "maintainer": { From 495fd1ef26dec622e5261a12aa8c729420552129 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Jul 2021 23:18:16 +0200 Subject: [PATCH 05/19] Other_var not needed --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 601ab57..1ef61cd 100644 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,7 @@ ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/den ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port domain env_path" +ynh_add_systemd_config #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 2680ae2..2113d63 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,7 +125,7 @@ popd || ynh_die ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port domain env_path" +ynh_add_systemd_config #================================================= # MODIFY A CONFIG FILE From 727228f6bcda26db1757f524cf9a136434db9142 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Jul 2021 23:23:57 +0200 Subject: [PATCH 06/19] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index f052395..d4fd719 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -113,7 +113,7 @@ fi ynh_script_progression --message="Updating systemd configuration..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port domain" +ynh_add_systemd_config #================================================= # GENERIC FINALISATION From 3a15ea3d64d490bde298dd805210f91c99db8fb2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Jul 2021 23:24:35 +0200 Subject: [PATCH 07/19] Update systemd.service --- conf/systemd.service | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index bd45aa6..4ea3ebd 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,6 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -Environment="PATH=__ENV_PATH__" 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__ >> /var/log/__APP__/__APP__.log 2>&1 [Install] From 3a0a4c3145ac021d93e990b87c00e61593eeed37 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Jul 2021 23:34:03 +0200 Subject: [PATCH 08/19] Add templates --- .../ISSUE_TEMPLATE.md | 4 +-- .github/PULL_REQUEST_TEMPLATE.md | 16 +++++++++ check_process | 8 ++--- check_process.default | 35 ------------------- doc/DISCLAIMER.md | 5 +++ manifest.json | 7 ++++ pull_request_template.md | 16 --------- scripts/change_url | 14 ++++---- 8 files changed, 41 insertions(+), 64 deletions(-) rename issue_template.md => .github/ISSUE_TEMPLATE.md (94%) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 check_process.default create mode 100644 doc/DISCLAIMER.md delete mode 100644 pull_request_template.md diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 94% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index df0eab4..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - - *Otherwise, the issue may be due to Dendrite itself. Refer to its documentation or repository for help.* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- @@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install dendrite + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/check_process b/check_process index 4cba368..02214c7 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) - port="666" (PORT) + domain="domain.tld" + path="/path" + is_public=1 + port="666" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/check_process.default b/check_process.default deleted file mode 100644 index 41888cb..0000000 --- a/check_process.default +++ /dev/null @@ -1,35 +0,0 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - -;; Test complet - ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - language="fr" - is_public=1 (PUBLIC|public=1|private=0) - password="pass" - port="666" (PORT) - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - upgrade=1 from_commit=CommitHash - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..765a28c --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,5 @@ +:warning: The upstream app is still in beta. Tread carefully. + +## Limitations + +* Upstream app still in beta. diff --git a/manifest.json b/manifest.json index 4f5f63f..e0c893c 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,13 @@ }, "version": "0.4.1~ynh1", "url": "https://matrix.org/", + "upstream": { + "license": "Apache-2.0", + "website": "https://matrix.org/", + "admindoc": "https://github.com/matrix-org/dendrite/tree/master/docs", + "userdoc": "https://yunohost.org/apps", + "code": "https://github.com/matrix-org/dendrite" + }, "license": "Apache-2.0", "maintainer": { "name": "tituspijean", diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/change_url b/scripts/change_url index d4fd719..6160dea 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,7 +29,7 @@ tls_port=$(ynh_app_setting_get --app=$app --key=tls_port) #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) @@ -37,7 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -72,14 +72,14 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 +ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -120,14 +120,14 @@ ynh_add_systemd_config #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +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="systemd" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -135,4 +135,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --time --last +ynh_script_progression --message="Change of URL completed for $app" --last From 4ba27e2fcb6e9107acc578415aed764147a76625 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot Date: Thu, 29 Jul 2021 21:34:10 +0000 Subject: [PATCH 09/19] Auto-update README --- README.md | 55 ++++++++++++++++++++++------------------------------ README_fr.md | 48 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 32 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index 5d455b5..d512007 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,42 @@ + + # Dendrite for YunoHost [![Integration level](https://dash.yunohost.org/integration/dendrite.svg)](https://dash.yunohost.org/appci/app/dendrite) ![](https://ci-apps.yunohost.org/ci/badges/dendrite.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/dendrite.maintain.svg) [![Install Dendrite with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dendrite) - +*[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Dendrite quickly and simply on a YunoHost server. +> *This package allows you to install Dendrite quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an efficient, reliable and scalable alternative to Synapse. -**Shipped version:** 0.3.11 +Matrix homeserver of second generation + +**Shipped version:** 0.4.1~ynh1 + + + +## Disclaimers / important information :warning: The upstream app is still in beta. Tread carefully. -## Configuration - -How to configure this app: from its configuration file. - -## Documentation - - * Official documentation: https://github.com/matrix-org/dendrite/tree/master/docs - * YunoHost documentation: If specific documentation is needed, feel free to contribute. - -## YunoHost specific features - -#### Multi-user support - - * Are LDAP and HTTP auth supported? Not yet. - * Can the app be used by multiple users? Yes. - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/dendrite%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/dendrite/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/dendrite%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/dendrite/) - ## Limitations * Upstream app still in beta. -## Links +## Documentation and resources - * Report a bug: https://github.com/YunoHost-Apps/dendrite_ynh/issues - * App website: https://matrix.org/docs/projects/server/dendrite - * Upstream app repository: https://github.com/matrix-org/dendrite - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://matrix.org/ +* Official user documentation: https://yunohost.org/apps +* Official admin documentation: https://github.com/matrix-org/dendrite/tree/master/docs +* Upstream app code repository: https://github.com/matrix-org/dendrite +* YunoHost documentation for this app: https://yunohost.org/app_dendrite +* Report a bug: https://github.com/YunoHost-Apps/dendrite_ynh/issues ## Developer info @@ -59,3 +48,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/dendrite_ynh/tree/tes or sudo yunohost app upgrade dendrite -u https://github.com/YunoHost-Apps/dendrite_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..ee31f88 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,48 @@ +# Dendrite pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/dendrite.svg)](https://dash.yunohost.org/appci/app/dendrite) ![](https://ci-apps.yunohost.org/ci/badges/dendrite.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/dendrite.maintain.svg) +[![Installer Dendrite avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dendrite) + +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* + +> *Ce package vous permet d'installer Dendrite rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Serveur Matrix de seconde génération + +**Version incluse :** 0.4.1~ynh1 + + + +## Avertissements / informations importantes + +:warning: The upstream app is still in beta. Tread carefully. + +## Limitations + +* Upstream app still in beta. + +## Documentations et ressources + +* Site officiel de l'app : https://matrix.org/ +* Documentation officielle utilisateur : https://yunohost.org/apps +* Documentation officielle de l'admin : https://github.com/matrix-org/dendrite/tree/master/docs +* Dépôt de code officiel de l'app : https://github.com/matrix-org/dendrite +* Documentation YunoHost pour cette app : https://yunohost.org/app_dendrite +* Signaler un bug : https://github.com/YunoHost-Apps/dendrite_ynh/issues + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/dendrite_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/dendrite_ynh/tree/testing --debug +ou +sudo yunohost app upgrade dendrite -u https://github.com/YunoHost-Apps/dendrite_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file From de558b697cdda99960eaf734a9cace4dd46993ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 30 Jul 2021 00:01:43 +0200 Subject: [PATCH 10/19] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2113d63..d4fa3a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) tls_port=$(ynh_app_setting_get --app=$app --key=tls_port) From 74b1698639b9429f074ff0cc83b415db490a910c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 30 Jul 2021 00:02:57 +0200 Subject: [PATCH 11/19] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 02214c7..5870165 100644 --- a/check_process +++ b/check_process @@ -9,7 +9,7 @@ setup_sub_dir=0 setup_root=1 setup_nourl=0 - setup_private=0 + setup_private=1 setup_public=1 upgrade=1 # upgrade=1 from_commit=CommitHash From 27abd4667be18b7e008d5d2939d4b98ea0a48778 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 30 Jul 2021 00:11:02 +0200 Subject: [PATCH 12/19] Update remove --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 8ea6236..49a895d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -105,7 +105,7 @@ fi #================================================= # Remove the log files -ynh_secure_remove --file="/var/log/$app/" +ynh_secure_remove --file="/var/log/$app" #================================================= # GENERIC FINALIZATION From 78b8e4fec19ef313569731f0cfe5fc045899bae9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 11 Aug 2021 08:36:11 +0200 Subject: [PATCH 13/19] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 5870165..02214c7 100644 --- a/check_process +++ b/check_process @@ -9,7 +9,7 @@ setup_sub_dir=0 setup_root=1 setup_nourl=0 - setup_private=1 + setup_private=0 setup_public=1 upgrade=1 # upgrade=1 from_commit=CommitHash From 68e69880ea670a9762b8fcfdabc462fa313dd4e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 1 Sep 2021 10:49:48 +0200 Subject: [PATCH 14/19] 0.5.0 --- conf/app.src | 4 ++-- doc/DESCRIPTION.md | 7 +++++++ manifest.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 doc/DESCRIPTION.md diff --git a/conf/app.src b/conf/app.src index 50ecd68..9738c1b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/matrix-org/dendrite/archive/v0.4.1.zip -SOURCE_SUM=458ef5652003280eb3acb6e7e6f59a6d99a741f6cdd26591612767443dd76451 +SOURCE_URL=https://github.com/matrix-org/dendrite/archive/v0.5.0.zip +SOURCE_SUM=0e2923f19c90b808a1cd8bed3649cbd3c6b29ceb9c8d35716c92890a40d70c5b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..1d270a7 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,7 @@ +Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an efficient, reliable and scalable alternative to Synapse: + +### Features + +- Efficient: A small memory footprint with better baseline performance than an out-of-the-box Synapse. +- Reliable: Implements the Matrix specification as written, using the same test suite as Synapse as well as a brand new Go test suite. +- Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. diff --git a/manifest.json b/manifest.json index e0c893c..c87bc6c 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.4.1~ynh1", + "version": "0.5.0~ynh1", "url": "https://matrix.org/", "upstream": { "license": "Apache-2.0", From 3903f52e10b3199c9e583179e32bdc9cf647afdf Mon Sep 17 00:00:00 2001 From: Yunohost-Bot Date: Wed, 1 Sep 2021 08:49:53 +0000 Subject: [PATCH 15/19] Auto-update README --- README.md | 11 +++++++++-- README_fr.md | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d512007..21429c9 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,16 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Matrix homeserver of second generation +Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an efficient, reliable and scalable alternative to Synapse: -**Shipped version:** 0.4.1~ynh1 +### Features + +- Efficient: A small memory footprint with better baseline performance than an out-of-the-box Synapse. +- Reliable: Implements the Matrix specification as written, using the same test suite as Synapse as well as a brand new Go test suite. +- Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. + + +**Shipped version:** 0.5.0~ynh1 diff --git a/README_fr.md b/README_fr.md index ee31f88..bdfed09 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,9 +11,16 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Serveur Matrix de seconde génération +Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an efficient, reliable and scalable alternative to Synapse: -**Version incluse :** 0.4.1~ynh1 +### Features + +- Efficient: A small memory footprint with better baseline performance than an out-of-the-box Synapse. +- Reliable: Implements the Matrix specification as written, using the same test suite as Synapse as well as a brand new Go test suite. +- Scalable: can run on multiple machines and eventually scale to massive homeserver deployments. + + +**Version incluse :** 0.5.0~ynh1 From ae44707aa353cba1c4c056ecb8ddc11187c4b9f6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Sep 2021 10:11:58 +0200 Subject: [PATCH 16/19] Update systemd.service --- conf/systemd.service | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/conf/systemd.service b/conf/systemd.service index 4ea3ebd..996a086 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,5 +9,35 @@ 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__ >> /var/log/__APP__/__APP__.log 2>&1 +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target From 01998f71a701d2698fbf19b51e54b6d58ea0b9e0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Sep 2021 07:36:14 +0200 Subject: [PATCH 17/19] Update restore --- scripts/restore | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index e30eae7..f64d565 100644 --- a/scripts/restore +++ b/scripts/restore @@ -42,8 +42,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From e99fff360cfe36c8319d78afd55718c2e5b4e448 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 25 Sep 2021 20:04:20 +0200 Subject: [PATCH 18/19] Update manifest.json --- manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index c87bc6c..6dfc185 100644 --- a/manifest.json +++ b/manifest.json @@ -44,8 +44,7 @@ "help": { "en": "Dendrite requires its own domain, so make sure to create a new one.", "fr": "Dendrite a besoin de son propre domaine, créez-en un au préalable." - }, - "example": "dendrite.example.com" + } }, { "name": "is_public", From dfd4a56de022682f4797b74c83190f32af0ba478 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 25 Sep 2021 20:10:08 +0200 Subject: [PATCH 19/19] Cleaning up --- scripts/install | 15 ++++----------- scripts/remove | 6 ------ scripts/restore | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index 1ef61cd..e6626f7 100644 --- a/scripts/install +++ b/scripts/install @@ -89,20 +89,13 @@ env_path=$PATH #================================================= ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 -ynh_print_OFF -db_pwd=$(ynh_string_random --length=30) -ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd -ynh_print_ON - -# Create postgresql database +db_name=$(ynh_sanitize_dbid --db_name=$app) +ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run -db_name=$app -ynh_print_OFF -ynh_psql_create_user $db_name $db_pwd -ynh_print_ON +ynh_psql_setup_db --db_user=$db_name --db_name=$db_name + ynh_psql_execute_as_root \ --sql="CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" -ynh_app_setting_set --app=$app --key=db_name --value=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/remove b/scripts/remove index 49a895d..601e5f3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -86,12 +86,6 @@ ynh_remove_logrotate # CLOSE A PORT #================================================= -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - if yunohost firewall list | grep -q "\- $tls_port$" then ynh_script_progression --message="Closing port $tls_port..." --weight=1 diff --git a/scripts/restore b/scripts/restore index f64d565..375b040 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) tls_port=$(ynh_app_setting_get --app=$app --key=tls_port) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= # CHECK IF THE APP CAN BE RESTORED