# $Id: smeserver-rdiff-backup.spec,v 1.3 2008/11/25 16:20:29 slords Exp $ # Authority: gordonr # Name: Gordon Rowell Summary: SME Server rdiff-backup module %define name smeserver-rdiff-backup Name: %{name} %define version 0.0.1 %define release 19 Version: %{version} Release: %{release}%{?dist} License: GPL Group: SMEServer/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-rdiff-backup-0.0.1-crontab.patch Patch1: smeserver-rdiff-backup-0.0.1-filelist.patch Patch2: smeserver-rdiff-backup-0.0.1-exitstatus.patch Patch3: smeserver-rdiff-backup-0.0.1-defaults.patch Patch4: smeserver-rdiff-backup-0.0.1-remotebackups.patch Patch5: smeserver-rdiff-backup-0.0.1-backuppathidentityfile.patch Patch6: smeserver-rdiff-backup-0.0.1-removeolder.patch Patch7: smeserver-rdiff-backup-0.0.1-printstatistics.patch Patch8: smeserver-rdiff-backup-0.0.1-backuptime.patch Patch9: smeserver-rdiff-backup-0.0.1-backuppath.patch Patch10: smeserver-rdiff-backup-0.0.1-remoteport.patch Patch11: smeserver-rdiff-backup-0.0.1-remotehost.patch Patch12: smeserver-rdiff-backup-0.0.1-RemoteUser.patch Patch13: smeserver-rdiff-backup-0.0.1-StrictHostKeyChecking.patch Patch14: smeserver-rdiff-backup-0.0.1-backuptime.patch2 Patch15: smeserver-rdiff-backup-0.0.1-backupdisk.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: rdiff-backup BuildRequires: e-smith-devtools >= 1.13.1-03 AutoReqProv: no %description %name is an implementation of rdiff-backup on SME Server %changelog * Sun Apr 29 2007 Shad L. Lords - Clean up spec so package can be built by koji/plague * Thu Dec 07 2006 Shad L. Lords - Update to new release naming. No functional changes. - Make Packager generic * Tue Oct 17 2006 Gordon Rowell 0.0.1-19 - Add [backupdisk] samba share so admin can recover files from the last backup via filesharing * Tue Oct 17 2006 Gordon Rowell 0.0.1-18 - Revert last change as it fails on first-time setup * Thu Sep 14 2006 Gordon Rowell 0.0.1-17 - Perform cleanup of old backups prior to starting this one * Wed May 24 2006 Gordon Rowell 0.0.1-16 - Widen default hour range to 0..6, 19..23 - Fix zero migration issue for minute and hour * Fri May 19 2006 Gordon Rowell 0.0.1-15 - Disable StrictHostKeyChecking to backup host to ease initial setup. TODO: Set to no initially, grab the host key, and then set to yes * Fri May 19 2006 Gordon Rowell 0.0.1-14 - Add RemoteUser, defaulting to rdiff-backup * Thu May 18 2006 Gordon Rowell 0.0.1-13 - Prepend rdiff-backup to host to match /root/.ssh/config * Thu May 18 2006 Gordon Rowell 0.0.1-12 - Allow RemotePort specification as well as RemoteHost * Thu May 18 2006 Gordon Rowell 0.0.1-11 - Rewrite migrate fragment for BackupPath * Thu May 18 2006 Gordon Rowell 0.0.1-10 - Default to a random backup time, early in the morning * Thu May 18 2006 Gordon Rowell 0.0.1-09 - Print statistics during backup runs - TODO: This should be configurable * Thu May 18 2006 Gordon Rowell 0.0.1-08 - Expand /root/.ssh/config during package install/upgrade - Add RemoveOlderThan default of 6 weeks * Thu May 18 2006 Gordon Rowell 0.0.1-07 - Convert BackupPath to LocalPath - Configure a default for RemoteIdentity * Thu May 18 2006 Gordon Rowell 0.0.1-06 - Initial support for local and remote backups * Wed Apr 26 2006 Gordon Rowell 0.0.1-05 - Clean up first-time install - Add rdiff-backup{BackupPath} default * Wed Apr 26 2006 Gordon Rowell 0.0.1-04 - Use different exit statuses for each error * Wed Apr 26 2006 Gordon Rowell 0.0.1-03 - Fix path to filelist - Expand templates in post * Tue Apr 25 2006 Gordon Rowell 0.0.1-02 - Remove stray /etc/crontab file * Tue Apr 25 2006 Gordon Rowell 0.0.1-01 - Initial %prep %setup %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %build perl createlinks mkdir -p root/home/e-smith/files/rdiff-backup/.ssh %install /bin/rm -rf $RPM_BUILD_ROOT (cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) /bin/rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist \ --file '/sbin/e-smith/do_rdiff-backup' 'attr(0700,root,root)' \ --dir '/home/e-smith/files/rdiff-backup' 'attr(0700,rdiff-backup,rdiff-backup)' \ --dir '/home/e-smith/files/rdiff-backup/.ssh' 'attr(0700,rdiff-backup,rdiff-backup)' \ $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist %clean /bin/rm -rf $RPM_BUILD_ROOT %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %pre /sbin/e-smith/create-system-user rdiff-backup 1010 \ 'rdiff-backup user' /home/e-smith/files/rdiff-backup /bin/bash %post /etc/e-smith/events/actions/initialize-default-databases /sbin/e-smith/expand-template /etc/crontab /sbin/e-smith/expand-template /root/.ssh/config /sbin/e-smith/expand-template /etc/rdiff-backup.filelist /bin/true