438af50
%global srcname synapse
438af50
b663fc1
# Version suffix in URL when building release candidates
b663fc1
%global rcx %{nil}
b663fc1
Jeremy Cline e514853
%{?python_enable_dependency_generator}
Jeremy Cline e514853
438af50
Name:       matrix-%{srcname}
db3dab5
Version:    1.44.0
4cb09f3
Release:    1%{?dist}
438af50
Summary:    A Matrix reference homeserver written in Python using Twisted
438af50
License:    ASL 2.0
438af50
URL:        https://github.com/matrix-org/%{srcname}
b663fc1
Source0:    %{url}/archive/v%{version}%{rcx}/%{srcname}-%{version}%{rcx}.tar.gz
438af50
Source1:    synapse.sysconfig
Jeremy Cline 2352997
Source2:    synapse.service
5dcb251
# non-upstreamable patch to accept any version of python-cryptography, see RHBZ#1978949
5dcb251
Patch1:     0001-relax-cryptography-dependency-version-requirement.patch
438af50
BuildArch:  noarch
438af50
Jeremy Cline 2352997
BuildRequires:  python3-devel
Jeremy Cline 2352997
BuildRequires:  python3-setuptools
Jeremy Cline 2352997
Jeremy Cline 2352997
# Test dependencies
c5f8aa2
BuildRequires:  python3-mock >= 2.0
2466647
BuildRequires:  python3-parameterized >= 0.7.0
7760bc4
BuildRequires:  /usr/bin/openssl
Jeremy Cline 2352997
Jeremy Cline 2352997
# Package dependencies
7760bc4
#BuildRequires:  python3-txacme >= 0.9.2
18ca30d
BuildRequires:  (python3-attrs >= 19.2.0 without python3-attrs = 21.1.0)
2466647
BuildRequires:  python3-authlib
c5f8aa2
BuildRequires:  python3-bcrypt >= 3.1.0
7760bc4
BuildRequires:  python3-bleach >= 1.4.3
ce16e3e
BuildRequires:  python3-canonicaljson >= 1.4.0
18ca30d
# v3.4.7 affects only the binary distribution, so using v3.4.6 is fine.
18ca30d
BuildRequires:  python3-cryptography >= 3.4.6
c5f8aa2
BuildRequires:  python3-daemonize >= 2.3.1
7760bc4
BuildRequires:  python3-frozendict >= 1.0
c5f8aa2
BuildRequires:  python3-idna >= 2.5
18ca30d
BuildRequires:  python3-ijson
c5f8aa2
BuildRequires:  python3-jinja2 >= 2.9
441d69e
BuildRequires:  python3-jsonschema
2466647
BuildRequires:  python3-jwt
c5f8aa2
BuildRequires:  python3-lxml >= 3.5.0
Jeremy Cline 2352997
BuildRequires:  python3-matrix-synapse-ldap3 >= 0.1
c5f8aa2
BuildRequires:  python3-msgpack >= 0.5.2
Jeremy Cline 2352997
BuildRequires:  python3-netaddr >= 0.7.18
Jeremy Cline 2352997
BuildRequires:  python3-phonenumbers >= 8.2.0
c5f8aa2
BuildRequires:  python3-pillow >= 4.3.0
7a31030
BuildRequires:  python3-prometheus_client
c5f8aa2
BuildRequires:  python3-pyOpenSSL >= 16.0.0
c5f8aa2
BuildRequires:  python3-pyasn1 >= 0.1.9
c5f8aa2
BuildRequires:  python3-pyasn1-modules >= 0.0.7
7760bc4
BuildRequires:  python3-pymacaroons-pynacl >= 0.13.0
c5f8aa2
BuildRequires:  python3-pynacl >= 1.2.1
c5f8aa2
BuildRequires:  python3-pysaml2 >= 4.5.0
c5f8aa2
BuildRequires:  python3-pyyaml >= 3.11
7760bc4
BuildRequires:  python3-service-identity >= 18.1.0
7f8a802
BuildRequires:  python3-signedjson >= 1.1.0
c5f8aa2
BuildRequires:  python3-sortedcontainers >= 1.4.4
c5f8aa2
BuildRequires:  python3-systemd >= 231
c5f8aa2
BuildRequires:  python3-treq >= 15.1
b45e436
BuildRequires:  python3-twisted >= 18.9.0
fbe3781
BuildRequires:  python3-typing-extensions >= 3.7.4
Jeremy Cline 2352997
BuildRequires:  python3-unpaddedbase64 >= 1.1.0
438af50
BuildRequires:  systemd
7a31030
BuildRequires:  xmlsec1
438af50
438af50
Requires(pre):  shadow-utils
438af50
Requires:       systemd
65b3e52
%{?systemd_requires}
438af50
438af50
%description
438af50
Matrix is an ambitious new ecosystem for open federated Instant Messaging and
438af50
VoIP. Synapse is a reference "homeserver" implementation of Matrix from the
438af50
core development team at matrix.org, written in Python/Twisted. It is intended
438af50
to showcase the concept of Matrix and let folks see the spec in the context of
438af50
a coded base and let you run your own homeserver and generally help bootstrap
438af50
the ecosystem.
438af50
438af50
438af50
%prep
b663fc1
%autosetup -p1 -n %{srcname}-%{version}%{rcx}
438af50
438af50
# We don't support the built-in client so remove all the bundled JS.
438af50
rm -rf synapse/static
438af50
438af50
438af50
%build
Jeremy Cline 2352997
%py3_build
438af50
438af50
438af50
%install
Jeremy Cline 2352997
%py3_install
438af50
23e1611
# Synapse includes some benchmarks in a separate Python package named "synmark"
23e1611
# which is installed by default. Remove it to avoid shipping it in the Fedora
23e1611
# package, since it is unlikely to be useful to end users.
23e1611
rm -r %{buildroot}%{python3_sitelib}/synmark/
23e1611
438af50
install -p -D -T -m 0644 contrib/systemd/log_config.yaml %{buildroot}%{_sysconfdir}/synapse/log_config.yaml
438af50
install -p -D -T -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/synapse
Jeremy Cline 2352997
install -p -D -T -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/synapse.service
438af50
install -p -d -m 755 %{buildroot}/%{_sharedstatedir}/synapse
438af50
438af50
438af50
%check
Jeremy Cline 2352997
PYTHONPATH=. trial-3 tests
438af50
438af50
438af50
%pre
438af50
getent group synapse >/dev/null || groupadd -r synapse
438af50
getent passwd synapse >/dev/null || \
438af50
    useradd -r -g synapse -d %{_sharedstatedir}/synapse -s /sbin/nologin \
