diff options
author | Tilo Brueckner | 2020-11-15 16:14:44 +0100 |
---|---|---|
committer | Tilo Brueckner | 2020-11-15 16:14:44 +0100 |
commit | a014ee57124561dad5c273291e25300bb3ee03bb (patch) | |
tree | 9865b3f84872564c36b8901f6f251efc48da8981 | |
parent | 268f76bcfbf28a8df06a8c1ffea7efadffbf8f53 (diff) | |
download | aur-a014ee57124561dad5c273291e25300bb3ee03bb.tar.gz |
Update to version 0.9.0-rc3
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | fix_telethon_version.patch | 9 | ||||
-rw-r--r-- | mautrix-telegram.install | 24 | ||||
-rw-r--r-- | mautrix-telegram.service | 6 | ||||
-rw-r--r-- | mautrix-telegram.sysusers | 1 | ||||
-rw-r--r-- | mautrix-telegram.tmpfiles | 2 |
7 files changed, 63 insertions, 52 deletions
@@ -1,9 +1,9 @@ # Generated by makepkg 5.2.2 -# Wed Jul 29 11:04:34 UTC 2020 +# Sun Nov 15 15:12:48 UTC 2020 pkgbase = matrix-appservice-telegram pkgdesc = A Matrix-Telegram hybrid puppeting/relaybot bridge. - pkgver = 0.8.2 - pkgrel = 2 + pkgver = 0.9.0_rc3 + pkgrel = 1 url = https://github.com/tulir/mautrix-telegram install = mautrix-telegram.install arch = any @@ -11,29 +11,38 @@ pkgbase = matrix-appservice-telegram makedepends = python depends = python depends = python-telethon-session-sqlalchemy - depends = python-telethon>=1.14.0 + depends = python-telethon>=1.17.0 depends = python-ruamel-yaml depends = python-commonmark depends = python-alembic - depends = python-mautrix>=0.5.0 + depends = python-mautrix>=0.8.2 depends = python-aiohttp depends = python-magic-ahupp optdepends = python-cryptg: Uses native code for Telegram crypto stuff instead of pure Python + optdepends = python-cchardet: For faster encoding detection + optdepends = python-aiodns: For asyncronous DNS requests optdepends = python-pillow: WebP <-> PNG conversion for stickers + optdepends = python-qrcode: Login with QR code optdepends = python-moviepy: High quality thumbnails for Telegram->Matrix gifs and videos optdepends = python-numpy: High quality thumbnails for Telegram->Matrix gifs and videos optdepends = python-psycopg2: PostgreSQL support + optdepends = python-asyncpg: End-to-bridge encryption support + optdepends = python-olm: End-to-bridge encryption support + optdepends = python-unpaddedbase64: End-to-bridge encryption support + optdepends = python-pycryptodome: End-to-bridge encryption support optdepends = lottieconverter-git: convert WebP to GIF or WEBM - optdepends = python-matrix-nio>=0.12.0: End-to-bridge encryption support + optdepends = python-prometheus_client: metrics upload backup = etc/mautrix-telegram/alembic.ini backup = etc/mautrix-telegram/config.yaml backup = etc/mautrix-telegram/registration.yaml - source = https://github.com/tulir/mautrix-telegram/archive/v0.8.2.tar.gz + source = https://github.com/tulir/mautrix-telegram/archive/v0.9.0-rc3.tar.gz source = mautrix-telegram.service - source = fix_telethon_version.patch - sha256sums = 1f227f50e84f643fc7633f1a8f336aa1e51db6c12628e983783c2995a41d497f - sha256sums = 52b9e24a238bb34daa4966f033593516089ae1e7a72b373e5fa0a08a25082123 - sha256sums = f68fccabe067e409f8bb8ca7c03bebdce425ea5ed903b103691e31c26f3bcaa6 + source = mautrix-telegram.sysusers + source = mautrix-telegram.tmpfiles + sha256sums = 12a78afa60474fb72b7e50566b8f3163d4cbac5b94e1213a843dade95566c3ad + sha256sums = d77c91154204ba5a5297c87c8b8a25209e125024aeee7c49f37416ccb7bd556a + sha256sums = e069958db276309d00864ee3dded5700b78806c82663346aa2ef6878e2c0566b + sha256sums = b7a13a8e400229f13cc6ff65319fa8cfc3eea4e9a4e6aba8933de663663bef94 pkgname = matrix-appservice-telegram @@ -1,19 +1,27 @@ # Maintainer: BluePeril <blueperil (at) blueperil _dot_ de> pkgname=matrix-appservice-telegram -pkgver=0.8.2 -pkgrel=2 +pkgver=0.9.0_rc3 +pkgrel=1 pkgdesc="A Matrix-Telegram hybrid puppeting/relaybot bridge." url="https://github.com/tulir/mautrix-telegram" -depends=('python' 'python-telethon-session-sqlalchemy' 'python-telethon>=1.14.0' 'python-ruamel-yaml' 'python-commonmark' 'python-alembic' 'python-mautrix>=0.5.0' 'python-aiohttp' 'python-magic-ahupp') +depends=('python' 'python-telethon-session-sqlalchemy' 'python-telethon>=1.17.0' 'python-ruamel-yaml' 'python-commonmark' 'python-alembic' 'python-mautrix>=0.8.2' 'python-aiohttp' 'python-magic-ahupp') makedepends=('python') optdepends=('python-cryptg: Uses native code for Telegram crypto stuff instead of pure Python' + 'python-cchardet: For faster encoding detection' + 'python-aiodns: For asyncronous DNS requests' 'python-pillow: WebP <-> PNG conversion for stickers' + 'python-qrcode: Login with QR code' 'python-moviepy: High quality thumbnails for Telegram->Matrix gifs and videos' 'python-numpy: High quality thumbnails for Telegram->Matrix gifs and videos' 'python-psycopg2: PostgreSQL support' + 'python-asyncpg: End-to-bridge encryption support' + 'python-olm: End-to-bridge encryption support' + 'python-unpaddedbase64: End-to-bridge encryption support' + 'python-pycryptodome: End-to-bridge encryption support' 'lottieconverter-git: convert WebP to GIF or WEBM' - 'python-matrix-nio>=0.12.0: End-to-bridge encryption support') + 'python-prometheus_client: metrics upload' + ) install=mautrix-telegram.install license=('AGPLv3') arch=('any') @@ -22,10 +30,12 @@ backup=('etc/mautrix-telegram/alembic.ini' 'etc/mautrix-telegram/registration.yaml') source=("https://github.com/tulir/mautrix-telegram/archive/v${pkgver/_rc/-rc}.tar.gz" 'mautrix-telegram.service' - 'fix_telethon_version.patch') -sha256sums=('1f227f50e84f643fc7633f1a8f336aa1e51db6c12628e983783c2995a41d497f' - '52b9e24a238bb34daa4966f033593516089ae1e7a72b373e5fa0a08a25082123' - 'f68fccabe067e409f8bb8ca7c03bebdce425ea5ed903b103691e31c26f3bcaa6') + 'mautrix-telegram.sysusers' + 'mautrix-telegram.tmpfiles') +sha256sums=('12a78afa60474fb72b7e50566b8f3163d4cbac5b94e1213a843dade95566c3ad' + 'd77c91154204ba5a5297c87c8b8a25209e125024aeee7c49f37416ccb7bd556a' + 'e069958db276309d00864ee3dded5700b78806c82663346aa2ef6878e2c0566b' + 'b7a13a8e400229f13cc6ff65319fa8cfc3eea4e9a4e6aba8933de663663bef94') prepare() { cd $srcdir/mautrix-telegram-${pkgver/_rc/-rc} @@ -47,10 +57,16 @@ build() { package() { cd $srcdir/mautrix-telegram-${pkgver/_rc/-rc} python setup.py install --root="${pkgdir}" --optimize=1 - mkdir -pm0755 ${pkgdir}/etc/mautrix-telegram ${pkgdir}/usr/lib/systemd/system/ - mv ${pkgdir}/usr/lib/python3.8/site-packages/mautrix_telegram/example-config.yaml ${pkgdir}/etc/mautrix-telegram/ - mv ${pkgdir}/usr/{alembic,alembic.ini} ${pkgdir}/etc/mautrix-telegram/ - sed -i -e "s|script_location = alembic|script_location = /etc/mautrix-telegram/alembic/|" ${pkgdir}/etc/mautrix-telegram/alembic.ini + + install -dm 750 "${pkgdir}/usr/share/mautrix-telegram/" + install -Dm 644 ../mautrix-telegram.service "${pkgdir}/usr/lib/systemd/system/mautrix-telegram.service" + install -Dm 644 ../mautrix-telegram.sysusers "${pkgdir}/usr/lib/sysusers.d/mautrix-telegram.conf" + install -Dm 644 ../mautrix-telegram.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/mautrix-telegram.conf" + + # cleanup rm -rf ${pkgdir}/usr/lib/python*/site-packages/tests - cp ../mautrix-telegram.service ${pkgdir}/usr/lib/systemd/system/ + + # Fix alembic position + mv ${pkgdir}/usr/{alembic,alembic.ini} "${pkgdir}/usr/share/mautrix-telegram/" + sed -i -e "s|script_location = alembic|script_location = /usr/share/mautrix-telegram/alembic/|" "${pkgdir}/usr/share/mautrix-telegram/alembic.ini" } diff --git a/fix_telethon_version.patch b/fix_telethon_version.patch deleted file mode 100644 index 44a3309e3037..000000000000 --- a/fix_telethon_version.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/requirements.txt 2020-07-27 16:35:25.139876137 +0200 -+++ b/requirements.txt 2020-07-27 16:35:55.257092008 +0200 -@@ -5,5 +5,5 @@ - commonmark>=0.8,<0.10 - aiohttp>=3,<4 - mautrix>=0.5.8,<0.6 --telethon>=1.13,<1.15 -+telethon>=1.13,<1.17 - telethon-session-sqlalchemy>=0.2.14,<0.3 diff --git a/mautrix-telegram.install b/mautrix-telegram.install index 0e0c856d371e..92ba13299cbb 100644 --- a/mautrix-telegram.install +++ b/mautrix-telegram.install @@ -1,22 +1,12 @@ post_install() { -cat << 'EOM' - # - # change the configuration file /etc/mautrix-telegram/config.yaml and execute the commands: - # - cd /etc/mautrix-telegram/ - alembic upgrade head - /usr/bin/mautrix-telegram -b /etc/mautrix-telegram/config.yaml -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml -g -EOM -} + if [ ! -f /etc/mautrix-telegram/config.yaml ]; then + cp /usr/lib/python3.8/site-packages/mautrix_telegram/example-config.yaml /etc/mautrix-telegram/config.yaml + sed -i -e "s|database: sqlite:///mautrix-telegram.db|database: sqlite:////var/lib/mautrix-telegram/mautrix-telegram.db|" /etc/mautrix-telegram/config.yaml + fi -post_upgrade() { -cat << 'EOM' - # - # update your database with the following commands: - # - cd /etc/mautrix-telegram/ - alembic upgrade head -EOM + if [ ! -f /etc/mautrix-telegram/registration.yaml ]; then + python -m mautrix_telegram -g -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml + fi } # vim: ts=2 sw=2 et: diff --git a/mautrix-telegram.service b/mautrix-telegram.service index 9e713ddc21c2..d9e059556f7e 100644 --- a/mautrix-telegram.service +++ b/mautrix-telegram.service @@ -3,13 +3,15 @@ Description=A Matrix-Telegram hybrid puppeting/relaybot bridge [Service] Environment=FFMPEG_BINARY=/usr/bin/ffmpeg -ExecStartPre=/usr/bin/alembic -c /etc/mautrix-telegram/alembic.ini -x config=/etc/mautrix-telegram/config.yaml upgrade head -ExecStart=/usr/bin/mautrix-telegram -b /etc/mautrix-telegram/config.yaml -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml +ExecStartPre=/usr/bin/alembic -c /usr/share/mautrix-telegram/alembic.ini -x config=/etc/mautrix-telegram/config.yaml upgrade head +ExecStart=/usr/bin/python -m mautrix_telegram -b /etc/mautrix-telegram/config.yaml -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml WorkingDirectory=/var/lib/mautrix-telegram/ ConfigurationDirectory=mautrix-telegram StateDirectory=mautrix-telegram Restart=on-failure ReadWritePaths=/etc/mautrix-telegram /var/lib/mautrix-telegram /var/log/matrix-synapse +User=mx-telegram +DynamicUser=true [Install] WantedBy=multi-user.target diff --git a/mautrix-telegram.sysusers b/mautrix-telegram.sysusers new file mode 100644 index 000000000000..82fff40b9bde --- /dev/null +++ b/mautrix-telegram.sysusers @@ -0,0 +1 @@ +u mx-telegram - "Matrix-Telegram hybrid puppeting and relaybot bridge" diff --git a/mautrix-telegram.tmpfiles b/mautrix-telegram.tmpfiles new file mode 100644 index 000000000000..cf96945b424d --- /dev/null +++ b/mautrix-telegram.tmpfiles @@ -0,0 +1,2 @@ +z /etc/mautrix-telegram/* 640 mx-telegram mx-telegram +Z /usr/share/mautrix-telegram - mx-telegram mx-telegram |