diff --git a/rsync.changes b/rsync.changes index a6dcf16..fce1a4d 100644 --- a/rsync.changes +++ b/rsync.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Dec 21 10:42:30 UTC 2011 - coolo@suse.com + +- add autoconf as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Fri Nov 25 01:38:07 UTC 2011 - crrodriguez@opensuse.org + +- Add systemd unit +- Do not BuildRequire textlive + ------------------------------------------------------------------- Wed Oct 12 03:40:40 UTC 2011 - crrodriguez@opensuse.org diff --git a/rsync.spec b/rsync.spec index c67386f..b2ce0d8 100644 --- a/rsync.spec +++ b/rsync.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %define with_system_zlib 0 %if 0%{?suse_version} < 1120 %define _initddir %{_sysconfdir}/init.d @@ -23,11 +22,11 @@ Name: rsync Version: 3.0.9 -Release: 8 -License: GPL-3.0+ +Release: 0 Summary: Versatile tool for fast incremental file transfer -Url: http://rsync.samba.org/ +License: GPL-3.0+ Group: Productivity/Networking/Other +Url: http://rsync.samba.org/ Source: %{name}-%{version}.tar.bz2 Source1: %{name}-patches-%{version}.tar.bz2 Source2: logrotate.rsync @@ -36,9 +35,10 @@ Source4: rsyncd.rc Source5: rsyncd.conf Source6: rsyncd.secrets Source7: rsync-server.firewall +Source8: rsyncd.service Patch3: system-zlib.diff +BuildRequires: autoconf BuildRequires: libacl-devel -BuildRequires: libpng BuildRequires: openslp-devel BuildRequires: popt-devel BuildRequires: zlib-devel @@ -47,15 +47,14 @@ PreReq: %insserv_prereq PreReq: grep PreReq: sed BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} > 1020 -BuildRequires: texlive-latex -%else -BuildRequires: te_ams -BuildRequires: te_latex -%endif %if 0%{?suse_version} > 1010 Recommends: logrotate %endif +%if 0%{?suse_version} > 1140 +BuildRequires: systemd +%{?systemd_requires} +%define has_systemd 1 +%endif %description Rsync is a fast and extraordinarily versatile file copying tool. It can copy @@ -87,9 +86,6 @@ autoconf --enable-acl-support \ --enable-xattr-support make %{?_smp_mflags} -latex tech_report -latex tech_report -dvips tech_report -o tech_report.ps %install %if 0%{?suse_version} < 1120 @@ -112,25 +108,45 @@ 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 +%endif + +%pre +%if 0%{?has_systemd} +%service_add_pre rsyncd.service +%endif %preun %stop_on_removal rsyncd +%if 0%{?has_systemd} +%service_del_preun rsyncd.service +%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 +%endif %postun %restart_on_update rsyncd %insserv_cleanup +%if 0%{?has_systemd} +%service_del_postun rsyncd.service +%endif %clean rm -rf %{buildroot} %files %defattr(-,root,root) +%if 0%{?has_systemd} +%{_unitdir}/rsyncd.service +%endif %config(noreplace) %{_sysconfdir}/rsyncd.conf %config(noreplace) %{_sysconfdir}/rsyncd.secrets %config(noreplace) %{_sysconfdir}/logrotate.d/rsync @@ -143,6 +159,6 @@ rm -rf %{buildroot} %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/* %doc %{_mandir}/man1/rsync.1.gz %doc %{_mandir}/man5/rsyncd.conf.5.gz -%doc COPYING NEWS README tech_report.ps tech_report.tex +%doc COPYING NEWS README tech_report.tex %changelog diff --git a/rsyncd.service b/rsyncd.service new file mode 100644 index 0000000..be2d94f --- /dev/null +++ b/rsyncd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start the rsync server daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/rsyncd --daemon --no-detach +IOSchedulingClass=idle +CPUSchedulingPolicy=batch +[Install] +WantedBy=multi-user.target \ No newline at end of file