438af50
    -c "The user for the Synapse Matrix server" synapse
438af50
exit 0
438af50
438af50
%post
438af50
%systemd_post synapse.service
438af50
438af50
%preun
438af50
%systemd_preun synapse.service
438af50
438af50
%postun
438af50
%systemd_postun_with_restart synapse.service
438af50
438af50
438af50
%files
438af50
%license LICENSE
438af50
%doc *.rst
438af50
%config(noreplace) %{_sysconfdir}/sysconfig/synapse
Jeremy Cline 2352997
%{python3_sitelib}/synapse/
Jeremy Cline 2352997
%{python3_sitelib}/matrix_synapse*.egg-info/
438af50
%{_bindir}/*
438af50
%{_unitdir}/synapse.service
438af50
%attr(755,synapse,synapse) %dir %{_sharedstatedir}/synapse
Jeremy Cline 6d6bb21
%attr(755,synapse,synapse) %dir %{_sysconfdir}/synapse
Jeremy Cline 6d6bb21
%attr(644,synapse,synapse) %config(noreplace) %{_sysconfdir}/synapse/*
438af50
438af50
438af50
%changelog
43c4932
* Mon Oct 18 2021 Kai A. Hiller <V02460@gmail.com> - 1.44.0-1
db3dab5
- Update to v1.44.0
db3dab5
441d69e
* Thu Sep 09 2021 Kai A. Hiller <V02460@gmail.com> - 1.42.0-1
441d69e
- Update to v1.42.0
441d69e
f3881d8
* Tue Aug 31 2021 Kai A. Hiller <V02460@gmail.com> - 1.41.1-1
f3881d8
- Update to v1.41.1
f3881d8
- Fix CVE-2021-39163, CVE-2021-39164
f3881d8
94f4286
* Tue Aug 24 2021 Kai A. Hiller <V02460@gmail.com> - 1.41.0-1
94f4286
- Update to v1.41.0
94f4286
bc82908
* Tue Aug 10 2021 Kai A. Hiller <V02460@gmail.com> - 1.40.0-1
bc82908
- Update to v1.40.0
bc82908
a74c98d
* Thu Jul 29 2021 Kai A. Hiller <V02460@gmail.com> - 1.39.0-1
a74c98d
- Update to v1.39.0
a74c98d
4cb09f3
* Fri Jul 23 2021 Kai A. Hiller <V02460@gmail.com> - 1.38.1-1
4cb09f3
- Update to v1.38.1
4cb09f3
1671050
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.38.0-3
1671050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
1671050
05bab65
* Sun Jul 18 2021 Dan Callaghan <djc@djc.id.au> - 1.38.0-2
05bab65
- fix startup ordering of synapse.service (RHBZ#1910740)
5dcb251
- relax version requirement for python3-cryptography
05bab65
18ca30d
* Wed Jul 14 2021 Kai A. Hiller <V02460@gmail.com> - 1.38.0-1
18ca30d
- Update to v1.38.0
18ca30d
bb3a279
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.26.0-3
bb3a279
- Rebuilt for Python 3.10
bb3a279
338d2e8
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.26.0-2
338d2e8
- Rebuilt for updated systemd-rpm-macros
338d2e8
  See https://pagure.io/fesco/issue/2583.
338d2e8
e39d410
* Thu Jan 28 2021 Kai A. Hiller <V02460@gmail.com> - 1.26.0-1
e39d410
- Update to v1.26.0
e39d410
e1e81f4
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.0-2
e1e81f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e1e81f4
9e4a0de
* Wed Jan 13 2021 Kai A. Hiller 
9e4a0de
- Update to v1.25.0
9e4a0de
7a31030
* Wed Dec 09 2020 Kai A. Hiller <V02460@gmail.com> - 1.24.0-1
7a31030
- Update to v1.24.0
7a31030
ce16e3e
* Mon Nov 30 2020 Gwyn Ciesla <gwync@protonmail.com> - 1.23.0-1
ce16e3e
- 1.23.0
ce16e3e
2466647
* Sat Aug 29 2020 Kai A. Hiller <V02460@gmail.com> - 1.18.0-1
2466647
- Update to v1.18.0
49e3a54
1ac41b3
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-4
1ac41b3
- Second attempt - Rebuilt for
1ac41b3
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1ac41b3
04957d5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-3
04957d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
04957d5
9cd0a9f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.13.0-2
9cd0a9f
- Rebuilt for Python 3.9
9cd0a9f
be37064
* Thu May 21 2020 Dan Callaghan <djc@djc.id.au> - 1.13.0-1
be37064
- Update to v1.13.0
be37064
1aa31c5
* Sun May 17 2020 Dan Callaghan <djc@djc.id.au> - 1.12.4-1
1aa31c5
- Update to v1.12.4
1aa31c5
7f8a802
* Wed Apr 22 2020 Kai A. Hiller <V02460@gmail.com> - 1.12.3-1
7f8a802
- Update to v1.12.3
7f8a802
4cf932f
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-2
4cf932f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4cf932f
41db3ae
* Fri Jan 24 2020 Arjen Heidinga <dexter@beetjevreeemd.nl> - 1.8.0-1
41db3ae
- Update to v1.8.0
41db3ae
23e1611
* Tue Dec 31 2019 Dan Callaghan <djc@djc.id.au> - 1.7.2-1
23e1611
- Update to v1.7.2
23e1611
d4e6082
* Tue Dec 03 2019 Dan Callaghan <djc@djc.id.au> - 1.6.1-1
d4e6082
- Update to v1.6.1
d4e6082
be9c91a
* Fri Nov 08 2019 Kai A. Hiller <V02460@gmail.com> - 1.5.1-1
ad16dc0
- Update to v1.5.1
ad16dc0
- Add Python 3.8 compatibility
fbe3781
7ba4324
* Fri Oct 11 2019 Kai A. Hiller <V02460@gmail.com> - 1.4.0-1
b45e436
- Update to v1.4.0
b45e436
4024c42
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-2
4024c42
- Rebuilt for Python 3.8
4024c42
c5f8aa2
* Fri Jul 26 2019 Kai A. Hiller <V02460@gmail.com> - 1.2.1-1
c5f8aa2
- Update to v1.2.1
c5f8aa2
5437ef2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
5437ef2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5437ef2
7760bc4
* Thu Jun 27 2019 Dan Callaghan <djc@djc.id.au> - 1.0.0-1
7760bc4
- Update to v1.0.0 release, including new protocol-mandated TLS
7760bc4
  certificate verification logic. See:
7760bc4
  https://github.com/matrix-org/synapse/blob/master/docs/MSC1711_certificates_FAQ.md
7760bc4
847ebe0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.34.0.1-3
847ebe0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
847ebe0
Jeremy Cline 6d6bb21
* Thu Jan 24 2019 Jeremy Cline <jeremy@jcline.org> - 0.34.0.1-2
Jeremy Cline 6d6bb21
- synapse user should own its configuration directory (rhbz 1662672)
Jeremy Cline 6d6bb21
Jeremy Cline 62c41d5
* Fri Jan 11 2019 Jeremy Cline <jeremy@jcline.org> - 0.34.0.1-1
Jeremy Cline 62c41d5
- Update to v0.34.0.1, fixes CVE-2019-5885
Jeremy Cline 62c41d5
Jeremy Cline 2352997
* Fri Dec 28 2018 Jeremy Cline <jeremy@jcline.org> - 0.34.0-1
Jeremy Cline 2352997
- Update to v0.34.0
Jeremy Cline 2352997
- Switch to Python 3
Jeremy Cline 2352997
Jeremy Cline e514853
* Thu Sep 06 2018 Jeremy Cline <jeremy@jcline.org> - 0.33.3.1-1
Jeremy Cline e514853
- Update to v0.33.3.1
Jeremy Cline e514853
- Use the Python dependency generator.
Jeremy Cline e514853
36dc95b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.2-2
36dc95b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
36dc95b
Jeremy Cline cb39405
* Thu Jun 14 2018 Jeremy Cline <jeremy@jcline.org> - 0.31.2-1
Jeremy Cline cb39405
- Update to v0.31.2
Jeremy Cline cb39405
- https://github.com/matrix-org/synapse/releases/tag/v0.31.2
Jeremy Cline cb39405
Jeremy Cline 04adc52
* Wed Jun 13 2018 Jeremy Cline <jeremy@jcline.org> - 0.31.1-2
Jeremy Cline 04adc52
- Stop using Python dependency generator
Jeremy Cline 04adc52
Jeremy Cline a0a09a0
* Wed Jun 13 2018 Jeremy Cline <jeremy@jcline.org> - 0.31.1-1
Jeremy Cline a0a09a0
- Update to v0.31.1
Jeremy Cline a0a09a0
- Fix CVE-2018-12291
Jeremy Cline a0a09a0
Jeremy Cline 307fe6b
* Thu May 24 2018 Jeremy Cline <jeremy@jcline.org> - 0.29.1-1
Jeremy Cline 307fe6b
- Update to the latest upstream release.
Jeremy Cline 307fe6b
- Use the Python dependency generator.
Jeremy Cline 307fe6b
ef18372
* Tue May 01 2018 Jeremy Cline <jeremy@jcline.org> - 0.28.1-1
ef18372
- Update to the latest upstream release.
ef18372
0e5dfc2
* Wed Apr 11 2018 Jeremy Cline <jeremy@jcline.org> - 0.27.3-1
0e5dfc2
- Update to the latest upstream release.
0e5dfc2
3931035
* Mon Mar 26 2018 Jeremy Cline <jeremy@jcline.org> - 0.27.2-1
3931035
- Update to the latest upstream release.
3931035
6e8bc23
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
6e8bc23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6e8bc23
1cb61c3
* Wed Jan 10 2018 Jeremy Cline <jeremy@jcline.org> - 0.26.0-1
1cb61c3
- Update to latest upstream
1cb61c3
87456e9
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.23.1-2
87456e9
- Update Python 2 dependency declarations to new packaging standards
87456e9
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
87456e9
e07f1b6
* Tue Oct 03 2017 Jeremy Cline <jeremy@jcline.org> - 0.23.1-1
e07f1b6
- Update to latest upstream
e07f1b6
- Include patch to work with ujson-2.0+
e07f1b6
3bbc395
* Fri Sep 29 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.22.1-4
3bbc395
- Use python2 prefix for packages whenever possible
3bbc395
- Add missing %%{?systemd_requires}
3bbc395
e92b675
* Wed Aug 09 2017 Gwyn Ciesla <limburgher@gmail.com> - 0.22.1-3
e92b675
- Switch to python-bcrypt, BZ 1473018.
e92b675
6b7ee6c
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.1-2
6b7ee6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6b7ee6c
a9799f2
* Mon Jul 10 2017 Jeremy Cline <jeremy@jcline.org> - 0.22.1-1
a9799f2
- Update to the latest upstream release
a9799f2
cf3a942
* Thu Jul 06 2017 Jeremy Cline <jeremy@jcline.org> - 0.22.0-1
cf3a942
- Update to the latest upstream release (#1462045)
cf3a942
0969d59
* Fri Jun 23 2017 Jeremy Cline <jeremy@jcline.org> - 0.21.1-1
0969d59
- Update to latest upstream release
0969d59
438af50
* Tue May 30 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-4
438af50
- use _sharedstatedir  rather than _localstatedir
438af50
438af50
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-3
438af50
- Remove bundled JS
438af50
- Fix some typos in the summary and description
438af50
438af50
* Tue Apr 04 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-2
438af50
- Remove the duplicate requirement on pysaml
438af50
438af50
* Tue Mar 28 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-1
438af50
- Initial package