YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 43 forks source link

Fix the way .well-known is handled for install with aliasing on domain with app already installed #389

Closed jukefr closed 3 months ago

jukefr commented 1 year ago

Describe the bug

I have synapse installed on chat.domain.tld but also enabled the option to have it work with domain.tld on install. Every single update if I forget to backup, uninstall the app on domain.tld I will get an error from the synapse upgrade that will render it unusable until I "fake" a new installation with ynh apps install synapse, immediately cancel, then ynh apps remove synapse, then (if I removed the app running on domain.tld already) now I can restore the backup that was automatically made, and then I can upgrade. If I don't forget that's a thing on every single update, I can "simply" backup the app on domain.tld, uninstall it, upgrade synapse, restore the backup from the app on domain.tld.

I recently saw that there is already support in yunohost for this kinds of stuff in the directory /var/www/.well-known/domain.tld. (used by the mail configuration) Maybe it would be a good idea to drop the two files (server/client) in there instead to prevent this behavior on every single upgrade which is a bit of a pain and probably not something fixable by an admin with little knowledge of the command line. Seems like anything you drop in there will get automatically served so should work for this purpose. (you can try navigating domain.tld/.well-known/autoconfig/mail/config-v1.1.xml to see it in action, should be there on every yunohost install i dont know since which version)

(instead of creating a file in /etc/nginx/conf.d/{domain.tld}.d/synapse_server_name.conf which is the cause of the issues)

Context

Steps to reproduce

Requirements

Steps:

  1. Upgrade synapse

Expected behavior

Shouldn't have to go through all of this every single upgrade.

Logs

Don't have them on hand right now but already plenty of issues in the repository about this with new ones every update.

Josue-T commented 3 months ago

Closing as there was many changes in packaging v2.

Please create a new issue about how to reproduce exactly the issue if it happen again.