Accepting request 238202 from home:elvigia:branches:network

- Remove sysvinit support on distros that have systemd 
- Remove libattr-devel from buildRequires, application does
  not link to libattr but it picks the glibc implementation 
  instead.

OBS-URL: https://build.opensuse.org/request/show/238202
OBS-URL: https://build.opensuse.org/package/show/network/rsync?expand=0&rev=33
This commit is contained in:
Andrey Karepin 2014-06-25 17:33:59 +00:00 committed by Git OBS Bridge
parent 3f9e987f00
commit b3b566c0ca
2 changed files with 21 additions and 8 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Jun 20 21:11:04 UTC 2014 - crrodriguez@opensuse.org
- Remove sysvinit support on distros that have systemd
- Remove libattr-devel from buildRequires, application does
not link to libattr but it picks the glibc implementation
instead.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 15 14:57:34 UTC 2014 - vcizek@suse.com Tue Apr 15 14:57:34 UTC 2014 - vcizek@suse.com

View File

@ -46,7 +46,6 @@ Patch4: 0001-use-lp_num_modules-instead-of-the-removed-lp_numserv.patch
Patch5: rsync-CVE-2014-2855.patch Patch5: rsync-CVE-2014-2855.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: openslp-devel BuildRequires: openslp-devel
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -116,14 +115,16 @@ ln -sf ../bin/rsync %{buildroot}%{_sbindir}/rsyncd
install -m 755 support/rsyncstats %{buildroot}%{_prefix}/bin install -m 755 support/rsyncstats %{buildroot}%{_prefix}/bin
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/rsync install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/rsync
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/rsync install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/rsync
install -m 755 %{SOURCE4} %{buildroot}%{_initddir}/rsyncd
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rsyncd.conf install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rsyncd.conf
install -m 600 %{SOURCE6} %{buildroot}%{_sysconfdir}/rsyncd.secrets install -m 600 %{SOURCE6} %{buildroot}%{_sysconfdir}/rsyncd.secrets
ln -sf ../../etc/init.d/rsyncd %{buildroot}%{_sbindir}/rcrsyncd
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/rsync-server install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/rsync-server
%if 0%{?has_systemd} %if 0%{?has_systemd}
install -D -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/rsyncd.service install -D -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/rsyncd.service
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rcrsyncd
%else
install -m 755 %{SOURCE4} %{buildroot}%{_initddir}/rsyncd
ln -sf ../../etc/init.d/rsyncd %{buildroot}%{_sbindir}/rcrsyncd
%endif %endif
%pre %pre
@ -132,37 +133,41 @@ install -D -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/rsyncd.service
%endif %endif
%preun %preun
%stop_on_removal rsyncd
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_del_preun rsyncd.service %service_del_preun rsyncd.service
%else
%stop_on_removal rsyncd
%endif %endif
%post %post
%fillup_and_insserv rsyncd
if ! grep -q "^pid file" /etc/rsyncd.conf ; then if ! grep -q "^pid file" /etc/rsyncd.conf ; then
sed -i -e "/^log file/{;p;s@\(.*\)@pid file = /var/run/rsyncd.pid@;}" /etc/rsyncd.conf sed -i -e "/^log file/{;p;s@\(.*\)@pid file = /var/run/rsyncd.pid@;}" /etc/rsyncd.conf
fi fi
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_add_post rsyncd.service %service_add_post rsyncd.service
%else
%fillup_and_insserv rsyncd
%endif %endif
%postun %postun
%restart_on_update rsyncd
%insserv_cleanup
%if 0%{?has_systemd} %if 0%{?has_systemd}
%service_del_postun rsyncd.service %service_del_postun rsyncd.service
%else
%restart_on_update rsyncd
%insserv_cleanup
%endif %endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{_unitdir}/rsyncd.service %{_unitdir}/rsyncd.service
%else
%config %{_sysconfdir}/init.d/rsyncd
%endif %endif
%config(noreplace) %{_sysconfdir}/rsyncd.conf %config(noreplace) %{_sysconfdir}/rsyncd.conf
%config(noreplace) %{_sysconfdir}/rsyncd.secrets %config(noreplace) %{_sysconfdir}/rsyncd.secrets
%config(noreplace) %{_sysconfdir}/logrotate.d/rsync %config(noreplace) %{_sysconfdir}/logrotate.d/rsync
%config(noreplace) %{_sysconfdir}/xinetd.d/rsync %config(noreplace) %{_sysconfdir}/xinetd.d/rsync
%config %{_sysconfdir}/init.d/rsyncd
%{_sbindir}/rcrsyncd %{_sbindir}/rcrsyncd
%{_sbindir}/rsyncd %{_sbindir}/rsyncd
%{_bindir}/rsyncstats %{_bindir}/rsyncstats