smeserver-affa/smeserver-affa.spec

283 lines
10 KiB
RPMSpec
Raw Normal View History

Summary: A rsync-based backup program for linux, adapted to Koozali SME server 10
%define name smeserver-affa
Name: %{name}
%define version 4.0
%define release 4
Version: %{version}
Release: %{release}%{?dist}
Vendor: Michael Weinberger <mweinber AT users DOT sourceforge DOT net> //// adaptation to sme-server Arnaud Guillaume <smeserver-affa AT guedel DOT eu>
License: GNU General Public License
Group: Applications/Archiving
Source: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
BuildRequires: smeserver-devtools
AutoReq: no
Requires: smeserver-release >= 10
Requires: smeserver-systemd-control
Requires: openssh-clients
Requires: perl-Config-IniFiles
Requires: perl-Filesys-DiskFree
Requires: perl-MailTools
Requires: perl-Proc-ProcessTable
Requires: perl-TimeDate
Requires: perl-List-MoreUtils
Requires: rsync >= 3.1.2-11
#Patch1: smeserver-affa-add-some-systemd-support.patch
#Patch2: smeserver-affa-change-host-domain.patch
#Patch3: smeserver-affa-change_to_rsa_keys.patch
#Patch4: smeserver-affa-update-ssh-keys-links.patch
#Patch5: smeserver-affa-fix-config-directory-name-spaces.patch
#Patch6: smeserver-affa-fix-reporting-error.patch
#Patch7: smeserver-affa-fix-ssh-knownhosts-error.patch
#Patch8: smeserver-affa-fix-reporting-error-syntax.patch
#Patch9: smeserver-affa-fix-reporting-error-2.patch
#Patch10: smeserver-affa-fix-reporting-error-3.patch
%description
Affa is a rsync-based backup program for SMEServer + RPMCheck + Watchdog + rise. Documentation: http://affa.sf.net
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q -n %{name}-%{version}
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
#%patch6 -p1
#%patch7 -p1
#%patch8 -p1
#%patch9 -p1
#%patch10 -p1
%build
# perl createlinks << if required
find . \( -name .gitinclude -o -name .gitignore \) -print0 | \
xargs -0 rm -f
%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
# Set version String
cp -a $RPM_BUILD_ROOT/sbin/affa $RPM_BUILD_ROOT/sbin/affa.tmp
VERSIONSTRING=%{version}-`echo %{release}|sed -e 's/\..*$//'`
sed -e "s/my \$VERSION.*;/my \$VERSION='$VERSIONSTRING';/" < $RPM_BUILD_ROOT/sbin/affa.tmp > $RPM_BUILD_ROOT/sbin/affa
rm -f $RPM_BUILD_ROOT/sbin/affa.tmp
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--ignoredir "/etc/sudoers.d" \
--ignoredir "/etc/profile.d" \
--file "/etc/profile.d/affa.sh" "attr(0555,root,root)" \
--file "/etc/sudoers.d/affa" "attr(0440,root,root)" \
> %{name}-%{version}-filelist
# We could use this for docs I guess - we should standardise this sort of thing
#%doc README LICENSE README
echo "%doc LICENSE COPYING README WARRANTY" >> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist
%clean
rm -rf $RPM_BUILD_ROOT
%pre
exit 0
%post
exit 0
%preun
exit 0
%postun
exit 0
%changelog
* Wed Sep 11 2024 Brian Read <brianr@koozali.org> 4.0-4.sme
- Update requires to use smeserver- packages
* Tue Sep 10 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 4.0-3.sme
- Roll up patches and move to git repo [SME: 12338]
* Tue Sep 10 2024 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Mon Sep 09 2024 John Crisp <jcrisp@safeandsoundit.co.uk> 4.0-2.sme
- Various fixes for rise
* Fri Apr 21 2023 John Crisp <jcrisp@safeandsoundit.co.uk>4.0-1.sme
- Update to v4
- Accomodate latest rsync to user@i.p.ad.dress:// format
- Rewrite the include and exclude routines
- Fix multiple small bugs
- Fix restore of selected backup or rise e.g daily.3 or monthly.1
- Add --cli-debug option
- Add --link-dest check in rise
* Tue Jul 05 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-11
- Update Regex to help clean out rsyncd.motd messages [SME: 12084]
* Mon Jul 04 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-10
- Redo patch at -8 to fix the next if syntax [SME: 12084]
* Mon Jul 04 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-9
- Fix my syntax errors from [SME: 11784]
* Thu Jun 30 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-8
- Fix KnownHosts error [SME: 12081]
- Thanks to 'gieres' for finding this
* Thu Jun 30 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-7
- Fix logging parse errors [SME: 12084]
- Thanks to 'sti' for finding it
* Thu Jun 30 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-6
- Fix error with files with spaces in names - Credit to Trevor Drake-Brockman [SME: 11784]
- Fix directory search - Credit to Trevor Drake-Brockman [SME: 11784]
* Wed Sep 22 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-5
- Modify ssh key links [SME: 10783]
- Untidy the ssh commands so I can see them and tidy them more easily
* Wed Sep 22 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-4
- Change ssh keys from DSA to RSA 4096 [SME: 10783]
- Fix missing /var/affa store dir
* Tue Sep 21 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-3.sme
- Fix some syntax errors. Migrate to using HostName/DomainName
* Tue Sep 21 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-2.sme
- Add some systemd support [SME: 11024]
* Mon Mar 29 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-1.sme
- Fix Warranty [SME: 11500]
- Fix Licence [SME: 11501]
- Remove atalk [SME: 11503]
* Tue Mar 23 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.0-1.sme
- New version for Koozali SME v10 [SME: 11024]
- incorporated old patches
- tidied up some old git files
- Very Alpha - see bug for details
* Mon Apr 10 2017 Arnaud Guillaume <smeserver-affa@guedel.eu> 3.2.2.3-8.sme
- Fix issue when multiple times are in an Affa configuration file, show-schedule only displays the last [SME: 10196]
* Wed Nov 23 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 3.2.2.3-7.sme
- Fix find command error in delete imap dovecot files [SME: 9874]
* Fri Aug 19 2016 Arnaud Guillaume <smeserver-affa@guedel.eu> 3.2.2.3-6.sme
- Fix issue due to blank characters into file /etc/affa/job.conf [SME: 9449]
* Fri Aug 19 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 3.2.2.3-5.sme
- Fix ssh port [SME: 8904]
- Modify changelog number to track define release number
* Wed Mar 23 2016 Arnaud Guillaume <smeserver-affa@guedel.eu> 3.2.2.3-4.sme
- Fix use of uninitialized value $1 in concatentation (.) or string at /sbin/affa/ line 4059 [SME: 9139]
- Fix "RPMCheck" not working [SME: 9270]
- Fix Inconsistent smb.conf when samba share option set to "yes" [SME: 9298]
- Fix affa --diskusage does not umount attached storage [SME: 9147]
* Mon Feb 29 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 3.2.2.3-3.sme
- Fix typos in config files [SME: 9094]
* Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 3.2.2.3-2.sme
- Initial release to contribs9
* Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 3.2.2.3-1
- fixed column ExecTime shift
- Adjusted column indices in report
- Fixed typo in remoteHostName [SME: 9062]
- Code done by mats schuh <m.schuh@neckargeo.net>
* Tue Jan 13 2015 mats schuh <m.schuh@neckargeo.net> 3.2.2.2-1
- Added TotalBytesSent to archive reports and fixed report layout
* Sun Dec 07 2014 Arnaud Guillaume 3.2.2.2
- integration of the patch of Mats Schuh in order to enable check for external disk label before unmount
* Sat Aug 23 2014 Arnaud Guillaume 3.2.2.1
- adapted to the new release of rsync (bug by calculating the number and the size of the transfered files)
* Sat Apr 05 2014 Arnaud Guillaume 3.2.2.0
- first adaptation for sme server8
* Sun Mar 04 2012 Michael Weinberger 3.2.2
- Improved NRPE and sudoers config
- Fixed bug in DiskUsageRaw()
- Added NRPE command affa_diskusagenrpe
* Fri Mar 02 2012 Michael Weinberger 3.2.1
- Bugfix: command_prefix definiton was not added to /etc/nagios/affa-nrpe.cfg
* Thu Mar 01 2012 Michael Weinberger 3.2.0
- Bugfix: remoteRsyncBinary and localRsyncBinary was not used
* Sun Feb 26 2012 Michael Weinberger 3.1.7
- Bugfixes in showSchedule()
* Sun Feb 26 2012 Michael Weinberger 3.1.6
- added ICINGA/Nagios auto-configuration
* Fri Feb 24 2012 Michael Weinberger 3.1.4
- do not show Dedup interrupted in --status after the very first run
- improved --nrpe function
- added script yum_install_packages.sh
* Tue Oct 11 2011 Michael Weinberger 3.1.3
- MINOR IMPROVEMENTS
--send-key: mkdir of RemoteAuthorizedKeysFile. Avoid errors if dir does not exist
--log-tail: show last rotated if current log is empty or too short
--check-conncetions: allow jobs as arguments
* Mon Aug 29 2011 Michael Weinberger 3.1.2
- Bugfix: postJobCommand and postJobCommandRemote were not executed
* Sat Aug 13 2011 Michael Weinberger 3.1.1
- process state 'rsync interrupted' and 'dedup interrupted'
- --resume-interrupted
- resume interrupted jobs after server boot
* Sun Aug 07 2011 Michael Weinberger 3.1.0-1
- introduced status 'interrupted'(with --status)
* Fri Aug 05 2011 Michael Weinberger 3.1.0-0
- Release of 3.1.0
* Thu Aug 04 2011 Michael Weinberger 3.0.2-14
- de-duplicate, execPreJobCommand and execPostJobCommand only on scheduled run
- removed Command arg from sample scripts
- Fixed: Concatenated config in /tmp was world readable
- De-duplication info added to --show-schedule
* Tue Aug 02 2011 Michael Weinberger 3.0.2-6
- De-Duplication (freedup)
- De-Dup info in --status and --list-archives
- --status: only show enabled jobs. All with --all
- Fix: property globalStatus was not working
- Running state rsync or de-deduplicating display in --status
- Show de-deduplicating busy in --list-archives for scheduled.0
- new property dedupKill. When set no, --kill does not kill a job when de-duplicating
- new option --show-property
* Wed Jul 27 2011 Michael Weinberger 3.0.1-7
- Bug fixes: RemoteUser was not always used in ssh commands
* Sun Jul 24 2011 Michael Weinberger 3.0.1-6
- fixed bug in affa --status
- GlobalAffaConfig was mounted as Samba share
- call setupSamba() only in cronSetup()
- updated man
* Sat Jul 23 2011 Michael Weinberger 3.0.1-5
- new key NRPEtrigger
- full affa path required when starting re-run from cronjob
- improved deletion of shift out archives, --delete-job and --cleanup
- added --single-transaction to /etc/affa/scripts/mysql-dump-tables
* Wed Jul 20 2011 Michael Weinberger 3.0.0-0
- generic linux version made from Affa 2.0 (SME Version)
* Mon Apr 02 2007 Michael Weinberger
- bash version re-written in Perl