Hello community, here is the log from the commit of package matrix-synapse for openSUSE:Factory checked in at 2018-05-16 11:43:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/matrix-synapse (Old) and /work/SRC/openSUSE:Factory/.matrix-synapse.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "matrix-synapse" Wed May 16 11:43:08 2018 rev:8 rq:607711 version:0.28.1 Changes: -------- --- /work/SRC/openSUSE:Factory/matrix-synapse/matrix-synapse.changes 2018-05-06 15:02:01.983782670 +0200 +++ /work/SRC/openSUSE:Factory/.matrix-synapse.new/matrix-synapse.changes 2018-05-16 11:44:13.266560810 +0200 @@ -1,0 +2,7 @@ +Mon May 14 20:32:40 UTC 2018 - ok...@suse.com + +- Fixed systemd service file installation +- Fixed rpmlint warnings +- Changed to specific "synapse" user and group + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ matrix-synapse.spec ++++++ --- /var/tmp/diff_new_pack.WupT4C/_old 2018-05-16 11:44:13.826540426 +0200 +++ /var/tmp/diff_new_pack.WupT4C/_new 2018-05-16 11:44:13.826540426 +0200 @@ -34,6 +34,12 @@ %define name_ext -test %endif +# openSUSE Leap 42.3 have an older version of python-rpm-macros and need a +# different files section which can not be applied for all python flavors +%if 0%{?suse_version} < 1500 +%define skip_python3 1 +%endif + %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define github_user matrix-org %define short_name synapse @@ -53,12 +59,10 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: systemd-rpm-macros BuildRequires: unzip +%{?systemd_requires} Requires(pre): shadow -%if 0%{?suse_version} >= 1330 -# alternative: create a specific "synapse" group -Requires(pre): group(nogroup) -%endif Requires: python-Twisted Requires: python-bcrypt Requires: python-canonicaljson >= 1.1.3 @@ -137,6 +141,7 @@ %build %if 0%{?_test} +[ -e $(readlink -f /usr/lib/systemd/system/synapse.service) ] || (echo "systemd service symlink is broken" && exit 1) python -m synapse.app.homeserver --generate-config --server localhost --config-path homeserver.yaml --report-stats=no # Disable the web client which would need python-matrix-synapse-angular-client # as a dependency for this test which is not available in all repos and we do @@ -147,7 +152,6 @@ register_new_matrix_user --config homeserver.yaml --user opensuse --password opensuse --admin https://localhost:8448 %else %python_build -chmod +x build/lib/synapse/app/synctl.py %endif %install @@ -176,15 +180,20 @@ %python_clone -a %{buildroot}%{_sbindir}/rcsynapse %python_clone -a %{buildroot}%{_unitdir}/synapse.service %python_clone -a %{buildroot}%{_sysconfdir}/synapse/log_config.yaml +%python_expand sed -i '1d' %{buildroot}%{$python_sitelib}/synapse/app/synctl.py + +# User Directory +install -d -m 750 %{buildroot}%{_localstatedir}/lib/%{short_name} %pre +getent group synapse >/dev/null || groupadd -r synapse getent passwd synapse >/dev/null || \ - /usr/sbin/useradd -r -g nogroup -s /sbin/nologin -c 'Matrix Synapse' \ + /usr/sbin/useradd -r -g synapse -s /sbin/nologin -c 'Matrix Synapse' \ -d %{_localstatedir}/lib/synapse synapse %service_add_pre synapse.service %post -%{python_install_alternative synctl hash_password register_new_matrix_user synapse_port_db rcsynapse synapse.service log_config.yaml} +%{python_install_alternative synctl hash_password register_new_matrix_user synapse_port_db %{_sbindir}/rcsynapse %{_unitdir}/synapse.service %{_sysconfdir}/synapse/log_config.yaml} %service_add_post synapse.service %preun @@ -194,11 +203,16 @@ %python_uninstall_alternative synctl %service_del_postun synapse.service +%if 0%{?suse_version} < 1500 +%files -n %name +%else %files %{python_files} +%endif %defattr(-,root,root,-) %doc *.rst %doc LICENSE %dir %{_sysconfdir}/synapse +%dir %attr(0750,%{short_name},%{short_name}) %{_localstatedir}/lib/%{short_name} %{python_sitelib} %python_alternative %{_bindir}/hash_password %python_alternative %{_bindir}/register_new_matrix_user @@ -207,8 +221,8 @@ %python_alternative %{_sbindir}/rcsynapse %python_alternative %{_unitdir}/synapse.service %config %python_alternative %{_sysconfdir}/synapse/log_config.yaml -%python3_only %{_bindir}/sync_room_to_group.pl -%python3_only %{_bindir}/move_remote_media_to_new_store.py +%python2_only %{_bindir}/sync_room_to_group.pl +%python2_only %{_bindir}/move_remote_media_to_new_store.py %endif