mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Merge branch 'testing' into config-panel
This commit is contained in:
commit
ed452ea71f
13 changed files with 149 additions and 35 deletions
|
@ -5,7 +5,8 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Synapse for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/synapse)  
|
||||
[](https://dash.yunohost.org/appci/app/synapse)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=synapse)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -20,7 +21,7 @@ Instant messaging server matrix network.
|
|||
Yunohost chatroom with matrix : [https://matrix.to/#/#yunohost:matrix.org](https://matrix.to/#/#yunohost:matrix.org)
|
||||
|
||||
|
||||
**Shipped version:** 1.74.0~ynh1
|
||||
**Shipped version:** 1.81.0~ynh1
|
||||
## Disclaimers / important information
|
||||
|
||||
## Configuration
|
||||
|
@ -59,6 +60,8 @@ If it is not automatically done, you need to open this in your ISP box.
|
|||
|
||||
You also need a valid TLS certificate for the domain used by synapse. To do that you can refer to the documentation here : https://yunohost.org/#/certificate_en
|
||||
|
||||
https://federationtester.matrix.org/ can be used to easily debug federation issues
|
||||
|
||||
### Turnserver
|
||||
|
||||
For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands:
|
||||
|
|
19
README_fr.md
19
README_fr.md
|
@ -5,22 +5,23 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Synapse pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/synapse)  
|
||||
[](https://dash.yunohost.org/appci/app/synapse)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=synapse)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Synapse 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.*
|
||||
> *Ce package vous permet d’installer Synapse 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
|
||||
## Vue d’ensemble
|
||||
|
||||
Instant messaging server matrix network.
|
||||
|
||||
Yunohost chatroom with matrix : [https://matrix.to/#/#yunohost:matrix.org](https://matrix.to/#/#yunohost:matrix.org)
|
||||
|
||||
|
||||
**Version incluse :** 1.74.0~ynh1
|
||||
**Version incluse :** 1.81.0~ynh1
|
||||
## Avertissements / informations importantes
|
||||
|
||||
## Configuration
|
||||
|
@ -59,6 +60,8 @@ If it is not automatically done, you need to open this in your ISP box.
|
|||
|
||||
You also need a valid TLS certificate for the domain used by synapse. To do that you can refer to the documentation here : https://yunohost.org/#/certificate_en
|
||||
|
||||
https://federationtester.matrix.org/ can be used to easily debug federation issues
|
||||
|
||||
### Turnserver
|
||||
|
||||
For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands:
|
||||
|
@ -205,8 +208,8 @@ Before installing a second instance of the app it's really recommended to update
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : <https://matrix.org/>
|
||||
* Dépôt de code officiel de l'app : <https://github.com/matrix-org/synapse>
|
||||
* Site officiel de l’app : <https://matrix.org/>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/matrix-org/synapse>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_synapse>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/synapse_ynh/issues>
|
||||
|
||||
|
@ -222,4 +225,4 @@ ou
|
|||
sudo yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.74.0/matrix-synapse_1.74.0-buster-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=4c7412eab47e9ac4ccc6cde6cbe33dbee2badbbded475cef5bb2b2e3ee926d62
|
||||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.81.0/matrix-synapse_1.81.0-bookworm-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=429e1d7570322b44da083f003adfda0e2ebfd1773d9991dd5b9ad6df5ff56804
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.74.0/matrix-synapse_1.74.0-bullseye-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=27f0cfad22014cf1eb75492e04996156d7284d1f419d23e0e4970c5ff479ba7d
|
||||
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.81.0/matrix-synapse_1.81.0-bullseye-bin1_armv7l.tar.gz
|
||||
SOURCE_SUM=7469e9e303fa72f3c6bd2700a77fb5bfda8f8e2bbafdb6d4b4074d1fe6be4043
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
|
|
54
conf/requirement_bookworm.txt
Normal file
54
conf/requirement_bookworm.txt
Normal file
|
@ -0,0 +1,54 @@
|
|||
attrs==22.2.0
|
||||
Automat==22.10.0
|
||||
bcrypt==4.0.1
|
||||
bleach==6.0.0
|
||||
canonicaljson==2.0.0
|
||||
certifi==2022.12.7
|
||||
cffi==1.15.1
|
||||
charset-normalizer==3.1.0
|
||||
constantly==15.1.0
|
||||
cryptography==40.0.1
|
||||
hyperlink==21.0.0
|
||||
idna==3.4
|
||||
ijson==3.2.0.post0
|
||||
immutabledict==2.2.4
|
||||
incremental==22.10.0
|
||||
Jinja2==3.1.2
|
||||
jsonschema==4.17.3
|
||||
ldap3==2.9.1
|
||||
lxml==4.9.2
|
||||
MarkupSafe==2.1.2
|
||||
matrix-common==1.3.0
|
||||
matrix-synapse==1.81.0
|
||||
matrix-synapse-ldap3==0.2.2
|
||||
msgpack==1.0.5
|
||||
ndg-httpsclient==0.5.1
|
||||
netaddr==0.8.0
|
||||
packaging==23.0
|
||||
phonenumbers==8.13.9
|
||||
Pillow==9.5.0
|
||||
prometheus-client==0.16.0
|
||||
psycopg2==2.9.6
|
||||
pyasn1==0.4.8
|
||||
pyasn1-modules==0.2.8
|
||||
pycparser==2.21
|
||||
pydantic==1.10.7
|
||||
pymacaroons==0.13.0
|
||||
PyNaCl==1.5.0
|
||||
pyOpenSSL==23.1.1
|
||||
pyrsistent==0.19.3
|
||||
PyYAML==6.0
|
||||
requests==2.28.2
|
||||
semantic-version==2.10.0
|
||||
service-identity==21.1.0
|
||||
setuptools-rust==1.5.2
|
||||
signedjson==1.1.4
|
||||
six==1.16.0
|
||||
sortedcontainers==2.4.0
|
||||
treq==22.2.0
|
||||
Twisted==22.10.0
|
||||
typing_extensions==4.5.0
|
||||
unpaddedbase64==2.1.0
|
||||
urllib3==1.26.15
|
||||
webencodings==0.5.1
|
||||
zope.interface==6.0
|
55
conf/requirement_bullseye.txt
Normal file
55
conf/requirement_bullseye.txt
Normal file
|
@ -0,0 +1,55 @@
|
|||
attrs==22.2.0
|
||||
Automat==22.10.0
|
||||
bcrypt==4.0.1
|
||||
bleach==6.0.0
|
||||
canonicaljson==2.0.0
|
||||
certifi==2022.12.7
|
||||
cffi==1.15.1
|
||||
charset-normalizer==3.1.0
|
||||
constantly==15.1.0
|
||||
cryptography==40.0.1
|
||||
hyperlink==21.0.0
|
||||
idna==3.4
|
||||
ijson==3.2.0.post0
|
||||
immutabledict==2.2.4
|
||||
incremental==22.10.0
|
||||
Jinja2==3.1.2
|
||||
jsonschema==4.17.3
|
||||
ldap3==2.9.1
|
||||
lxml==4.9.2
|
||||
MarkupSafe==2.1.2
|
||||
matrix-common==1.3.0
|
||||
matrix-synapse==1.81.0
|
||||
matrix-synapse-ldap3==0.2.2
|
||||
msgpack==1.0.5
|
||||
ndg-httpsclient==0.5.1
|
||||
netaddr==0.8.0
|
||||
packaging==23.0
|
||||
phonenumbers==8.13.9
|
||||
Pillow==9.5.0
|
||||
pkg_resources==0.0.0
|
||||
prometheus-client==0.16.0
|
||||
psycopg2==2.9.6
|
||||
pyasn1==0.4.8
|
||||
pyasn1-modules==0.2.8
|
||||
pycparser==2.21
|
||||
pydantic==1.10.7
|
||||
pymacaroons==0.13.0
|
||||
PyNaCl==1.5.0
|
||||
pyOpenSSL==23.1.1
|
||||
pyrsistent==0.19.3
|
||||
PyYAML==6.0
|
||||
requests==2.28.2
|
||||
semantic-version==2.10.0
|
||||
service-identity==21.1.0
|
||||
setuptools-rust==1.5.2
|
||||
signedjson==1.1.4
|
||||
six==1.16.0
|
||||
sortedcontainers==2.4.0
|
||||
treq==22.2.0
|
||||
Twisted==22.10.0
|
||||
typing_extensions==4.5.0
|
||||
unpaddedbase64==2.1.0
|
||||
urllib3==1.26.15
|
||||
webencodings==0.5.1
|
||||
zope.interface==6.0
|
|
@ -34,6 +34,8 @@ If it is not automatically done, you need to open this in your ISP box.
|
|||
|
||||
You also need a valid TLS certificate for the domain used by synapse. To do that you can refer to the documentation here : https://yunohost.org/#/certificate_en
|
||||
|
||||
https://federationtester.matrix.org/ can be used to easily debug federation issues
|
||||
|
||||
### Turnserver
|
||||
|
||||
For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Instant messaging server which uses Matrix",
|
||||
"fr": "Serveur de messagerie instantané basé sur Matrix"
|
||||
},
|
||||
"version": "1.74.0~ynh1",
|
||||
"version": "1.81.0~ynh1",
|
||||
"url": "http://matrix.org",
|
||||
"license": "Apache-2.0",
|
||||
"maintainer": {
|
||||
|
@ -19,7 +19,7 @@
|
|||
"code": "https://github.com/matrix-org/synapse"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.2"
|
||||
"yunohost": ">= 11.0.11"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -47,30 +47,24 @@ install_sources() {
|
|||
source $final_path/bin/activate
|
||||
set -$u_arg;
|
||||
if [ $(lsb_release --codename --short) == "bullseye" ]; then
|
||||
# Fix issue with setuptools https://github.com/pypa/setuptools/issues/3118
|
||||
pip3 install --upgrade setuptools==60.8.2 wheel pip
|
||||
else
|
||||
pip3 install --upgrade setuptools wheel pip
|
||||
fi
|
||||
|
||||
chown $synapse_user:root -R $final_path
|
||||
sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade 'cryptography>=3.4.7' 'pyOpenSSL>=22.1.0' 'attrs>=22.1.0'
|
||||
|
||||
pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2
|
||||
# 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
|
||||
pip3 install --upgrade -r $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt
|
||||
|
||||
# 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_arg;
|
||||
deactivate
|
||||
set -$u_arg;
|
||||
|
||||
# Remove Rust to reduce backup size
|
||||
ynh_secure_remove --file=$final_path/.rustup
|
||||
ynh_secure_remove --file=$final_path/.cargo
|
||||
fi
|
||||
}
|
||||
|
||||
get_domain_list() {
|
||||
yunohost --output-as plain domain list | grep -E "^#" -v | sort | uniq | while read domain; do
|
||||
echo -n " - https://$domain\n"
|
||||
echo -n " - https://$domain\n"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ synapse_db_name="matrix_$app"
|
|||
synapse_db_user="matrix_$app"
|
||||
synapse_db_name="matrix_$app"
|
||||
upstream_version=$(ynh_app_upstream_version)
|
||||
domain_whitelist_client=$(get_domain_list)
|
||||
domain_whitelist_client_=$(get_domain_list)
|
||||
domain_whitelist_client=${domain_whitelist_client_%"\n"}
|
||||
|
||||
# Check if the new path stay /_matrix if not exit
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ upstream_version=$(ynh_app_upstream_version)
|
|||
report_stats="false"
|
||||
e2e_enabled_by_default="off"
|
||||
default_domain_value="Same than the domain"
|
||||
domain_whitelist_client=$(get_domain_list)
|
||||
domain_whitelist_client_=$(get_domain_list)
|
||||
domain_whitelist_client=${domain_whitelist_client_%"\n"}
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
|
@ -374,12 +375,12 @@ public_ip6="$(curl -s ipv6.yunohost.org)" || true
|
|||
turn_external_ip=""
|
||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip4"
|
||||
turn_external_ip+="external-ip="$public_ip4%"\n"
|
||||
fi
|
||||
|
||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip6"
|
||||
turn_external_ip+="external-ip="$public_ip6%"\n"
|
||||
fi
|
||||
|
||||
ynh_add_config --template="turnserver.conf" --destination="/etc/matrix-$app/coturn.conf"
|
||||
|
|
|
@ -182,12 +182,12 @@ public_ip6="$(curl -s ipv6.yunohost.org)" || true
|
|||
turn_external_ip=""
|
||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip4"
|
||||
turn_external_ip+="external-ip="$public_ip4%"\n"
|
||||
fi
|
||||
|
||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip6"
|
||||
turn_external_ip+="external-ip="$public_ip6%"\n"
|
||||
fi
|
||||
|
||||
ynh_add_config --template="turnserver.conf" --destination="/etc/matrix-$app/coturn.conf"
|
||||
|
|
|
@ -40,7 +40,8 @@ registration_shared_secret=$(ynh_app_setting_get --app=$app --key=registration_s
|
|||
form_secret=$(ynh_app_setting_get --app=$app --key=form_secret)
|
||||
macaroon_secret_key=$(ynh_app_setting_get --app=$app --key=macaroon_secret_key)
|
||||
synapse_user_app_pwd=$(ynh_app_setting_get --app=$app --key=synapse_user_app_pwd)
|
||||
domain_whitelist_client=$(get_domain_list)
|
||||
domain_whitelist_client_=$(get_domain_list)
|
||||
domain_whitelist_client=${domain_whitelist_client_%"\n"}
|
||||
main_domain=$(yunohost domain list --output-as json | jq -r .main)
|
||||
|
||||
#=================================================
|
||||
|
@ -537,12 +538,12 @@ public_ip6="$(curl -s ipv6.yunohost.org)" || true
|
|||
turn_external_ip=""
|
||||
if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip4"
|
||||
turn_external_ip+="external-ip="$public_ip4%"\n"
|
||||
fi
|
||||
|
||||
if [ -n "$public_ip6" ] && ynh_validate_ip6 --ip_address="$public_ip6"
|
||||
then
|
||||
turn_external_ip+="\nexternal-ip=$public_ip6"
|
||||
turn_external_ip+="external-ip="$public_ip6%"\n"
|
||||
fi
|
||||
|
||||
ynh_add_config --template="turnserver.conf" --destination="/etc/matrix-$app/coturn.conf"
|
||||
|
|
Loading…
Add table
Reference in a new issue