From b1eab1b4085c0bc870a3f078ee2cd15f5c188624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 9 Feb 2023 19:44:59 +0100 Subject: [PATCH 1/7] Cleanup install and use requirement from package build --- scripts/_common.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 990a3fc..ec166b7 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -47,16 +47,15 @@ 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 + sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r ../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; From 75919e6c95456401cbd52ee7b2d635442f5fccab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 15 Feb 2023 01:51:48 +0100 Subject: [PATCH 2/7] Upgrade synapse to 1.77.0 --- conf/armv7_bookworm.src | 4 +-- conf/armv7_bullseye.src | 4 +-- conf/requirement_bookworm.txt | 55 ++++++++++++++++++++++++++++++++++ conf/requirement_bullseye.txt | 56 +++++++++++++++++++++++++++++++++++ manifest.json | 2 +- 5 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 conf/requirement_bookworm.txt create mode 100644 conf/requirement_bullseye.txt diff --git a/conf/armv7_bookworm.src b/conf/armv7_bookworm.src index 52cddc1..dac0f8d 100644 --- a/conf/armv7_bookworm.src +++ b/conf/armv7_bookworm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.76.0/matrix-synapse_1.76.0-bookworm-bin1_armv7l.tar.gz -SOURCE_SUM=11b45507a34f16cae39eed899798f7078d54f32190ebc2c9b1450a1410eb639d +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.77.0/matrix-synapse_1.77.0-bookworm-bin1_armv7l.tar.gz +SOURCE_SUM=60b117008ebd0339c397983f11d8b3538eb5cd086839fcb3c46b70dc4348afda # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_bullseye.src b/conf/armv7_bullseye.src index 6da9c49..5ecc6f7 100644 --- a/conf/armv7_bullseye.src +++ b/conf/armv7_bullseye.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.76.0/matrix-synapse_1.76.0-bullseye-bin1_armv7l.tar.gz -SOURCE_SUM=255fe98712d7482a68305e641e507048fb6c123e67912b788e6eeeb511b598cc +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.77.0/matrix-synapse_1.77.0-bullseye-bin1_armv7l.tar.gz +SOURCE_SUM=ddefcfa9ba4b80ac4b49cbd4ab4172c27136ce0ab32d4ac3f1d517ecc6b43391 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/requirement_bookworm.txt b/conf/requirement_bookworm.txt new file mode 100644 index 0000000..251f97d --- /dev/null +++ b/conf/requirement_bookworm.txt @@ -0,0 +1,55 @@ +attrs==22.2.0 +Automat==22.10.0 +bcrypt==4.0.1 +bleach==6.0.0 +canonicaljson==1.6.4 +certifi==2022.12.7 +cffi==1.15.1 +charset-normalizer==3.0.1 +constantly==15.1.0 +cryptography==39.0.1 +frozendict==2.3.4 +hyperlink==21.0.0 +idna==3.4 +ijson==3.2.0.post0 +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.77.0 +matrix-synapse-ldap3==0.2.2 +msgpack==1.0.4 +ndg-httpsclient==0.5.1 +netaddr==0.8.0 +packaging==23.0 +phonenumbers==8.13.6 +Pillow==9.4.0 +prometheus-client==0.16.0 +psycopg2==2.9.5 +pyasn1==0.4.8 +pyasn1-modules==0.2.8 +pycparser==2.21 +pydantic==1.10.4 +pymacaroons==0.13.0 +PyNaCl==1.5.0 +pyOpenSSL==23.0.0 +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 +simplejson==3.18.3 +six==1.16.0 +sortedcontainers==2.4.0 +treq==22.2.0 +Twisted==22.10.0 +typing_extensions==4.4.0 +unpaddedbase64==2.1.0 +urllib3==1.26.14 +webencodings==0.5.1 +zope.interface==5.5.2 diff --git a/conf/requirement_bullseye.txt b/conf/requirement_bullseye.txt new file mode 100644 index 0000000..75b5c31 --- /dev/null +++ b/conf/requirement_bullseye.txt @@ -0,0 +1,56 @@ +attrs==22.2.0 +Automat==22.10.0 +bcrypt==4.0.1 +bleach==6.0.0 +canonicaljson==1.6.4 +certifi==2022.12.7 +cffi==1.15.1 +charset-normalizer==3.0.1 +constantly==15.1.0 +cryptography==39.0.1 +frozendict==2.3.4 +hyperlink==21.0.0 +idna==3.4 +ijson==3.2.0.post0 +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.77.0 +matrix-synapse-ldap3==0.2.2 +msgpack==1.0.4 +ndg-httpsclient==0.5.1 +netaddr==0.8.0 +packaging==23.0 +phonenumbers==8.13.6 +Pillow==9.4.0 +pkg_resources==0.0.0 +prometheus-client==0.16.0 +psycopg2==2.9.5 +pyasn1==0.4.8 +pyasn1-modules==0.2.8 +pycparser==2.21 +pydantic==1.10.4 +pymacaroons==0.13.0 +PyNaCl==1.5.0 +pyOpenSSL==23.0.0 +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 +simplejson==3.18.3 +six==1.16.0 +sortedcontainers==2.4.0 +treq==22.2.0 +Twisted==22.10.0 +typing_extensions==4.4.0 +unpaddedbase64==2.1.0 +urllib3==1.26.14 +webencodings==0.5.1 +zope.interface==5.5.2 diff --git a/manifest.json b/manifest.json index cad9c83..07c6e6f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server which uses Matrix", "fr": "Serveur de messagerie instantané basé sur Matrix" }, - "version": "1.76.0~ynh1", + "version": "1.77.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From ea9adf080a021b3b5316c09ea933a9589cc783de Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 15 Feb 2023 06:56:32 +0000 Subject: [PATCH 3/7] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e55c4b1..379b8dc 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Synapse for YunoHost [![Integration level](https://dash.yunohost.org/integration/synapse.svg)](https://dash.yunohost.org/appci/app/synapse) ![Working status](https://ci-apps.yunohost.org/ci/badges/synapse.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/synapse.maintain.svg) + [![Install Synapse with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](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.76.0~ynh1 +**Shipped version:** 1.77.0~ynh1 ## Disclaimers / important information ## Configuration diff --git a/README_fr.md b/README_fr.md index 0e61ecf..70e87c3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Synapse pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/synapse.svg)](https://dash.yunohost.org/appci/app/synapse) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/synapse.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/synapse.maintain.svg) + [![Installer Synapse avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=synapse) *[Read this readme in english.](./README.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) -**Version incluse :** 1.76.0~ynh1 +**Version incluse :** 1.77.0~ynh1 ## Avertissements / informations importantes ## Configuration From 24b07765e14cf737d44647e89e5ba27fc457bf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 15 Feb 2023 20:16:42 +0100 Subject: [PATCH 4/7] Add missing chown --- scripts/_common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index ec166b7..7fdc28f 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -54,6 +54,7 @@ install_sources() { fi chown $synapse_user:root -R $final_path + chown $synapse_user:root ../conf/requirement_$(lsb_release --codename --short).txt pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r ../conf/requirement_$(lsb_release --codename --short).txt From 10d66805ef9af2be58fade72b7c69eb8100b7549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 15 Feb 2023 22:29:06 +0100 Subject: [PATCH 5/7] fix path issue --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7fdc28f..240f81e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -54,7 +54,7 @@ install_sources() { fi chown $synapse_user:root -R $final_path - chown $synapse_user:root ../conf/requirement_$(lsb_release --codename --short).txt + chown $synapse_user:root $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r ../conf/requirement_$(lsb_release --codename --short).txt From b6fdf2e9980d9b8f257ca3cc1f9186184fc1b97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 16 Feb 2023 00:09:54 +0100 Subject: [PATCH 6/7] Fix typo --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 240f81e..0eb1695 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -56,7 +56,7 @@ install_sources() { chown $synapse_user:root -R $final_path chown $synapse_user:root $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 - sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r ../conf/requirement_$(lsb_release --codename --short).txt + sudo -u $synapse_user env PATH=$PATH 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; From 136d04abea3f2c5f2dbbf9f5417558773aad6a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 16 Feb 2023 08:07:35 +0100 Subject: [PATCH 7/7] fix setup source --- scripts/_common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 0eb1695..788440e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -53,10 +53,14 @@ install_sources() { pip3 install --upgrade setuptools wheel pip fi + temp_requirement=$(mktemp) + cp $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt $temp_requirement + chown $synapse_user:root $temp_requirement + chown $synapse_user:root -R $final_path - chown $synapse_user:root $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 - sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r $YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt + sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade -r $temp_requirement + ynh_secure_remove $temp_requirement # 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;