diff --git a/matrix-synapse.changes b/matrix-synapse.changes index 3ac95d8..0793169 100644 --- a/matrix-synapse.changes +++ b/matrix-synapse.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 29 20:53:00 UTC 2017 - okurz@suse.com + +- Prevent conflicts between python2/3 version of packages + ------------------------------------------------------------------- Sun Jun 18 12:05:47 UTC 2017 - okurz@suse.com diff --git a/matrix-synapse.spec b/matrix-synapse.spec index 126e0a8..d16edde 100644 --- a/matrix-synapse.spec +++ b/matrix-synapse.spec @@ -64,6 +64,8 @@ Requires: python-pysaml2 >= 3.0.0 #BuildRequires: python-pysaml2 < 4.0.0 Requires: python-pymacaroons-pynacl Requires: python-msgpack-python >= 0.3.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -128,11 +130,16 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsynapse %{__install} -m 0644 contrib/systemd/synapse.service \ "%{buildroot}%{_unitdir}" -%{__mkdir_p} "%{buildroot}%{_rundir}/synapse" -%{__mkdir_p} "%{buildroot}%{_rundir}/synapse" %{__mkdir_p} "%{buildroot}%{_rundir}/synapse" %python_expand %fdupes %{buildroot}%{$python_sitelib} +for p in hash_password register_new_matrix_user synapse_port_db synctl ; do + %python_clone -a %{buildroot}%{_bindir}/$p +done +%python_clone -a %{buildroot}%{_sbindir}/rcsynapse +%python_clone -a %{buildroot}%{_unitdir}/synapse.service +%python_clone -a %{buildroot}%{_sysconfdir}/synapse/log_config.yaml + %clean rm -rf %{buildroot} @@ -144,26 +151,27 @@ getent passwd synapse &>/dev/null || \ %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} %service_add_post synapse.service %preun %service_del_preun synapse.service %postun +%python_uninstall_alternative synctl %service_del_postun synapse.service %files %{python_files} %defattr(-,root,root,-) %doc *.rst %doc LICENSE -%attr(0710,root,synapse) %dir %{_sysconfdir}/synapse -%config %{_sysconfdir}/synapse/* +%dir %{_sysconfdir}/synapse %{python_sitelib} -%{_bindir}/hash_password -%{_bindir}/register_new_matrix_user -%{_bindir}/synapse_port_db -%{_bindir}/synctl -%{_sbindir}/rcsynapse -%{_unitdir}/synapse.service - +%python_alternative %{_bindir}/hash_password +%python_alternative %{_bindir}/register_new_matrix_user +%python_alternative %{_bindir}/synapse_port_db +%python_alternative %{_bindir}/synctl +%python_alternative %{_sbindir}/rcsynapse +%python_alternative %{_unitdir}/synapse.service +%config %python_alternative %{_sysconfdir}/synapse/log_config.yaml %changelog