diff --git a/README.md b/README.md index 03bd0f1..be1477c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Instant messaging server matrix network. Yunohost chatroom with matrix : [https://riot.im/app/#/room/#yunohost:matrix.org](https://riot.im/app/#/room/#yunohost:matrix.org) -**Shipped version:** 1.28.0 +**Shipped version:** 1.31.0 ## Configuration @@ -78,6 +78,29 @@ If you have a dynamic IP address, you also might need to update this config auto */15 * * * * root bash /opt/yunohost/__SYNAPSE_INSTANCE_NAME__/Coturn_config_rotate.sh; ``` +#### OpenVPN + +In case of you have an OpenVPN server you might want than `coturn-synapse` restart when the VPN restart. To do this create a file named `/usr/local/bin/openvpn_up_script.sh` with this content: +``` +#!/bin/bash + +( + sleep 5 + sudo systemctl restart coturn-synapse.service +) & +exit 0 +``` + +Add this line in you sudo config file `/etc/sudoers` +``` +openvpn ALL=(ALL) NOPASSWD: /bin/systemctl restart coturn-synapse.service +``` + +And add this line in your OpenVPN config file +``` +ipchange /usr/local/bin/openvpn_up_script.sh +``` + ### Important Security Note We do not recommend running Element from the same domain name as your Matrix diff --git a/check_process b/check_process index fa6484d..c14412d 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,7 @@ upgrade=1 from_commit=35774cc0eabb82b03230210689fa060d5f2b0bd8 upgrade=1 from_commit=dbf0a2c9359ccd62b55132cace548b17e44af9bf backup_restore=1 - multi_instance=1 + multi_instance=0 incorrect_path=0 port_already_use=1 (8448) change_url=0 diff --git a/conf/armv7_stretch.src b/conf/armv7_bullseye.src similarity index 69% rename from conf/armv7_stretch.src rename to conf/armv7_bullseye.src index 744d6fc..89e1144 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_bullseye.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.28.0/matrix-synapse_1.28.0-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=03078aa4a8a88609ab71e11f8503c83f5bbee8e4211f997318d7843438ac4db5 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.31.0/matrix-synapse_1.31.0-bullseye-bin1_armv7l.tar.gz +SOURCE_SUM=edfe30078bae8fbe565e6e18f6c0859c81e1828862584a5135ac57f92e1f0c91 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index 3139bdb..ed0e09a 100644 --- a/conf/armv7_buster.src +++ b/conf/armv7_buster.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.28.0/matrix-synapse_1.28.0-buster-bin1_armv7l.tar.gz -SOURCE_SUM=9a3a0098953ee592f9c40fd98d1e54f0c5a369a27007667fbe4689cc0aa4bcc0 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.31.0/matrix-synapse_1.31.0-buster-bin1_armv7l.tar.gz +SOURCE_SUM=877bb0812bd133b4f4c6745b1c5dc441dcd919f65de8a53d348fd00b99e74660 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/nginx.conf b/conf/nginx.conf index a08a7b7..9b12af0 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,7 @@ location __PATH__ { proxy_pass http://localhost:__PORT__; proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 100M; diff --git a/manifest.json b/manifest.json index 5f1c968..3228ee2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server which uses Matrix", "fr": "Un serveur de messagerie instantané basé sur Matrix" }, - "version": "1.28.0~ynh2", + "version": "1.31.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index f760389..79a4564 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -40,27 +40,29 @@ install_sources() { if [ -e $final_path/.rustup ]; then sudo -u "$synapse_user" env PATH=$PATH rustup update else - sudo -u "$synapse_user" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable' + sudo -u "$synapse_user" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal' fi - + # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path # Install synapse in virtualenv # We set all necessary environement variable to create a python virtualenvironnement. - set +u; + u_arg='u' + set +$u_arg; source $final_path/bin/activate - set -u; + set -$u_arg; pip3 install --upgrade setuptools wheel chown $synapse_user:root -R $final_path sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade 'cryptography>=3.3' pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 - pip3 install --upgrade 'Twisted>=20.3.0<21' matrix-synapse==$upstream_version matrix-synapse-ldap3 + # Fix issue https://github.com/YunoHost-Apps/synapse_ynh/issues/248 + pip3 install --upgrade 'Twisted>=21' 'treq>=21.1.0' matrix-synapse==$upstream_version matrix-synapse-ldap3 # This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does - set +u; + set +$u_arg; deactivate - set -u; + set -$u_arg; fi } diff --git a/scripts/install b/scripts/install index 9e5bb73..9a1184c 100644 --- a/scripts/install +++ b/scripts/install @@ -342,7 +342,7 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin ynh_script_progression --message="Configuring permissions..." --weight=1 ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true -ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true +ynh_permission_update --permission=main --show_tile=false --protected=true ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \ --label="Server access for client apps." --show_tile=false --allowed=visitors \ diff --git a/scripts/upgrade b/scripts/upgrade index 63f92bc..174a103 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -405,7 +405,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 ynh_legacy_permissions_delete_all ynh_permission_url --permission=main --url=$domain/_matrix/cas_server.php/login --auth_header=true -ynh_permission_update --permission=main --label="Synapse server SSO authentication" --show_tile=false --protected=true +ynh_permission_update --permission=main --show_tile=false --protected=true if ! ynh_permission_exists --permission=server_api; then ynh_permission_create --permission=server_api --url=$domain/_matrix --additional_urls=$server_name/.well-known/matrix \