diff --git a/rsync.changes b/rsync.changes index dd26352..6bca389 100644 --- a/rsync.changes +++ b/rsync.changes @@ -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 diff --git a/rsync.spec b/rsync.spec index 18cedbe..6f3463d 100644 --- a/rsync.spec +++ b/rsync.spec @@ -46,7 +46,6 @@ Patch4: 0001-use-lp_num_modules-instead-of-the-removed-lp_numserv.patch Patch5: rsync-CVE-2014-2855.patch BuildRequires: autoconf BuildRequires: libacl-devel -BuildRequires: libattr-devel BuildRequires: openslp-devel BuildRequires: popt-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 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.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 600 %{SOURCE6} %{buildroot}%{_sysconfdir}/rsyncd.secrets -ln -sf ../../etc/init.d/rsyncd %{buildroot}%{_sbindir}/rcrsyncd mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/rsync-server %if 0%{?has_systemd} 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 %pre @@ -132,37 +133,41 @@ install -D -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/rsyncd.service %endif %preun -%stop_on_removal rsyncd %if 0%{?has_systemd} %service_del_preun rsyncd.service +%else +%stop_on_removal rsyncd %endif %post -%fillup_and_insserv rsyncd 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 fi %if 0%{?has_systemd} %service_add_post rsyncd.service +%else +%fillup_and_insserv rsyncd %endif %postun -%restart_on_update rsyncd -%insserv_cleanup %if 0%{?has_systemd} %service_del_postun rsyncd.service +%else +%restart_on_update rsyncd +%insserv_cleanup %endif %files %defattr(-,root,root) %if 0%{?has_systemd} %{_unitdir}/rsyncd.service +%else +%config %{_sysconfdir}/init.d/rsyncd %endif %config(noreplace) %{_sysconfdir}/rsyncd.conf %config(noreplace) %{_sysconfdir}/rsyncd.secrets %config(noreplace) %{_sysconfdir}/logrotate.d/rsync %config(noreplace) %{_sysconfdir}/xinetd.d/rsync -%config %{_sysconfdir}/init.d/rsyncd %{_sbindir}/rcrsyncd %{_sbindir}/rsyncd %{_bindir}/rsyncstats