Switch to new entrypoints.

This commit is contained in:
Alex Manning 2022-01-04 20:23:26 +00:00
parent 3c405430ea
commit f54154acfb
4 changed files with 3 additions and 15 deletions

View file

@ -2,7 +2,7 @@
# Version suffix in URL when building release candidates # Version suffix in URL when building release candidates
%global rcx %{nil} %global rcx %{nil}
%global ghversion 1.49.0 %global ghversion 1.49.2
%{?python_enable_dependency_generator} %{?python_enable_dependency_generator}
@ -21,7 +21,6 @@ URL: https://github.com/matrix-org/%{srcname}
Source0: %{url}/archive/v%{ghversion}%{rcx}/%{srcname}-%{ghversion}%{rcx}.tar.gz Source0: %{url}/archive/v%{ghversion}%{rcx}/%{srcname}-%{ghversion}%{rcx}.tar.gz
Source1: synapse.sysconfig Source1: synapse.sysconfig
Source2: synapse.service Source2: synapse.service
Source3: synapse-homeserver
Source4: synapse@.service Source4: synapse@.service
# non-upstreamable patch to accept any version of python-cryptography, see RHBZ#1978949 # non-upstreamable patch to accept any version of python-cryptography, see RHBZ#1978949
@ -115,8 +114,6 @@ install -p -D -T -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/synapse.service
install -p -D -T -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/synapse@.service 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
install -p -D -T -m 755 %{SOURCE3} %{buildroot}%{_bindir}/synapse-homeserver
%check %check
PYTHONPATH=. trial-3 tests PYTHONPATH=. trial-3 tests

View file

@ -1,9 +0,0 @@
#!/usr/bin/python3
import re
import sys
from synapse.app.homeserver import main
if __name__ == "__main__":
sys.argv[0] = re.sub(r"(-script\.pyw?|\.exe)?$", "", sys.argv[0])
sys.exit(main())

View file

@ -8,7 +8,7 @@ NotifyAccess=main
User=synapse User=synapse
Group=synapse Group=synapse
WorkingDirectory=/var/lib/synapse WorkingDirectory=/var/lib/synapse
ExecStart=/usr/bin/synapse-homeserver --config-path=/etc/synapse/homeserver.yaml ExecStart=/usr/bin/synapse_homeserver --config-path=/etc/synapse/homeserver.yaml
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
# EnvironmentFile=-/etc/sysconfig/synapse # Can be used to e.g. set SYNAPSE_CACHE_FACTOR # EnvironmentFile=-/etc/sysconfig/synapse # Can be used to e.g. set SYNAPSE_CACHE_FACTOR
SyslogIdentifier=synapse SyslogIdentifier=synapse

View file

@ -15,7 +15,7 @@ Type=notify
NotifyAccess=main NotifyAccess=main
User=synapse User=synapse
WorkingDirectory=/var/lib/synapse WorkingDirectory=/var/lib/synapse
ExecStart=/usr/bin/python -m synapse.app.generic_worker --config-path=/etc/synapse/homeserver.yaml --config-path=/etc/synapse/workers/%i.yaml ExecStart=/usr/bin/synapse_worker --config-path=/etc/synapse/homeserver.yaml --config-path=/etc/synapse/workers/%i.yaml
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure Restart=on-failure
RestartSec=3 RestartSec=3