# # spec file for package rsync # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define with_system_zlib 0 Name: rsync Version: 3.0.8 Release: 1 License: GPLv3+ Summary: Replacement for RCP/mirror that has Many More Features Url: http://rsync.samba.org/ Group: Productivity/Networking/Other Source: %{name}-%{version}.tar.bz2 Source1: %{name}-patches-%{version}.tar.bz2 Source2: logrotate.rsync Source3: rsync.xinetd Source4: rsyncd.rc Source5: rsyncd.conf Source6: rsyncd.secrets Source7: rsync-server.firewall Patch3: system-zlib.diff #PATCH-FIX-UPSTREAM rsync-3.0.5-doc-fix.patch bnc487591 petr.uzel@suse.cz -- based on upstream changes to rsync.yo Patch4: rsync-3.0.5-doc-fix.patch BuildRequires: libacl-devel BuildRequires: libpng BuildRequires: openslp-devel BuildRequires: popt-devel BuildRequires: zlib-devel PreReq: %fillup_prereq 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 Recommends: logrotate %description rsync uses the "rsync algorithm" which provides a very fast method for bringing remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both sets of files be present at one of the ends of the link beforehand. At first glance, this may seem impossible because the calculation of diffs between two files normally requires local access to both files. A technical report describing the rsync algorithm is included with this package. %prep %setup -q -b 1 -n %{name}-%{version} %if %with_system_zlib rm -f zlib/*.h %patch3 %endif patch -p1 < patches/acls.diff patch -p1 < patches/xattrs.diff patch -p1 < patches/slp.diff %patch4 -p1 %build autoheader autoconf %configure \ --disable-debug \ --enable-slp \ --enable-acl-support \ --enable-xattr-support make %{?_smp_mflags} latex tech_report latex tech_report dvips tech_report -o tech_report.ps %install %make_install rm -f %{buildroot}%{_sbindir}/rsyncd install -d %{buildroot}%{_sysconfdir}/logrotate.d install -d %{buildroot}%{_sysconfdir}/init.d install -d %{buildroot}%{_sysconfdir}/xinetd.d install -d %{buildroot}%{_prefix}/sbin 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 %preun %stop_on_removal rsyncd %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 %postun %restart_on_update rsyncd %insserv_cleanup %clean rm -rf %{buildroot} %files %defattr(-,root,root) %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 %{_bindir}/rsync %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 %changelog