--- rpms/smeserver-affa/contribs8/smeserver-affa.spec 2013/02/05 21:26:53 1.1 +++ rpms/smeserver-affa/contribs8/smeserver-affa.spec 2013/12/15 16:50:26 1.3 @@ -1,31 +1,176 @@ -# $Id: smeserver-affa.spec,v 1.20 2008/11/25 16:20:17 slords Exp $ -# Authority: mweinber -# Name: Michael Weinberger - -Summary: Makes the SME server a dedicated rsync based backup server +Summary: Makes the SME server a dedicated backup server %define name smeserver-affa Name: %{name} -%define version 1.0.0 -%define release 3 +%define version 2.0.0 +%define release rc5 Version: %{version} Release: %{release}%{?dist} -License: GNU GPL (GNU General Public License) +Vendor: Michael Weinberger +License: GNU General Public License Group: Applications/Archiving Source: %{name}-%{version}.tar.gz +Patch0: smeserver-affa-2.0.0-change-path-to-yum.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: noarch AutoReq: no -Requires: smeserver-release >= 7 +Requires: smeserver-release >= 7.3 +Requires: rsync >= 3.0.4 Requires: perl-Filesys-DiskFree +Requires: perl-Compress-Bzip2 BuildRequires: e-smith-devtools -Patch0: smeserver-affa-1.0.0-bug4210.patch -Patch1: smeserver-affa-1.0.0-desktop.patch %description -Main purpose ist to make the SME server a dedicated rsync based backup server. -Also providing functions to backup to USB disks or SMB shares in SOHO environments. +http://wiki.contribs.org/Affa +http://wiki.contribs.org/Backup_of_ESXi_Virtual_Machines_using_Affa + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 + +%build + +%install +rm -rf $RPM_BUILD_ROOT +rm -f %{name}-%{version}-filelist +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) + +perl createlinks $RPM_BUILD_ROOT + +# Set version String +cp -a $RPM_BUILD_ROOT/sbin/e-smith/affa $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp +VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'` +sed -e "s/my \$VERSION.*;/my \$VERSION='$VERSIONSTRING';/" < $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp > $RPM_BUILD_ROOT/sbin/e-smith/affa +rm -f $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp + +rm -f %{name}-%{version}-filelist + +find $RPM_BUILD_ROOT -depth -type f -print |\ + sed -e "s@^$RPM_BUILD_ROOT@@g" \ + -e "s@^/sbin/e-smith/@%attr(0750,root,root) &@"\ + -e "s@^/usr/lib/perl5/@%attr(0644,root,root) &@"\ + -e "s@^/etc/profile.d/@%attr(0555,root,root) &@"\ + -e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\ + -e "s@^/usr/lib/affa/COPYING@%attr(0444,root,root) &@"\ + -e "s@^/usr/lib/affa/@%attr(0750,root,root) &@"\ + >> %{name}-%{version}-filelist + +find $RPM_BUILD_ROOT -depth -type l -print |\ + sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT +exit 0 + + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root) %changelog +* Sun Dec 15 2013 JP Pialasse 2.0.0-rc5 +- yum path bug fix [SME: 5661] + +* Sun Jan 25 2009 Michael Weinberger 2.0.0-rc4 + Bugfix: --send-status was broken + Added disk usages to Success Message + +* Fri Jan 23 2009 Michael Weinberger 2.0.0-rc3 + Bugfix: --mailtest: mail from remote watchdog was not sent + +* Sun Jan 10 2009 Michael Weinberger 2.0.0-rc2 +- Workaround to catch Dropbear rsync errors (ESXi Mode) + +* Sun Jan 04 2009 Michael Weinberger 2.0.0-rc1 +- no changes + +* Fri Jan 02 2009 Michael Weinberger 2.0.0-beta21 +- show last execution time in --show-schedule + +* Thu Jan 01 2009 Michael Weinberger 2.0.0-beta20 +- Fixed calculation of compression rate in chunkfile() +- Changed format of --list-archives output: added Exec Time and Bytes received +- Changed format of --status: added Exec Time, removed Disk usage +- Output formatted table in --disk-usage +- added --debug CLI switch + + +* Tue Dec 30 2008 Michael Weinberger 2.0.0-beta19 +- Retry feature added, new props RetryAfter,RetryAttempts and RetryNotification +- Dependency rsync >= 3.0.4 added to spec file +- Append job status on testmail (because spam filter on receiver site) +- log total execution time + +* Fri Dec 26 2008 Michael Weinberger 2.0.0-beta18 +- bugfix check-connections: in ssh check in rsyncd mode +- Bug 4888 fixed: escape single quotes in source dir names +- Bug 4882 fixed: LVM mapped devices + +* Fri Dec 19 2008 Michael Weinberger 2.0.0-beta17 +- dont chunk ESXi vmdk files in linkdest archive that will be deleted afterwards +- show disk usage at time at job run in --status +- new option --disk-usage shows current disk usage of all Root Dirs +- Bug 4852 fixed +- Modifications to allow backup of specific files (Bug 4853) + +* Thu Dec 11 2008 Michael Weinberger 2.0.0-beta16 +- shorten command line of rsync command when syncing ESXi VM. Dropbear has limits + +* Wed Dec 10 2008 Michael Weinberger 2.0.0-beta15 +- chunk feature now working for all job types +- new property chunkFiles +- new options --chunk-archive and --unchunk-archive + +* Mon Dec 08 2008 Michael Weinberger 2.0.0-beta14 +- --delete-job: Delete logfile +- samba template for Affa archives +- Bugfix: snapshot was removed to early. Wrong vmx file copied +- disabled chunk feature for now. Needs more testing + +* Sun Dec 07 2008 Michael Weinberger 2.0.0-beta12 +- using perl Compress::Bzip2 + +* Sat Dec 06 2008 Michael Weinberger 2.0.0-beta11 +- replaced gzip by bzip2 as gzip inserts timestamps + +* Wed Dec 04 2008 Michael Weinberger 2.0.0-beta10 +- bugfixes + +* Wed Dec 04 2008 Michael Weinberger 2.0.0-beta09 +- chunk and compress vmdk files + +* Thu Nov 27 2008 Michael Weinberger 2.0.0-beta08 +- allow special characters in VM name and pathes + +* Tue Nov 11 2008 Michael Weinberger 2.0.0-beta07 +- New Dropbear Version 0.51 did not work stable. Stay with original 0.49 and th exit status bug +- Modified Affa to not to check exit status of ssh and rsync command + +* Sat Nov 08 2008 Michael Weinberger 2.0.0-beta06 +- FIXED: rsync did not work for VM with blanks in name +- SSH exit codes now checked as Dropbear 0.51 is used on ESX3i host + +* Tue Nov 04 2008 Michael Weinberger 2.0.0-beta05 +- log msg and exit if VI Pert Tool Kit installed +- Fixed: in job sample scripts create affa db if not exists + +* Tue Nov 04 2008 Michael Weinberger 2.0.0-beta04 +- Allow setups with dailyKeep=0, weeklyKeep=0, monthlyKeep=0 or yearlyKeep=0 +- Fixed: Yearly archives not listed in --status and --list-archives + +* Mon Nov 03 2008 Michael Weinberger 2.0.0-beta03 +- cleaner logging of VI API errors +- backing up ESXi server config and root home dir +- Checking VI API connect in --check-connections + +* Sun Nov 02 2008 Michael Weinberger 2.0.0-beta02 +- Fixed: Log file excerpt was not appened to Email. +- Fixed: checkConnection() did not work for ESXi +- Fixed: ssh find command did not use the HostKeyAlias option +- Catch die from VI Toolkit +- Close VI API session while rsyncing + +* Fri Oct 31 2008 Michael Weinberger 2.0.0-beta01 +- ESXi support added + * Tue May 27 2008 Michael Weinberger 1.0.0-3 Re-added type 'desktop' to pre-backup event for SME6 compatibility * Tue Apr 22 2008 Michael Weinberger 1.0.0-2 @@ -335,44 +480,3 @@ Also providing functions to backup to US * Mon Apr 02 2007 Michael Weinberger - initial release -%prep -%setup -q -n %{name}-%{version} -%patch0 -p1 -%patch1 -p1 - -%build - -%install -rm -rf $RPM_BUILD_ROOT -rm -f %{name}-%{version}-filelist -(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) - -perl createlinks $RPM_BUILD_ROOT - -# Set version String -cp -a $RPM_BUILD_ROOT/sbin/e-smith/affa $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp -VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'` -sed -e "s/my \$VERSION.*;/my \$VERSION='$VERSIONSTRING';/" < $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp > $RPM_BUILD_ROOT/sbin/e-smith/affa -rm -f $RPM_BUILD_ROOT/sbin/e-smith/affa.tmp - -rm -f %{name}-%{version}-filelist - -find $RPM_BUILD_ROOT -depth -type f -print |\ - sed -e "s@^$RPM_BUILD_ROOT@@g" \ - -e "s@^/sbin/e-smith/@%attr(0750,root,root) &@"\ - -e "s@^/etc/profile.d/@%attr(0755,root,root) &@"\ - -e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\ - -e "s@^/usr/lib/affa/COPYING@%attr(0444,root,root) &@"\ - -e "s@^/usr/lib/affa/@%attr(0750,root,root) &@"\ - >> %{name}-%{version}-filelist - -find $RPM_BUILD_ROOT -depth -type l -print |\ - sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist - -%clean -rm -rf $RPM_BUILD_ROOT -exit 0 - - -%files -f %{name}-%{version}-filelist -%defattr(-,root,root)