Package Details: mautrix-telegram 0.11.3-3

Git Clone URL: https://aur.archlinux.org/mautrix-telegram.git (read-only, click to copy)
Package Base: mautrix-telegram
Description: A Matrix-Telegram hybrid puppeting/relaybot bridge.
Upstream URL: https://github.com/tulir/mautrix-telegram
Licenses: AGPLv3
Submitter: BrainDamage
Maintainer: BrainDamage
Last Packager: BrainDamage
Votes: 2
Popularity: 0.045273
First Submitted: 2020-11-09 15:48 (UTC)
Last Updated: 2022-04-17 23:48 (UTC)

Latest Comments

zotan commented on 2022-04-17 16:59 (UTC)

This now depends on python-mautrix >= 0.16.1

istobic commented on 2022-01-07 17:25 (UTC) (edited on 2022-01-07 17:28 (UTC) by istobic)

Currently, one needs to change from python-telethon to python-telethon-tulir-git to get this working. The changes are not upstreamed to python-telethon yet. Also, it does no longer depend on python-telethon-session-sqlalchemy (@BrainDamage)

zotan commented on 2021-12-16 20:48 (UTC)

@BrainDamage: As far as I can tell telethon released an update which does require a patched library anymore, I was able to build the package with the current AUR versions of python-telethon and python-mautrix with this PKGBUILD, editing only the min/max versions of the respective packages. Tested & working.

BrainDamage commented on 2021-11-17 19:42 (UTC) (edited on 2021-11-17 19:43 (UTC) by BrainDamage)

re: the out-of-date flag, unfortunately the new version depends on a patched library for which I have no time/energy to package right now

noctux commented on 2021-11-09 15:10 (UTC)

It's not really a problem with mautrix-telegram, newer python-sqlalchemy releases have now dropped the postgres:// uri syntax to specify database paths. You now have to use postgresql:// in your config file.

kauron commented on 2021-11-09 15:01 (UTC) (edited on 2021-11-09 15:20 (UTC) by kauron)

Hi there! It seems that python-sqlalchemy >= 1.4 breaks this package, with the following error message (this happened after upgrading from 1.3.23-1 to 1.4.25-1; downgrading fixed it). I don't know what the root cause of this problem is, or if it should be reported upstream.

As always, it is a user error: thanks @noctux.

BrainDamage commented on 2021-09-13 16:23 (UTC) (edited on 2021-09-13 16:23 (UTC) by BrainDamage)

@sdfg: I've used upstream values, the problem is exactly the one in comment of the pkgbuild. The small range makes tracking releases a nightmare, pinning a single version would make the problem worse, not better. In this case by increasing the range to allow version 1.23 of telethon we're going against upstream's values, so if it breaks, it's on our own; for other libraries they don't seem to break the api, but those two in particular they routinely do, so just allowing arbitrary ranges produces all sorts of breakages ...

@nocctux: fixed, thanks.

noctux commented on 2021-09-07 19:33 (UTC)

Thank you for packaging this program (especially the really helpful .install notes!).

However, for me the current version did not build because the folder under srcdir was not called src/mautrix-telegram-0.10.1, but instead src/telegram-0.10.1, so I did require the following patch (in addition to bumping telethon to <1.24 as mentioned by @sdfg):

diff --git a/PKGBUILD b/PKGBUILD
index 902cef7..b01c41a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,6 @@
 # Maintainer: BrainDamage
 pkgname=mautrix-telegram
+_pkgname=telegram
 pkgver=0.10.1
 pkgrel=2
 pkgdesc="A Matrix-Telegram hybrid puppeting/relaybot bridge."
