YunoHost-Apps / mautrix_telegram_ynh

Matrix Telegram pupetting bridge for YunoHost
https://github.com/mautrix/telegram
GNU General Public License v3.0
14 stars 4 forks source link

basically all the initial work is done #1

Closed benneti closed 3 years ago

benneti commented 3 years ago

i restore, backup, and upgrade definitely need some additional work.

But basic installation should work and I hope basic upgrades (and backups) work, too.

centralscrutinizer21 commented 3 years ago

i restore, backup, and upgrade definitely need some additional work.

But basic installation should work and I hope basic upgrades (and backups) work, too.

Hi Benneti i was trying to install this bridge on my yunohost server, but i think there is still no build for armv7? I am running yunohost on a raspberri pi4. Mautrix-whatsapp works fine for me i was hoping to get telegram and signal bridged as well. Tell me if I can help somehow

benneti commented 3 years ago

Hi, how did you try to install I and what is the exact error you get? As this is a pure python bridge it is no surprise there is no specific build for armv7 (I am on armhf myself and it works) it just createss a venv and should build all dependencies local if something misses.

Just to be sure, right now you have to install using sudo yunohost app install https://github.com/benneti/mautrix_telegram_ynh/tree/main --debug where the debug is optional, but might give you a more verbose Idea of what is going wrong

centralscrutinizer21 commented 3 years ago

I have tried again to install from ssh here is the log: https://paste.yunohost.org/raw/lozujuvupa

benneti commented 3 years ago

As it seems (ImportError: cannot import name 'RowProxy' from 'sqlalchemy.engine.result') there is nothing going wrong while setting up the packages but when importing them in python. As the yunohost script basically just follows the instructions here https://docs.mau.fi/bridges/python/setup/index.html?bridge=telegram with paths and minor tweaks to integrate with synapse installed from yunohost automatically you could try the four lines here https://github.com/benneti/mautrix_telegram_ynh/blob/79d768cc78970a79a29200e109d415b712fc55f6/scripts/install#L225 in a random directory and using the latetst release.tar.gz from github. If this fails in the same way I think you should ask for help at mautrix_telegram directly if it does work than we can try to figure out more precisely what goes wrong in the script.

benneti commented 3 years ago

It might be that the version of SQLAlchemy your pip installs (1.4.something) is to new and changed something relevant; for me it worked but it used 1.3.something. EDIT: Indeed this is already fixed upstream: https://github.com/tulir/mautrix-telegram/commit/783c94dadd04d68947c2c3141cd52725321ab6f0 But it is not in a release yet, so either you wait for the next release or try to change my script to install the version on the master branch; I want to wait on the next release for simplicity of maintenance

centralscrutinizer21 commented 3 years ago

Ok thanks, I think I'll wait as well

benneti commented 3 years ago

OK, in this case you'll see it as soon as I push an update to my fork; also feel free to ping me if there is a new update and I miss it

centralscrutinizer21 commented 3 years ago

Well I opened an account on github just to be able to contact you for this project, still learning and I have just started following you, I will add tulir project as well. Any idea about the mautrix-signal for yunohost? Is someone doing something?

benneti commented 3 years ago

I changed the version to rc1, so you can try installing again, I also changed some other things so let me know whether the installation works.

centralscrutinizer21 commented 3 years ago

Installation was succesful! I am still testing all the functions but big thumbs up!

benneti commented 3 years ago

Great to hear!

gautz commented 3 years ago

congrats! do you want to be maintainer of this app? if yes you can ask for write access in the yunohost-apps matrix room. @tituspijean could you merge this PR in master branch and create a testing one plz?

benneti commented 3 years ago

I can maintain it for as long as I use it if this is fine. (I plan to switch from yunohost to nixos on my homelab in the next year or so; so this will probably not be too long)

Gredin67 commented 3 years ago

@benneti did you test the helper write_bridge_config? is it a new Yunohost approach to customize config files? You don't need to copy the template file first? How does it know where to find the config file? Are'nt you missing some parameters?

I did not manage to install on x86 https://paste.yunohost.org/raw/irayoxerol

benneti commented 3 years ago

I did not test on x86(_amd64) only on arm. The write_bridge_config function is defined in common, because I wanted to use this in upgrade and not duplicate any code (incase defaults change and so on). I do not need to copy the template and do the substitutions manually as you can see in the function this is handled by the ynh_add_config function.

Did you try whether the installation steps (from mautrix_telegram work manually) as it seems this fails in the pip command and might be an upstream problem.