%global srcname rdiff-backup Version: 1.2.8 Summary: Convenient and transparent local/remote incremental mirror/backup Name: python2-%{srcname} Release: 3%{?dist} URL: http://www.nongnu.org/rdiff-backup/ Source: http://savannah.nongnu.org/download/%{srcname}/%{srcname}-%{version}.tar.gz # # Upstream bug: https://savannah.nongnu.org/bugs/?26064 # Patch0: http://dev.sgu.ru/rpm/rdiff-backup--popen2.patch # # Fix to use unversioned docdirs # Patch1: rdiff-backup-1.2.8-docdir.patch # # Workaround to build with librsync >= 1.0.0 # Patch2: rdiff-backup-1.2.8-librsync-1.0.0.patch # # Deal better with hardlinks # https://bugzilla.redhat.com/show_bug.cgi?id=1409435 # http://savannah.nongnu.org/bugs/?26796 # Patch3: rdiff-backup-1.2.8-hardlinks.patch # # Ignore ENODATA when clearing xattrs # https://bugzilla.redhat.com/show_bug.cgi?id=1494236 # https://github.com/sol1/rdiff-backup/issues/20 Patch4: rdiff-backup-1.2.8-ignore-enodata.patch License: GPLv2+ BuildRequires: python2-devel >= 2.2, librsync-devel >= 0.9.6 BuildRequires: gcc #recommended runtime dependencies %if 0%{?fedora} >= 32 Requires: python2-pylibacl %else Requires: pylibacl %endif %if 0%{?rhel} >= 8 || 0%{?fedora} >= 31 Requires: python2-pyxattr %else Requires: pyxattr %endif Provides: %{srcname}-1 = %{version}-%{release} %description rdiff-backup is a script, written in Python, that backs up one directory to another and is intended to be run periodically (nightly from cron for instance). The target directory ends up a copy of the source directory, but extra reverse diffs are stored in the target directory, so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup. rdiff-backup can also operate in a bandwidth efficient manner over a pipe, like rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up to a remote location, and only the differences from the previous backup will be transmitted. This is intended to provide a transition aid for use on a backup server that needs to communicate with both python2 and python3 versions of rdiff-backup. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %build python2 setup.py build %install rm -rf $RPM_BUILD_ROOT python2 setup.py install --root $RPM_BUILD_ROOT # Produce .pyo files for %ghost directive later python2 -Oc 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT/%{python2_sitearch}/rdiff_backup'")' mv $RPM_BUILD_ROOT/%{_bindir}/%{srcname} $RPM_BUILD_ROOT/%{_bindir}/%{srcname}-1 rm $RPM_BUILD_ROOT/%{_bindir}/%{srcname}-statistics rm -rf $RPM_BUILD_ROOT/%{_mandir} $RPM_BUILD_ROOT/%{_docdir} %files %license COPYING %{_bindir}/%{srcname}-1 %dir %{python2_sitearch}/rdiff_backup %{python2_sitearch}/rdiff_backup/*.py %{python2_sitearch}/rdiff_backup/*.pyc %{python2_sitearch}/rdiff_backup/*.so %{python2_sitearch}/rdiff_backup/*.pyo %{python2_sitearch}/rdiff_backup-%{version}-py?.?.egg-info %changelog * Sat Sep 05 2020 Frank Crawford - 1.2.8-3 - Update required package for later versions of Fedora * Thu May 28 2020 Frank Crawford - 1.2.8-2 - Correct required packages for EPEL7 and older Fedora versions * Sun May 03 2020 Frank Crawford - 1.2.8-1 - Packaged for transition from version 1.2.8 to 2.0.0 - rdiff-backup renamed as rdiff-backp-1