forked from pool/csync2
Accepting request 394099 from home:jengelh:branches:network:ha-clustering:Factory
- Avoid runtime dependency on systemd, the macros can all deal with its absence. - Call %systemd_pre/post/etc. on csync@.service template as well. OBS-URL: https://build.opensuse.org/request/show/394099 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/csync2?expand=0&rev=40
This commit is contained in:
parent
3e8e83b755
commit
99961227a8
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 6 21:13:01 UTC 2016 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Avoid runtime dependency on systemd, the macros can all deal with
|
||||||
|
its absence.
|
||||||
|
- Call %systemd_pre/post/etc. on csync@.service template as well.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 27 09:49:11 UTC 2016 - kgronlund@suse.com
|
Wed Apr 27 09:49:11 UTC 2016 - kgronlund@suse.com
|
||||||
|
|
||||||
|
10
csync2.spec
10
csync2.spec
@ -51,7 +51,6 @@ BuildRequires: pkgconfig
|
|||||||
BuildRequires: sqlite3-devel
|
BuildRequires: sqlite3-devel
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
Requires: sqlite3
|
Requires: sqlite3
|
||||||
%{?systemd_requires}
|
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%endif
|
%endif
|
||||||
@ -60,7 +59,6 @@ BuildRequires: texlive-latex
|
|||||||
%if 0%{?suse_version} > 1220
|
%if 0%{?suse_version} > 1220
|
||||||
BuildRequires: texlive-nopageno
|
BuildRequires: texlive-nopageno
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -100,10 +98,10 @@ touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_key.pem
|
|||||||
touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_cert.pem
|
touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_cert.pem
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%service_add_pre csync2.socket
|
%service_add_pre csync2.socket csync2@.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%service_add_post csync2.socket
|
%service_add_post csync2.socket csync2@.service
|
||||||
umask 077
|
umask 077
|
||||||
if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_key.pem ]; then
|
if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_key.pem ]; then
|
||||||
/usr/bin/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/csync2/csync2_ssl_key.pem 2>/dev/null
|
/usr/bin/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/csync2/csync2_ssl_key.pem 2>/dev/null
|
||||||
@ -125,14 +123,14 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun csync2.socket
|
%service_del_preun csync2.socket csync2@.service
|
||||||
# Cleanup all databases upon last removal
|
# Cleanup all databases upon last removal
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
rm -f %{_localstatedir}/lib/csync2/*
|
rm -f %{_localstatedir}/lib/csync2/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%service_del_postun csync2.socket
|
%service_del_postun csync2.socket csync2@.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user