Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix v2 #439

Draft
wants to merge 38 commits into
base: testing
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3a1d10d
First implementation of matrix sliding proxy
Josue-T Feb 26, 2024
61add5e
Make it less warning on remove
Josue-T Feb 26, 2024
8b4d2e1
fix test
Josue-T Feb 26, 2024
632ecc4
Fix upgrade with old 3pids_email values
Josue-T Mar 8, 2024
1b522bd
Merge branch 'testing' into matrix_v2
Josue-T Mar 9, 2024
1efee60
Merge branch 'testing' into matrix_v2
Josue-T Mar 9, 2024
507ac9d
Force enable password authentication as some client need it to work c…
Josue-T Mar 19, 2024
72b21bf
Auto-update README
yunohost-bot Mar 19, 2024
24fb003
Merge branch 'testing' into matrix_v2
Josue-T Mar 22, 2024
1ecfca8
Merge branch 'testing' into matrix_v2
Josue-T Apr 3, 2024
1b8c052
Merge branch 'testing' into matrix_v2
Josue-T Apr 17, 2024
4caf510
Merge branch 'testing' into matrix_v2
Josue-T Apr 19, 2024
4d1cc3a
Merge branch 'testing' into matrix_v2
Josue-T Apr 25, 2024
2b6e61d
Merge branch 'testing' into matrix_v2
Josue-T May 6, 2024
ecb452f
Merge branch 'testing' into matrix_v2
Josue-T May 15, 2024
5cda628
[fix] Force enable password authentication on matrixv2
Josue-T May 17, 2024
1b4c08c
Merge branch 'testing' into matrix_v2
Josue-T May 30, 2024
aa34378
Upgrade sliding sync proxy to v0.99.18
nathanael-h Jun 10, 2024
1a39c32
Merge branch 'testing' into matrix_v2
Josue-T Jun 22, 2024
a925519
Merge branch 'testing' into matrix_v2
Josue-T Jun 24, 2024
07efe7b
Merge branch 'testing' into matrix_v2
Josue-T Jul 3, 2024
23985be
Merge branch 'testing' into matrix_v2
Josue-T Jul 17, 2024
50d70de
Merge branch 'testing' into matrix_v2
Josue-T Jul 31, 2024
0f5060c
Merge branch 'testing' into matrix_v2
Josue-T Aug 14, 2024
695e2f0
Add missing sliding sync proxy db on restore
Josue-T Aug 22, 2024
155514f
Merge branch 'testing' into matrix_v2
Josue-T Aug 22, 2024
5a55aee
Merge branch 'testing' into matrix_v2
Josue-T Sep 5, 2024
823bbcc
Merge branch 'testing' into matrix_v2
Josue-T Sep 18, 2024
607fff3
Merge branch 'testing' into matrix_v2
Josue-T Oct 2, 2024
70b585b
Merge branch 'testing' into matrix_v2
Josue-T Oct 16, 2024
0c17daa
Merge branch 'testing' into matrix_v2
Josue-T Oct 28, 2024
5e7b559
Remove sliding sync proxy and use native synapse sliding sync
Josue-T Oct 28, 2024
75d3384
Remove /client as it not anymore necessary
Josue-T Oct 30, 2024
6ae1fc9
Merge pull request #494 from YunoHost-Apps/matrix_v2_merge
Josue-T Nov 1, 2024
b5e25d0
Merge branch 'testing' into matrix_v2
Josue-T Nov 18, 2024
418aba8
Merge branch 'testing' into matrix_v2
Josue-T Nov 27, 2024
52ce772
Merge branch 'testing' into matrix_v2
Josue-T Nov 30, 2024
6e09114
Merge branch 'testing' into matrix_v2
Josue-T Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/server_name.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ location = /.well-known/matrix/server {
location = /.well-known/matrix/client {
return 200 '{
"m.homeserver": { "base_url": "https://__DOMAIN__" },
"org.matrix.msc3575.proxy": { "url": "https://__DOMAIN__"},
"im.vector.riot.jitsi": {"preferredDomain": "__JITSI_SERVER__"},
"im.vector.riot.e2ee": {"default": __E2E_ENABLED_BY_DEFAULT_CLIENT_CONFIG__ }
}';
Expand Down
15 changes: 8 additions & 7 deletions config_panel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ services = ["__APP__"]
no = "false"
help = "Defaults to 'false'. If 'true', it is highly recommended to use either captcha, email, or token-based verification to avoid SPAM."

[main.welcome.password_enabled]
ask = "Enable Password Login"
type = "boolean"
yes = "true"
no = "false"
help = "If disabled, Login with Non-YunoHost Users impossible. But it simplies Login process if your Matrix server only has YunoHost SSO Users."
visible = "! enable_registration"
# Disabled for matrix V2 because some client like Element X don't support cas and so require to have password authentication enabled
# [main.welcome.password_enabled]
# ask = "Enable Password Login"
# type = "boolean"
# yes = "true"
# no = "false"
# help = "If disabled, Login with Non-YunoHost Users impossible. But it simplies Login process if your Matrix server only has YunoHost SSO Users."
# visible = "! enable_registration"

[main.welcome.registrations_require_3pid]
ask = "Registration requires all following 3PID personal identifier"
Expand Down
4 changes: 4 additions & 0 deletions scripts/change_url
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ configure_nginx
#=================================================

ynh_script_progression "Updating Synapse config..."

# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled
password_enabled=true

ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml"
ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"

Expand Down
4 changes: 4 additions & 0 deletions scripts/config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ ynh_app_config_validate() {
ynh_app_config_apply() {
_ynh_app_config_apply
configure_nginx

# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled
password_enabled=true

ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml"
ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"
set_permissions
Expand Down
3 changes: 3 additions & 0 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ configure_nginx
#=================================================
ynh_script_progression "Configuring Synapse..."

# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled
password_enabled=true

ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml"
ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"

Expand Down
20 changes: 20 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,32 @@ then
ynh_app_setting_set --key=form_secret --value="$form_secret"
fi

#=================================================
# MIGRATION 13 : REMOVE SLIDING SYNC PROXY COMPONENTS
#=================================================
ynh_script_progression --message="Cleaning sliding sync proxy components..."

if ynh_''psql_database_exists "${db_name}"_slidingproxy; then
ynh_''psql_drop_db "${db_name}"_slidingproxy
fi

ynh_safe_rm /etc/matrix-$app/sliding_proxy.conf

test -e /etc/systemd/system/"$app"-sliding-proxy.service && (yunohost service remove "$app"-sliding-proxy || true)
ynh_config_remove_systemd "$app"-sliding-proxy

#=================================================
# STANDARD UPGRADE STEPS
#=================================================

#=================================================
# UPDATE SYNAPSE CONFIG
#=================================================
ynh_script_progression "Updating synapse config..."

# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled
password_enabled=true

ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml"
ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml"

Expand Down
6 changes: 6 additions & 0 deletions tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ test_format = 1.0
[default]

test_upgrade_from.3b5a58e5d8b83f292c6160e8908ac662360aa03e.name = "Before packaging v2 (branch old_version_for_CI_6)"

test_upgrade_from.9f273cac72baad192f046620dae33a97cd0ec749.name = "Post app user creation (branch old_version_for_CI_7)"

test_upgrade_from.0d433dc2d756cf39b13b1be8a7b9c00655edf4fb.name = "Before Matrix v2 implementation"

test_upgrade_from.70b585b595bfe63ebf4ef82f11acc7e243740764.name = "Before sliding sync proxy removal"

test_upgrade_from.8ab6186bede11c5856886a8978428a0f09b6d08d.name = "Before helper 2.1"