Synapse v0.34.0

Switch to Python 3 since 0.34 supports it
This commit is contained in:
Jeremy Cline 2018-12-28 15:43:36 -05:00
parent e514853835
commit 2352997660
No known key found for this signature in database
GPG key ID: 9223308FA9B246DB
3 changed files with 62 additions and 73 deletions

View file

@ -1,29 +0,0 @@
From 088d83aa2df3748f42569f9c6bbbda48c5c7d82a Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline@redhat.com>
Date: Thu, 6 Sep 2018 15:04:39 -0400
Subject: [PATCH] Drop the unshipped web_client dependency
This is necessary to use the auto-dependency generator.
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
synapse/python_dependencies.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index 987eec3ef..4bffd9e2f 100644
--- a/synapse/python_dependencies.py
+++ b/synapse/python_dependencies.py
@@ -62,9 +62,6 @@ REQUIREMENTS = {
}
CONDITIONAL_REQUIREMENTS = {
- "web_client": {
- "matrix_angular_sdk>=0.6.8": ["syweb>=0.6.8"],
- },
"email.enable_notifs": {
"Jinja2>=2.8": ["Jinja2>=2.8"],
"bleach>=1.4.2": ["bleach>=1.4.2"],
--
2.17.1

View file

@ -3,53 +3,53 @@
%{?python_enable_dependency_generator} %{?python_enable_dependency_generator}
Name: matrix-%{srcname} Name: matrix-%{srcname}
Version: 0.33.3.1 Version: 0.34.0
Release: 1%{?dist} Release: 1%{?dist}
Summary: A Matrix reference homeserver written in Python using Twisted Summary: A Matrix reference homeserver written in Python using Twisted
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/matrix-org/%{srcname} URL: https://github.com/matrix-org/%{srcname}
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
Source1: synapse.sysconfig Source1: synapse.sysconfig
Patch0: Drop-the-unshipped-web_client-dependency.patch Source2: synapse.service
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel BuildRequires: python3-devel
BuildRequires: python2-setuptools BuildRequires: python3-setuptools
BuildRequires: python2-sphinx
BuildRequires: python2-affinity # Test dependencies
BuildRequires: python2-bcrypt BuildRequires: python3-lxml
BuildRequires: python2-pyOpenSSL >= 0.15 BuildRequires: python3-mock
BuildRequires: python2-bleach >= 1.4.2
BuildRequires: python2-blist # Package dependencies
BuildRequires: python2-canonicaljson >= 1.1.3 BuildRequires: python3-bcrypt
BuildRequires: python2-daemonize BuildRequires: python3-pyOpenSSL >= 0.15
BuildRequires: python2-frozendict >= 0.4 BuildRequires: python3-bleach >= 1.4.2
BuildRequires: python2-jinja2 >= 2.8 BuildRequires: python3-canonicaljson >= 1.1.3
BuildRequires: python2-jsonschema BuildRequires: python3-daemonize
BuildRequires: python2-lxml BuildRequires: python3-frozendict >= 0.4
BuildRequires: python2-matrix-synapse-ldap3 >= 0.1 BuildRequires: python3-jinja2 >= 2.8
BuildRequires: python2-msgpack >= 0.3.0 BuildRequires: python3-jsonschema
BuildRequires: python2-netaddr >= 0.7.18 BuildRequires: python3-matrix-synapse-ldap3 >= 0.1
BuildRequires: python2-phonenumbers >= 8.2.0 BuildRequires: python3-msgpack >= 0.3.0
BuildRequires: python2-pillow BuildRequires: python3-netaddr >= 0.7.18
BuildRequires: python2-psutil >= 2.0.0 BuildRequires: python3-phonenumbers >= 8.2.0
BuildRequires: python2-pyasn1 BuildRequires: python3-pillow
BuildRequires: python2-pydenticon BuildRequires: python3-psutil >= 2.0.0
BuildRequires: python2-pymacaroons-pynacl BuildRequires: python3-pyasn1
BuildRequires: python2-pynacl >= 1.2.0 BuildRequires: python3-pymacaroons-pynacl
BuildRequires: python2-pysaml2 >= 3.0.0 BuildRequires: python3-pynacl >= 1.2.0
BuildRequires: python2-service-identity >= 1.0.0 BuildRequires: python3-pysaml2 >= 3.0.0
BuildRequires: python2-signedjson >= 1.0.0 BuildRequires: python3-service-identity >= 1.0.0
BuildRequires: python2-six BuildRequires: python3-signedjson >= 1.0.0
BuildRequires: python2-sortedcontainers BuildRequires: python3-six
BuildRequires: python2-systemd BuildRequires: python3-sortedcontainers
BuildRequires: python2-twisted >= 16.0.0 BuildRequires: python3-systemd
BuildRequires: python2-ujson BuildRequires: python3-twisted >= 17.0.0
BuildRequires: python2-unpaddedbase64 >= 1.1.0 BuildRequires: python3-treq
BuildRequires: python2-prometheus_client BuildRequires: python3-unpaddedbase64 >= 1.1.0
BuildRequires: python2-pyyaml BuildRequires: python3-prometheus_client
BuildRequires: python3-pyyaml
BuildRequires: systemd BuildRequires: systemd
BuildRequires: python2-mock
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires: systemd Requires: systemd
@ -72,20 +72,20 @@ rm -rf synapse/static
%build %build
%py2_build %py3_build
%install %install
%py2_install %py3_install
install -p -D -T -m 0644 contrib/systemd/log_config.yaml %{buildroot}%{_sysconfdir}/synapse/log_config.yaml install -p -D -T -m 0644 contrib/systemd/log_config.yaml %{buildroot}%{_sysconfdir}/synapse/log_config.yaml
install -p -D -T -m 0644 contrib/systemd/synapse.service %{buildroot}%{_unitdir}/synapse.service
install -p -D -T -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/synapse install -p -D -T -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/synapse
install -p -D -T -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/synapse.service
install -p -d -m 755 %{buildroot}/%{_sharedstatedir}/synapse install -p -d -m 755 %{buildroot}/%{_sharedstatedir}/synapse
%check %check
PYTHONPATH=. trial-2 tests PYTHONPATH=. trial-3 tests
%pre %pre
@ -111,14 +111,18 @@ exit 0
%dir %{_sysconfdir}/synapse %dir %{_sysconfdir}/synapse
%config(noreplace) %{_sysconfdir}/synapse/* %config(noreplace) %{_sysconfdir}/synapse/*
%config(noreplace) %{_sysconfdir}/sysconfig/synapse %config(noreplace) %{_sysconfdir}/sysconfig/synapse
%{python2_sitelib}/synapse/ %{python3_sitelib}/synapse/
%{python2_sitelib}/matrix_synapse*.egg-info/ %{python3_sitelib}/matrix_synapse*.egg-info/
%{_bindir}/* %{_bindir}/*
%{_unitdir}/synapse.service %{_unitdir}/synapse.service
%attr(755,synapse,synapse) %dir %{_sharedstatedir}/synapse %attr(755,synapse,synapse) %dir %{_sharedstatedir}/synapse
%changelog %changelog
* Fri Dec 28 2018 Jeremy Cline <jeremy@jcline.org> - 0.34.0-1
- Update to v0.34.0
- Switch to Python 3
* Thu Sep 06 2018 Jeremy Cline <jeremy@jcline.org> - 0.33.3.1-1 * Thu Sep 06 2018 Jeremy Cline <jeremy@jcline.org> - 0.33.3.1-1
- Update to v0.33.3.1 - Update to v0.33.3.1
- Use the Python dependency generator. - Use the Python dependency generator.

14
synapse.service Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Synapse Matrix homeserver
[Service]
Type=simple
User=synapse
Group=synapse
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/sysconfig/synapse # Can be used to e.g. set SYNAPSE_CACHE_FACTOR
[Install]
WantedBy=multi-user.target