diff --git a/README.md b/README.md index 112e0ec..d5f50c4 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.19.3 +**Shipped version:** 1.20.1 ## Configuration @@ -29,7 +29,7 @@ The script to build the binary is also available. ### Web client -If you want a web client you can also install riot with this package: https://github.com/YunoHost-Apps/riot_ynh . +If you want a web client you can also install riot with this package: https://github.com/YunoHost-Apps/element_ynh . ### Access by federation diff --git a/actions.toml b/actions.toml index 42932d4..d6721fc 100644 --- a/actions.toml +++ b/actions.toml @@ -21,10 +21,10 @@ description = "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open [set_admin_user] name = "Set a user as admin" -command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME domain)'\")\" == 'UPDATE 1' ]]" +command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME server_name)'\")\" == 'UPDATE 1' ]]" user = "root" accepted_return_codes = [0] -description = "Set a synapse user as admin in the synapse server. It probably usefull only to manage the community function." +description = "Set a synapse user as admin in the synapse server. It is mainly required to manage the community function." [set_admin_user.arguments] [set_admin_user.arguments.username] diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index f791800..80a6e37 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.19.3/matrix-synapse_1.19.3-buster-bin1_armv7l.tar.gz -SOURCE_SUM=34738e934c99aeb784682190a8852ad42698c72554a5249093a3110c221bbb73 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.1/matrix-synapse_1.20.1-buster-bin1_armv7l.tar.gz +SOURCE_SUM=89a895a4aace87f3a7782aff0589dbc61a6dd8beb08f7d72715e3e4670e28a97 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 02aa362..aeebf67 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_stretch.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.19.3/matrix-synapse_1.19.3-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=35b16127fe402aa0f069e01038f1f30bbf6ee9b81c666a91d7d272259b69c3b3 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.1/matrix-synapse_1.20.1-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=c6bb1e8f29aeaca836eccf56067a26835db7881a767d99775e572393438d4cc7 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/server_name.conf b/conf/server_name.conf index fdf553e..4555203 100644 --- a/conf/server_name.conf +++ b/conf/server_name.conf @@ -5,8 +5,9 @@ location /.well-known/matrix/server { } location /.well-known/matrix/client { - return 200 '{"im.vector.riot.jitsi": - {"preferredDomain": "__JITSI_SERVER_ADDR__"} + return 200 '{ + "m.homeserver": { "base_url": "https://__DOMAIN__" }, + "im.vector.riot.jitsi": {"preferredDomain": "__JITSI_SERVER_ADDR__"} }'; add_header Content-Type application/json; add_header Access-Control-Allow-Origin '*'; diff --git a/manifest.json b/manifest.json index 5594952..eb70a1f 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.19.3~ynh1", + "version": "1.20.1~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/install b/scripts/install index 48983e8..9696f53 100644 --- a/scripts/install +++ b/scripts/install @@ -175,6 +175,7 @@ ynh_script_progression --message="Setting up source files..." --weight=50 mkdir -p /var/lib/matrix-$app mkdir -p /var/log/matrix-$app mkdir -p /etc/matrix-$app/conf.d +mkdir -p /etc/matrix-$app/app-service # Install synapse in virtualenv install_sources diff --git a/scripts/restore b/scripts/restore index 3b3815d..60ada9d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -77,6 +77,7 @@ ynh_install_app_dependencies $dependances ynh_script_progression --message="Restoring directory and configuration..." --weight=10 ynh_restore +mkdir -p /etc/matrix-$app/app-service # Check that the good python version is installed # If not upgrade the source diff --git a/scripts/upgrade b/scripts/upgrade index d1a6b80..98d9957 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -323,6 +323,7 @@ ynh_add_fpm_config # Create .well-known redirection for access by federation if yunohost --output-as plain domain list | grep -q "^$server_name$" then + ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" cp ../conf/server_name.conf /etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" ynh_replace_string --match_string=__PORT__ --replace_string=$synapse_tls_port --target_file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" @@ -385,6 +386,9 @@ cp ../sources/update_synapse_for_appservice.sh $final_path/ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/update_synapse_for_appservice.sh" +# Ensure app-service folder has exists (Migration) +mkdir -p /etc/matrix-$app/app-service + #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #=================================================