@@ -34,7 +35,7 @@ install="${pkgname}.install"


 prepare() {
-       cd "${srcdir}/${pkgname}-${pkgver}"
+       cd "${srcdir}/${_pkgname}-${pkgver}"
        # the author makes liberal usage of max version for requirements without a real need
        # we'll strip them and re-introduce in the deps/optdeps array if truly necessary
        # to prevent a nightmare during updates while tracking stable releases
@@ -48,12 +49,12 @@ prepare() {
 }

 build() {
-       cd "${srcdir}/${pkgname}-${pkgver}"
+       cd "${srcdir}/${_pkgname}-${pkgver}"
        python setup.py build
 }

 package() {
-       cd "${srcdir}/${pkgname}-${pkgver}"
+       cd "${srcdir}/${_pkgname}-${pkgver}"

        _shared_dir="/usr/share/${pkgname}"

It's a bit strange as I seem to be the only one with this problem(?), so sorry to bother you if this was a problem on my end.

sdfg commented on 2021-09-06 09:12 (UTC)

Updates to package versions again

mautrix>=0.10.5,<0.11 telethon>=1.22,<1.24

Might be worth just version restricting them.

julianuu commented on 2021-06-16 13:36 (UTC)

No need to apologize, thanks a lot and for maintaining the package and for the quick fix!

The checksums still need to be updated though ;)

BrainDamage commented on 2021-06-16 12:38 (UTC) (edited on 2021-06-16 12:39 (UTC) by BrainDamage)

@julianuu

that was my mistake, I forgot to set the homedir for the user in the package file, and since I've used my installation which already had homedir set to test it, I've never caught the problem

the command would've been right ... for few versions ago, I forgot to update the installation instructions after upstream changed the method from a wrapper launcher to a pure module, again, I didn't notice because I've used my working installation to test the package and it already had a valid registration file

I apologize for all the issues

istobic commented on 2021-06-16 10:22 (UTC) (edited on 2021-06-16 10:23 (UTC) by istobic)

@julianuu: Same issue I'm facing. I think WorkingDirectory=~ only works, if the home path in mautrix-telegram.sysusers would be pointing there acordingly.

julianuu commented on 2021-06-16 10:22 (UTC) (edited on 2021-06-16 10:26 (UTC) by julianuu)

Also could it be that there is a typo in mautrix-telegram.install? In order to generate the registration I have to run python -m mautrix_telegram -b /usr/share/mautrix-telegram/example-config.yaml -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml -g, but in mautrix-telegram.service it says mautrix-telegram for the python module.

Or maybe I am misunderstanding that line in mautrix-telegram.install.

julianuu commented on 2021-06-16 10:19 (UTC)

I have to set WorkingDirectory=/var/lib/mautrix-telegram in the service file, otherwise it complains about permission. I tried deleting /var/lib/mautrix-telegram and the user mautrix-telegram and reinstalling the bridge, but it didn't help.

L0ric0 commented on 2021-06-15 08:57 (UTC)

with the new version of mautrix-telegram the version requirements for python-mautrix and python-teletron have changed.

  • python-mautrix >=0.9.3,<0.10
  • python-telethon >=1.20,<1.22

could you please change this and refere to requirements.txt for further updates

kauron commented on 2021-06-12 11:33 (UTC)

Now that python-brotlipy is no longer in the AUR, can it be replaced by extra/python-brotli?

L0ric0 commented on 2021-04-24 11:05 (UTC)

to prevent errors from python-mautrix updating without a new version of maturix-telegram released, could you please always add a max version to python-mautrix?

kauron commented on 2021-04-21 07:58 (UTC) (edited on 2021-04-21 08:06 (UTC) by kauron)

I've had an error with python-mautrix>=0.9, which has removed the module mautrix.util.network_retry (see release notes), and the bridge couldn't start, as it missed that module. Downgrading python-mautrix to 0.8.18 solved this issue. It seems that mautrix-telegram 0.10 has a fix already (commit).

istobic commented on 2021-04-16 17:05 (UTC)

Hey, thanks for taking time for your detailed response. I'll give you feedback once I have the clean setup.

BrainDamage commented on 2021-04-13 11:29 (UTC)

That's not correct, for one, the package never had such user, it's probably result of some leftover of another package or our own manual installation.

The db is not supposed to be located in /usr/share, /usr/share is for packaged files, not runtime data, the db should be located in /var/lib/username which is th user's home dir, as set per WorkingDirectory

I would advise you to uninstall the package, delete /usr/share/mautrix-telegram; reinstall and pay careful attention to any warning you get during installation about different permissions / users about more conflicting files

istobic commented on 2021-04-13 10:21 (UTC) (edited on 2021-04-13 11:14 (UTC) by istobic)

I'm getting

The job identifier is 5003.
Apr 13 12:19:05 <systemname> systemd[56102]: mautrix-telegram.service: Changing to the requested working directory failed: Permission denied
Apr 13 12:19:05 <systemname> systemd[56102]: mautrix-telegram.service: Failed at step CHDIR spawning alembic: Permission denied

from systemd. Any idea whats wrong? Settings from /usr/share:

drwxr-x--- 1 mx-telegram mx-telegram    112 Apr 13 12:13 mautrix-telegram
-rw-r--r-- 1 root        root        184320 Apr 13 12:23 mautrix-telegram.db

It seems suspicious, that the user here is mx-telegram instead of mautrix-telegram as defined in the mautrix-telegram.service

However, I got the service starting by editing the systemd unit (systemctl edit --full mautrix-telegram.service) and setting the WorkingDirectory to /usr/share/mautrix-telegram/ is this the intended WorkingDirectory?

L0ric0 commented on 2021-03-09 19:48 (UTC) (edited on 2021-03-09 20:33 (UTC) by L0ric0)

edit 2: raised issues at https://github.com/tulir/mautrix-telegram/issues/594 and https://github.com/ahupp/python-magic/issues/239

edit: it seems that python-magic (the python bindings published by the author of the file command) and python-magic-ahupp (looks like an independend implementation of the bindings) have a slightly different interface as with python-magic I'm getting the following exception: AttributeError: module 'magic' has no attribute 'from_buffer'. So the package should probably require python-magic-ahupp until that is fixed

could you please set the package to require a version of python-magic<0.5 as an exeption will be raised if a picture is recived over telegram and this message is not propagated to the matrix server

BrainDamage commented on 2021-01-29 17:16 (UTC)

There is no pip requirement ( it uses setup.py), and no trace of pip mention in the sources other than the docker script. It builds in a clean chroot here. How are you building it?

kauron commented on 2021-01-29 15:59 (UTC)

I had to manually install python-pip, as it wasn't listed as make dependency. Could you add it to the PKGBUILD?

BrainDamage commented on 2021-01-20 01:21 (UTC)

the error is intentional, the package on the aur won't work with the current release of python-telethon, either build yourself a lower version, wait for a new release, or switch to the -git package

istobic commented on 2021-01-19 19:01 (UTC) (edited on 2021-01-19 19:07 (UTC) by istobic)

Installation fails with:

==> ERROR: Could not resolve all dependencies.
error making: mautrix-telegram