[arch-commits] Commit in matrix-synapse/repos (6 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 13 07:26:13 UTC 2020


    Date: Friday, November 13, 2020 @ 07:26:13
  Author: felixonmars
Revision: 753842

archrelease: copy trunk to community-staging-any

Added:
  matrix-synapse/repos/community-staging-any/
  matrix-synapse/repos/community-staging-any/PKGBUILD
    (from rev 753841, matrix-synapse/trunk/PKGBUILD)
  matrix-synapse/repos/community-staging-any/synapse.install
    (from rev 753841, matrix-synapse/trunk/synapse.install)
  matrix-synapse/repos/community-staging-any/synapse.service
    (from rev 753841, matrix-synapse/trunk/synapse.service)
  matrix-synapse/repos/community-staging-any/sysusers-synapse.conf
    (from rev 753841, matrix-synapse/trunk/sysusers-synapse.conf)
  matrix-synapse/repos/community-staging-any/tmpfiles-synapse.conf
    (from rev 753841, matrix-synapse/trunk/tmpfiles-synapse.conf)

-----------------------+
 PKGBUILD              |   69 ++++++++++++++++++++++++++++++++++++++++++++++++
 synapse.install       |   38 ++++++++++++++++++++++++++
 synapse.service       |   18 ++++++++++++
 sysusers-synapse.conf |    1 
 tmpfiles-synapse.conf |    1 
 5 files changed, 127 insertions(+)

Copied: matrix-synapse/repos/community-staging-any/PKGBUILD (from rev 753841, matrix-synapse/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-13 07:26:13 UTC (rev 753842)
@@ -0,0 +1,69 @@
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Contributor: Ivan Shapovalov <intelfx at intelfx.name>
+
+pkgname=matrix-synapse
+pkgver=1.22.1
+pkgrel=2
+
+pkgdesc="Matrix reference homeserver"
+url="https://github.com/matrix-org/synapse"
+arch=('any')
+license=('Apache')
+
+depends=('libwebp' 'python-jsonschema' 'python-twisted' 'python-service-identity'
+         'python-pyopenssl' 'python-yaml' 'python-pyasn1' 'python-pynacl'
+         'python-bcrypt' 'python-frozendict'
+         'python-pillow' 'python-ujson'
+         'python-pysaml2' 'python-setuptools'
+         'python-systemd' 'python-unpaddedbase64' 'python-canonicaljson'
+         'python-signedjson' 'python-pymacaroons'
+         'python-service-identity' 'python-msgpack'
+         'python-phonenumbers' 'python-prometheus_client'
+         'python-attrs' 'python-netaddr' 'python-sortedcontainers'
+         'python-treq' 'python-idna' 'python-jinja'
+         'python-bleach' 'python-typing_extensions' 'systemd')
+checkdepends=('python-authlib' 'python-pyjwt' 'python-lxml' 'python-mock' 'python-parameterized'
+              'python-txredisapi' 'python-hiredis')
+optdepends=('perl: sync_room_to_group.pl'
+            'python-psycopg2: PostgreSQL support'
+            'python-lxml: URL previewing'
+            'python-psutil: metrics'
+            'python-pyjwt: jwt'
+            'python-txredisapi: redis'
+            'python-hiredis')
+
+source=("synapse-$pkgver.tar.gz::https://github.com/matrix-org/synapse/archive/v$pkgver.tar.gz"
+        'synapse.service'
+        'sysusers-synapse.conf'
+        'tmpfiles-synapse.conf')
+
+sha256sums=('ae55099c367f6ba19dc13b177041d47684d67c088fabf5a704cecf7f87304cda'
+            'ce434eaa92e6504988fb9005d49c078ab7a2d33951d8adece26ccce8b2475857'
+            'aadfdd78fe73e6eb325ee4299b8db8b97bfa2f4e7df953aa8477f442598a7ec5'
+            '65588c8c64dfb84cab831cd8d028a295d753cf7322dd63053e8488466047b45f')
+
+backup=('etc/synapse/log_config.yaml')
+install=synapse.install
+
+build() {
+	cd synapse-$pkgver
+	python setup.py build
+}
+
+check() {
+	cd synapse-$pkgver
+	PYTHONPATH=. trial3 tests
+}
+
+package() {
+	install -Dm644 synapse.service "$pkgdir"/usr/lib/systemd/system/synapse.service
+
+	cd synapse-$pkgver
+	python setup.py install --root "$pkgdir" --optimize=1 --skip-build
+
+	install -dm755 -o 198 -g 198 "$pkgdir"/etc/synapse
+
+	install -Dm644 contrib/systemd/log_config.yaml "$pkgdir"/etc/synapse/log_config.yaml
+	install -Dm644 "$srcdir"/sysusers-synapse.conf "$pkgdir"/usr/lib/sysusers.d/synapse.conf
+	install -Dm644 "$srcdir"/tmpfiles-synapse.conf "$pkgdir"/usr/lib/tmpfiles.d/synapse.conf
+}

Copied: matrix-synapse/repos/community-staging-any/synapse.install (from rev 753841, matrix-synapse/trunk/synapse.install)
===================================================================
--- community-staging-any/synapse.install	                        (rev 0)
+++ community-staging-any/synapse.install	2020-11-13 07:26:13 UTC (rev 753842)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# arg 1:  the new package version
+post_install() {
+	if [[ ! -e /etc/synapse/homeserver.yaml ]]; then
+		cat <<-EOF
+		==> A synapse configuration file needs to be generated before you can
+		    start synapse, and you should make sure that it's readable by the
+		    synapse user.
+
+		    cd /var/lib/synapse
+		    sudo -u synapse python -m synapse.app.homeserver \\
+		      --server-name my.domain.name \\
+		      --config-path /etc/synapse/homeserver.yaml \\
+		      --generate-config \\
+		      --report-stats=yes
+
+		    N.B.: The default synapse config enables the webclient feature.
+		          You need to either disable it, install the syweb python package
+		          from matrix-angular-sdk, or set 'web_client_location' to a path
+		          to make synapse not try to serve it using syweb.
+		EOF
+		install -dm700 -o 198 -g 198 /var/lib/synapse
+	fi
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+	if [[ "$(vercmp "$2" 1.4.0-2)" -lt 0 ]]; then
+		cat <<-EOF
+		==> Upstream email templates are no longer available in /var/lib/synapse/res/templates.
+
+		    If you want to customize the templates, you can copy the default ones from
+		    /usr/lib/python3.x/site-packages/synapse/res/templates/
+		EOF
+	fi
+}

Copied: matrix-synapse/repos/community-staging-any/synapse.service (from rev 753841, matrix-synapse/trunk/synapse.service)
===================================================================
--- community-staging-any/synapse.service	                        (rev 0)
+++ community-staging-any/synapse.service	2020-11-13 07:26:13 UTC (rev 753842)
@@ -0,0 +1,18 @@
+[Unit]
+Description=Synapse Matrix homeserver
+After=network-online.target
+Requires=network-online.target
+
+[Service]
+Type=simple
+User=synapse
+Group=synapse
+SyslogIdentifier=synapse
+Environment=LANG=en_US.UTF-8
+WorkingDirectory=/var/lib/synapse
+ExecStart=/usr/bin/python3 -m synapse.app.homeserver --config-path=/etc/synapse/homeserver.yaml
+ExecStop=/usr/bin/synctl stop /etc/synapse/homeserver.yaml
+EnvironmentFile=-/etc/default/synapse
+
+[Install]
+WantedBy=multi-user.target

Copied: matrix-synapse/repos/community-staging-any/sysusers-synapse.conf (from rev 753841, matrix-synapse/trunk/sysusers-synapse.conf)
===================================================================
--- community-staging-any/sysusers-synapse.conf	                        (rev 0)
+++ community-staging-any/sysusers-synapse.conf	2020-11-13 07:26:13 UTC (rev 753842)
@@ -0,0 +1 @@
+u synapse 198 "Matrix Synapse user" /var/lib/synapse

Copied: matrix-synapse/repos/community-staging-any/tmpfiles-synapse.conf (from rev 753841, matrix-synapse/trunk/tmpfiles-synapse.conf)
===================================================================
--- community-staging-any/tmpfiles-synapse.conf	                        (rev 0)
+++ community-staging-any/tmpfiles-synapse.conf	2020-11-13 07:26:13 UTC (rev 753842)
@@ -0,0 +1 @@
+d /var/lib/synapse 0700 synapse synapse -



More information about the arch-commits mailing list