diff --git a/README.md b/README.md index 2bf9528..636b640 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.22.1 +**Shipped version:** 1.23.0 ## 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/element_ynh . +If you want a web client you can also install Element with this package: https://github.com/YunoHost-Apps/element_ynh . ### Access by federation @@ -80,15 +80,15 @@ If you have a dynamic IP address, you also might need to update this config auto ### Important Security Note -We do not recommend running Riot from the same domain name as your Matrix +We do not recommend running Element from the same domain name as your Matrix homeserver (synapse). The reason is the risk of XSS (cross-site-scripting) -vulnerabilities that could occur if someone caused Riot to load and render +vulnerabilities that could occur if someone caused Element to load and render malicious user generated content from a Matrix API which then had trusted -access to Riot (or other apps) due to sharing the same domain. +access to Element (or other apps) due to sharing the same domain. We have put some coarse mitigations into place to try to protect against this situation, but it's still not a good practice to do it in the first place. See -https://github.com/vector-im/riot-web/issues/1977 for more details. +https://github.com/vector-im/element-web/issues/1977 for more details. ## Documentation @@ -111,7 +111,7 @@ Supported with LDAP. Synapse uses a lot of ressource. So on slow architecture (like small ARM board), this app could take a lot of CPU and RAM. -This app doesn't provide any real good web interface. So it's recommended to use Riot client to connect to this app. This app is available [here](https://github.com/YunoHost-Apps/riot_ynh) +This app doesn't provide any real good web interface. So it's recommended to use Element client to connect to this app. This app is available [here](https://github.com/YunoHost-Apps/element_ynh) ## Additional information diff --git a/check_process b/check_process index e7fbe71..c475b1c 100644 --- a/check_process +++ b/check_process @@ -3,7 +3,7 @@ domain="domain.tld" (DOMAIN) path="/_matrix/static/" (PATH) is_public=1 (PUBLIC|public=1|private=0) - server_name="domain2.tld" (DOMAIN) + server_name="domain2.tld" (DOMAIN) ; Checks pkg_linter=1 setup_sub_dir=1 @@ -22,7 +22,7 @@ ;;; Levels Level 5=auto ;;; Upgrade options - ; commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b - name=Fix postgresql helper from old_version_for_CI_2 branch + ; commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b + name=Fix postgresql helper from old_version_for_CI_2 branch ; commit=5006cf1536f33d065aade2caa9b88120e0d1a381 name=Migrate from self signed certificate to cert managed by Yunohost from old_version_for_CI_3 branch diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index 5ca9fb6..5c46ae0 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.22.1/matrix-synapse_1.22.1-buster-bin1_armv7l.tar.gz -SOURCE_SUM=21a6c38dc0adf0f50b568536a9e116f34696ae7e36c3f2b5f1093962444a4bb8 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.23.0/matrix-synapse_1.23.0-buster-bin1_armv7l.tar.gz +SOURCE_SUM=d5f5c05b34b8fc3a7eb2f97a48eac9c5737818d3b21621c261be18540c779a28 # (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 37f5e91..774df90 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.22.1/matrix-synapse_1.22.1-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=8a3209322576811dd6ae9f0e1117977eddbf9f0e6eafc6a12de11326c31a86b9 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.23.0/matrix-synapse_1.23.0-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=5f787c992541d0f58d22fc4d9cd243746f09db879e6663960060ba097386e0c0 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/coturn-synapse.service b/conf/coturn-synapse.service index 94884a7..13c0687 100644 --- a/conf/coturn-synapse.service +++ b/conf/coturn-synapse.service @@ -8,11 +8,11 @@ User=turnserver Group=turnserver Type=forking EnvironmentFile=/etc/default/coturn-__APP__ -PIDFile=/var/run/coturn-__APP__/turnserver.pid +PIDFile=/run/coturn-__APP__/turnserver.pid RuntimeDirectory=coturn-__APP__ RuntimeDirectoryMode=0755 ExecStart=/usr/bin/turnserver -o -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS -ExecStopPost=/bin/rm -f /var/run/coturn-__APP__/turnserver.pid +ExecStopPost=/bin/rm -f /run/coturn-__APP__/turnserver.pid Restart=on-abort LimitCORE=infinity @@ -24,4 +24,4 @@ CPUSchedulingPolicy=other UMask=0007 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/conf/homeserver.yaml b/conf/homeserver.yaml index 0084bf7..8d69522 100644 --- a/conf/homeserver.yaml +++ b/conf/homeserver.yaml @@ -11,7 +11,7 @@ server_name: "__SERVER_NAME__" # When running as a daemon, the file to store the pid in # -pid_file: /var/run/matrix-__APP__/homeserver.pid +pid_file: /run/matrix-__APP__/homeserver.pid # The path to the web client which will be served at /_matrix/client/ # if 'webclient' is configured under the 'listeners' configuration. diff --git a/conf/nginx.conf b/conf/nginx.conf index c00d0ce..3c1e9f5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,7 +8,7 @@ location __PATH__ { location __PATH__/cas_server.php { alias /var/www/__APP__/; fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock; + fastcgi_pass unix:/run/php7.0-fpm-__NAME__.sock; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 236179a..8f737b9 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -30,7 +30,7 @@ group = matrix-__USER__ ; specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php5-fpm-__NAMETOCHANGE__.sock +listen = /run/php7.0-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. A value of '-1' means unlimited. ; Default Value: 128 (-1 on FreeBSD and OpenBSD) diff --git a/conf/turnserver.conf b/conf/turnserver.conf index c3149da..7483e7d 100644 --- a/conf/turnserver.conf +++ b/conf/turnserver.conf @@ -24,5 +24,5 @@ no-multicast-peers no-cli log-file=/var/log/matrix-__APP__/turnserver.log -pidfile=/var/run/coturn-__APP__/turnserver.pid +pidfile=/run/coturn-__APP__/turnserver.pid simple-log diff --git a/manifest.json b/manifest.json index d4a3915..71719db 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.22.1~ynh1", + "version": "1.23.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/backup b/scripts/backup index 50e6d11..1632188 100644 --- a/scripts/backup +++ b/scripts/backup @@ -54,7 +54,7 @@ ynh_backup --src_path="$final_www_path" ynh_script_progression --message="Backing up nginx web server configuration..." --weight=1 # BACKUP THE PHP-FPM CONFIGURATION -ynh_backup --src_path "/etc/php5/fpm/pool.d/$app.conf" +ynh_backup --src_path "/etc/php/7.0/fpm/pool.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" if yunohost --output-as plain domain list | grep -q "^$server_name$" diff --git a/scripts/install b/scripts/install index 9696f53..1354ec0 100644 --- a/scripts/install +++ b/scripts/install @@ -176,6 +176,7 @@ 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 +echo "app_service_config_files:" > /etc/matrix-$app/conf.d/app_service.yaml # Install synapse in virtualenv install_sources diff --git a/scripts/restore b/scripts/restore index 60ada9d..2c288ce 100644 --- a/scripts/restore +++ b/scripts/restore @@ -281,7 +281,7 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --type="restore" #================================================= ynh_script_progression --message="Reloading nginx web server..." -systemctl reload php5-fpm +systemctl reload php7.0-fpm ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 98d9957..8b9f3f5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -386,8 +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) +# Ensure app-service folder has exists and the config file exit (Migration) mkdir -p /etc/matrix-$app/app-service +test -e /etc/matrix-$app/conf.d/app_service.yaml || echo "app_service_config_files:" > /etc/matrix-$app/conf.d/app_service.yaml #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/sources/update_synapse_for_appservice.sh b/sources/update_synapse_for_appservice.sh index 50097ee..193b1f0 100644 --- a/sources/update_synapse_for_appservice.sh +++ b/sources/update_synapse_for_appservice.sh @@ -9,12 +9,13 @@ cp $service_config_file /tmp/app_service_backup.yaml echo "app_service_config_files:" > $service_config_file for f in $(ls /etc/matrix-$app/app-service/); do echo " - /etc/matrix-$app/app-service/$f" >> $service_config_file - chmod 600 /etc/matrix-$app/app-service/$f done # Set permissions -chown --reference=$service_config_file -R /etc/matrix-$app +chown matrix-$app $service_config_file +chown matrix-$app /etc/matrix-$app/app-service/* chmod 600 $service_config_file +chmod 600 /etc/matrix-$app/app-service/* systemctl restart matrix-$app @@ -23,5 +24,5 @@ if [ $? -eq 0 ]; then exit 0 else echo "Failed to restart synapse with the new config file. Restore the old config file !!" - mv /tmp/app_service_backup.yaml $service_config_file + cp /tmp/app_service_backup.yaml $service_config_file fi